Skip to content

Type Alias: OnPluginExtension<G>

Plugin extension callback, which is called when the plugin is extended with extension option.

Since

v0.27.0

Signature

ts
export type OnPluginExtension<G extends GunshiParams = DefaultGunshiParams> = (ctx: Readonly<CommandContext<G>>, cmd: Readonly<Command<G>>) => Awaitable<void>

Type Parameters

NameDescription
G extends GunshiParams = DefaultGunshiParamsA type extending GunshiParams to specify the shape of CommandContext and Command.

Parameters

NameTypeDescription
ctxReadonly<CommandContext<G>>The command context
cmdReadonly<Command<G>>The command

Returns

Awaitable<void>

Released under the MIT License.