From b724100477c1b5fecbdda883291bebf3254a7d2b Mon Sep 17 00:00:00 2001 From: Sebastian Frank Date: Wed, 27 Aug 2025 08:55:15 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(index.d.ts):=20add=20ExecPacka?= =?UTF-8?q?ge=20interface=20for=20command=20execution=20with=20options?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.d.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/index.d.ts b/index.d.ts index db79a44..d46afbe 100644 --- a/index.d.ts +++ b/index.d.ts @@ -685,6 +685,33 @@ declare global { stringify(json: any): string } + interface ExecPackage { + command(cmd: string, options?: { + args?: string[] + stdin?: string + dir?: string + env?: string[] + timeout?: number + returnObject?: boolean + combineOutput?: boolean + }): string + + command(cmd: string, options: T): + T['returnObject'] extends true + ? T['combineOutput'] extends true + ? { output: string; exitCode: number } + : { stdout: string; stderr: string; exitCode: number } + : string + } + export interface HookContext extends GetHookData, GetHookGetOnlyData,