Extract the inferred values type from a CallableOptionsParser or Parser.
Useful for getting the type of global options to use elsewhere in your code.
const globalOptions = opt.options({ verbose: opt.boolean(), 'output-dir': opt.string(),});// Extract the type for use elsewheretype GlobalOpts = InferParserValues<typeof globalOptions>;// { verbose: boolean | undefined; 'output-dir': string | undefined } Copy
const globalOptions = opt.options({ verbose: opt.boolean(), 'output-dir': opt.string(),});// Extract the type for use elsewheretype GlobalOpts = InferParserValues<typeof globalOptions>;// { verbose: boolean | undefined; 'output-dir': string | undefined }
Extract the inferred values type from a CallableOptionsParser or Parser.
Useful for getting the type of global options to use elsewhere in your code.