Type Alias ArgConfig

ArgConfig: {
    action?: Action;
    alias?: string;
    choices?: unknown[];
    const?: unknown;
    default?: unknown;
    description?: string;
    name: string;
    nargs?: NArgs;
    required?: boolean;
    type: ArgType;
    validator?: (value: unknown) => boolean;
}

Configuration for an argument.

Type declaration

  • Optionalaction?: Action

    A custom action for the argument.

  • Optionalalias?: string

    An optional alias for the argument.

  • Optionalchoices?: unknown[]

    Allowed values for the argument.

  • Optionalconst?: unknown

    A constant value for the argument.

  • Optionaldefault?: unknown

    The default value of the argument.

  • Optionaldescription?: string

    A description of the argument.

  • name: string

    The name of the argument.

  • Optionalnargs?: NArgs

    Whether the argument is required.

  • Optionalrequired?: boolean

    Whether the argument is required.

  • type: ArgType

    The type of the argument.

  • Optionalvalidator?: (value: unknown) => boolean

    A custom validator function for the argument value.