mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-06 06:19:58 +08:00
Merge pull request #17810 from achugaev93/patch-1
node: Updated signature of ChildProcess#send method
This commit is contained in:
7
types/node/index.d.ts
vendored
7
types/node/index.d.ts
vendored
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user