@@ -175,7 +175,7 @@ added and `'removeListener'` when existing listeners are removed.
175
175
added: v0.1.26
176
176
-->
177
177
178
- * ` eventName ` {any } The name of the event being listened for
178
+ * ` eventName ` {string|symbol } The name of the event being listened for
179
179
* ` listener ` {Function} The event handler function
180
180
181
181
The ` EventEmitter ` instance will emit its own ` 'newListener' ` event * before*
@@ -219,7 +219,7 @@ changes:
219
219
now yields the original listener function.
220
220
-->
221
221
222
- * ` eventName ` {any } The event name
222
+ * ` eventName ` {string|symbol } The event name
223
223
* ` listener ` {Function} The event handler function
224
224
225
225
The ` 'removeListener' ` event is emitted * after* the ` listener ` is removed.
@@ -287,7 +287,7 @@ Its `name` property is set to `'MaxListenersExceededWarning'`.
287
287
<!-- YAML
288
288
added: v0.1.26
289
289
-->
290
- - ` eventName ` {any }
290
+ - ` eventName ` {string|symbol }
291
291
- ` listener ` {Function}
292
292
293
293
Alias for ` emitter.on(eventName, listener) ` .
@@ -296,7 +296,7 @@ Alias for `emitter.on(eventName, listener)`.
296
296
<!-- YAML
297
297
added: v0.1.26
298
298
-->
299
- - ` eventName ` {any }
299
+ - ` eventName ` {string|symbol }
300
300
- ` ...args ` {any}
301
301
302
302
Synchronously calls each of the listeners registered for the event named
@@ -340,7 +340,7 @@ set by [`emitter.setMaxListeners(n)`][] or defaults to
340
340
added: v3.2.0
341
341
-->
342
342
343
- * ` eventName ` {any } The name of the event being listened for
343
+ * ` eventName ` {string|symbol } The name of the event being listened for
344
344
345
345
Returns the number of listeners listening to the event named ` eventName ` .
346
346
@@ -353,7 +353,7 @@ changes:
353
353
description: For listeners attached using `.once()` this returns the
354
354
original listeners instead of wrapper functions now.
355
355
-->
356
- - ` eventName ` {any }
356
+ - ` eventName ` {string|symbol }
357
357
358
358
Returns a copy of the array of listeners for the event named ` eventName ` .
359
359
@@ -370,7 +370,7 @@ console.log(util.inspect(server.listeners('connection')));
370
370
added: v0.1.101
371
371
-->
372
372
373
- * ` eventName ` {any } The name of the event.
373
+ * ` eventName ` {string|symbol } The name of the event.
374
374
* ` listener ` {Function} The callback function
375
375
376
376
Adds the ` listener ` function to the end of the listeners array for the
@@ -406,7 +406,7 @@ myEE.emit('foo');
406
406
added: v0.3.0
407
407
-->
408
408
409
- * ` eventName ` {any } The name of the event.
409
+ * ` eventName ` {string|symbol } The name of the event.
410
410
* ` listener ` {Function} The callback function
411
411
412
412
Adds a ** one-time** ` listener ` function for the event named ` eventName ` . The
@@ -439,7 +439,7 @@ myEE.emit('foo');
439
439
added: v6.0.0
440
440
-->
441
441
442
- * ` eventName ` {any } The name of the event.
442
+ * ` eventName ` {string|symbol } The name of the event.
443
443
* ` listener ` {Function} The callback function
444
444
445
445
Adds the ` listener ` function to the * beginning* of the listeners array for the
@@ -461,7 +461,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.
461
461
added: v6.0.0
462
462
-->
463
463
464
- * ` eventName ` {any } The name of the event.
464
+ * ` eventName ` {string|symbol } The name of the event.
465
465
* ` listener ` {Function} The callback function
466
466
467
467
Adds a ** one-time** ` listener ` function for the event named ` eventName ` to the
@@ -480,7 +480,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.
480
480
<!-- YAML
481
481
added: v0.1.26
482
482
-->
483
- - ` eventName ` {any }
483
+ - ` eventName ` {string|symbol }
484
484
485
485
Removes all listeners, or those of the specified ` eventName ` .
486
486
@@ -494,7 +494,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.
494
494
<!-- YAML
495
495
added: v0.1.26
496
496
-->
497
- - ` eventName ` {any }
497
+ - ` eventName ` {string|symbol }
498
498
- ` listener ` {Function}
499
499
500
500
Removes the specified ` listener ` from the listener array for the event named
@@ -578,7 +578,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.
578
578
<!-- YAML
579
579
added: REPLACEME
580
580
-->
581
- - ` eventName ` {any }
581
+ - ` eventName ` {string|symbol }
582
582
583
583
Returns a copy of the array of listeners for the event named ` eventName ` ,
584
584
including any wrappers (such as those created by ` .once ` ).
0 commit comments