gunshi / default / ExtendedCommand
Interface: ExtendedCommand<A, E>
Extended command type with extension support
Extends
Omit
<Command
<A
>,"run"
>
Type Parameters
Type Parameter | Default type |
---|---|
A extends Args | Args |
E extends Record <string , CommandContextExtension > | Record <string , CommandContextExtension > |
Properties
Property | Type | Description | Inherited from |
---|---|---|---|
_extensions | E | - | - |
args? | A | Command arguments. Each argument can include a description property to describe the argument in usage. | Omit.args |
description? | string | Command description. It's used to describe the command in usage and it's recommended to specify. | Omit.description |
examples? | | string | CommandExamplesFetcher <A > | Command examples. examples of how to use the command. | Omit.examples |
name? | string | Command name. It's used to find command line arguments to execute from sub commands, and it's recommended to specify. | Omit.name |
resource? | CommandResourceFetcher <A > | Command resource fetcher. | Omit.resource |
run? | (ctx ) => Awaitable <string | void > | - | - |
toKebab? | boolean | Whether to convert the camel-case style argument name to kebab-case. If you will set to true , All Command.args names will be converted to kebab-case. | Omit.toKebab |