import { CCliDescription } from './c-cli-description'; import { CCliConditionalValue } from './c-cli-conditional-value'; /** Defines the type of the args passed to an {@link CCliArgGroup.parse} */ export declare type CCliParseArgs = CCliConditionalValue; /** Options for creating an argument group, a group of adjacent command-line * arguments * @typeParam Optional If `true`, the type of `args` passed to * {@link CCliArgGroupOptions.parse} does not include `undefined`. */ export declare type CCliArgGroupOptions = { /** A text description of this argument group. Paragraphs are re-wrapped when * printed to the terminal so don't worry about whitespace. */ description?: CCliDescription; /** If `true`, command-line usage won't show this arg group unless it's * invoked directly */ hidden?: boolean; /** A short placeholder for this argument group in command-line usage. By * convention, **@carnesen/cli** placeholders are wrapped in angled brackets * e.g. `""` */ placeholder?: string; /** Unless `true`, a {@link CCliUsageError} thrown if no argument is provided * for this argument group */ optional?: Optional; }; export declare type InferParsedValueFromCCliArgGroup = ArgGroup extends CCliArgGroup ? Value | undefined : ArgGroup extends CCliArgGroup ? NonNullable : never; /** A group of consecutive command-line arguments parsed together into a single * well-typed value * @param Value Type of the value returned by {@link CCliArgGroup.parse} * @param Optional If `true`, the type of `args` passed to * {@link CCliArgGroup.parse} includes `undefined`. */ export declare abstract class CCliArgGroup { protected readonly options: CCliArgGroupOptions; protected constructor(options: CCliArgGroupOptions); get description(): CCliDescription; get hidden(): boolean; get placeholder(): string; get optional(): boolean; /** Function that parses a well-typed value from string arguments */ abstract parse(args: CCliParseArgs): CCliConditionalValue; /** Experimental support for autocompletion. Optionally implemented by * subclass. */ _suggest(_args: string[], _search?: string): string[]; protected assertSingleArg(args: unknown[]): void; protected assertOneOrMoreArgs(args: unknown[]): void; undefinedAsValue(): Value; } //# sourceMappingURL=c-cli-arg-group.d.ts.map