Function: generate()
ts
function generate<G>(
command,
entry,
options): Promise<string>;Generate the command usage.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
G extends GunshiParamsConstraint | DefaultGunshiParams | A type extending GunshiParams to specify the shape of command parameters. |
Parameters
| Parameter | Type | Description |
|---|---|---|
command | null | string | usage generate command, if you want to generate the usage of the default command where there are target commands and sub-commands, specify null. |
entry | | Command<G> | LazyCommand<G> | A entry command |
options | GenerateOptions<G> | A cli options |
Returns
Promise<string>
A rendered usage.
