UNPKG

581 BTypeScriptView Raw
1export interface IPromptOptions {
2 prompt?: string;
3 type?: 'normal' | 'mask' | 'hide' | 'single';
4 timeout?: number;
5 /**
6 * Requires user input if true, otherwise allows empty input
7 */
8 required?: boolean;
9 default?: string;
10}
11/**
12 * prompt for input
13 */
14export declare function prompt(name: string, options?: IPromptOptions): Promise<any>;
15/**
16 * confirmation prompt (yes/no)
17 */
18export declare function confirm(message: string): Promise<boolean>;
19/**
20 * "press anykey to continue"
21 */
22export declare function anykey(message?: string): Promise<void>;