Home > @rushstack/ts-command-line > CommandLineParameterProvider > defineChoiceParameter
CommandLineParameterProvider.defineChoiceParameter() method
Defines a command-line parameter whose value must be a string from a fixed set of allowable choices (similar to an enum).
Signature:
defineChoiceParameter(definition: ICommandLineChoiceDefinition): CommandLineChoiceParameter;
Parameters
Parameter | Type | Description |
---|---|---|
definition | ICommandLineChoiceDefinition |
Returns:
Remarks
Example of a choice parameter:
example-tool --log-level warn