Skip to content

Commit 80c1f5c

Browse files
Renegade334aduh95
authored andcommitted
doc, typings: events.once accepts symbol event type
PR-URL: #53542 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 4d4a833 commit 80c1f5c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/api/events.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ changes:
13371337
-->
13381338

13391339
* `emitter` {EventEmitter}
1340-
* `name` {string}
1340+
* `name` {string|symbol}
13411341
* `options` {Object}
13421342
* `signal` {AbortSignal} Can be used to cancel waiting for the event.
13431343
* Returns: {Promise}

lib/events.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ function getMaxListeners(emitterOrTarget) {
967967
* Creates a `Promise` that is fulfilled when the emitter
968968
* emits the given event.
969969
* @param {EventEmitter} emitter
970-
* @param {string} name
970+
* @param {string | symbol} name
971971
* @param {{ signal: AbortSignal; }} [options]
972972
* @returns {Promise}
973973
*/

0 commit comments

Comments
 (0)