X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Fclasses%2FPoolEmitter.html;h=3a95fd2598b888c477405a4a32833de332bb8f93;hb=be71219a2e687e8a46a167503df4f5620807db0b;hp=9f5534b383e9c27a6d120df5c820155bb0ed975a;hpb=a47027a0bf90ce21b528708dadd0eb23b5537b43;p=poolifier.git diff --git a/docs/classes/PoolEmitter.html b/docs/classes/PoolEmitter.html index 9f5534b3..3a95fd25 100644 --- a/docs/classes/PoolEmitter.html +++ b/docs/classes/PoolEmitter.html @@ -1,4 +1,4 @@ -
Optional
options: EventEmitterOptionsOptional
options: EventEmitterOptionsOptional
Static
captureStatic
defaultname
property is set to 'MaxListenersExceededWarning&
Static
Readonly
error'error'
listener is installed.
'error'
listener is installed.
Rest
...args: any[]Rest
...args: any[]Rest
Rest
...args: any[]Rest
...args: any[]Rest
v0.1.26
Symbol
s.
emitter.setMaxListeners(n)
or defaults to
Inherited from EventEmitter.getMaxListeners
The name of the event being listened for
-Optional
listener: FunctionThe event handler function
-Optional
v3.2.0
Rest
...args: any[]Rest
...args: any[]Rest
The name of the event.
-The callback function
Rest
...args: any[]Rest
...args: any[]Rest
The name of the event.
-The callback function
Rest
...args: any[]Rest
...args: any[]Rest
The name of the event.
-The callback function
Rest
...args: any[]Rest
...args: any[]Rest
The name of the event.
-The callback function
Rest
...args: any[]Rest
...args: any[]Rest
.once()
).
Optional
event: string | symbolOptional
event: string | symbolOptional
v0.1.26
once('ping')
lis
Rest
...args: any[]Rest
...args: any[]Rest
once('ping')
lis
EventEmitter
instance. The value can be
Static
addExperimental
+Listens once to the abort
event on the provided signal
.
Listening to the abort
event on abort signals is unsafe and may
+lead to resource leaks since another third party with the signal can
+call e.stopImmediatePropagation()
. Unfortunately Node.js cannot change
+this since it would violate the web standard. Additionally, the original
+API makes it easy to forget to remove listeners.
This API allows safely using AbortSignal
s in Node.js APIs by solving these
+two issues by listening to the event such that stopImmediatePropagation
does
+not prevent the listener from running.
Returns a disposable so that it may be unsubscribed from more easily.
+import { addAbortListener } from 'node:events';
function example(signal) {
let disposable;
try {
signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
disposable = addAbortListener(signal, (e) => {
// Do something when signal is aborted.
});
} finally {
disposable?.[Symbol.dispose]();
}
}
+
+that removes the abort
listener.
v20.5.0
+Static
getStatic
getStatic
listenerThe emitter to query
-The event name
-v0.9.12
@@ -711,7 +744,7 @@ the max set, the EventTarget will print a warning.Static
onThe name of the event being listened for
-Optional
options: StaticEventEmitterOptionsOptional
options: StaticEventEmitterOptionsOptional
that iterates eventName
events emitted by the emitter
Static
onceOptional
options: StaticEventEmitterOptionsOptional
options: StaticEventEmitterOptionsOptional
v11.13.0, v10.16.0
Optional
options: StaticEventEmitterOptionsOptional
options: StaticEventEmitterOptionsOptional
Static
setOptional
n: numberA non-negative number. The maximum number of listeners per EventTarget
event.
Optional
Rest
...eventTargets: (EventEmitter | _DOMEventTarget)[]Rest
...eventTargets: (EventEmitter | _DOMEventTarget)[]Rest
v15.4.0
Generated using TypeDoc
Generated using TypeDoc
\ No newline at end of file
'error'
listener is installed.