Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ myEmitter.emit('event', 1, 2, 3, 4, 5);
added: v6.0.0
-->

* Returns: {Array}
* Returns: {string\[]|symbol\[]}

Returns an array listing the events for which the emitter has registered
listeners. The values in the array are strings or `Symbol`s.
Comment thread
y-hsgw marked this conversation as resolved.
Outdated
Expand Down
2 changes: 1 addition & 1 deletion lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ function listenerCount(type, listener) {
/**
* Returns an array listing the events for which
* the emitter has registered listeners.
* @returns {any[]}
* @returns {(string | symbol)[]}
*/
EventEmitter.prototype.eventNames = function eventNames() {
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
Expand Down