import type { Signal } from "./signal.js"; export interface SpawnCommandOptions { args: string[]; cwd: string; /** The complete environment for the child — Node's `cp.spawn` does not * merge with `process.env` when this is passed. */ env: Record; stdin: "inherit" | "null" | "piped"; stdout: "inherit" | "null" | "piped"; stderr: "inherit" | "null" | "piped"; } export interface SpawnedChildProcess { /** OS process id, or `undefined` if the process failed to spawn. */ readonly pid: number | undefined; stdin(): WritableStream; stdout(): ReadableStream; stderr(): ReadableStream; kill(signo?: Signal): void; waitExitCode(): Promise; } export declare function spawnCommand(path: string, options: SpawnCommandOptions): SpawnedChildProcess;