diff --git a/src/cli-ux/action/base.ts b/src/cli-ux/action/base.ts index b2b14191..522df8e0 100644 --- a/src/cli-ux/action/base.ts +++ b/src/cli-ux/action/base.ts @@ -92,7 +92,7 @@ export class ActionBase { task.status = status } - public async pauseAsync(fn: () => Promise, icon?: string) { + public async pauseAsync(fn: () => Promise, icon?: string): Promise { const task = this.task const active = task && task.active if (task && active) { diff --git a/src/cli-ux/prompt.ts b/src/cli-ux/prompt.ts index 7852a8a5..de66a3fd 100644 --- a/src/cli-ux/prompt.ts +++ b/src/cli-ux/prompt.ts @@ -120,9 +120,9 @@ function _prompt(name: string, inputOptions: Partial = {}): Prom * prompt for input * @param name - prompt text * @param options - @see IPromptOptions - * @returns void + * @returns Promise */ -export function prompt(name: string, options: IPromptOptions = {}) { +export function prompt(name: string, options: IPromptOptions = {}): Promise { return config.action.pauseAsync(() => { return _prompt(name, options) }, chalk.cyan('?')) @@ -149,9 +149,9 @@ export function confirm(message: string): Promise { /** * "press anykey to continue" * @param message - optional message to display to user - * @returns Promise + * @returns Promise */ -export async function anykey(message?: string): Promise { +export async function anykey(message?: string): Promise { const tty = Boolean(process.stdin.setRawMode) if (!message) { message = tty ?