Home > @rushstack/ts-command-line > CommandLineChoiceParameter
CommandLineChoiceParameter class
The data type returned by CommandLineParameterProvider.defineChoiceParameter().
Signature:
export declare class CommandLineChoiceParameter<TChoice extends string = string> extends CommandLineParameterBase
Extends: CommandLineParameterBase
Remarks
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the CommandLineChoiceParameter class.
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| ReadonlySet<TChoice> | A list of strings (which contain no spaces), of possible options which can be selected | |
| (() => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>) | undefined | An optional callback that provides a list of custom choices for tab completion. | |
| TChoice | undefined | The default value which will be used if the parameter is omitted from the command line. | |
| Indicates the type of parameter. | ||
| TChoice | undefined | Returns the argument value for a choice parameter that was parsed from the command line. |
Methods
Method | Modifiers | Description |
|---|---|---|
Append the parsed values to the provided string array. |