From 0ae7ed8ff4cccceb91566c6e6826beaa7275d724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Budi=C5=A1a?= Date: Wed, 18 Dec 2019 19:11:38 +0100 Subject: [PATCH] index.d.ts: Allow 2 or 1 parameter exec() call. Fix callback parameter types --- index.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 1d99892..826c3be 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1 +1,4 @@ -export function exec(cmd: string, options: { name?: string, icns?: string, env?: { [key: string]: string } }, callback: (error: string, stdout: string, stderr: string) => void): void; +export function exec(cmd: string, + options?: ((error?: Error, stdout?: string | Buffer, stderr?: string | Buffer) => void) + | { name?: string, icns?: string, env?: { [key: string]: string } }, + callback?: (error: Error, stdout: string | Buffer, stderr: string | Buffer) => void): void;