Skip to content

Commit 8ae52bf

Browse files
committed
doc: include webstreams in finished() and Duplex.from() parameters
PR-URL: nodejs#46312 Refs: nodejs#46190 Refs: nodejs#46205 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 7e23a16 commit 8ae52bf

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

doc/api/stream.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -2579,6 +2579,9 @@ further errors except from `_destroy()` may be emitted as `'error'`.
25792579
<!-- YAML
25802580
added: v10.0.0
25812581
changes:
2582+
- version: v19.5.0
2583+
pr-url: https://github.com/nodejs/node/pull/46205
2584+
description: Added support for `ReadableStream` and `WritableStream`.
25822585
- version: v15.11.0
25832586
pr-url: https://github.com/nodejs/node/pull/37354
25842587
description: The `signal` option was added.
@@ -2598,7 +2601,9 @@ changes:
25982601
finished before the call to `finished(stream, cb)`.
25992602
-->
26002603

2601-
* `stream` {Stream} A readable and/or writable stream.
2604+
* `stream` {Stream|ReadableStream|WritableStream}
2605+
2606+
A readable and/or writable stream/webstream.
26022607

26032608
* `options` {Object}
26042609
* `error` {boolean} If set to `false`, then a call to `emit('error', err)` is
@@ -3011,10 +3016,16 @@ added: v17.0.0
30113016

30123017
<!-- YAML
30133018
added: v16.8.0
3019+
changes:
3020+
- version: v19.5.0
3021+
pr-url: https://github.com/nodejs/node/pull/46190
3022+
description: The `src` argument can now be a `ReadableStream` or
3023+
`WritableStream`.
30143024
-->
30153025

30163026
* `src` {Stream|Blob|ArrayBuffer|string|Iterable|AsyncIterable|
3017-
AsyncGeneratorFunction|AsyncFunction|Promise|Object}
3027+
AsyncGeneratorFunction|AsyncFunction|Promise|Object|
3028+
ReadableStream|WritableStream}
30183029

30193030
A utility method for creating duplex streams.
30203031

@@ -3034,6 +3045,8 @@ A utility method for creating duplex streams.
30343045
`writable` into `Stream` and then combines them into `Duplex` where the
30353046
`Duplex` will write to the `writable` and read from the `readable`.
30363047
* `Promise` converts into readable `Duplex`. Value `null` is ignored.
3048+
* `ReadableStream` converts into readable `Duplex`.
3049+
* `WritableStream` converts into writable `Duplex`.
30373050
* Returns: {stream.Duplex}
30383051

30393052
If an `Iterable` object containing promises is passed as an argument,

0 commit comments

Comments
 (0)