Rush StackShopBlogEvents
Skip to main content

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

AliasCommandLineAction class

Represents a sub-command that is part of the CommandLineParser command line. The sub-command is an alias for another existing action.

The alias name should be comprised of lower case words separated by hyphens or colons. The name should include an English verb (e.g. "deploy"). Use a hyphen to separate words (e.g. "upload-docs").

Signature:

export declare class AliasCommandLineAction extends CommandLineAction 

Extends: CommandLineAction

Constructors

ConstructorModifiersDescription
(constructor)(options)Constructs a new instance of the AliasCommandLineAction class

Properties

PropertyModifiersTypeDescription
defaultParametersreadonlyReadonlyArray<string>A list of default arguments to pass to the target action.
targetActionreadonlyCommandLineActionThe action that this alias invokes.

Methods

MethodModifiersDescription
onExecute()protectedExecutes the target action.