Home > @microsoft/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:

CommandLineChoiceParameter

Remarks

Example: example-tool –log-level warn