Interface: SubCommandable
Sub-command entry type for use in subCommands.
This type uses a loose structural match to bypass TypeScript's contravariance issues with function parameters, allowing any Command or LazyCommand to be used as a sub-command.
Since
v0.27.1
Signature
ts
export interface SubCommandableIndexable
ts
[key: string]: anyIndex signature to allow additional properties
Properties
| Name | Type | Description |
|---|---|---|
args (optional) | Args | Record<string, any> | see Command.args |
commandName (optional) | string | see LazyCommand.commandName |
description (optional) | string | see Command.description |
entry (optional) | boolean | see Command.entry |
examples (optional) | string | ((...args: any[]) => any) | see Command.examples |
internal (optional) | boolean | see Command.internal |
name (optional) | string | see Command.name |
rendering (optional) | any | see Command.rendering |
run (optional) | (...args: any[]) => any | see Command.run |
subCommands (optional) | Record<string, any> | Map<string, any> | Nested sub-commands for this command. Since v0.28.0 |
toKebab (optional) | boolean | see Command.toKebab |
run Parameters
| Name | Type | Description |
|---|---|---|
args | any[] |
run Returns
any
