Interface: CommandContextParams<G, V, C, E>
Parameters of createCommandContext
Signature
ts
export interface CommandContextParams<
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>
>Type Parameters
| Name |
|---|
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
| Name | Type | Description |
|---|---|---|
args (optional) | ExtractArgs<G> | An arguments of target command |
argv (optional) | string[] | Original command line arguments |
callMode (optional) | CommandCallMode | Command call mode. |
cliOptions (optional) | CliOptions<G> | A command options, which is spicialized from cli function |
command (optional) | C | A target command |
commandPath (optional) | string[] | The path of nested sub-commands resolved to reach the current command. |
explicit (optional) | ExtractArgExplicitlyProvided<G> | Explicitly provided arguments |
extensions (optional) | E | Plugin extensions to apply as the command context extension. |
omitted (optional) | boolean | Whether the command is omitted |
positionals (optional) | string[] | A positionals arguments, which passed to the target command |
rest (optional) | string[] | A rest arguments, which passed to the target command |
tokens (optional) | ArgToken[] | Argument tokens that are parsed by the parseArgs function |
validationError (optional) | AggregateError | Validation error from argument parsing. |
values (optional) | V | A values of target command |
