Home > @momentum-design/common > Command
Command class
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
The Abstract Command class to be extended by scoped Command classes.
Signature:
declare abstract class Command<O extends Options, P extends Params>
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(options) | (BETA) Construct a new Command. |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
CONSTANTS |
| typeof CONSTANTS | (BETA) Constants associated with this Command. |
options | O | (BETA) Options to use when parsing the provided CLI command | |
params | Params | (BETA) Params generated in reflection of the provided options and the CLI command. |
Methods
Method | Modifiers | Description |
---|---|---|
clean() | protected | (BETA) Clean the params mounted to this Command. |
collect() | protected | (BETA) Collect all CLI arguments as parameters. |
prepare(results) | (BETA) Prepare the processed results for emiting as a string. | |
process() | (BETA) Process the Command params into a new object for transport. |