Function getAnyOption

  • Transform TypeBox schema and options appended in schema to yargs options.

    Type Parameters

    Parameters

    • type: T

      type of the yargs option

    • schema: S

      TypeBox schema to transform

    • overwrites: O = ...

      overwrites for yargs options result

    Returns {
        alias: undefined | string | readonly string[];
        coerce: undefined | ((arg: any) => any);
        config: undefined | boolean;
        configParser: undefined | ((configPath: string) => object);
        conflicts:
            | undefined
            | string
            | readonly string[]
            | {
                [key: string]: string | readonly string[];
            };
        count: undefined | boolean;
        default: undefined | Static<S>;
        defaultDescription: undefined | string;
        demandOption: string | boolean;
        deprecated: undefined | string | boolean;
        describe: undefined | string;
        global: undefined | boolean;
        group: undefined | string;
        hidden: undefined | boolean;
        implies:
            | undefined
            | string
            | readonly string[]
            | {
                [key: string]: string | readonly string[];
            };
        nargs: undefined | number;
        normalize: undefined | boolean;
        requiresArg: undefined | boolean;
        skipValidation: undefined | boolean;
        type: T;
    } & O

    applicable yargs options in schema and overwrites