utils/node_modules/@rushstack/ts-command-line/lib/parameters/CommandLineChoiceListParameter.d.ts

33 lines
1.4 KiB
TypeScript
Raw Normal View History

2024-02-07 01:33:07 -05:00
import type { ICommandLineChoiceListDefinition } from './CommandLineDefinition';
import { CommandLineParameter, CommandLineParameterKind } from './BaseClasses';
/**
* The data type returned by {@link CommandLineParameterProvider.defineChoiceListParameter}.
* @public
*/
export declare class CommandLineChoiceListParameter extends CommandLineParameter {
/** {@inheritDoc ICommandLineChoiceListDefinition.alternatives} */
readonly alternatives: ReadonlyArray<string>;
private _values;
/** {@inheritDoc ICommandLineChoiceListDefinition.completions} */
readonly completions: (() => Promise<string[]>) | undefined;
/** @internal */
constructor(definition: ICommandLineChoiceListDefinition);
/** {@inheritDoc CommandLineParameter.kind} */
get kind(): CommandLineParameterKind;
/**
* {@inheritDoc CommandLineParameter._setValue}
* @internal
*/
_setValue(data: any): void;
/**
* Returns the string arguments for a choice list parameter that was parsed from the command line.
*
* @remarks
* The array will be empty if the command-line has not been parsed yet,
* or if the parameter was omitted and has no default value.
*/
get values(): ReadonlyArray<string>;
/** {@inheritDoc CommandLineParameter.appendToArgList} @override */
appendToArgList(argList: string[]): void;
}
//# sourceMappingURL=CommandLineChoiceListParameter.d.ts.map