Skip to content

Commit 4187b81

Browse files
Renegade334marco-ippolito
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 c7e4c3d commit 4187b81

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
@@ -1333,7 +1333,7 @@ changes:
13331333
-->
13341334

13351335
* `emitter` {EventEmitter}
1336-
* `name` {string}
1336+
* `name` {string|symbol}
13371337
* `options` {Object}
13381338
* `signal` {AbortSignal} Can be used to cancel waiting for the event.
13391339
* Returns: {Promise}

lib/events.js

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

0 commit comments

Comments
 (0)