stream: readable.compose
fails to return a Duplex
#55203
Labels
stream
Issues and PRs related to the stream subsystem.
readable.compose
fails to return a Duplex
#55203
The intention of
readable.compose()
is that the method returns the Duplex from the internals/streams/compose function unscathed.Unfortunately, because it's merged onto
Readable.prototype
as a "stream-returning operator":node/lib/stream.js
Lines 64 to 83 in 8a3482e
...its return value is passed via
Readable.from()
, clobbering the Duplex into a Readable.The
.compose()
operator needs specifically to bypass this mechanism.Refs: #44937
The text was updated successfully, but these errors were encountered: