lib: fix isReadable and isWritable return type value

PR-URL: https://github.com/nodejs/node/pull/59089
Fixes: https://github.com/nodejs/node/issues/59006
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mattias Buelens <mattias@buelens.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Gabriel Quaresma 2025-09-07 11:50:36 -03:00 committed by GitHub
parent 4d5792a66c
commit ce08561b67
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3084,10 +3084,17 @@ changes:
-->
* `stream` {Readable|Duplex|ReadableStream}
* Returns: {boolean}
* Returns: {boolean|null} - Only returns `null` if `stream` is not a valid `Readable`, `Duplex` or `ReadableStream`.
Returns whether the stream is readable.
### `stream.isWritable(stream)`
* `stream` {Writable|Duplex|WritableStream}
* Returns: {boolean|null} - Only returns `null` if `stream` is not a valid `Writable`, `Duplex` or `WritableStream`.
Returns whether the stream is writable.
### `stream.Readable.from(iterable[, options])`
<!-- YAML