Skip to content
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

os: fix cpus invalid return type jsdoc syntax #43006

Merged
merged 2 commits into from
May 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions lib/os.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ function loadavg() {
* logical CPU core.
*
* @returns {Array<{
* model: string
* speed: number
* model: string,
* speed: number,
Comment on lines +122 to +123
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a personal preference of using ; in type definitions, but I'm fine with , if we already use it elsewhere.

* times: {
* user: number
* nice: number
* sys: number
* idle: number
* irq: number
* }
* user: number,
* nice: number,
* sys: number,
* idle: number,
* irq: number,
* },
* }>}
*/
function cpus() {
Expand Down Expand Up @@ -246,13 +246,13 @@ function getCIDR(address, netmask, family) {

/**
* @returns {Record<string, Array<{
* address: string
* netmask: string
* family: 4 | 6
* mac: string
* internal: boolean
* scopeid: number
* cidr: string | null
* address: string,
* netmask: string,
* family: 4 | 6,
* mac: string,
* internal: boolean,
* scopeid: number,
* cidr: string | null,
* }>>}
*/
function networkInterfaces() {
Expand Down Expand Up @@ -329,11 +329,11 @@ function getPriority(pid) {
* `'buffer'`, the `username`, `shell`, and `homedir` values will
* be `Buffer` instances.
* @returns {{
* uid: number
* gid: number
* username: string
* homedir: string
* shell: string | null
* uid: number,
* gid: number,
* username: string,
* homedir: string,
* shell: string | null,
* }}
*/
function userInfo(options) {
Expand Down