Skip to content

gunshi / context / CommandContextParams

Interface: CommandContextParams<G, V, C, E>

Parameters of createCommandContext

Type Parameters

Type ParameterDefault 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

PropertyTypeDescription
args?ExtractArgs<G>An arguments of target command
argv?string[]Original command line arguments
callMode?CommandCallModeCommand call mode.
cliOptions?CliOptions<G>A command options, which is spicialized from cli function
command?CA target command
explicit?ArgExplicitlyProvided<ExtractArgs<G>>Explicitly provided arguments
extensions?EPlugin extensions to apply as the command context extension.
omitted?booleanWhether 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?AggregateErrorValidation error from argument parsing.
values?VA values of target command

Released under the MIT License.