From 631afeb886ac43cc90cc3dae5a319a51b45ee9ef Mon Sep 17 00:00:00 2001 From: Debadree Chatterjee Date: Wed, 1 Feb 2023 00:21:14 +0530 Subject: [PATCH] doc: include webstreams in finished() and Duplex.from() parameters PR-URL: https://github.com/nodejs/node/pull/46312 Refs: https://github.com/nodejs/node/pull/46190 Refs: https://github.com/nodejs/node/pull/46205 Reviewed-By: Antoine du Hamel --- doc/api/stream.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 1e87af4d8f6677..a4f8ed6e5aedab 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2579,6 +2579,9 @@ further errors except from `_destroy()` may be emitted as `'error'`. -* `stream` {Stream} A readable and/or writable stream. +* `stream` {Stream|ReadableStream|WritableStream} + +A readable and/or writable stream/webstream. * `options` {Object} * `error` {boolean} If set to `false`, then a call to `emit('error', err)` is @@ -3022,10 +3027,16 @@ added: v17.0.0 * `src` {Stream|Blob|ArrayBuffer|string|Iterable|AsyncIterable| - AsyncGeneratorFunction|AsyncFunction|Promise|Object} + AsyncGeneratorFunction|AsyncFunction|Promise|Object| + ReadableStream|WritableStream} A utility method for creating duplex streams. @@ -3045,6 +3056,8 @@ A utility method for creating duplex streams. `writable` into `Stream` and then combines them into `Duplex` where the `Duplex` will write to the `writable` and read from the `readable`. * `Promise` converts into readable `Duplex`. Value `null` is ignored. +* `ReadableStream` converts into readable `Duplex`. +* `WritableStream` converts into writable `Duplex`. * Returns: {stream.Duplex} If an `Iterable` object containing promises is passed as an argument,