export interface KeyChoice { /** The single character the label advertises. Matched case-insensitively. */ key: string; label: string; value: T; } /** Which choice a keypress selects, or null if it selects nothing. */ export declare function matchChoiceKey(choices: readonly KeyChoice[], input: string): number | null; /** The lines of the list, with the caret on the highlighted row. */ export declare function renderChoiceLines(choices: readonly KeyChoice[], selected: number, caret?: string): string[]; /** * Asks, and returns the chosen value. * * Falls back to reading a whole line where there is no terminal to take single keys from. A piped * answer of "y" should still work, and refusing to run because stdin is not a tty would make the * prompt worse than whatever it is guarding. */ export declare function askChoice(message: string, choices: readonly KeyChoice[], onCancel: T, io?: { input?: NodeJS.ReadStream; output?: NodeJS.WriteStream; }): Promise; //# sourceMappingURL=key-choice.d.ts.map