From c4fdc85a92f9d04c8e9b6460de0cd63b69b03a78 Mon Sep 17 00:00:00 2001 From: Renegade334 Date: Mon, 2 Feb 2026 00:57:33 +0000 Subject: [PATCH] stream: rename `Duplex.toWeb()` type option to `readableType` --- doc/api/stream.md | 11 ++++++++--- lib/internal/webstreams/adapters.js | 14 ++++++++++---- test/parallel/test-stream-duplex.js | 6 +++++- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index ef6dd51eabfd5e..6cd97093b931c8 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -3219,7 +3219,8 @@ changes: If no value is provided, the size will be `1` for all the chunks. * `chunk` {any} * Returns: {number} - * `type` {string} Must be 'bytes' or undefined. + * `type` {string} Specifies the type of the created `ReadableStream`. Must be + `'bytes'` or undefined. * Returns: {ReadableStream} ### `stream.Writable.fromWeb(writableStream[, options])` @@ -3398,9 +3399,12 @@ duplex.once('readable', () => console.log('readable', duplex.read()));