@types/node 24.12.0 → 25.5.0

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 (98) hide show
  1. node v24.12/README.md → node/README.md +2 -2
  2. node v24.12/assert/strict.d.ts → node/assert/strict.d.ts +5 -11
  3. node v24.12/assert.d.ts → node/assert.d.ts +11 -171
  4. node v24.12/async_hooks.d.ts → node/async_hooks.d.ts +8 -8
  5. node v24.12/buffer.buffer.d.ts → node/buffer.buffer.d.ts +1 -7
  6. node v24.12/buffer.d.ts → node/buffer.d.ts +44 -168
  7. node v24.12/child_process.d.ts → node/child_process.d.ts +21 -64
  8. node/cluster.d.ts +486 -0
  9. node/console.d.ts +151 -0
  10. node v24.12/constants.d.ts → node/constants.d.ts +3 -4
  11. node v24.12/crypto.d.ts → node/crypto.d.ts +287 -1639
  12. node v24.12/dgram.d.ts → node/dgram.d.ts +15 -51
  13. node v24.12/diagnostics_channel.d.ts → node/diagnostics_channel.d.ts +4 -4
  14. node v24.12/dns/promises.d.ts → node/dns/promises.d.ts +3 -3
  15. node v24.12/dns.d.ts → node/dns.d.ts +131 -132
  16. node v24.12/domain.d.ts → node/domain.d.ts +13 -17
  17. node v24.12/events.d.ts → node/events.d.ts +866 -795
  18. node v24.12/fs/promises.d.ts → node/fs/promises.d.ts +7 -8
  19. node v24.12/fs.d.ts → node/fs.d.ts +419 -455
  20. node v24.12/globals.d.ts → node/globals.d.ts +6 -26
  21. node/globals.typedarray.d.ts +101 -0
  22. node v24.12/http.d.ts → node/http.d.ts +310 -276
  23. node v24.12/http2.d.ts → node/http2.d.ts +528 -804
  24. node v24.12/https.d.ts → node/https.d.ts +63 -243
  25. node v24.12/index.d.ts → node/index.d.ts +15 -1
  26. node/inspector/promises.d.ts +41 -0
  27. node v24.12/inspector.d.ts → node/inspector.d.ts +42 -50
  28. node v24.12/inspector.generated.d.ts → node/inspector.generated.d.ts +572 -417
  29. node v24.12/module.d.ts → node/module.d.ts +47 -195
  30. node v24.12/net.d.ts → node/net.d.ts +68 -189
  31. node v24.12/os.d.ts → node/os.d.ts +6 -6
  32. node v24.12/package.json → node/package.json +3 -3
  33. node/path/posix.d.ts +8 -0
  34. node/path/win32.d.ts +8 -0
  35. node/path.d.ts +187 -0
  36. node/perf_hooks.d.ts +643 -0
  37. node v24.12/process.d.ts → node/process.d.ts +219 -127
  38. node v24.12/punycode.d.ts → node/punycode.d.ts +5 -5
  39. node v24.12/querystring.d.ts → node/querystring.d.ts +4 -4
  40. node/quic.d.ts +910 -0
  41. node v24.12/readline/promises.d.ts → node/readline/promises.d.ts +3 -3
  42. node v24.12/readline.d.ts → node/readline.d.ts +68 -120
  43. node v24.12/repl.d.ts → node/repl.d.ts +75 -98
  44. node v24.12/sea.d.ts → node/sea.d.ts +1 -1
  45. node v24.12/sqlite.d.ts → node/sqlite.d.ts +137 -30
  46. node v24.12/stream/consumers.d.ts → node/stream/consumers.d.ts +10 -10
  47. node/stream/promises.d.ts +211 -0
  48. node/stream/web.d.ts +296 -0
  49. node v24.12/stream.d.ts → node/stream.d.ts +565 -478
  50. node v24.12/string_decoder.d.ts → node/string_decoder.d.ts +4 -4
  51. node/test/reporters.d.ts +96 -0
  52. node v24.12/test.d.ts → node/test.d.ts +134 -199
  53. node v24.12/timers/promises.d.ts → node/timers/promises.d.ts +4 -4
  54. node v24.12/timers.d.ts → node/timers.d.ts +4 -130
  55. node v24.12/tls.d.ts → node/tls.d.ts +109 -179
  56. node v24.12/trace_events.d.ts → node/trace_events.d.ts +9 -9
  57. node v24.12/ts5.6/buffer.buffer.d.ts → node/ts5.6/buffer.buffer.d.ts +1 -7
  58. node v24.12/ts5.6/index.d.ts → node/ts5.6/index.d.ts +15 -1
  59. node v24.12/ts5.7/index.d.ts → node/ts5.7/index.d.ts +15 -1
  60. node v24.12/tty.d.ts → node/tty.d.ts +58 -16
  61. node/url.d.ts +541 -0
  62. node/util/types.d.ts +558 -0
  63. node v24.12/util.d.ts → node/util.d.ts +150 -796
  64. node v24.12/v8.d.ts → node/v8.d.ts +31 -21
  65. node v24.12/vm.d.ts → node/vm.d.ts +43 -30
  66. node v24.12/wasi.d.ts → node/wasi.d.ts +4 -4
  67. node v24.12/web-globals/abortcontroller.d.ts → node/web-globals/abortcontroller.d.ts +27 -2
  68. node/web-globals/blob.d.ts +23 -0
  69. node/web-globals/console.d.ts +9 -0
  70. node v24.12/web-globals/crypto.d.ts → node/web-globals/crypto.d.ts +7 -0
  71. node/web-globals/encoding.d.ts +11 -0
  72. node v24.12/web-globals/events.d.ts → node/web-globals/events.d.ts +9 -0
  73. node v24.12/web-globals/fetch.d.ts → node/web-globals/fetch.d.ts +7 -0
  74. node/web-globals/importmeta.d.ts +13 -0
  75. node/web-globals/messaging.d.ts +23 -0
  76. node/web-globals/performance.d.ts +45 -0
  77. node/web-globals/streams.d.ts +115 -0
  78. node/web-globals/timers.d.ts +44 -0
  79. node/web-globals/url.d.ts +24 -0
  80. node v24.12/worker_threads.d.ts → node/worker_threads.d.ts +186 -363
  81. node v24.12/zlib.d.ts → node/zlib.d.ts +8 -71
  82. node v24.12/cluster.d.ts +0 -578
  83. node v24.12/console.d.ts +0 -453
  84. node v24.12/globals.typedarray.d.ts +0 -41
  85. node v24.12/path.d.ts +0 -200
  86. node v24.12/perf_hooks.d.ts +0 -1042
  87. node v24.12/stream/promises.d.ts +0 -90
  88. node v24.12/stream/web.d.ts +0 -573
  89. node v24.12/url.d.ts +0 -1057
  90. node v24.12/web-globals/streams.d.ts +0 -22
  91. {node v24.12 → node}/LICENSE +0 -0
  92. {node v24.12 → node}/compatibility/iterators.d.ts +0 -0
  93. {node v24.12 → node}/ts5.6/compatibility/float16array.d.ts +0 -0
  94. {node v24.12 → node}/ts5.6/globals.typedarray.d.ts +0 -0
  95. {node v24.12 → node}/ts5.7/compatibility/float16array.d.ts +0 -0
  96. {node v24.12 → node}/web-globals/domexception.d.ts +0 -0
  97. {node v24.12 → node}/web-globals/navigator.d.ts +0 -0
  98. {node v24.12 → node}/web-globals/storage.d.ts +0 -0
