UNPKG

458 BTypeScriptView Raw
1export declare type IPromptListOption = {
2 name: string;
3 value?: any;
4};
5export declare type IPrompt = {
6 text: PromptText;
7 list: PromptList;
8};
9export declare type PromptText = (args: {
10 message: string;
11 default?: string;
12}) => Promise<string>;
13export declare type PromptList = <V = string>(args: {
14 message: string;
15 items: (string | IPromptListOption)[];
16 pageSize?: number;
17 type?: 'list' | 'checkbox';
18}) => Promise<V>;