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: add process api data types to documentation #9505

Closed
wants to merge 4 commits into from

Conversation

imatveev
Copy link
Contributor

@imatveev imatveev commented Nov 7, 2016

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

doc

Description of change

Clarified part of data types of properties and return values of process module in docs due to item

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem. labels Nov 7, 2016
@@ -852,13 +871,15 @@ And `process.argv`:
added: v0.1.100
-->

* {String}

The `process.execPath` property returns the absolute pathname of the executable
that started the Node.js process.

For example:

```sh
Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't be sh if we're converting it to a JavaScript string value, it should be js.

@@ -603,6 +613,9 @@ added: v6.1.0

* `previousValue` {Object} A previous return value from calling
`process.cpuUsage()`
* return: {Object}
Copy link
Contributor

@mscdex mscdex Nov 8, 2016

Choose a reason for hiding this comment

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

Can you capitalize every instance of 'return' to look like 'Return'?

@@ -931,6 +952,8 @@ is safer than calling `process.exit()`.
added: v0.11.8
-->

* {Number}
Copy link
Contributor

Choose a reason for hiding this comment

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

You might be more specific here and use {Integer} instead.

@@ -1008,6 +1037,8 @@ Android)
added: v0.1.28
-->

* return: {Number}
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto about using {Integer}.

Copy link
Contributor

Choose a reason for hiding this comment

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

Same goes for any other non-floating point number values.

@imatveev
Copy link
Contributor Author

imatveev commented Nov 8, 2016

Added changes according to @mscdex review.

@@ -1634,6 +1685,8 @@ console.log(`Version: ${process.version}`);
added: v0.2.0
-->

* Return: {Object}
Copy link
Member

Choose a reason for hiding this comment

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

I think "Return:" should be removed here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed.

@mscdex
Copy link
Contributor

mscdex commented Nov 8, 2016

LGTM

@@ -1576,6 +1622,7 @@ See the [TTY][] documentation for more information.
added: v0.1.104
-->

* {String}
Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency with the other changes, maybe add a blank line after this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

@silverwind
Copy link
Contributor

Thanks! Landed in c184f22.

@silverwind silverwind closed this Nov 11, 2016
silverwind pushed a commit that referenced this pull request Nov 11, 2016
PR-URL: #9505
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
addaleax pushed a commit that referenced this pull request Nov 22, 2016
PR-URL: #9505
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
@MylesBorins
Copy link
Contributor

is this accurate for v4 or v6?

@imatveev
Copy link
Contributor Author

Checked on V6, can check on V4 if it needs to be done.

@imatveev imatveev deleted the docs-process-props-data-type branch December 15, 2016 22:26
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
PR-URL: #9505
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
PR-URL: #9505
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
@MylesBorins MylesBorins mentioned this pull request Dec 21, 2016
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. process Issues and PRs related to the process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants