RoadmapShopEvents
Skip to main content

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](/pages/ts-command-line.ibasecommandlinedefinition)

Properties

PropertyTypeDescription
alternativesstring[]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.