const types in getOpt
This commit is contained in:
parent
63f40309c7
commit
44fe2165d2
1 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ type ParsedOptions<P extends Options, V extends string | TextPiece> = {
|
|||
error?: string;
|
||||
};
|
||||
|
||||
export function getOpt<P extends Options>(
|
||||
export function getOpt<const P extends Options>(
|
||||
argv: TextPiece[],
|
||||
options: P,
|
||||
procBody: (
|
||||
|
@ -60,7 +60,7 @@ export function getOpt<P extends Options>(
|
|||
}
|
||||
}
|
||||
|
||||
export function getOptRaw<P extends Options>(
|
||||
export function getOptRaw<const P extends Options>(
|
||||
argv: TextPiece[],
|
||||
options: P,
|
||||
procBody: (
|
||||
|
@ -95,7 +95,7 @@ export function getOptRaw<P extends Options>(
|
|||
|
||||
const SWITCH_REGEX = /^-([^]*)/;
|
||||
|
||||
function getOptCore<P extends Options>(
|
||||
function getOptCore<const P extends Options>(
|
||||
argv: TextPiece[],
|
||||
options: P
|
||||
): [ParsedOptions<P, TextPiece>, TextPiece[]] {
|
||||
|
|
Loading…
Reference in a new issue