doc: improve stream.compose documentation clarity#61975
Open
turanalmammadov wants to merge 1 commit intonodejs:mainfrom
Open
doc: improve stream.compose documentation clarity#61975turanalmammadov wants to merge 1 commit intonodejs:mainfrom
turanalmammadov wants to merge 1 commit intonodejs:mainfrom
Conversation
- Clarify that compose requires Duplex streams (transforms) when piping multiple streams; add reference to Duplex.from for combining write-only + read-only streams without piping - Explain 'readable Duplex' and 'writable Duplex' terminology: Duplex instances with configurable readable/writable options where only one side is used Refs: nodejs#40812 Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improves the
stream.composedocumentation to address confusion raised in #40812:Clarify Duplex vs Duplex.from: When composing multiple streams, all must be Duplex streams (e.g. transforms) that get piped together. For combining a write-only stream with a read-only stream without piping, use
stream.Duplex.from({ writable, readable })instead.Explain readable/writable Duplex terminology: The terms "readable Duplex" and "writable Duplex" refer to Duplex instances with configurable
readableandwritableoptions where only one side is used. This addresses the confusion about how a "readable Duplex" or "writable Duplex" can exist when Duplex implies both directions.Refs: #40812
Made with Cursor