Node.js-specific extension to the EventTarget class that adds a once listener for the given event type. This is equivalent to calling on with the once option set to true.
method
worker_threads.MessagePort.once
once(
event: 'message',
listener: (value: any) => void
): this;
Node.js-specific extension to the EventTarget class that adds a once listener for the given event type. This is equivalent to calling on with the once option set to true.
once(
event: string,
listener: (arg: any) => void
): this;
Node.js-specific extension to the EventTarget class that adds a once listener for the given event type. This is equivalent to calling on with the once option set to true.