Skip to main content

Type Alias: ParserOptions<T>

ParserOptions<T>: object

Extra options for the parser

Type Parameters

T extends ParsedArgs = ParsedArgs

Type declaration

extraParsers?

optional extraParsers: Record<string, Parser<any>>

Can be used to implement custom parser types.

unmatchedParser()?

optional unmatchedParser: (arg, tokens, parser) => boolean

Can be used to implement custom handling for unmatched arguments.

Parameters

arg: string

tokens: string[]

parser: ArgvParser<T>

Returns

boolean

true if the argument was handled, false if it was not

Defined in

packages/parser/src/lib/parser.ts:55