Skip to main content
Process.emit - process - Node documentation
method Process.emit

Usage in Deno

import { type Process } from "node:process";
Process.emit(
event: "beforeExit",
code: number,
): boolean

Parameters

event: "beforeExit"
code: number

Return Type

boolean
Process.emit(event: "disconnect"): boolean

Parameters

event: "disconnect"

Return Type

boolean
Process.emit(
event: "exit",
code: number,
): boolean

Parameters

event: "exit"
code: number

Return Type

boolean
Process.emit(
event: "rejectionHandled",
promise: Promise<unknown>,
): boolean

Parameters

event: "rejectionHandled"
promise: Promise<unknown>

Return Type

boolean
Process.emit(
event: "uncaughtException",
error: Error,
): boolean

Parameters

event: "uncaughtException"
error: Error

Return Type

boolean
Process.emit(
event: "uncaughtExceptionMonitor",
error: Error,
): boolean

Parameters

event: "uncaughtExceptionMonitor"
error: Error

Return Type

boolean
Process.emit(
event: "unhandledRejection",
reason: unknown,
promise: Promise<unknown>,
): boolean

Parameters

event: "unhandledRejection"
reason: unknown
promise: Promise<unknown>

Return Type

boolean
Process.emit(
event: "warning",
warning: Error,
): boolean

Parameters

event: "warning"
warning: Error

Return Type

boolean
Process.emit(
event: "message",
message: unknown,
sendHandle: unknown,
): this

Parameters

event: "message"
message: unknown
sendHandle: unknown

Return Type

this
Process.emit(
event: Signals,
signal?: Signals,
): boolean

Parameters

event: Signals
optional
signal: Signals

Return Type

boolean
Process.emit(
event: "multipleResolves",
promise: Promise<unknown>,
value: unknown,
): this

Parameters

event: "multipleResolves"
promise: Promise<unknown>
value: unknown

Return Type

this
Process.emit(
event: "worker",
listener: WorkerListener,
): this

Parameters

event: "worker"
listener: WorkerListener

Return Type

this
Back to top