Type Alias OptionsGetter<TOptions>

OptionsGetter<TOptions>: {
    [K in keyof TOptions as K | OptionAlias<TOptions[K]> | CamelCase<K | OptionAlias<TOptions[K]>>]: OptionGetter<CommandOptionType<TOptions[K]>>
} & {
    values: {
        [K in keyof TOptions as K | OptionAlias<TOptions[K]> | CamelCase<K | OptionAlias<TOptions[K]>>]: CommandOptionType<TOptions[K]>
    };
    get<K>(optionNames: K[]): Promise<{
        [O in string | number | symbol as O | CamelCase<O>]: CommandOptionsTypes<TOptions>[O]
    }>;
}

An object that can be used to dynamically retrieve the values of command options, including aliases. Options can be retrieved by their original key, any of their aliases, or camelCased versions of either.

Type Parameters

Type declaration

  • Readonlyvalues: {
        [K in keyof TOptions as K | OptionAlias<TOptions[K]> | CamelCase<K | OptionAlias<TOptions[K]>>]: CommandOptionType<TOptions[K]>
    }

    Direct access to the values of the options, keyed by their original keys, aliases, and camelCased versions of both. This is useful for checking option values without triggering any validation or prompting.

  • get:function
    • Get the values of the specified options. This is useful when you want to get the values of multiple options at once.

      Type Parameters

      • K extends string | number | symbol

      Parameters

      • optionNames: K[]

        The names of the options to get.

      Returns Promise<{
          [O in string | number | symbol as O | CamelCase<O>]: CommandOptionsTypes<TOptions>[O]
      }>

      An object with the values of the specified options keyed by both their original keys and camelCased keys.