@types/node 20.12.7 → 20.12.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
node/os.d.ts CHANGED
@@ -5,17 +5,22 @@
5
5
  * ```js
6
6
  * const os = require('node:os');
7
7
  * ```
8
- * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/os.js)
8
+ * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/os.js)
9
9
  */
10
10
  declare module "os" {
11
11
  interface CpuInfo {
12
12
  model: string;
13
13
  speed: number;
14
14
  times: {
15
+ /** The number of milliseconds the CPU has spent in user mode. */
15
16
  user: number;
17
+ /** The number of milliseconds the CPU has spent in nice mode. */
16
18
  nice: number;
19
+ /** The number of milliseconds the CPU has spent in sys mode. */
17
20
  sys: number;
21
+ /** The number of milliseconds the CPU has spent in idle mode. */
18
22
  idle: number;
23
+ /** The number of milliseconds the CPU has spent in irq mode. */
19
24
  irq: number;
20
25
  };
21
26
  }
@@ -75,7 +80,7 @@ declare module "os" {
75
80
  function totalmem(): number;
76
81
  /**
77
82
  * Returns an array of objects containing information about each logical CPU core.
78
- * The array will be empty if no CPU information is available, such as if the`/proc` file system is unavailable.
83
+ * The array will be empty if no CPU information is available, such as if the `/proc` file system is unavailable.
79
84
  *
80
85
  * The properties included on each object include:
81
86
  *
@@ -229,14 +234,14 @@ declare module "os" {
229
234
  /**
230
235
  * Returns information about the currently effective user. On POSIX platforms,
231
236
  * this is typically a subset of the password file. The returned object includes
232
- * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and`gid` fields are `-1`, and `shell` is `null`.
237
+ * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and `gid` fields are `-1`, and `shell` is `null`.
233
238
  *
234
239
  * The value of `homedir` returned by `os.userInfo()` is provided by the operating
235
240
  * system. This differs from the result of `os.homedir()`, which queries
236
241
  * environment variables for the home directory before falling back to the
237
242
  * operating system response.
238
243
  *
239
- * Throws a `SystemError` if a user has no `username` or `homedir`.
244
+ * Throws a [`SystemError`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`.
240
245
  * @since v6.0.0
241
246
  */
242
247
  function userInfo(options: { encoding: "buffer" }): UserInfo<Buffer>;
@@ -387,6 +392,13 @@ declare module "os" {
387
392
  const WSA_E_CANCELLED: number;
388
393
  const WSAEREFUSED: number;
389
394
  }
395
+ namespace dlopen {
396
+ const RTLD_LAZY: number;
397
+ const RTLD_NOW: number;
398
+ const RTLD_GLOBAL: number;
399
+ const RTLD_LOCAL: number;
400
+ const RTLD_DEEPBIND: number;
401
+ }
390
402
  namespace priority {
391
403
  const PRIORITY_LOW: number;
392
404
  const PRIORITY_BELOW_NORMAL: number;
@@ -397,13 +409,18 @@ declare module "os" {
397
409
  }
398
410
  }
399
411
  const devNull: string;
412
+ /**
413
+ * The operating system-specific end-of-line marker.
414
+ * * `\n` on POSIX
415
+ * * `\r\n` on Windows
416
+ */
400
417
  const EOL: string;
401
418
  /**
402
419
  * Returns the operating system CPU architecture for which the Node.js binary was
403
420
  * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`,`'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`,
404
421
  * and `'x64'`.
405
422
  *
406
- * The return value is equivalent to `process.arch`.
423
+ * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v20.x/api/process.html#processarch).
407
424
  * @since v0.5.0
408
425
  */
409
426
  function arch(): string;
@@ -418,7 +435,7 @@ declare module "os" {
418
435
  /**
419
436
  * Returns a string identifying the operating system platform for which
420
437
  * the Node.js binary was compiled. The value is set at compile time.
421
- * Possible values are `'aix'`, `'darwin'`, `'freebsd'`,`'linux'`,`'openbsd'`, `'sunos'`, and `'win32'`.
438
+ * Possible values are `'aix'`, `'darwin'`, `'freebsd'`, `'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`.
422
439
  *
423
440
  * The return value is equivalent to `process.platform`.
424
441
  *
@@ -428,7 +445,7 @@ declare module "os" {
428
445
  */
429
446
  function platform(): NodeJS.Platform;
430
447
  /**
431
- * Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`,`mips`, `mips64`, `ppc64`, `ppc64le`, `s390`, `s390x`, `i386`, `i686`, `x86_64`.
448
+ * Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`, `mips`, `mips64`, `ppc64`, `ppc64le`, `s390`, `s390x`, `i386`, `i686`, `x86_64`.
432
449
  *
433
450
  * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
434
451
  * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
@@ -457,15 +474,15 @@ declare module "os" {
457
474
  */
458
475
  function getPriority(pid?: number): number;
459
476
  /**
460
- * Attempts to set the scheduling priority for the process specified by `pid`. If`pid` is not provided or is `0`, the process ID of the current process is used.
477
+ * Attempts to set the scheduling priority for the process specified by `pid`. If `pid` is not provided or is `0`, the process ID of the current process is used.
461
478
  *
462
- * The `priority` input must be an integer between `-20` (high priority) and `19`(low priority). Due to differences between Unix priority levels and Windows
463
- * priority classes, `priority` is mapped to one of six priority constants in`os.constants.priority`. When retrieving a process priority level, this range
479
+ * The `priority` input must be an integer between `-20` (high priority) and `19` (low priority). Due to differences between Unix priority levels and Windows
480
+ * priority classes, `priority` is mapped to one of six priority constants in `os.constants.priority`. When retrieving a process priority level, this range
464
481
  * mapping may cause the return value to be slightly different on Windows. To avoid
465
482
  * confusion, set `priority` to one of the priority constants.
466
483
  *
467
484
  * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user
468
- * privileges. Otherwise the set priority will be silently reduced to`PRIORITY_HIGH`.
485
+ * privileges. Otherwise the set priority will be silently reduced to `PRIORITY_HIGH`.
469
486
  * @since v10.10.0
470
487
  * @param [pid=0] The process ID to set scheduling priority for.
471
488
  * @param priority The scheduling priority to assign to the process.
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.12.7",
3
+ "version": "20.12.9",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -212,6 +212,6 @@
212
212
  "dependencies": {
213
213
  "undici-types": "~5.26.4"
214
214
  },
215
- "typesPublisherContentHash": "257832cf20d61375d191770b6747feddc6c529ce9401986ddec96cc397099d0a",
215
+ "typesPublisherContentHash": "e2928530ca9e17aba7534c840c2ef692da1ac9f35810d5ac1955b8c3b2f2fbc5",
216
216
  "typeScriptVersion": "4.7"
217
217
  }
node/path.d.ts CHANGED
@@ -13,7 +13,7 @@ declare module "path/win32" {
13
13
  * ```js
14
14
  * const path = require('node:path');
15
15
  * ```
16
- * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/path.js)
16
+ * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/path.js)
17
17
  */
18
18
  declare module "path" {
19
19
  namespace path {
node/perf_hooks.d.ts CHANGED
@@ -27,14 +27,14 @@
27
27
  * performance.measure('A to B', 'A', 'B');
28
28
  * });
29
29
  * ```
30
- * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/perf_hooks.js)
30
+ * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/perf_hooks.js)
31
31
  */
32
32
  declare module "perf_hooks" {
33
33
  import { AsyncResource } from "node:async_hooks";
34
34
  type EntryType = "node" | "mark" | "measure" | "gc" | "function" | "http2" | "http" | "dns" | "net";
35
35
  interface NodeGCPerformanceDetail {
36
36
  /**
37
- * When `performanceEntry.entryType` is equal to 'gc', `the performance.kind` property identifies
37
+ * When `performanceEntry.entryType` is equal to 'gc', the `performance.kind` property identifies
38
38
  * the type of garbage collection operation that occurred.
39
39
  * See perf_hooks.constants for valid values.
40
40
  */
@@ -392,7 +392,7 @@ declare module "perf_hooks" {
392
392
  getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
393
393
  /**
394
394
  * Returns a list of `PerformanceEntry` objects in chronological order
395
- * with respect to `performanceEntry.startTime` whose `performanceEntry.entryType`is equal to `type`.
395
+ * with respect to `performanceEntry.startTime` whose `performanceEntry.entryType` is equal to `type`.
396
396
  *
397
397
  * ```js
398
398
  * const {