lib: fix and improve os typings

1. marked optional params as such
2. assigned default values using jsdoc conventions.

PR-URL: https://github.com/nodejs/node/pull/38316
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
This commit is contained in:
Akhil Marsonya authored and Michaël Zasso committed 2021-06-11 09:30:07 +02:00
1 parent 5f3e96b570
commit 490bc58229
1 file changed
+5 -5
+5 -5
View File
@@ -286,7 +286,7 @@ function networkInterfaces() {
}
/**
* @param {number} pid
* @param {number} [pid=0]
* @param {number} priority
* @returns {void}
*/
@@ -306,7 +306,7 @@ function setPriority(pid, priority) {
}
/**
* @param {number} pid
* @param {number} [pid=0]
* @returns {number}
*/
function getPriority(pid) {
@@ -325,9 +325,9 @@ function getPriority(pid) {
}
/**
* @param {{ encoding?: string }} options If `encoding` is set to `'buffer'`,
* the `username`, `shell`, and `homedir` values will be `Buffer` instances.
* Default: `'utf8'`
* @param {{ encoding?: string }} [options=utf8] If `encoding` is set to
* `'buffer'`, the `username`, `shell`, and `homedir` values will
* be `Buffer` instances.
* @returns {{
* uid: number
* gid: number