Skip to main content
MessagePort.prototype.once - worker_threads - Node documentation
method MessagePort.prototype.once

Usage in Deno

import { MessagePort } from "node:worker_threads";
MessagePort.prototype.once(
event: "close",
listener: () => void,
): this

Parameters

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

Return Type

this
MessagePort.prototype.once(
event: "message",
listener: (value: any) => void,
): this

Parameters

event: "message"
listener: (value: any) => void

Return Type

this
MessagePort.prototype.once(
event: "messageerror",
listener: (error: Error) => void,
): this

Parameters

event: "messageerror"
listener: (error: Error) => void

Return Type

this
MessagePort.prototype.once(
event: string | symbol,
listener: (...args: any[]) => void,
): this

Parameters

event: string | symbol
listener: (...args: any[]) => void

Return Type

this
Back to top