Skip to main content
ChildProcess.prototype.emit - node__child_process.d.ts - Node documentation
method ChildProcess.prototype.emit

Usage in Deno

```typescript import { ChildProcess } from "node:node__child_process.d.ts"; ```
ChildProcess.prototype.emit(
event: string | symbol,
...args: any[],
): boolean

Parameters

event: string | symbol
...args: any[]

Return Type

boolean
ChildProcess.prototype.emit(
event: "close",
code: number | null,
signal: Signals | null,
): boolean

Parameters

event: "close"
code: number | null
signal: Signals | null

Return Type

boolean
ChildProcess.prototype.emit(event: "disconnect"): boolean

Parameters

event: "disconnect"

Return Type

boolean
ChildProcess.prototype.emit(
event: "error",
err: Error,
): boolean

Parameters

event: "error"
err: Error

Return Type

boolean
ChildProcess.prototype.emit(
event: "exit",
code: number | null,
signal: Signals | null,
): boolean

Parameters

event: "exit"
code: number | null
signal: Signals | null

Return Type

boolean
ChildProcess.prototype.emit(
event: "message",
message: Serializable,
sendHandle: SendHandle,
): boolean

Parameters

event: "message"
message: Serializable
sendHandle: SendHandle

Return Type

boolean
ChildProcess.prototype.emit(
event: "spawn",
listener: () => void,
): boolean

Parameters

event: "spawn"
listener: () => void

Return Type

boolean