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
| Parameter | Type | Description |
|---|---|---|
definition | Command<{ 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
| Parameter | Type | Description |
|---|---|---|
definition | Command<{ 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 Parameter | Default type |
|---|---|
G extends GunshiParamsConstraint | DefaultGunshiParams |
Parameters
| Parameter | Type | Description |
|---|---|---|
definition | Command<G> | A command definition |
Returns
Command<G>
