Type Alias: PluginExtension<T, G>
Plugin extension
Since
v0.27.0
Signature
ts
export type PluginExtension<
T = Record<string, unknown>,
G extends GunshiParams = DefaultGunshiParams
> = (ctx: CommandContextCore<G>, cmd: Command<G>) => Awaitable<T>Type Parameters
| Name | Description |
|---|---|
T = Record<string, unknown> | The type of the extension object returned by the plugin extension function. |
G extends GunshiParams = DefaultGunshiParams | A type extending GunshiParams to specify the shape of CommandContextCore. |
Parameters
| Name | Type | Description |
|---|---|---|
ctx | CommandContextCore<G> | The command context core |
cmd | Command<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
