From f8bbe37b8cd67a6bc104ea1905375f23fcc9f430 Mon Sep 17 00:00:00 2001 From: Prokop Simek Date: Wed, 29 Jan 2020 16:57:11 +0100 Subject: [PATCH] fix: action can return an async function Since we can use `parseAsync` for async functions so the action can be asynchronous. related to https://github.com/tj/commander.js/issues/806 --- typings/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index d1a89d8c2..082a3a3c2 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -115,7 +115,7 @@ declare namespace commander { * * @returns Command for chaining */ - action(fn: (...args: any[]) => void): Command; + action(fn: (...args: any[]) => void | Promise): Command; /** * Define option with `flags`, `description` and optional