Skip to content

Commit

Permalink
doc: include webstreams in finished() and Duplex.from() parameters
Browse files Browse the repository at this point in the history
PR-URL: nodejs#46312
Refs: nodejs#46190
Refs: nodejs#46205
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
debadree25 committed Feb 27, 2023
1 parent 58f6443 commit 7eb38e1
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -2579,6 +2579,9 @@ further errors except from `_destroy()` may be emitted as `'error'`.
<!-- YAML
added: v10.0.0
changes:
- version: v18.14.0
pr-url: https://github.com/nodejs/node/pull/46205
description: Added support for `ReadableStream` and `WritableStream`.
- version: v15.11.0
pr-url: https://github.com/nodejs/node/pull/37354
description: The `signal` option was added.
Expand All @@ -2598,7 +2601,9 @@ changes:
finished before the call to `finished(stream, cb)`.
-->

* `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
Expand Down Expand Up @@ -3011,10 +3016,16 @@ added: v17.0.0

<!-- YAML
added: v16.8.0
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/46190
description: The `src` argument can now be a `ReadableStream` or
`WritableStream`.
-->

* `src` {Stream|Blob|ArrayBuffer|string|Iterable|AsyncIterable|
AsyncGeneratorFunction|AsyncFunction|Promise|Object}
AsyncGeneratorFunction|AsyncFunction|Promise|Object|
ReadableStream|WritableStream}

A utility method for creating duplex streams.

Expand All @@ -3034,6 +3045,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,
Expand Down

0 comments on commit 7eb38e1

Please sign in to comment.