mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
typings: fix os.cpus invalid return type
PR-URL: https://github.com/nodejs/node/pull/43006 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
40
lib/os.js
40
lib/os.js
@@ -119,15 +119,15 @@ function loadavg() {
|
||||
* logical CPU core.
|
||||
*
|
||||
* @returns {Array<{
|
||||
* model: string
|
||||
* speed: number
|
||||
* model: string,
|
||||
* speed: number,
|
||||
* times: {
|
||||
* user: number
|
||||
* nice: number
|
||||
* sys: number
|
||||
* idle: number
|
||||
* irq: number
|
||||
* }
|
||||
* user: number,
|
||||
* nice: number,
|
||||
* sys: number,
|
||||
* idle: number,
|
||||
* irq: number,
|
||||
* },
|
||||
* }>}
|
||||
*/
|
||||
function cpus() {
|
||||
@@ -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() {
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user