-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Conversation
@@ -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 |
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto about using {Integer}
.
There was a problem hiding this comment.
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.
Added changes according to @mscdex review. |
@@ -1634,6 +1685,8 @@ console.log(`Version: ${process.version}`); | |||
added: v0.2.0 | |||
--> | |||
|
|||
* Return: {Object} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
LGTM |
@@ -1576,6 +1622,7 @@ See the [TTY][] documentation for more information. | |||
added: v0.1.104 | |||
--> | |||
|
|||
* {String} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks! Landed in c184f22. |
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>
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>
is this accurate for v4 or v6? |
Checked on V6, can check on V4 if it needs to be done. |
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>
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>
Checklist
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