Skip to content

Type Alias: CommandRunner<G>

Command runner.

Signature

ts
export type CommandRunner<G extends GunshiParamsConstraint = DefaultGunshiParams> = (ctx: Readonly<CommandContext<G>>) => Awaitable<string | void>

Type Parameters

NameDescription
G extends GunshiParamsConstraint = DefaultGunshiParamsA type extending GunshiParams to specify the shape of command context.

Parameters

NameTypeDescription
ctxReadonly<CommandContext<G>>A command context

Returns

Awaitable<string | void> — void or string (for CLI output)

Released under the MIT License.