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: standardize rest parameters #8485

Closed
wants to merge 1 commit into from
Closed

doc: standardize rest parameters #8485

wants to merge 1 commit into from

Conversation

TimothyGu
Copy link
Member

@TimothyGu TimothyGu commented Sep 10, 2016

Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc

Description of change

Current, rest parameters in API documentation take a variety of inconsistent forms, many of which cause the JSON documentation generator to emit a warning such as the following:

Warning: invalid param "..."
 > {"textRaw":"`string` {string} The message to print to `stderr` ","name":"string","type":"string","desc":"The message to print to `stderr`"}
 > util.error([...])

This pull request adopts a consistent form of documenting rest parameters, that fits the ES2015 syntax and is digestible for the documentation generator.

One caveat is that this PR changes the anchors of numerous functions, which may break links on the Internet. I could manually add <a id> to mitigate that, so let me know if that is preferred.

@mscdex mscdex added the doc Issues and PRs related to the documentations. label Sep 10, 2016
@addaleax
Copy link
Member

Thanks, LGTM!

I could manually add <a id> to mitigate that, so let me know if that is preferred.

Hmm. We have been pretty liberal with changing these so far, and definitely thank you for taking care of the internal links that would otherwise have been broken…

@cjihrig
Copy link
Contributor

cjihrig commented Sep 10, 2016

LGTM. As long as the internal links in the docs are working, I think we're fine. As @addaleax said, we've changed these pretty freely in the past. We haven't started considering documentation link changes as semver major... YET.

<!-- YAML
added: v0.3.0
deprecated: v0.11.3
-->

> Stability: 0 - Deprecated: Use [`console.error()`][] instead.

* `string` {string} The message to print to `stderr`
* `...strings` {string} The message to print to `stderr`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalize the type so it will be properly linked.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@lpinca
Copy link
Member

lpinca commented Sep 11, 2016

LGTM

@jasnell
Copy link
Member

jasnell commented Sep 12, 2016

LGTM

@lpinca
Copy link
Member

lpinca commented Sep 14, 2016

Landed in e1ddcb7, thanks!

@lpinca lpinca closed this Sep 14, 2016
lpinca pushed a commit that referenced this pull request Sep 14, 2016
PR-URL: #8485
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@TimothyGu TimothyGu deleted the std-rest-params branch September 14, 2016 06:26
Fishrock123 pushed a commit that referenced this pull request Oct 11, 2016
PR-URL: #8485
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants