Skip to content

gunshi / default / OnPluginExtension

Type Alias: OnPluginExtension()<G>

ts
type OnPluginExtension<G> = (ctx, cmd) => Awaitable<void>;

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

Type Parameters

Type ParameterDefault typeDescription
G extends GunshiParamsDefaultGunshiParamsA type extending GunshiParams to specify the shape of CommandContext and Command.

Parameters

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

Returns

Awaitable<void>

Since

v0.27.0

Released under the MIT License.