From 5444aceedb771671aad06776fa5893788950f148 Mon Sep 17 00:00:00 2001 From: Prokop Simek Date: Wed, 29 Jan 2020 16:58:53 +0100 Subject: [PATCH] fix(ts): action can be 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