import { InferParsedValueFromCCliArgGroup, CCliArgGroup } from './c-cli-arg-group'; import { CCliLogger } from './c-cli-logger'; import { CCliColor } from './c-cli-color'; import { CCliDescription } from './c-cli-description'; /** Type of the `input` argument injected into injected into * {@link CCliCommandOptions.action} */ export declare type CCliCommandActionInput = { color: CCliColor; doubleDashValue: InferParsedValueFromCCliArgGroup; logger: CCliLogger; namedValues: { [K in keyof NamedArgGroups]: InferParsedValueFromCCliArgGroup; }; positionalValue: InferParsedValueFromCCliArgGroup; }; /** Options for creating a **@carnesen/cli** command */ export declare type CCliCommandOptions = { /** Function or async function that implements the command */ action: (input: CCliCommandActionInput) => any; /** Identifier for this command in command-line usage */ name: string; /** A sentence or two about this command for command-line usage or a function * returning the description text */ description?: CCliDescription; /** A {@link CCliArgGroup} for the arguments after a lone "--" */ doubleDashArgGroup?: DoubleDashArgGroup; /** If `true`, don't show this command in command-line usage */ hidden?: boolean; /** A {@link CCliArgGroup} for the arguments passed as "--name value" */ namedArgGroups?: NamedArgGroups; /** A {@link CCliArgGroup} for the arguments before the first separator argument */ positionalArgGroup?: PositionalArgGroup; }; /** A **@carnesen/cli** command-line interface (CLI) command */ export declare class CCliCommand { protected readonly options: CCliCommandOptions; protected constructor(options: CCliCommandOptions); action(input: CCliCommandActionInput): any; get description(): CCliDescription; get doubleDashArgGroup(): DoubleDashArgGroup_ | undefined; get hidden(): boolean; get name(): string; get namedArgGroups(): NamedArgGroups_ | undefined; get positionalArgGroup(): PositionalArgGroup_ | undefined; /** Factory for **@carnesen/cli** command-line interface (CLI) commands */ static create, NamedArgGroups extends { [name: string]: CCliArgGroup; } = { [name: string]: CCliArgGroup; }, DoubleDashArgGroup extends CCliArgGroup = CCliArgGroup>(options: CCliCommandOptions): CCliCommand; } //# sourceMappingURL=c-cli-command.d.ts.map