Function getOptionKeys

  • Get all keys for an option, including the option key, aliases, and camelCased versions of each.

    Parameters

    • configKey: PropertyKey

      The option's key in the command's options config.

    • config:
          | (
              { type: "string"; customType?: OptionCustomType<"string"> | undefined; choices?: string[] | undefined; string?: boolean | undefined; alias?: MaybeReadonly<string[]> | undefined; description?: string | undefined; required?: boolean | undefined; requires?: MaybeReadonly<...> | undefined; conflicts?: MaybeReadonly<...>...
          )
          | (
              { type: "number"; customType?: "number" | undefined; choices?: string[] | undefined; string?: boolean | undefined; alias?: MaybeReadonly<string[]> | undefined; description?: string | undefined; required?: boolean | undefined; requires?: MaybeReadonly<...> | undefined; conflicts?: MaybeReadonly<...> | undefined; } & ...
          )
          | (
              { type: "boolean"; customType?: "boolean" | undefined; choices?: string[] | undefined; string?: boolean | undefined; alias?: MaybeReadonly<string[]> | undefined; description?: string | undefined; required?: boolean | undefined; requires?: MaybeReadonly<...> | undefined; conflicts?: MaybeReadonly<...> | undefined; } ...
          )
          | (
              { type: "secret"; customType?: OptionCustomType<"secret"> | undefined; choices?: string[] | undefined; string?: boolean | undefined; alias?: MaybeReadonly<string[]> | undefined; description?: string | undefined; required?: boolean | undefined; requires?: MaybeReadonly<...> | undefined; conflicts?: MaybeReadonly<...>...
          )
          | (
              { type: "array"; customType?: "array" | undefined; choices?: string[] | undefined; string?: boolean | undefined; alias?: MaybeReadonly<string[]> | undefined; description?: string | undefined; required?: boolean | undefined; requires?: MaybeReadonly<...> | undefined; conflicts?: MaybeReadonly<...> | undefined; } & ({...
          )

      The option's config entry.

    Returns string[]