X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Fclasses%2FPoolEmitter.html;h=1aa7ff6e5363adbaa6a7a4a2563a0fe328dcf749;hb=95d287d1625c80929657a9f217774c5c8f6668e7;hp=93b88c97b009f91fc0165ac982d081daeea5a831;hpb=5e7fdc4a7f8c01824825abd4ad57ec787a4beea7;p=poolifier.git diff --git a/docs/classes/PoolEmitter.html b/docs/classes/PoolEmitter.html index 93b88c97..1aa7ff6e 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.