Skip to content

gunshi / default / ExtendedCommand

Interface: ExtendedCommand<A, E>

Extended command type with extension support

Extends

Type Parameters

Type ParameterDefault type
A extends ArgsArgs
E extends Record<string, CommandContextExtension>Record<string, CommandContextExtension>

Properties

PropertyTypeDescriptionInherited from
_extensionsE--
args?ACommand arguments. Each argument can include a description property to describe the argument in usage.Omit.args
description?stringCommand 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?stringCommand 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?booleanWhether 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

Released under the MIT License.