Skip to content

Type Alias: CommandLoader<G> ​

Command loader.

A function that returns a command or command runner. This is used to lazily load commands.

Signature ​

ts
export type CommandLoader<G extends GunshiParamsConstraint = DefaultGunshiParams> = () => Awaitable<Command<G> | CommandRunner<G>>

Type Parameters ​

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

Returns ​

Awaitable<Command<G> | CommandRunner<G>> — A command or command runner

Released under the MIT License.