Skip to content

gunshi / definition / define

Function: define()

Define a command

Param

A command definition

Call Signature

ts
function define<A>(definition): Command<{
  args: A;
  extensions: {
  };
}>;

Define a command

Type Parameters

Type Parameter
A extends Args

Parameters

ParameterTypeDescription
definitionCommand<{ args: A; extensions: { }; }>A command definition

Returns

Command<{ args: A; extensions: { }; }>

Call Signature

ts
function define<E>(definition): Command<{
  args: Args;
  extensions: E;
}>;

Define a command

Type Parameters

Type Parameter
E extends ExtendContext

Parameters

ParameterTypeDescription
definitionCommand<{ args: Args; extensions: E; }>A command definition

Returns

Command<{ args: Args; extensions: E; }>

Call Signature

ts
function define<G>(definition): Command<G>;

Define a command

Type Parameters

Type ParameterDefault type
G extends GunshiParamsConstraintDefaultGunshiParams

Parameters

ParameterTypeDescription
definitionCommand<G>A command definition

Returns

Command<G>

Released under the MIT License.