BARGS
    Preparing search index...

    Type Alias InferParserValues<T>

    InferParserValues: T extends CallableOptionsParser<infer V>
        ? V
        : T extends Parser<infer V, readonly unknown[]> ? V : never

    Extract the inferred values type from a CallableOptionsParser or Parser.

    Useful for getting the type of global options to use elsewhere in your code.

    Type Parameters

    • T
    const globalOptions = opt.options({
    verbose: opt.boolean(),
    'output-dir': opt.string(),
    });

    // Extract the type for use elsewhere
    type GlobalOpts = InferParserValues<typeof globalOptions>;
    // { verbose: boolean | undefined; 'output-dir': string | undefined }