MessagePort.prototype.emit - Node documentation
method MessagePort.prototype.emit

Usage in Deno

import { MessagePort } from "node:worker_threads";
MessagePort.prototype.emit(event: "close"): boolean

Parameters

event: "close"

Return Type

boolean
MessagePort.prototype.emit(
event: "message",
value: any,
): boolean

Parameters

event: "message"
value: any

Return Type

boolean
MessagePort.prototype.emit(
event: "messageerror",
error: Error,
): boolean

Parameters

event: "messageerror"
error: Error

Return Type

boolean
MessagePort.prototype.emit(
event: string | symbol,
...args: any[],
): boolean

Parameters

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

Return Type

boolean