| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8f1aee9 commit 62dbd36
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -603,10 +603,10 @@ myEmitter.emit('event', 1, 2, 3, 4, 5); | |||
| 603 | 603 | added: v6.0.0 | |
| 604 | 604 | --> | |
| 605 | 605 | ||
| 606 | - * Returns: {Array} | ||
| 606 | + * Returns: {string\[]|symbol\[]} | ||
| 607 | 607 | ||
| 608 | 608 | Returns an array listing the events for which the emitter has registered | |
| 609 | - listeners. The values in the array are strings or `Symbol`s. | ||
| 609 | + listeners. | ||
| 610 | 610 | ||
| 611 | 611 | ```mjs | |
| 612 | 612 | import { EventEmitter } from 'node:events'; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -871,7 +871,7 @@ function listenerCount(type, listener) { | |||
| 871 | 871 | /** | |
| 872 | 872 | * Returns an array listing the events for which | |
| 873 | 873 | * the emitter has registered listeners. | |
| 874 | - * @returns {any[]} | ||
| 874 | + * @returns {(string | symbol)[]} | ||
| 875 | 875 | */ | |
| 876 | 876 | EventEmitter.prototype.eventNames = function eventNames() { | |
| 877 | 877 | return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments