diff --git a/types/node/index.d.ts b/types/node/index.d.ts index 14dc11d44d..2f7dc57e90 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -1782,7 +1782,7 @@ declare module "child_process" { stdio: [stream.Writable, stream.Readable, stream.Readable]; pid: number; kill(signal?: string): void; - send(message: any, sendHandle?: any): boolean; + send(message: any, sendHandle?: net.Socket | net.Server, options?: MessageOptions, callback?: (error: Error) => void): boolean; connected: boolean; disconnect(): void; unref(): void; @@ -1840,6 +1840,10 @@ declare module "child_process" { prependOnceListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; } + export interface MessageOptions { + keepOpen: boolean; + } + export interface SpawnOptions { cwd?: string; env?: any; @@ -1849,6 +1853,7 @@ declare module "child_process" { gid?: number; shell?: boolean | string; } + export function spawn(command: string, args?: string[], options?: SpawnOptions): ChildProcess; export interface ExecOptions {