Skip to content

doc: standardize rest parameters - #8485

Closed
TimothyGu wants to merge 1 commit into
nodejs:masterfrom
TimothyGu:std-rest-params
Closed

doc: standardize rest parameters#8485
TimothyGu wants to merge 1 commit into
nodejs:masterfrom
TimothyGu:std-rest-params

Conversation

@TimothyGu

@TimothyGuTimothyGu commented Sep 10, 2016

Copy link
Copy Markdown
Member
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.

@mscdexmscdex added the doc Issues and PRs related to the documentations. label Sep 10, 2016
@addaleax

Copy link
Copy Markdown
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
Copy Markdown
Contributor

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.

Comment threaddoc/api/util.md Outdated

Copy link
Copy Markdown
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
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed.

@lpinca

Copy link
Copy Markdown
Member

LGTM

@jasnell

Copy link
Copy Markdown
Member

LGTM

@lpinca

Copy link
Copy Markdown
Member

Landed in e1ddcb7, thanks!

@lpincalpinca 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docIssues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@TimothyGu@addaleax@cjihrig@lpinca@jasnell@mscdex@MylesBorins