gunshi / context / CommandContextParams
Interface: CommandContextParams<G, V, C, E>
Parameters of createCommandContext
Type Parameters
| Type Parameter | Default type |
|---|---|
G extends | GunshiParams | { args: Args; } | { extensions: ExtendContext; } | - |
V extends ArgValues<ExtractArgs<G>> | - |
C extends | Command<G> | LazyCommand<G> | Command<G> |
E extends Record<string, CommandContextExtension> | Record<string, CommandContextExtension> |
Properties
| Property | Type | Description |
|---|---|---|
args? | ExtractArgs<G> | An arguments of target command |
argv? | string[] | Original command line arguments |
callMode? | CommandCallMode | Command call mode. |
cliOptions? | CliOptions<G> | A command options, which is spicialized from cli function |
command? | C | A target command |
explicit? | ArgExplicitlyProvided<ExtractArgs<G>> | Explicitly provided arguments |
extensions? | E | Plugin extensions to apply as the command context extension. |
omitted? | boolean | Whether the command is omitted |
positionals? | string[] | A positionals arguments, which passed to the target command |
rest? | string[] | A rest arguments, which passed to the target command |
tokens? | ArgToken[] | Argument tokens that are parsed by the parseArgs function |
validationError? | AggregateError | Validation error from argument parsing. |
values? | V | A values of target command |
