Home > @rushstack/ts-command-line > ICommandLineChoiceDefinition
ICommandLineChoiceDefinition interface
For use with CommandLineParameterProvider.defineChoiceParameter(), this interface defines a command line parameter which is constrained to a list of possible options.
Signature:
export interface ICommandLineChoiceDefinition extends IBaseCommandLineDefinition
Extends: IBaseCommandLineDefinition
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
alternatives | string[] | A list of strings (which contain no spaces), of possible options which can be selected | |
completions? | () => Promise<string[]> | (Optional) An optional callback that provides a list of custom choices for tab completion. | |
defaultValue? | string | (Optional) The default value which will be used if the parameter is omitted from the command line. |