diff --git a/types/node/index.d.ts b/types/node/index.d.ts index fdda9e948a..0f6698035d 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -2655,6 +2655,7 @@ declare module "child_process" { windowsHide?: boolean; } + function spawn(command: string, options?: SpawnOptions): ChildProcess; function spawn(command: string, args?: ReadonlyArray, options?: SpawnOptions): ChildProcess; interface ExecOptions { diff --git a/types/node/node-tests.ts b/types/node/node-tests.ts index 20159c70d9..c59ed08064 100644 --- a/types/node/node-tests.ts +++ b/types/node/node-tests.ts @@ -2636,6 +2636,8 @@ async function asyncStreamPipelineFinished() { { childProcess.exec("echo test"); childProcess.exec("echo test", { windowsHide: true }); + childProcess.spawn("echo"); + childProcess.spawn("echo", { windowsHide: true }); childProcess.spawn("echo", ["test"], { windowsHide: true }); childProcess.spawn("echo", ["test"], { windowsHide: true, argv0: "echo-test" }); childProcess.spawn("echo", ["test"], { stdio: [0xdeadbeef, "inherit", undefined, "pipe"] });