@types/node 20.19.25 → 24.10.3

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.
Files changed (79) hide show
  1. {node v20.19 → node v24.10}/README.md +3 -3
  2. node v24.10/assert/strict.d.ts +111 -0
  3. {node v20.19 → node v24.10}/assert.d.ts +150 -97
  4. {node v20.19 → node v24.10}/async_hooks.d.ts +27 -9
  5. {node v20.19 → node v24.10}/buffer.buffer.d.ts +2 -1
  6. {node v20.19 → node v24.10}/buffer.d.ts +6 -8
  7. {node v20.19 → node v24.10}/child_process.d.ts +11 -10
  8. {node v20.19 → node v24.10}/cluster.d.ts +16 -15
  9. {node v20.19 → node v24.10}/console.d.ts +19 -18
  10. {node v20.19 → node v24.10}/crypto.d.ts +1120 -293
  11. {node v20.19 → node v24.10}/dgram.d.ts +5 -2
  12. {node v20.19 → node v24.10}/diagnostics_channel.d.ts +1 -3
  13. {node v20.19 → node v24.10}/dns/promises.d.ts +30 -6
  14. {node v20.19 → node v24.10}/dns.d.ts +69 -17
  15. {node v20.19 → node v24.10}/domain.d.ts +1 -1
  16. {node v20.19 → node v24.10}/events.d.ts +1 -2
  17. {node v20.19 → node v24.10}/fs/promises.d.ts +85 -38
  18. {node v20.19 → node v24.10}/fs.d.ts +387 -48
  19. {node v20.19 → node v24.10}/globals.d.ts +2 -4
  20. {node v20.19 → node v24.10}/globals.typedarray.d.ts +3 -0
  21. {node v20.19 → node v24.10}/http.d.ts +90 -5
  22. {node v20.19 → node v24.10}/http2.d.ts +166 -41
  23. {node v20.19 → node v24.10}/https.d.ts +4 -3
  24. {node v20.19 → node v24.10}/index.d.ts +13 -5
  25. node v24.10/inspector.d.ts +277 -0
  26. {node v20.19 → node v24.10}/inspector.generated.d.ts +1096 -829
  27. {node v20.19 → node v24.10}/module.d.ts +403 -48
  28. {node v20.19 → node v24.10}/net.d.ts +62 -20
  29. {node v20.19 → node v24.10}/os.d.ts +8 -7
  30. {node v20.19 → node v24.10}/package.json +18 -3
  31. {node v20.19 → node v24.10}/path.d.ts +3 -3
  32. {node v20.19 → node v24.10}/perf_hooks.d.ts +37 -16
  33. {node v20.19 → node v24.10}/process.d.ts +133 -16
  34. {node v20.19 → node v24.10}/punycode.d.ts +1 -1
  35. {node v20.19 → node v24.10}/querystring.d.ts +1 -1
  36. {node v20.19 → node v24.10}/readline/promises.d.ts +0 -1
  37. {node v20.19 → node v24.10}/readline.d.ts +19 -14
  38. {node v20.19 → node v24.10}/repl.d.ts +25 -17
  39. {node v20.19 → node v24.10}/sea.d.ts +11 -2
  40. node v24.10/sqlite.d.ts +937 -0
  41. {node v20.19 → node v24.10}/stream/web.d.ts +85 -45
  42. {node v20.19 → node v24.10}/stream.d.ts +36 -28
  43. {node v20.19 → node v24.10}/string_decoder.d.ts +1 -1
  44. {node v20.19 → node v24.10}/test.d.ts +587 -35
  45. {node v20.19 → node v24.10}/timers/promises.d.ts +1 -1
  46. {node v20.19 → node v24.10}/timers.d.ts +4 -5
  47. {node v20.19 → node v24.10}/tls.d.ts +62 -48
  48. {node v20.19 → node v24.10}/trace_events.d.ts +6 -6
  49. node v24.10/ts5.6/compatibility/float16array.d.ts +71 -0
  50. {node v20.19 → node v24.10}/ts5.6/globals.typedarray.d.ts +2 -0
  51. {node v20.19 → node v24.10}/ts5.6/index.d.ts +15 -5
  52. node v24.10/ts5.7/compatibility/float16array.d.ts +72 -0
  53. node v24.10/ts5.7/index.d.ts +103 -0
  54. {node v20.19 → node v24.10}/tty.d.ts +1 -1
  55. {node v20.19 → node v24.10}/url.d.ts +128 -35
  56. {node v20.19 → node v24.10}/util.d.ts +384 -390
  57. {node v20.19 → node v24.10}/v8.d.ts +175 -32
  58. {node v20.19 → node v24.10}/vm.d.ts +246 -67
  59. {node v20.19 → node v24.10}/wasi.d.ts +23 -2
  60. node v24.10/web-globals/crypto.d.ts +32 -0
  61. {node v20.19 → node v24.10}/web-globals/fetch.d.ts +4 -0
  62. node v24.10/web-globals/navigator.d.ts +25 -0
  63. node v24.10/web-globals/storage.d.ts +24 -0
  64. node v24.10/web-globals/streams.d.ts +22 -0
  65. {node v20.19 → node v24.10}/worker_threads.d.ts +205 -24
  66. {node v20.19 → node v24.10}/zlib.d.ts +185 -44
  67. node v20.19/assert/strict.d.ts +0 -8
  68. node v20.19/compatibility/disposable.d.ts +0 -16
  69. node v20.19/compatibility/index.d.ts +0 -9
  70. node v20.19/compatibility/indexable.d.ts +0 -20
  71. {node v20.19 → node v24.10}/LICENSE +0 -0
  72. {node v20.19 → node v24.10}/compatibility/iterators.d.ts +0 -0
  73. {node v20.19 → node v24.10}/constants.d.ts +0 -0
  74. {node v20.19 → node v24.10}/stream/consumers.d.ts +0 -0
  75. {node v20.19 → node v24.10}/stream/promises.d.ts +0 -0
  76. {node v20.19 → node v24.10}/ts5.6/buffer.buffer.d.ts +0 -0
  77. {node v20.19 → node v24.10}/web-globals/abortcontroller.d.ts +0 -0
  78. {node v20.19 → node v24.10}/web-globals/domexception.d.ts +0 -0
  79. {node v20.19 → node v24.10}/web-globals/events.d.ts +0 -0
