Skip to content

gunshi / default / SubCommandable

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

Indexable

ts
[key: string]: any

Index signature to allow additional properties

Properties

PropertyTypeDescription
args?Args | Record<string, any>see Command.args
commandName?stringsee LazyCommand.commandName
description?stringsee Command.description
entry?booleansee Command.entry
examples?string | (...args) => anysee Command.examples
internal?booleansee Command.internal
name?stringsee Command.name
rendering?anysee Command.rendering
run?(...args) => anysee Command.run
toKebab?booleansee Command.toKebab

Released under the MIT License.