mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
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:
parent
5f3e96b570
commit
490bc58229
10
lib/os.js
10
lib/os.js
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user