Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 277122e

Browse filesBrowse 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 <jasnell@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
1 parent 28e1648 commit 277122e
Copy full SHA for 277122e

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Open diff view settings
Collapse file

‎lib/os.js‎

Copy file name to clipboardExpand all lines: lib/os.js
+5-5Lines changed: 5 additions & 5 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.