Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: include webstreams in finished() and Duplex.from() parameters #46312

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -2603,6 +2603,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 @@ -2622,7 +2625,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 @@ -3031,10 +3036,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 @@ -3054,6 +3065,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