@@ -24,7 +24,7 @@
24
24
  * the parent Node.js process and the spawned subprocess. These pipes have
25
25
  * limited (and platform-specific) capacity. If the subprocess writes to
26
26
  * stdout in excess of that limit without the output being captured, the
27
- * subprocess blocks waiting for the pipe buffer to accept more data. This is
27
+ * subprocess blocks, waiting for the pipe buffer to accept more data. This is
28
28
  * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }` option if the output will not be consumed.
29
29
  *
30
30
  * The command lookup is performed using the `options.env.PATH` environment
@@ -63,7 +63,7 @@
63
63
  * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
64
64
  * the synchronous methods can have significant impact on performance due to
65
65
  * stalling the event loop while spawned processes complete.
66
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/child_process.js)
66
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/child_process.js)
67
67
  */
68
68
  declare module "child_process" {
69
69
  import { NonSharedBuffer } from "node:buffer";
@@ -374,12 +374,12 @@ declare module "child_process" {
374
374
  * a TCP server object to the child process as illustrated in the example below:
375
375
  *
376
376
  * ```js
377
- * import child_process from 'node:child_process';
378
- * const subprocess = child_process.fork('subprocess.js');
377
+ * import { createServer } from 'node:net';
378
+ * import { fork } from 'node:child_process';
379
+ * const subprocess = fork('subprocess.js');
379
380
  *
380
381
  * // Open up the server object and send the handle.
381
- * import net from 'node:net';
382
- * const server = net.createServer();
382
+ * const server = createServer();
383
383
  * server.on('connection', (socket) => {
384
384
  * socket.end('handled by parent');
385
385
  * });
