interface SubCommand
extends Command

Interface for a sub-command.

Properties

readonly
options: ReadonlyArray<Option | ComplexOption>

Option or ComplexOption argument definitions for the sub-command.

readonly
positionals: ReadonlyArray<Positional>

Positional argument definitions for the sub-command.

readonly
optional
helpTopic: string

Optional grouping topic of the command for structuring of help output.

readonly
optional
usageExamples: ReadonlyArray<UsageExample>

Optional usage examples for the command to support help output.

Methods

execute(
context: Context,
argumentValues: ArgumentValues,
): Promise<void>

Execute the command.

Usage

import type SubCommand from ".";