| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b064433 commit 34a9b85
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 | |
|---|---|---|---|
@@ -882,7 +882,7 @@ function listenerCount(type, listener) { | |||
| 882 | 882 | /** | |
| 883 | 883 | * Returns an array listing the events for which | |
| 884 | 884 | * the emitter has registered listeners. | |
| 885 | - * @returns {any[]} | ||
| 885 | + * @returns {(string | symbol)[]} | ||
| 886 | 886 | */ | |
| 887 | 887 | EventEmitter.prototype.eventNames = function eventNames() { | |
| 888 | 888 | return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments