Skip to content

Commit

Permalink
doc: document missing options of events.on
Browse files Browse the repository at this point in the history
  • Loading branch information
atlowChemi committed Mar 14, 2024
1 parent 639c096 commit 3b693ac
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -1661,12 +1661,24 @@ console.log(listenerCount(myEmitter, 'event'));
added:
- v13.6.0
- v12.16.0
changes:
- version:
- v20.0.0
pr-url: https://github.com/nodejs/node/pull/41276
description: The `close`, `highWatermark`, and `lowWatermark`
options are supported now.
-->

* `emitter` {EventEmitter}
* `eventName` {string|symbol} The name of the event being listened for
* `options` {Object}
* `signal` {AbortSignal} Can be used to cancel awaiting events.
* `close` - {string\[]} Can be used to set event names that will end
the iteration.
* `highWatermark` - {integer} **Default:** `Number.MAX_SAFE_INTEGER`
Sets the `highWaterMark` used for the stream.
* `lowWatermark` - {integer} **Default:** `1`
Sets the `lowWaterMark` used for the stream.
* Returns: {AsyncIterator} that iterates `eventName` events emitted by the `emitter`

```mjs
Expand Down

0 comments on commit 3b693ac

Please sign in to comment.