Skip to content

gunshi / default / PluginExtension

Type Alias: PluginExtension()<T, G>

ts
type PluginExtension<T, G> = (ctx, cmd) => Awaitable<T>;

Plugin extension

Type Parameters

Type ParameterDefault typeDescription
TRecord<string, unknown>The type of the extension object returned by the plugin extension function.
G extends GunshiParamsDefaultGunshiParamsA type extending GunshiParams to specify the shape of CommandContextCore.

Parameters

ParameterTypeDescription
ctxCommandContextCore<G>The command context core
cmdCommand<G>The command to which the plugin is being applied

Returns

Awaitable<T>

An object of type T that represents the extension provided by the plugin

Since

v0.27.0

Released under the MIT License.