Skip to content

gunshi / context / createCommandContext

Function: createCommandContext()

ts
function createCommandContext<G, V, C, E>(param): Promise<CommandContextResult<G, E>>;

Create a command context.

Type Parameters

Type ParameterDefault type
G extends GunshiParamsConstraintDefaultGunshiParams
V extends objectArgValues<ExtractArgs<G>>
C extends | Command<G> | LazyCommand<G>Command<G>
E extends Record<string, CommandContextExtension<{ }>>object

Parameters

ParameterTypeDescription
paramCommandContextParams<G, V, C, E>A parameters to create a command context.

Returns

Promise<CommandContextResult<G, E>>

A command context, which is readonly.

Released under the MIT License.