From 80c1f5ce8af815bc4ab5f76fd3a584c570b5ebe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9?= Date: Thu, 27 Jun 2024 22:56:25 +0100 Subject: [PATCH] doc, typings: events.once accepts symbol event type PR-URL: https://github.com/nodejs/node/pull/53542 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Luigi Pinca --- doc/api/events.md | 2 +- lib/events.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/events.md b/doc/api/events.md index 8983d9d5daba51..1addeb123f4ed3 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -1337,7 +1337,7 @@ changes: --> * `emitter` {EventEmitter} -* `name` {string} +* `name` {string|symbol} * `options` {Object} * `signal` {AbortSignal} Can be used to cancel waiting for the event. * Returns: {Promise} diff --git a/lib/events.js b/lib/events.js index 4d8b5bbb1e6f3f..1d9239d276049b 100644 --- a/lib/events.js +++ b/lib/events.js @@ -967,7 +967,7 @@ function getMaxListeners(emitterOrTarget) { * Creates a `Promise` that is fulfilled when the emitter * emits the given event. * @param {EventEmitter} emitter - * @param {string} name + * @param {string | symbol} name * @param {{ signal: AbortSignal; }} [options] * @returns {Promise} */