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: #46312
Refs: #46190
Refs: #46205
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
debadree25 authored and ruyadorno committed Jan 31, 2023
1 parent 43cad78 commit 996bac0
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 @@ -2601,6 +2601,9 @@ further errors except from `_destroy()` may be emitted as `'error'`.
<!-- YAML
added: v10.0.0
changes:
- version: v19.5.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 @@ -2620,7 +2623,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 @@ -3029,10 +3034,16 @@ added: v17.0.0

<!-- YAML
added: v16.8.0
changes:
- version: v19.5.0
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 @@ -3052,6 +3063,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 996bac0

Please sign in to comment.