@@ -1,9 +1,8 @@
1
- declare module "process" {
1
+ declare module "node:process" {
2
2
  import { Control, MessageOptions, SendHandle } from "node:child_process";
3
3
  import { PathLike } from "node:fs";
4
4
  import * as tty from "node:tty";
5
5
  import { Worker } from "node:worker_threads";
6
-
7
6
  interface BuiltInModule {
8
7
  "assert": typeof import("assert");
9
8
  "node:assert": typeof import("node:assert");
@@ -69,6 +68,7 @@ declare module "process" {
69
68
  "node:punycode": typeof import("node:punycode");
70
69
  "querystring": typeof import("querystring");
71
70
  "node:querystring": typeof import("node:querystring");
71
+ "node:quic": typeof import("node:quic");
72
72
  "readline": typeof import("readline");
73
73
  "node:readline": typeof import("node:readline");
74
74
  "readline/promises": typeof import("readline/promises");
@@ -103,8 +103,6 @@ declare module "process" {
103
103
  "node:url": typeof import("node:url");
104
104
  "util": typeof import("util");
105
105
  "node:util": typeof import("node:util");
106
- "sys": typeof import("util");
107
- "node:sys": typeof import("node:util");
108
106
  "util/types": typeof import("util/types");
109
107
  "node:util/types": typeof import("node:util/types");
110
108
  "v8": typeof import("v8");
@@ -118,8 +116,28 @@ declare module "process" {
118
116
  "zlib": typeof import("zlib");
119
117
  "node:zlib": typeof import("node:zlib");
120
118
  }
119
+ type SignalsEventMap = { [S in NodeJS.Signals]: [signal: S] };
120
+ interface ProcessEventMap extends SignalsEventMap {
121
+ "beforeExit": [code: number];
122
+ "disconnect": [];
123
+ "exit": [code: number];
124
+ "message": [
125
+ message: object | boolean | number | string | null,
126
+ sendHandle: SendHandle | undefined,
127
+ ];
128
+ "rejectionHandled": [promise: Promise<unknown>];
129
+ "uncaughtException": [error: Error, origin: NodeJS.UncaughtExceptionOrigin];
130
+ "uncaughtExceptionMonitor": [error: Error, origin: NodeJS.UncaughtExceptionOrigin];
131
+ "unhandledRejection": [reason: unknown, promise: Promise<unknown>];
132
+ "warning": [warning: Error];
133
+ "worker": [worker: Worker];
134
+ "workerMessage": [value: any, source: number];
135
+ }
121
136
  global {
122
137
  var process: NodeJS.Process;
138
+ namespace process {
139
+ export { ProcessEventMap };
140
+ }
123
141
  namespace NodeJS {
124
142
  // this namespace merge is here because these are specifically used
125
143
  // as the type for process.stdin, process.stdout, and process.stderr.
@@ -196,7 +214,7 @@ declare module "process" {
196
214
  readonly ipv6: boolean;
197
215
  /**
198
216
  * A boolean value that is `true` if the current Node.js build supports
199
- * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v24.x/api/modules.md#loading-ecmascript-modules-using-require).
217
+ * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v25.x/api/modules.md#loading-ecmascript-modules-using-require).
200
218
  * @since v22.10.0
201
219
  */
202
220
  readonly require_module: boolean;
@@ -320,26 +338,129 @@ declare module "process" {
320
338
  | "SIGLOST"
321
339
  | "SIGINFO";
322
340
  type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection";
323
- type MultipleResolveType = "resolve" | "reject";
324
- type BeforeExitListener = (code: number) => void;
325
- type DisconnectListener = () => void;
326
- type ExitListener = (code: number) => void;
327
- type RejectionHandledListener = (promise: Promise<unknown>) => void;
328
- type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void;
329
341
  /**
330
- * Most of the time the unhandledRejection will be an Error, but this should not be relied upon
331
- * as *anything* can be thrown/rejected, it is therefore unsafe to assume that the value is an Error.
342
+ * @deprecated Global listener types will be removed in a future version.
343
+ * Callbacks passed directly to `process`'s EventEmitter methods
344
+ * have their parameter types inferred automatically.
345
+ *
346
+ * `process` event types are also available via `ProcessEventMap`:
347
+ *
348
+ * ```ts
349
+ * import type { ProcessEventMap } from 'node:process';
350
+ * const listener = (...args: ProcessEventMap['beforeExit']) => { ... };
351
+ * ```
352
+ */
353
+ type BeforeExitListener = (...args: ProcessEventMap["beforeExit"]) => void;
354
+ /**
355
+ * @deprecated Global listener types will be removed in a future version.
356
+ * Callbacks passed directly to `process`'s EventEmitter methods
357
+ * have their parameter types inferred automatically.
358
+ *
359
+ * `process` event types are also available via `ProcessEventMap`:
360
+ *
361
+ * ```ts
362
+ * import type { ProcessEventMap } from 'node:process';
363
+ * const listener = (...args: ProcessEventMap['disconnect']) => { ... };
364
+ * ```
365
+ */
366
+ type DisconnectListener = (...args: ProcessEventMap["disconnect"]) => void;
367
+ /**
368
+ * @deprecated Global listener types will be removed in a future version.
369
+ * Callbacks passed directly to `process`'s EventEmitter methods
370
+ * have their parameter types inferred automatically.
371
+ *
372
+ * `process` event types are also available via `ProcessEventMap`:
373
+ *
374
+ * ```ts
375
+ * import type { ProcessEventMap } from 'node:process';
376
+ * const listener = (...args: ProcessEventMap['exit']) => { ... };
377
+ * ```
378
+ */
379
+ type ExitListener = (...args: ProcessEventMap["exit"]) => void;
380
+ /**
381
+ * @deprecated Global listener types will be removed in a future version.
382
+ * Callbacks passed directly to `process`'s EventEmitter methods
383
+ * have their parameter types inferred automatically.
384
+ *
385
+ * `process` event types are also available via `ProcessEventMap`:
386
+ *
387
+ * ```ts
388
+ * import type { ProcessEventMap } from 'node:process';
389
+ * const listener = (...args: ProcessEventMap['message']) => { ... };
390
+ * ```
391
+ */
392
+ type MessageListener = (...args: ProcessEventMap["message"]) => void;
393
+ /**
394
+ * @deprecated Global listener types will be removed in a future version.
395
+ * Callbacks passed directly to `process`'s EventEmitter methods
396
+ * have their parameter types inferred automatically.
397
+ *
398
+ * `process` event types are also available via `ProcessEventMap`:
399
+ *
400
+ * ```ts
401
+ * import type { ProcessEventMap } from 'node:process';
402
+ * const listener = (...args: ProcessEventMap['rejectionHandled']) => { ... };
403
+ * ```
404
+ */
405
+ type RejectionHandledListener = (...args: ProcessEventMap["rejectionHandled"]) => void;
406
+ /**
407
+ * @deprecated Global listener types will be removed in a future version.
408
+ * Callbacks passed directly to `process`'s EventEmitter methods
409
+ * have their parameter types inferred automatically.
332
410
  */
333
- type UnhandledRejectionListener = (reason: unknown, promise: Promise<unknown>) => void;
334
- type WarningListener = (warning: Error) => void;
335
- type MessageListener = (message: unknown, sendHandle: SendHandle) => void;
336
411
  type SignalsListener = (signal: Signals) => void;
337
- type MultipleResolveListener = (
338
- type: MultipleResolveType,
339
- promise: Promise<unknown>,
340
- value: unknown,
341
- ) => void;
342
- type WorkerListener = (worker: Worker) => void;
412
+ /**
413
+ * @deprecated Global listener types will be removed in a future version.
414
+ * Callbacks passed directly to `process`'s EventEmitter methods
415
+ * have their parameter types inferred automatically.
416
+ *
417
+ * `process` event types are also available via `ProcessEventMap`:
418
+ *
419
+ * ```ts
420
+ * import type { ProcessEventMap } from 'node:process';
421
+ * const listener = (...args: ProcessEventMap['uncaughtException']) => { ... };
422
+ * ```
423
+ */
424
+ type UncaughtExceptionListener = (...args: ProcessEventMap["uncaughtException"]) => void;
425
+ /**
426
+ * @deprecated Global listener types will be removed in a future version.
427
+ * Callbacks passed directly to `process`'s EventEmitter methods
428
+ * have their parameter types inferred automatically.
429
+ *
430
+ * `process` event types are also available via `ProcessEventMap`:
431
+ *
432
+ * ```ts
433
+ * import type { ProcessEventMap } from 'node:process';
434
+ * const listener = (...args: ProcessEventMap['unhandledRejection']) => { ... };
435
+ * ```
436
+ */
437
+ type UnhandledRejectionListener = (...args: ProcessEventMap["unhandledRejection"]) => void;
438
+ /**
439
+ * @deprecated Global listener types will be removed in a future version.
440
+ * Callbacks passed directly to `process`'s EventEmitter methods
441
+ * have their parameter types inferred automatically.
442
+ *
443
+ * `process` event types are also available via `ProcessEventMap`:
444
+ *
445
+ * ```ts
446
+ * import type { ProcessEventMap } from 'node:process';
447
+ * const listener = (...args: ProcessEventMap['warning']) => { ... };
448
+ * ```
449
+ */
450
+ type WarningListener = (...args: ProcessEventMap["warning"]) => void;
451
+ /**
452
+ * @deprecated Global listener types will be removed in a future version.
453
+ * Callbacks passed directly to `process`'s EventEmitter methods
454
+ * have their parameter types inferred automatically.
455
+ *
456
+ * `process` event types are also available via `ProcessEventMap`:
457
+ *
458
+ * ```ts
459
+ * import type { ProcessEventMap } from 'node:process';
460
+ * const listener = (...args: ProcessEventMap['worker']) => { ... };
461
+ * ```
462
+ */
463
+ type WorkerListener = (...args: ProcessEventMap["worker"]) => void;
343
464
  interface Socket extends ReadWriteStream {
344
465
  isTTY?: true | undefined;
345
466
  }
@@ -608,7 +729,8 @@ declare module "process" {
608
729
  * arguments passed when the Node.js process was launched. The first element will
609
730
  * be {@link execPath}. See `process.argv0` if access to the original value
610
731
  * of `argv[0]` is needed. The second element will be the path to the JavaScript
611
- * file being executed. The remaining elements will be any additional command-line
732
+ * file being executed. If a [program entry point](https://nodejs.org/docs/latest-v25.x/api/cli.html#program-entry-point) was provided, the second element
733
+ * will be the absolute path to it. The remaining elements are additional command-line
612
734
  * arguments.
613
735
  *
614
736
  * For example, assuming the following script for `process-args.js`:
@@ -749,7 +871,7 @@ declare module "process" {
749
871
  * should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()`
750
872
  * unless there are specific reasons such as custom dlopen flags or loading from ES modules.
751
873
  *
752
- * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v24.x/api/os.html#dlopen-constants)`
874
+ * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v25.x/api/os.html#dlopen-constants)`
753
875
  * documentation for details.
754
876
  *
755
877
  * An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon
@@ -1584,7 +1706,7 @@ declare module "process" {
1584
1706
  constrainedMemory(): number;
1585
1707
  /**
1586
1708
  * Gets the amount of free memory that is still available to the process (in bytes).
1587
- * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v24.x/api/process.html#processavailablememory) for more information.
1709
+ * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v25.x/api/process.html#processavailablememory) for more information.
1588
1710
  * @since v20.13.0
1589
1711
  */
1590
1712
  availableMemory(): number;
@@ -1740,6 +1862,24 @@ declare module "process" {
1740
1862
  */
1741
1863
  readonly release: ProcessRelease;
1742
1864
  readonly features: ProcessFeatures;
1865
+ /**
1866
+ * The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag
1867
+ * is set on the current Node.js process. This property allows programmatic control over the
1868
+ * tracing of warnings, enabling or disabling stack traces for warnings at runtime.
1869
+ *
1870
+ * ```js
1871
+ * // Enable trace warnings
1872
+ * process.traceProcessWarnings = true;
1873
+ *
1874
+ * // Emit a warning with a stack trace
1875
+ * process.emitWarning('Warning with stack trace');
1876
+ *
1877
+ * // Disable trace warnings
1878
+ * process.traceProcessWarnings = false;
1879
+ * ```
1880
+ * @since v6.10.0
1881
+ */
1882
+ traceProcessWarnings: boolean;
1743
1883
  /**
1744
1884
  * `process.umask()` returns the Node.js process's file mode creation mask. Child
1745
1885
  * processes inherit the mask from the parent process.
@@ -1804,7 +1944,7 @@ declare module "process" {
1804
1944
  * If the Node.js process was not spawned with an IPC channel, `process.disconnect()` will be `undefined`.
1805
1945
  * @since v0.7.2
1806
1946
  */
1807
- disconnect(): void;
1947
+ disconnect?(): void;
1808
1948
  /**
1809
1949
  * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return `true` so long as the IPC
1810
1950
  * channel is connected and will return `false` after `process.disconnect()` is called.
@@ -1858,7 +1998,7 @@ declare module "process" {
1858
1998
  allowedNodeEnvironmentFlags: ReadonlySet<string>;
1859
1999
  /**
1860
2000
  * `process.report` is an object whose methods are used to generate diagnostic reports for the current process.
1861
- * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v24.x/api/report.html).
2001
+ * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v25.x/api/report.html).
1862
2002
  * @since v11.8.0
1863
2003
  */
1864
2004
  report: ProcessReport;
@@ -1973,111 +2113,63 @@ declare module "process" {
1973
2113
  * **Default:** `process.env`.
1974
2114
  */
1975
2115
  execve?(file: string, args?: readonly string[], env?: ProcessEnv): never;
1976
- /* EventEmitter */
1977
- addListener(event: "beforeExit", listener: BeforeExitListener): this;
1978
- addListener(event: "disconnect", listener: DisconnectListener): this;
1979
- addListener(event: "exit", listener: ExitListener): this;
1980
- addListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
1981
- addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
1982
- addListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
1983
- addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
1984
- addListener(event: "warning", listener: WarningListener): this;
1985
- addListener(event: "message", listener: MessageListener): this;
1986
- addListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
1987
- addListener(event: Signals, listener: SignalsListener): this;
1988
- addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
1989
- addListener(event: "worker", listener: WorkerListener): this;
1990
- emit(event: "beforeExit", code: number): boolean;
1991
- emit(event: "disconnect"): boolean;
1992
- emit(event: "exit", code: number): boolean;
1993
- emit(event: "rejectionHandled", promise: Promise<unknown>): boolean;
1994
- emit(event: "uncaughtException", error: Error): boolean;
1995
- emit(event: "uncaughtExceptionMonitor", error: Error): boolean;
1996
- emit(event: "unhandledRejection", reason: unknown, promise: Promise<unknown>): boolean;
1997
- emit(event: "warning", warning: Error): boolean;
1998
- emit(event: "message", message: unknown, sendHandle: SendHandle): this;
1999
- emit(event: "workerMessage", value: any, source: number): this;
2000
- emit(event: Signals, signal?: Signals): boolean;
2001
- emit(
2002
- event: "multipleResolves",
2003
- type: MultipleResolveType,
2004
- promise: Promise<unknown>,
2005
- value: unknown,
2116
+ // #region InternalEventEmitter
2117
+ addListener<E extends keyof ProcessEventMap>(
2118
+ eventName: E,
2119
+ listener: (...args: ProcessEventMap[E]) => void,
2120
+ ): this;
2121
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
2122
+ emit<E extends keyof ProcessEventMap>(eventName: E, ...args: ProcessEventMap[E]): boolean;
2123
+ emit(eventName: string | symbol, ...args: any[]): boolean;
2124
+ listenerCount<E extends keyof ProcessEventMap>(
2125
+ eventName: E,
2126
+ listener?: (...args: ProcessEventMap[E]) => void,
2127
+ ): number;
2128
+ listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
2129
+ listeners<E extends keyof ProcessEventMap>(eventName: E): ((...args: ProcessEventMap[E]) => void)[];
2130
+ listeners(eventName: string | symbol): ((...args: any[]) => void)[];
2131
+ off<E extends keyof ProcessEventMap>(
2132
+ eventName: E,
2133
+ listener: (...args: ProcessEventMap[E]) => void,
2134
+ ): this;
2135
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
2136
+ on<E extends keyof ProcessEventMap>(
2137
+ eventName: E,
2138
+ listener: (...args: ProcessEventMap[E]) => void,
2139
+ ): this;
2140
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
2141
+ once<E extends keyof ProcessEventMap>(
2142
+ eventName: E,
2143
+ listener: (...args: ProcessEventMap[E]) => void,
2144
+ ): this;
2145
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
2146
+ prependListener<E extends keyof ProcessEventMap>(
2147
+ eventName: E,
2148
+ listener: (...args: ProcessEventMap[E]) => void,
2006
2149
  ): this;
2007
- emit(event: "worker", listener: WorkerListener): this;
2008
- on(event: "beforeExit", listener: BeforeExitListener): this;
2009
- on(event: "disconnect", listener: DisconnectListener): this;
2010
- on(event: "exit", listener: ExitListener): this;
2011
- on(event: "rejectionHandled", listener: RejectionHandledListener): this;
2012
- on(event: "uncaughtException", listener: UncaughtExceptionListener): this;
2013
- on(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
2014
- on(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2015
- on(event: "warning", listener: WarningListener): this;
2016
- on(event: "message", listener: MessageListener): this;
2017
- on(event: Signals, listener: SignalsListener): this;
2018
- on(event: "multipleResolves", listener: MultipleResolveListener): this;
2019
- on(event: "worker", listener: WorkerListener): this;
2020
- on(event: "workerMessage", listener: (value: any, source: number) => void): this;
2021
- on(event: string | symbol, listener: (...args: any[]) => void): this;
2022
- once(event: "beforeExit", listener: BeforeExitListener): this;
2023
- once(event: "disconnect", listener: DisconnectListener): this;
2024
- once(event: "exit", listener: ExitListener): this;
2025
- once(event: "rejectionHandled", listener: RejectionHandledListener): this;
2026
- once(event: "uncaughtException", listener: UncaughtExceptionListener): this;
2027
- once(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
2028
- once(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2029
- once(event: "warning", listener: WarningListener): this;
2030
- once(event: "message", listener: MessageListener): this;
2031
- once(event: Signals, listener: SignalsListener): this;
2032
- once(event: "multipleResolves", listener: MultipleResolveListener): this;
2033
- once(event: "worker", listener: WorkerListener): this;
2034
- once(event: "workerMessage", listener: (value: any, source: number) => void): this;
2035
- once(event: string | symbol, listener: (...args: any[]) => void): this;
2036
- prependListener(event: "beforeExit", listener: BeforeExitListener): this;
2037
- prependListener(event: "disconnect", listener: DisconnectListener): this;
2038
- prependListener(event: "exit", listener: ExitListener): this;
2039
- prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
2040
- prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
2041
- prependListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
2042
- prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2043
- prependListener(event: "warning", listener: WarningListener): this;
2044
- prependListener(event: "message", listener: MessageListener): this;
2045
- prependListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
2046
- prependListener(event: Signals, listener: SignalsListener): this;
2047
- prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
2048
- prependListener(event: "worker", listener: WorkerListener): this;
2049
- prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this;
2050
- prependOnceListener(event: "disconnect", listener: DisconnectListener): this;
2051
- prependOnceListener(event: "exit", listener: ExitListener): this;
2052
- prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
2053
- prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
2054
- prependOnceListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
2055
- prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2056
- prependOnceListener(event: "warning", listener: WarningListener): this;
2057
- prependOnceListener(event: "message", listener: MessageListener): this;
2058
- prependOnceListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
2059
- prependOnceListener(event: Signals, listener: SignalsListener): this;
2060
- prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
2061
- prependOnceListener(event: "worker", listener: WorkerListener): this;
2062
- listeners(event: "beforeExit"): BeforeExitListener[];
2063
- listeners(event: "disconnect"): DisconnectListener[];
2064
- listeners(event: "exit"): ExitListener[];
2065
- listeners(event: "rejectionHandled"): RejectionHandledListener[];
2066
- listeners(event: "uncaughtException"): UncaughtExceptionListener[];
2067
- listeners(event: "uncaughtExceptionMonitor"): UncaughtExceptionListener[];
2068
- listeners(event: "unhandledRejection"): UnhandledRejectionListener[];
2069
- listeners(event: "warning"): WarningListener[];
2070
- listeners(event: "message"): MessageListener[];
2071
- listeners(event: "workerMessage"): ((value: any, source: number) => void)[];
2072
- listeners(event: Signals): SignalsListener[];
2073
- listeners(event: "multipleResolves"): MultipleResolveListener[];
2074
- listeners(event: "worker"): WorkerListener[];
2150
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
2151
+ prependOnceListener<E extends keyof ProcessEventMap>(
2152
+ eventName: E,
2153
+ listener: (...args: ProcessEventMap[E]) => void,
2154
+ ): this;
2155
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
2156
+ rawListeners<E extends keyof ProcessEventMap>(eventName: E): ((...args: ProcessEventMap[E]) => void)[];
2157
+ rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
2158
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
2159
+ removeAllListeners<E extends keyof ProcessEventMap>(eventName?: E): this;
2160
+ removeAllListeners(eventName?: string | symbol): this;
2161
+ removeListener<E extends keyof ProcessEventMap>(
2162
+ eventName: E,
2163
+ listener: (...args: ProcessEventMap[E]) => void,
2164
+ ): this;
2165
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
2166
+ // #endregion
2075
2167
  }
2076
2168
  }
2077
2169
  }
2078
2170
  export = process;
2079
2171
  }
2080
- declare module "node:process" {
2081
- import process = require("process");
2172
+ declare module "process" {
2173
+ import process = require("node:process");
2082
2174
  export = process;
2083
2175
  }
@@ -23,10 +23,10 @@
23
23
  * The `punycode` module is a third-party dependency used by Node.js and
24
24
  * made available to developers as a convenience. Fixes or other modifications to
25
25
  * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
26
- * @deprecated Since v7.0.0 - Deprecated
27
- * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/punycode.js)
26
+ * @deprecated
27
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/punycode.js)
28
28
  */
29
- declare module "punycode" {
29
+ declare module "node:punycode" {
30
30
  /**
31
31
  * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only
32
32
  * characters to the equivalent string of Unicode codepoints.
@@ -112,6 +112,6 @@ declare module "punycode" {
112
112
  */
113
113
  const version: string;
114
114
  }
115
- declare module "node:punycode" {
116
- export * from "punycode";
115
+ declare module "punycode" {
116
+ export * from "node:punycode";
117
117
  }
@@ -9,9 +9,9 @@
9
9
  * `querystring` is more performant than `URLSearchParams` but is not a
10
10
  * standardized API. Use `URLSearchParams` when performance is not critical or
11
11
  * when compatibility with browser code is desirable.
12
- * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/querystring.js)
12
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/querystring.js)
13
13
  */
14
- declare module "querystring" {
14
+ declare module "node:querystring" {
15
15
  interface StringifyOptions {
16
16
  /**
17
17
  * The function to use when converting URL-unsafe characters to percent-encoding in the query string.
@@ -147,6 +147,6 @@ declare module "querystring" {
147
147
  */
148
148
  function unescape(str: string): string;
149
149
  }
150
- declare module "node:querystring" {
151
- export * from "querystring";
150
+ declare module "querystring" {
151
+ export * from "node:querystring";
152
152
  }