gunshi / definition / lazy
Function: lazy()
Define a lazy command with or without definition.
Param
A command loader function that returns a command definition
Param
An optional command definition
Call Signature
ts
function lazy<G>(loader): LazyCommand<G>;Define a lazy command
Type Parameters
| Type Parameter | Default type |
|---|---|
G extends GunshiParams<{ args: Args; extensions: { }; }> | DefaultGunshiParams |
Parameters
| Parameter | Type | Description |
|---|---|---|
loader | CommandLoader<G> | A command loader |
Returns
LazyCommand<G>
A lazy command that can be executed later
Param
A command loader function that returns a command definition
Param
An optional command definition
Call Signature
ts
function lazy<G>(loader, definition): LazyCommand<G>;Define a lazy command with definition.
Type Parameters
| Type Parameter | Default type |
|---|---|
G extends GunshiParams<{ args: Args; extensions: { }; }> | DefaultGunshiParams |
Parameters
| Parameter | Type | Description |
|---|---|---|
loader | CommandLoader<G> | A command loader function that returns a command definition |
definition | Command<G> | An optional command definition |
Returns
LazyCommand<G>
A lazy command that can be executed later
Param
A command loader function that returns a command definition
Param
An optional command definition
