You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -48,7 +48,7 @@ export declare function getEventListeners(
48
48
): Function[];
49
49
50
50
/**
51
-
* ```js
51
+
* ```js ignore
52
52
* const { on, EventEmitter } = require('events');
53
53
*
54
54
* (async () => {
@@ -77,7 +77,7 @@ export declare function getEventListeners(
77
77
*
78
78
* An `AbortSignal` can be used to cancel waiting on events:
79
79
*
80
-
* ```js
80
+
* ```js ignore
81
81
* const { on, EventEmitter } = require('events');
82
82
* const ac = new AbortController();
83
83
*
@@ -120,7 +120,7 @@ export declare function on(
120
120
* This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event
121
121
* semantics and does not listen to the `'error'` event.
* The `EventEmitter` class is defined and exposed by the `events` module:
230
230
*
231
-
* ```js
231
+
* ```js ignore
232
232
* const EventEmitter = require('events');
233
233
* ```
234
234
*
@@ -253,7 +253,7 @@ export declare class EventEmitter {
253
253
* already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple
254
254
* times.
255
255
*
256
-
* ```js
256
+
* ```js ignore
257
257
* server.on('connection', (stream) => {
258
258
* console.log('someone connected!');
259
259
* });
@@ -264,7 +264,7 @@ export declare class EventEmitter {
264
264
* By default, event listeners are invoked in the order they are added. The`emitter.prependListener()` method can be used as an alternative to add the
265
265
* event listener to the beginning of the listeners array.
@@ -282,7 +282,7 @@ export declare class EventEmitter {
282
282
* Adds a **one-time**`listener` function for the event named `eventName`. The
283
283
* next time `eventName` is triggered, this listener is removed and then invoked.
284
284
*
285
-
* ```js
285
+
* ```js ignore
286
286
* server.once('connection', (stream) => {
287
287
* console.log('Ah, we have our first user!');
288
288
* });
@@ -293,7 +293,7 @@ export declare class EventEmitter {
293
293
* By default, event listeners are invoked in the order they are added. The`emitter.prependOnceListener()` method can be used as an alternative to add the
294
294
* event listener to the beginning of the listeners array.
@@ -310,7 +310,7 @@ export declare class EventEmitter {
310
310
/**
311
311
* Removes the specified `listener` from the listener array for the event named`eventName`.
312
312
*
313
-
* ```js
313
+
* ```js ignore
314
314
* const callback = (stream) => {
315
315
* console.log('someone connected!');
316
316
* };
@@ -328,7 +328,7 @@ export declare class EventEmitter {
328
328
* time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and_before_ the last listener finishes execution will
329
329
* not remove them from`emit()` in progress. Subsequent events behave as expected.
330
330
*
331
-
* ```js
331
+
* ```js ignore
332
332
* const myEmitter = new MyEmitter();
333
333
*
334
334
* const callbackA = () => {
@@ -368,7 +368,7 @@ export declare class EventEmitter {
368
368
* event (as in the example below), `removeListener()` will remove the most
369
369
* recently added instance. In the example the `once('ping')`listener is removed:
370
370
*
371
-
* ```js
371
+
* ```js ignore
372
372
* const ee = new EventEmitter();
373
373
*
374
374
* function pong() {
@@ -425,7 +425,7 @@ export declare class EventEmitter {
425
425
/**
426
426
* Returns a copy of the array of listeners for the event named `eventName`.
427
427
*
428
-
* ```js
428
+
* ```js ignore
429
429
* server.on('connection', (stream) => {
430
430
* console.log('someone connected!');
431
431
* });
@@ -440,7 +440,7 @@ export declare class EventEmitter {
440
440
* Returns a copy of the array of listeners for the event named `eventName`,
441
441
* including any wrappers (such as those created by `.once()`).
@@ -473,7 +473,7 @@ export declare class EventEmitter {
473
473
*
474
474
* Returns `true` if the event had listeners, `false` otherwise.
475
475
*
476
-
* ```js
476
+
* ```js ignore
477
477
* const EventEmitter = require('events');
478
478
* const myEmitter = new EventEmitter();
479
479
*
@@ -520,7 +520,7 @@ export declare class EventEmitter {
520
520
* already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple
@@ -539,7 +539,7 @@ export declare class EventEmitter {
539
539
* Adds a **one-time**`listener` function for the event named `eventName` to the_beginning_ of the listeners array. The next time `eventName` is triggered, this
@@ -558,7 +558,7 @@ export declare class EventEmitter {
558
558
* Returns an array listing the events for which the emitter has registered
559
559
* listeners. The values in the array are strings or `Symbol`s.
560
560
*
561
-
* ```js
561
+
* ```js ignore
562
562
* const EventEmitter = require('events');
563
563
* const myEE = new EventEmitter();
564
564
* myEE.on('foo', () => {});
@@ -584,7 +584,7 @@ export declare class EventEmitter {
584
584
* This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event
585
585
* semantics and does not listen to the `'error'` event.
0 commit comments