RoadmapShopEvents
Skip to main content

Home > @rushstack/ts-command-line > CommandLineIntegerListParameter

CommandLineIntegerListParameter class

The data type returned by CommandLineParameterProvider.defineIntegerListParameter().

Signature:

export declare class CommandLineIntegerListParameter extends CommandLineParameterWithArgument 

Extends: CommandLineParameterWithArgument

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 CommandLineIntegerListParameter class.

Properties

PropertyModifiersTypeDescription
argumentNamereadonlystring

The name of the argument, which will be shown in the command-line help.

(Inherited from CommandLineParameterWithArgument)

completionsreadonly(() => Promise<string[]>) | undefined

An optional callback that provides a list of custom choices for tab completion.

(Inherited from CommandLineParameterWithArgument)

descriptionreadonlystring

Documentation for the parameter that will be shown when invoking the tool with "--help"

(Inherited from CommandLineParameter)

environmentVariablereadonlystring | undefined

The name of an environment variable that the parameter value will be read from, if it was omitted from the command-line. An error will be reported if the environment value cannot be parsed.

(Inherited from CommandLineParameter)

kindreadonlyCommandLineParameterKindIndicates the type of parameter.
longNamereadonlystring

The long name of the flag including double dashes, e.g. "--do-something"

(Inherited from CommandLineParameter)

parameterGroupreadonlystring | typeof SCOPING_PARAMETER_GROUP | undefined

An optional parameter group name, shown when invoking the tool with "--help"

(Inherited from CommandLineParameter)

parameterScopereadonlystring | undefined

An optional parameter scope name, used to add a scope-prefixed parameter synonym, e.g. "--scope:do-something". Scopes provide additional flexibility for parameters in conflict resolution since when a scope is specified, parameters that have conflicting long names will be defined using only the scope-prefixed name.

(Inherited from CommandLineParameter)

requiredreadonlyboolean

If true, then an error occurs if the parameter was not included on the command-line.

(Inherited from CommandLineParameter)

scopedLongNamereadonlystring | undefined

If a parameterScope is provided, returns the scope-prefixed long name of the flag, including double dashes, eg. "--scope:do-something". Otherwise undefined.

(Inherited from CommandLineParameter)

shortNamereadonlystring | undefined

An optional short name for the flag including the dash, e.g. "-d"

(Inherited from CommandLineParameter)

undocumentedSynonymsreadonlystring[] | undefined

Specifies additional names for this parameter that are accepted but not displayed in the command line help.

(Inherited from CommandLineParameter)

valuesreadonlyReadonlyArray<number>Returns the integer arguments for an integer list parameter that was parsed from the command line.

Methods

MethodModifiersDescription
appendToArgList(argList)Append the parsed values to the provided string array.
reportInvalidData(data)protected

Internal usage only. Used to report unexpected output from the argparse library.

(Inherited from CommandLineParameter)

validateDefaultValue(hasDefaultValue)protected(Inherited from CommandLineParameter)