Type Alias WithSelection

WithSelection: {
    choices?: ReadonlyArray<string>;
    mapping?: Readonly<Record<string, unknown>>;
    normalize?: NormalizationCallback;
    regex?: RegExp;
}

Defines attributes for options that may have parameter selection constraints.

Type declaration

  • Optional Readonlychoices?: ReadonlyArray<string>

    The allowed parameter values.

  • Optional Readonlymapping?: Readonly<Record<string, unknown>>

    The mapping of parameter values to option values.

  • Optional Readonlynormalize?: NormalizationCallback

    A normalization function applied to parameters before they get validated and/or parsed.

  • Optional Readonlyregex?: RegExp

    The regular expression that parameters should match.