diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 524273bc1cd8b5..7c839a6f7aa13f 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -4388,6 +4388,21 @@ import { opendir } from 'node:fs/promises'; } ``` +### DEP0201: Passing `options.type` to `Duplex.toWeb()` + + + +Type: Documentation-only + +Passing the `type` option to [`Duplex.toWeb()`][] is deprecated. To specify the +type of the readable half of the constructed readable-writable pair, use the +`readableType` option instead. + [DEP0142]: #dep0142-repl_builtinlibs [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf [RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3 @@ -4406,6 +4421,7 @@ import { opendir } from 'node:fs/promises'; [`Buffer.isBuffer()`]: buffer.md#static-method-bufferisbufferobj [`Cipheriv`]: crypto.md#class-cipheriv [`Decipheriv`]: crypto.md#class-decipheriv +[`Duplex.toWeb()`]: stream.md#streamduplextowebstreamduplex-options [`Error.isError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/isError [`REPLServer.clearBufferedCommand()`]: repl.md#replserverclearbufferedcommand [`ReadStream.open()`]: fs.md#class-fsreadstream diff --git a/doc/api/stream.md b/doc/api/stream.md index ef6dd51eabfd5e..73009939fe721b 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,13 @@ duplex.once('readable', () => console.log('readable', duplex.read()));