feat(index.d.ts): add ExecPackage interface for command execution with options
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-08-27 08:55:15 +00:00
parent 40446e13bb
commit b724100477

27
index.d.ts vendored
View File

@@ -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<T extends {
args?: string[]
stdin?: string
dir?: string
env?: string[]
timeout?: number
returnObject?: boolean
combineOutput?: boolean
}>(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,