Type Alias WithValue<P>

WithValue: {
    cluster?: string;
    default?: KnownValue | DefaultValueCallback;
    parse?: ParsingCallback<P>;
    required?: true;
    requiredIf?: Requires;
    requires?: Requires;
}

Defines attributes common to options that have values.

Type Parameters

  • P

    The type of parse parameter

Type declaration

  • Optional Readonlycluster?: string

    The letters used for clustering in short-option style (e.g., 'fF').

  • Optional Readonlydefault?: KnownValue | DefaultValueCallback

    Te default value or a callback that returns the default value.

    The default value is set at the end of the parsing loop if the option was specified neither on the command-line nor as an environment variable. You may use a callback to inspect parsed values and determine the default value based on those values.

  • Optional Readonlyparse?: ParsingCallback<P>

    A custom callback for parsing the option parameter(s).

  • Optional Readonlyrequired?: true

    True if the option is always required.

  • Optional ReadonlyrequiredIf?: Requires

    The conditional requirements.

  • Optional Readonlyrequires?: Requires

    The forward requirements.