diff options
author | Naor Tedgi (Abu Emma) <naor.tedgi@gmail.com> | 2022-10-15 13:07:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-15 13:07:47 +0300 |
commit | 84064bfd6c237a7451ff7b025e47dbe0775704c9 (patch) | |
tree | 977f6b90246b1b198c2764077ae06f1e69dd14af /doc/api/stream.md | |
parent | 6fb466bc38b1b489afe16ab4c88f08105b9ddb94 (diff) |
lib: promise version of streams.finished call clean up
implement autoCleanup logic. update docs add autoCleanup description
ref: https://github.com/nodejs/node/issues/44556
PR-URL: https://github.com/nodejs/node/pull/44862
Refs: https://github.com/nodejs/node/issues/44556
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Diffstat (limited to 'doc/api/stream.md')
-rw-r--r-- | doc/api/stream.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md index 7c0cdfe8e5d..5b65340f494 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2363,6 +2363,7 @@ changes: --> * `stream` {Stream} A readable and/or writable stream. + * `options` {Object} * `error` {boolean} If set to `false`, then a call to `emit('error', err)` is not treated as finished. **Default:** `true`. @@ -2376,8 +2377,12 @@ changes: underlying stream will _not_ be aborted if the signal is aborted. The callback will get called with an `AbortError`. All registered listeners added by this function will also be removed. + * `cleanup` {boolean} remove all registered stream listeners. + **Default:** `false`. + * `callback` {Function} A callback function that takes an optional error argument. + * Returns: {Function} A cleanup function which removes all registered listeners. |