Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: update stream.pipeline() signature #31789

Closed
wants to merge 1 commit into from
Closed

doc: update stream.pipeline() signature #31789

wants to merge 1 commit into from

Conversation

vsemozhetbyt
Copy link
Contributor

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

The ...transforms parameter seems optional.

Refs:

if (streams.length < 2) {
throw new ERR_MISSING_ARGS('streams');
}

Refs: https://github.com/nodejs/node/blob/e559842188f541b884abff2ffad4d2d3e1b841a6/doc/api/stream.md#streams-compatibility-with-async-generators-and-async-iterators
(see the last example)

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. stream Issues and PRs related to the stream subsystem. labels Feb 14, 2020
@ronag
Copy link
Member

ronag commented Feb 14, 2020

Isn't ...transform already optional by definition? i.e. ... is a sequence which may be empty.

@jasnell
Copy link
Member

jasnell commented Feb 14, 2020

Yes, but the [ .. ] bracket syntax is more idiomatic across our docs.

@vsemozhetbyt
Copy link
Contributor Author

vsemozhetbyt commented Feb 14, 2020

Sorry, I did not even consider ... may mean an empty list (i.e. for me it was rather transform+ than transform*). So maybe there are some more readers like me)

@vsemozhetbyt
Copy link
Contributor Author

lpinca pushed a commit that referenced this pull request Feb 22, 2020
The  `...transforms` parameter is optional.

Refs: https://github.com/nodejs/node/blob/0875837417/lib/internal/streams/pipeline.js#L130-L132
Refs: https://github.com/nodejs/node/blob/e559842188/doc/api/stream.md#streams-compatibility-with-async-generators-and-async-iterators

PR-URL: #31789
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@lpinca
Copy link
Member

lpinca commented Feb 22, 2020

Landed in 2f23918.

@lpinca lpinca closed this Feb 22, 2020
@vsemozhetbyt vsemozhetbyt deleted the doc-stream-pipeline-signature branch February 22, 2020 10:04
MylesBorins pushed a commit that referenced this pull request Mar 4, 2020
The  `...transforms` parameter is optional.

Refs: https://github.com/nodejs/node/blob/0875837417/lib/internal/streams/pipeline.js#L130-L132
Refs: https://github.com/nodejs/node/blob/e559842188/doc/api/stream.md#streams-compatibility-with-async-generators-and-async-iterators

PR-URL: #31789
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants