RoadmapShopEvents
Skip to main content

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

DynamicCommandLineAction class

Signature:

export declare class DynamicCommandLineAction extends CommandLineAction 

Extends: CommandLineAction

Constructors

ConstructorModifiersDescription
(constructor)(options)

Constructs a new instance of the CommandLineAction class

(Inherited from CommandLineAction)

Properties

PropertyModifiersTypeDescription
actionNamereadonlystring

The name of the action. For example, if the tool is called "example", then the "build" action might be invoked as: "example build -q --some-other-option"

(Inherited from CommandLineAction)

documentationreadonlystring

A detailed description that is shown on the action help page, which is displayed by the command "example build --help", e.g. for actionName="build".

(Inherited from CommandLineAction)

parametersreadonlyReadonlyArray<CommandLineParameter>

Returns a collection of the parameters that were defined for this object.

(Inherited from CommandLineParameterProvider)

parametersProcessedreadonlyboolean

Informs the caller if the argparse data has been processed into parameters.

(Inherited from CommandLineParameterProvider)

remainderreadonlyCommandLineRemainder | undefined

If CommandLineParameterProvider.defineCommandLineRemainder() was called, this object captures any remaining command line arguments after the recognized portion.

(Inherited from CommandLineParameterProvider)

summaryreadonlystring

A quick summary that is shown on the main help page, which is displayed by the command "example --help"

(Inherited from CommandLineAction)

Methods

MethodModifiersDescription
defineChoiceListParameter(definition)

Defines a command-line parameter whose value must be a string from a fixed set of allowable choices (similar to an enum). The parameter can be specified multiple times to build a list.

(Inherited from CommandLineParameterProvider)

defineChoiceParameter(definition)

Defines a command-line parameter whose value must be a string from a fixed set of allowable choices (similar to an enum).

(Inherited from CommandLineParameterProvider)

defineCommandLineRemainder(definition)

Defines a rule that captures any remaining command line arguments after the recognized portion.

(Inherited from CommandLineParameterProvider)

defineFlagParameter(definition)

Defines a command-line switch whose boolean value is true if the switch is provided, and false otherwise.

(Inherited from CommandLineParameterProvider)

defineIntegerListParameter(definition)

Defines a command-line parameter whose argument is an integer. The parameter can be specified multiple times to build a list.

(Inherited from CommandLineParameterProvider)

defineIntegerParameter(definition)

Defines a command-line parameter whose argument is an integer.

(Inherited from CommandLineParameterProvider)

defineStringListParameter(definition)

Defines a command-line parameter whose argument is a single text string. The parameter can be specified multiple times to build a list.

(Inherited from CommandLineParameterProvider)

defineStringParameter(definition)

Defines a command-line parameter whose argument is a single text string.

(Inherited from CommandLineParameterProvider)

getChoiceListParameter(parameterLongName, parameterScope)

Returns the CommandLineChoiceListParameter with the specified long name.

(Inherited from CommandLineParameterProvider)

getChoiceParameter(parameterLongName, parameterScope)

Returns the CommandLineChoiceParameter with the specified long name.

(Inherited from CommandLineParameterProvider)

getFlagParameter(parameterLongName, parameterScope)

Returns the CommandLineFlagParameter with the specified long name.

(Inherited from CommandLineParameterProvider)

getIntegerListParameter(parameterLongName, parameterScope)

Returns the CommandLineIntegerParameter with the specified long name.

(Inherited from CommandLineParameterProvider)

getIntegerParameter(parameterLongName, parameterScope)

Returns the CommandLineIntegerParameter with the specified long name.

(Inherited from CommandLineParameterProvider)

getParameterStringMap()

Returns a object which maps the long name of each parameter in this.parameters to the stringified form of its value. This is useful for logging telemetry, but it is not the proper way of accessing parameters or their values.

(Inherited from CommandLineParameterProvider)

getStringListParameter(parameterLongName, parameterScope)

Returns the CommandLineStringListParameter with the specified long name.

(Inherited from CommandLineParameterProvider)

getStringParameter(parameterLongName, parameterScope)

Returns the CommandLineStringParameter with the specified long name.

(Inherited from CommandLineParameterProvider)

onDefineParameters()protected
onExecute()protected
parseScopedLongName(scopedLongName)

Returns an object with the parsed scope (if present) and the long name of the parameter.

(Inherited from CommandLineParameterProvider)

renderHelpText()

Generates the command-line help text.

(Inherited from CommandLineParameterProvider)

renderUsageText()

Generates the command-line usage text.

(Inherited from CommandLineParameterProvider)