Skip to content

Commit 277122e

Browse files
marsonyatargos
authored andcommitted
lib: fix and improve os typings
1. marked optional params as such 2. assigned default values using jsdoc conventions. PR-URL: #38316 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Shingo Inoue <[email protected]>
1 parent 28e1648 commit 277122e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/os.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ function networkInterfaces() {
286286
}
287287

288288
/**
289-
* @param {number} pid
289+
* @param {number} [pid=0]
290290
* @param {number} priority
291291
* @returns {void}
292292
*/
@@ -306,7 +306,7 @@ function setPriority(pid, priority) {
306306
}
307307

308308
/**
309-
* @param {number} pid
309+
* @param {number} [pid=0]
310310
* @returns {number}
311311
*/
312312
function getPriority(pid) {
@@ -325,9 +325,9 @@ function getPriority(pid) {
325325
}
326326

327327
/**
328-
* @param {{ encoding?: string }} options If `encoding` is set to `'buffer'`,
329-
* the `username`, `shell`, and `homedir` values will be `Buffer` instances.
330-
* Default: `'utf8'`
328+
* @param {{ encoding?: string }} [options=utf8] If `encoding` is set to
329+
* `'buffer'`, the `username`, `shell`, and `homedir` values will
330+
* be `Buffer` instances.
331331
* @returns {{
332332
* uid: number
333333
* gid: number

0 commit comments

Comments
 (0)