Skip to content

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.

doc/api/util.md Outdated
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
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