VipInquirer: {
handleSimpleSearchSource: (
sources: string[],
) => SimpleSearchSource<string>;
promptCheckBox: <T extends string>(
message: string,
choices: string[] | VipInquirerChoiceList<T>,
options?: VipInquirerOptions,
) => Promise<T[]>;
promptConfirm: (
message: string,
defaultValue?: boolean,
) => Promise<boolean>;
promptConfirmWithSuccessExit: (
message: string,
__namedParameters: { defaultValue?: boolean; exitMsg?: string },
) => Promise<void>;
promptInput: (message: string, defaultValue?: string) => Promise<string>;
promptInputRequired: (message: string) => Promise<string>;
promptList: <T extends string>(
message: string,
choices: VipInquirerChoiceList<T>,
) => Promise<T>;
promptNumber: (
message: string,
defaultValue?: number,
) => Promise<undefined | number>;
promptPassword: (message: string) => Promise<string>;
promptSearch: <T extends string>(
message: string,
source: SearchSource<T>,
pageSize?: number,
) => Promise<T>;
promptSelect: <T extends string>(
message: string,
choices: string[] | VipInquirerChoiceList<T>,
options?: VipInquirerOptions,
) => Promise<T>;
} = ...
类型声明
handleSimpleSearchSource: (sources: string[]) => SimpleSearchSource<string>
promptCheckBox: <T extends string>(
message: string,
choices: string[] | VipInquirerChoiceList<T>,
options?: VipInquirerOptions,
) => Promise<T[]>
promptConfirm: (message: string, defaultValue?: boolean) => Promise<boolean>
promptConfirmWithSuccessExit: (
message: string,
__namedParameters: { defaultValue?: boolean; exitMsg?: string },
) => Promise<void>
promptList: <T extends string>(
message: string,
choices: VipInquirerChoiceList<T>,
) => Promise<T>
promptNumber: (message: string, defaultValue?: number) => Promise<undefined | number>
promptPassword: (message: string) => Promise<string>
promptSearch: <T extends string>(
message: string,
source: SearchSource<T>,
pageSize?: number,
) => Promise<T>
promptSelect: <T extends string>(
message: string,
choices: string[] | VipInquirerChoiceList<T>,
options?: VipInquirerOptions,
) => Promise<T>
终端交互