Home > @rushstack/ts-command-line > IBaseCommandLineDefinitionWithArgument
IBaseCommandLineDefinitionWithArgument interface
The common base interface for parameter types that accept an argument.
Signature:
export interface IBaseCommandLineDefinitionWithArgument extends IBaseCommandLineDefinition
Extends: IBaseCommandLineDefinition
Remarks
An argument is an accompanying command-line token, such as "123" in the example "--max-count 123".
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
argumentName | string | The name of the argument, which will be shown in the command-line help. | |
completions? | () => Promise<string[]> | (Optional) An optional callback that provides a list of custom choices for tab completion. | |
description | string | Documentation for the parameter that will be shown when invoking the tool with "--help" (Inherited from IBaseCommandLineDefinition) | |
environmentVariable? | string | (Optional) 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 IBaseCommandLineDefinition) | |
parameterGroup? | string | typeof SCOPING_PARAMETER_GROUP | (Optional) An optional parameter group name, shown when invoking the tool with "--help" (Inherited from IBaseCommandLineDefinition) | |
parameterLongName | string | The long name of the flag including double dashes, e.g. "--do-something" (Inherited from IBaseCommandLineDefinition) | |
parameterScope? | string | (Optional) 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 IBaseCommandLineDefinition) | |
parameterShortName? | string | (Optional) An optional short name for the flag including the dash, e.g. "-d" (Inherited from IBaseCommandLineDefinition) | |
required? | boolean | (Optional) If true, then an error occurs if the parameter was not included on the command-line. (Inherited from IBaseCommandLineDefinition) | |
undocumentedSynonyms? | string[] | (Optional) Specifies additional names for this parameter that are accepted but not displayed in the command line help. (Inherited from IBaseCommandLineDefinition) |