@@ -414,14 +414,14 @@ declare module "child_process" {
414
414
  * handle connections with "normal" or "special" priority:
415
415
  *
416
416
  * ```js
417
+ * import { createServer } from 'node:net';
417
418
  * import { fork } from 'node:child_process';
418
419
  * const normal = fork('subprocess.js', ['normal']);
419
420
  * const special = fork('subprocess.js', ['special']);
420
421
  *
421
422
  * // Open up the server and send sockets to child. Use pauseOnConnect to prevent
422
423
  * // the sockets from being read before they are sent to the child process.
423
- * import net from 'node:net';
424
- * const server = net.createServer({ pauseOnConnect: true });
424
+ * const server = createServer({ pauseOnConnect: true });
425
425
  * server.on('connection', (socket) => {
426
426
  *
427
427
  * // If this is special priority...
@@ -458,7 +458,7 @@ declare module "child_process" {
458
458
  * as the connection may have been closed during the time it takes to send the
459
459
  * connection to the child.
460
460
  * @since v0.5.9
461
- * @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v20.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v20.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v20.x/api/dgram.html#class-dgramsocket) object.
461
+ * @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v24.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v24.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v24.x/api/dgram.html#class-dgramsocket) object.
462
462
  * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
463
463
  */
464
464
  send(message: Serializable, callback?: (error: Error | null) => void): boolean;
@@ -1105,7 +1105,8 @@ declare module "child_process" {
1105
1105
  *
1106
1106
  * ```js
1107
1107
  * import util from 'node:util';
1108
- * const execFile = util.promisify(require('node:child_process').execFile);
1108
+ * import child_process from 'node:child_process';
1109
+ * const execFile = util.promisify(child_process.execFile);
1109
1110
  * async function getVersion() {
1110
1111
  * const { stdout } = await execFile('node', ['--version']);
1111
1112
  * console.log(stdout);
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Clusters of Node.js processes can be used to run multiple instances of Node.js
3
3
  * that can distribute workloads among their application threads. When process isolation
4
- * is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html)
4
+ * is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html)
5
5
  * module instead, which allows running multiple application threads within a single Node.js instance.
6
6
  *
7
7
  * The cluster module allows easy creation of child processes that all share
@@ -50,7 +50,7 @@
50
50
  * ```
51
51
  *
52
52
  * On Windows, it is not yet possible to set up a named pipe server in a worker.
53
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/cluster.js)
53
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/cluster.js)
54
54
  */
55
55
  declare module "cluster" {
56
56
  import * as child from "node:child_process";
@@ -80,8 +80,8 @@ declare module "cluster" {
80
80
  silent?: boolean | undefined;
81
81
  /**
82
82
  * Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must
83
- * contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#child_processspawncommand-args-options)'s
84
- * [`stdio`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#optionsstdio).
83
+ * contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processspawncommand-args-options)'s
84
+ * [`stdio`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#optionsstdio).
85
85
  */
86
86
  stdio?: any[] | undefined;
87
87
  /**
@@ -99,7 +99,7 @@ declare module "cluster" {
99
99
  inspectPort?: number | (() => number) | undefined;
100
100
  /**
101
101
  * Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`.
102
- * See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#advanced-serialization) for more details.
102
+ * See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#advanced-serialization) for more details.
103
103
  * @default false
104
104
  */
105
105
  serialization?: SerializationType | undefined;
