gunshi / definition / define
Function: define()
Call Signature
ts
function define<A>(definition): Command<GunshiParams<{
args: A;
extensions: {
};
}>>;Define a command
Type Parameters
| Type Parameter |
|---|
A extends Args |
Parameters
| Parameter | Type | Description |
|---|---|---|
definition | Command<GunshiParams<{ args: A; extensions: { }; }>> & object | A command definition |
Returns
Command<GunshiParams<{ args: A; extensions: { }; }>>
Call Signature
ts
function define<E>(definition): Command<GunshiParams<{
args: Args;
extensions: E;
}>>;Define a command
Type Parameters
| Type Parameter |
|---|
E extends ExtendContext |
Parameters
| Parameter | Type | Description |
|---|---|---|
definition | Command<GunshiParams<{ args: Args; extensions: E; }>> | A command definition |
Returns
Command<GunshiParams<{ args: Args; extensions: E; }>>
Call Signature
ts
function define<G>(definition): Command<G>;Define a command
Type Parameters
| Type Parameter | Default type |
|---|---|
G extends GunshiParams<{ args: Args; extensions: { }; }> | DefaultGunshiParams |
Parameters
| Parameter | Type | Description |
|---|---|---|
definition | Command<G> | A command definition |
Returns
Command<G>