@@ -142,10 +142,10 @@ declare module "cluster" {
142
142
  */
143
143
  id: number;
144
144
  /**
145
- * All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object
145
+ * All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object
146
146
  * from this function is stored as `.process`. In a worker, the global `process` is stored.
147
147
  *
148
- * See: [Child Process module](https://nodejs.org/docs/latest-v20.x/api/child_process.html#child_processforkmodulepath-args-options).
148
+ * See: [Child Process module](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processforkmodulepath-args-options).
149
149
  *
150
150
  * Workers will call `process.exit(0)` if the `'disconnect'` event occurs
151
151
  * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
@@ -156,7 +156,7 @@ declare module "cluster" {
156
156
  /**
157
157
  * Send a message to a worker or primary, optionally with a handle.
158
158
  *
159
- * In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback).
159
+ * In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback).
160
160
  *
161
161
  * In a worker, this sends a message to the primary. It is identical to `process.send()`.
162
162
  *
@@ -198,7 +198,7 @@ declare module "cluster" {
198
198
  * This method is aliased as `worker.destroy()` for backwards compatibility.
199
199
  *
200
200
  * In a worker, `process.kill()` exists, but it is not this function;
201
- * it is [`kill()`](https://nodejs.org/docs/latest-v20.x/api/process.html#processkillpid-signal).
201
+ * it is [`kill()`](https://nodejs.org/docs/latest-v24.x/api/process.html#processkillpid-signal).
202
202
  * @since v0.9.12
203
203
  * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process.
204
204
  */
@@ -232,6 +232,7 @@ declare module "cluster" {
232
232
  *
233
233
  * ```js
234
234
  * import net from 'node:net';
235
+ *
235
236
  * if (cluster.isPrimary) {
236
237
  * const worker = cluster.fork();
237
238
  * let timeout;
@@ -411,7 +412,7 @@ declare module "cluster" {
411
412
  readonly isWorker: boolean;
412
413
  /**
413
414
  * The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a
414
- * global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clustersetupprimarysettings)
415
+ * global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clustersetupprimarysettings)
415
416
  * is called, whichever comes first.
416
417
  *
417
418
  * `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute
@@ -422,24 +423,24 @@ declare module "cluster" {
422
423
  */
423
424
  schedulingPolicy: number;
424
425
  /**
425
- * After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clustersetupprimarysettings)
426
- * (or [`.fork()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clusterforkenv)) this settings object will contain
426
+ * After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clustersetupprimarysettings)
427
+ * (or [`.fork()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clusterforkenv)) this settings object will contain
427
428
  * the settings, including the default values.
428
429
  *
429
430
  * This object is not intended to be changed or set manually.
430
431
  * @since v0.7.1
431
432
  */
432
433
  readonly settings: ClusterSettings;
433
- /** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clustersetupprimarysettings) instead. */
434
+ /** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clustersetupprimarysettings) instead. */
434
435
  setupMaster(settings?: ClusterSettings): void;
435
436
  /**
436
437
  * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`.
437
438
  *
438
- * Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clusterforkenv)
439
+ * Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clusterforkenv)
439
440
  * and have no effect on workers that are already running.
440
441
  *
441
442
  * The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to
442
- * [`.fork()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clusterforkenv).
443
+ * [`.fork()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clusterforkenv).
443
444
  *
444
445
  * The defaults above apply to the first call only; the defaults for later calls are the current values at the time of
445
446
  * `cluster.setupPrimary()` is called.
@@ -5,12 +5,12 @@
5
5
  * The module exports two specific components:
6
6
  *
7
7
  * * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream.
8
- * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdout) and
9
- * [`process.stderr`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
8
+ * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and
9
+ * [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
10
10
  *
11
11
  * _**Warning**_: The global console object's methods are neither consistently
12
12
  * synchronous like the browser APIs they resemble, nor are they consistently
13
- * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v20.x/api/process.html#a-note-on-process-io) for
13
+ * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for
14
14
  * more information.
15
15
  *
16
16
  * Example using the global `console`:
@@ -54,7 +54,7 @@
54
54
  * myConsole.warn(`Danger ${name}! Danger!`);
55
55
  * // Prints: Danger Will Robinson! Danger!, to err
56
56
  * ```
57
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/console.js)
57
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
58
58
  */
59
59
  declare module "console" {
60
60
  import console = require("node:console");
@@ -70,7 +70,7 @@ declare module "node:console" {
70
70
  * `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only
71
71
  * writes a message and does not otherwise affect execution. The output always
72
72
  * starts with `"Assertion failed"`. If provided, `message` is formatted using
73
- * [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args).
73
+ * [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args).
74
74
  *
75
75
  * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens.
76
76
  *
@@ -152,7 +152,7 @@ declare module "node:console" {
152
152
  */
153
153
  debug(message?: any, ...optionalParams: any[]): void;
154
154
  /**
155
- * Uses [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options) on `obj` and prints the resulting string to `stdout`.
155
+ * Uses [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options) on `obj` and prints the resulting string to `stdout`.
156
156
  * This function bypasses any custom `inspect()` function defined on `obj`.
157
157
  * @since v0.1.101
158
158
  */
@@ -167,7 +167,7 @@ declare module "node:console" {
167
167
  * Prints to `stderr` with newline. Multiple arguments can be passed, with the
168
168
  * first used as the primary message and all additional used as substitution
169
169
  * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
170
- * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)).
170
+ * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)).
171
171
  *
172
172
  * ```js
173
173
  * const code = 5;
@@ -178,8 +178,8 @@ declare module "node:console" {
178
178
  * ```
179
179
  *
180
180
  * If formatting elements (e.g. `%d`) are not found in the first string then
181
- * [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options) is called on each argument and the
182
- * resulting string values are concatenated. See [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)
181
+ * [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options) is called on each argument and the
182
+ * resulting string values are concatenated. See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)
183
183
  * for more information.
184
184
  * @since v0.1.100
185
185
  */
@@ -211,7 +211,7 @@ declare module "node:console" {
211
211
  * Prints to `stdout` with newline. Multiple arguments can be passed, with the
212
212
  * first used as the primary message and all additional used as substitution
213
213
  * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
214
- * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)).
214
+ * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)).
215
215
  *
216
216
  * ```js
217
217
  * const count = 5;
@@ -221,7 +221,7 @@ declare module "node:console" {
221
221
  * // Prints: count: 5, to stdout
222
222
  * ```
223
223
  *
224
- * See [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args) for more information.
224
+ * See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
225
225
  * @since v0.1.100
226
226
  */
227
227
  log(message?: any, ...optionalParams: any[]): void;
@@ -297,7 +297,7 @@ declare module "node:console" {
297
297
  */
298
298
  timeLog(label?: string, ...data: any[]): void;
299
299
  /**
300
- * Prints to `stderr` the string `'Trace: '`, followed by the [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)
300
+ * Prints to `stderr` the string `'Trace: '`, followed by the [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)
301
301
  * formatted message and stack trace to the current position in the code.
302
302
  *
303
303
  * ```js
@@ -361,12 +361,12 @@ declare module "node:console" {
361
361
  * The module exports two specific components:
362
362
  *
363
363
  * * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream.
364
- * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdout) and
365
- * [`process.stderr`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
364
+ * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and
365
+ * [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
366
366
  *
367
367
  * _**Warning**_: The global console object's methods are neither consistently
368
368
  * synchronous like the browser APIs they resemble, nor are they consistently
369
- * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v20.x/api/process.html#a-note-on-process-io) for
369
+ * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for
370
370
  * more information.
371
371
  *
372
372
  * Example using the global `console`:
@@ -410,7 +410,7 @@ declare module "node:console" {
410
410
  * myConsole.warn(`Danger ${name}! Danger!`);
411
411
  * // Prints: Danger Will Robinson! Danger!, to err
412
412
  * ```
413
- * @see [source](https://github.com/nodejs/node/blob/v20.11.1/lib/console.js)
413
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
414
414
  */
415
415
  namespace console {
416
416
  interface ConsoleConstructorOptions {
@@ -431,9 +431,10 @@ declare module "node:console" {
431
431
  colorMode?: boolean | "auto" | undefined;
432
432
  /**
433
433
  * Specifies options that are passed along to
434
- * [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options).
434
+ * `util.inspect()`. Can be an options object or, if different options
435
+ * for stdout and stderr are desired, a `Map` from stream objects to options.
435
436
  */
436
- inspectOptions?: InspectOptions | undefined;
437
+ inspectOptions?: InspectOptions | ReadonlyMap<NodeJS.WritableStream, InspectOptions> | undefined;
437
438
  /**
438
439
  * Set group indentation.
439
440
  * @default 2