@types/node 22.15.33 → 24.10.8

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 (84) hide show
  1. node v24.10/README.md +15 -0
  2. node v24.10/assert/strict.d.ts +111 -0
  3. {node v22.15 → node v24.10}/assert.d.ts +162 -101
  4. {node v22.15 → node v24.10}/async_hooks.d.ts +26 -6
  5. {node v22.15 → node v24.10}/buffer.buffer.d.ts +9 -0
  6. {node v22.15 → node v24.10}/buffer.d.ts +15 -7
  7. {node v22.15 → node v24.10}/child_process.d.ts +91 -164
  8. {node v22.15 → node v24.10}/cluster.d.ts +19 -20
  9. {node v22.15 → node v24.10}/compatibility/iterators.d.ts +1 -0
  10. {node v22.15 → node v24.10}/console.d.ts +19 -18
  11. {node v22.15 → node v24.10}/crypto.d.ts +1264 -356
  12. {node v22.15 → node v24.10}/dgram.d.ts +10 -9
  13. {node v22.15 → node v24.10}/diagnostics_channel.d.ts +1 -3
  14. {node v22.15 → node v24.10}/dns/promises.d.ts +12 -11
  15. {node v22.15 → node v24.10}/dns.d.ts +41 -37
  16. {node v22.15 → node v24.10}/domain.d.ts +1 -1
  17. {node v22.15 → node v24.10}/events.d.ts +81 -36
  18. {node v22.15 → node v24.10}/fs/promises.d.ts +114 -57
  19. {node v22.15 → node v24.10}/fs.d.ts +413 -136
  20. node v24.10/globals.d.ts +170 -0
  21. node v24.10/globals.typedarray.d.ts +41 -0
  22. {node v22.15 → node v24.10}/http.d.ts +187 -37
  23. {node v22.15 → node v24.10}/http2.d.ts +197 -66
  24. {node v22.15 → node v24.10}/https.d.ts +97 -63
  25. {node v22.15 → node v24.10}/index.d.ts +16 -7
  26. node v24.10/inspector.d.ts +277 -0
  27. node v22.15/inspector.d.ts → node v24.10/inspector.generated.d.ts +1059 -828
  28. {node v22.15 → node v24.10}/module.d.ts +90 -30
  29. {node v22.15 → node v24.10}/net.d.ts +35 -16
  30. {node v22.15 → node v24.10}/os.d.ts +22 -10
  31. {node v22.15 → node v24.10}/package.json +14 -84
  32. {node v22.15 → node v24.10}/path.d.ts +2 -2
  33. {node v22.15 → node v24.10}/perf_hooks.d.ts +28 -16
  34. {node v22.15 → node v24.10}/process.d.ts +59 -34
  35. {node v22.15 → node v24.10}/punycode.d.ts +1 -1
  36. {node v22.15 → node v24.10}/querystring.d.ts +1 -1
  37. {node v22.15 → node v24.10}/readline/promises.d.ts +1 -2
  38. {node v22.15 → node v24.10}/readline.d.ts +13 -13
  39. {node v22.15 → node v24.10}/repl.d.ts +25 -17
  40. {node v22.15 → node v24.10}/sea.d.ts +10 -1
  41. {node v22.15 → node v24.10}/sqlite.d.ts +438 -9
  42. {node v22.15 → node v24.10}/stream/consumers.d.ts +2 -2
  43. {node v22.15 → node v24.10}/stream/web.d.ts +13 -54
  44. {node v22.15 → node v24.10}/stream.d.ts +63 -48
  45. {node v22.15 → node v24.10}/string_decoder.d.ts +3 -3
  46. node v24.10/test.d.ts +2339 -0
  47. {node v22.15 → node v24.10}/timers/promises.d.ts +1 -1
  48. {node v22.15 → node v24.10}/timers.d.ts +1 -3
  49. {node v22.15 → node v24.10}/tls.d.ts +128 -114
  50. {node v22.15 → node v24.10}/trace_events.d.ts +6 -6
  51. {node v22.15 → node v24.10}/ts5.6/buffer.buffer.d.ts +10 -2
  52. node v24.10/ts5.6/compatibility/float16array.d.ts +71 -0
  53. node v24.10/ts5.6/globals.typedarray.d.ts +36 -0
  54. {node v22.15 → node v24.10}/ts5.6/index.d.ts +18 -7
  55. node v24.10/ts5.7/compatibility/float16array.d.ts +72 -0
  56. node v24.10/ts5.7/index.d.ts +103 -0
  57. {node v22.15 → node v24.10}/tty.d.ts +1 -1
  58. {node v22.15 → node v24.10}/url.d.ts +119 -34
  59. {node v22.15 → node v24.10}/util.d.ts +45 -304
  60. {node v22.15 → node v24.10}/v8.d.ts +68 -38
  61. {node v22.15 → node v24.10}/vm.d.ts +258 -107
  62. {node v22.15 → node v24.10}/wasi.d.ts +23 -2
  63. node v24.10/web-globals/abortcontroller.d.ts +34 -0
  64. node v24.10/web-globals/crypto.d.ts +32 -0
  65. node v24.10/web-globals/domexception.d.ts +68 -0
  66. node v22.15/dom-events.d.ts → node v24.10/web-globals/events.d.ts +49 -51
  67. node v24.10/web-globals/fetch.d.ts +50 -0
  68. node v24.10/web-globals/navigator.d.ts +25 -0
  69. node v24.10/web-globals/storage.d.ts +24 -0
  70. node v24.10/web-globals/streams.d.ts +22 -0
  71. {node v22.15 → node v24.10}/worker_threads.d.ts +206 -68
  72. {node v22.15 → node v24.10}/zlib.d.ts +44 -33
  73. node v22.15/README.md +0 -15
  74. node v22.15/assert/strict.d.ts +0 -8
  75. node v22.15/compatibility/disposable.d.ts +0 -14
  76. node v22.15/compatibility/index.d.ts +0 -9
  77. node v22.15/compatibility/indexable.d.ts +0 -20
  78. node v22.15/globals.d.ts +0 -364
  79. node v22.15/globals.typedarray.d.ts +0 -21
  80. node v22.15/test.d.ts +0 -2278
  81. node v22.15/ts5.6/globals.typedarray.d.ts +0 -19
  82. {node v22.15 → node v24.10}/LICENSE +0 -0
  83. {node v22.15 → node v24.10}/constants.d.ts +0 -0
  84. {node v22.15 → node v24.10}/stream/promises.d.ts +0 -0
@@ -13,7 +13,7 @@ declare module "path/win32" {
13
13
  * ```js
14
14
  * import path from 'node:path';
15
15
  * ```
16
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/path.js)
16
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/path.js)
17
17
  */
18
18
  declare module "path" {
19
19
  namespace path {
@@ -67,7 +67,7 @@ declare module "path" {
67
67
  interface PlatformPath {
68
68
  /**
69
69
  * Normalize a string path, reducing '..' and '.' parts.
70
- * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
70
+ * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory.
71
71
  *
72
72
  * @param path string path to normalize.
73
73
  * @throws {TypeError} if `path` is not a string.
@@ -27,7 +27,7 @@
27
27
  * performance.measure('A to B', 'A', 'B');
28
28
  * });
29
29
  * ```
30
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/perf_hooks.js)
30
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/perf_hooks.js)
31
31
  */
32
32
  declare module "perf_hooks" {
33
33
  import { AsyncResource } from "node:async_hooks";
@@ -48,13 +48,13 @@ declare module "perf_hooks" {
48
48
  * the type of garbage collection operation that occurred.
49
49
  * See perf_hooks.constants for valid values.
50
50
  */
51
- readonly kind?: number | undefined;
51
+ readonly kind: number;
52
52
  /**
53
53
  * When `performanceEntry.entryType` is equal to 'gc', the `performance.flags`
54
54
  * property contains additional information about garbage collection operation.
55
55
  * See perf_hooks.constants for valid values.
56
56
  */
57
- readonly flags?: number | undefined;
57
+ readonly flags: number;
58
58
  }
59
59
  /**
60
60
  * The constructor of this class is not exposed to users directly.
@@ -92,11 +92,6 @@ declare module "perf_hooks" {
92
92
  * @since v8.5.0
93
93
  */
94
94
  readonly entryType: EntryType;
95
- /**
96
- * Additional detail specific to the `entryType`.
97
- * @since v16.0.0
98
- */
99
- readonly detail?: NodeGCPerformanceDetail | unknown | undefined; // TODO: Narrow this based on entry type.
100
95
  toJSON(): any;
101
96
  }
102
97
  /**
@@ -104,6 +99,7 @@ declare module "perf_hooks" {
104
99
  * @since v18.2.0, v16.17.0
105
100
  */
106
101
  class PerformanceMark extends PerformanceEntry {
102
+ readonly detail: any;
107
103
  readonly duration: 0;
108
104
  readonly entryType: "mark";
109
105
  }
@@ -114,6 +110,7 @@ declare module "perf_hooks" {
114
110
  * @since v18.2.0, v16.17.0
115
111
  */
116
112
  class PerformanceMeasure extends PerformanceEntry {
113
+ readonly detail: any;
117
114
  readonly entryType: "measure";
118
115
  }
119
116
  interface UVMetrics {
@@ -130,6 +127,7 @@ declare module "perf_hooks" {
130
127
  */
131
128
  readonly eventsWaiting: number;
132
129
  }
130
+ // TODO: PerformanceNodeEntry is missing
133
131
  /**
134
132
  * _This property is an extension by Node.js. It is not available in Web browsers._
135
133
  *
@@ -225,7 +223,7 @@ declare module "perf_hooks" {
225
223
  /**
226
224
  * Additional optional detail to include with the mark.
227
225
  */
228
- detail?: unknown | undefined;
226
+ detail?: unknown;
229
227
  /**
230
228
  * Duration between start and end times.
231
229
  */
@@ -813,6 +811,20 @@ declare module "perf_hooks" {
813
811
  * @since v11.10.0
814
812
  */
815
813
  disable(): boolean;
814
+ /**
815
+ * Disables the update interval timer when the histogram is disposed.
816
+ *
817
+ * ```js
818
+ * const { monitorEventLoopDelay } = require('node:perf_hooks');
819
+ * {
820
+ * using hist = monitorEventLoopDelay({ resolution: 20 });
821
+ * hist.enable();
822
+ * // The histogram will be disabled when the block is exited.
823
+ * }
824
+ * ```
825
+ * @since v24.2.0
826
+ */
827
+ [Symbol.dispose](): void;
816
828
  }
817
829
  interface RecordableHistogram extends Histogram {
818
830
  /**
@@ -895,7 +907,7 @@ declare module "perf_hooks" {
895
907
  global {
896
908
  /**
897
909
  * `PerformanceEntry` is a global reference for `import { PerformanceEntry } from 'node:perf_hooks'`
898
- * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceentry
910
+ * @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performanceentry
899
911
  * @since v19.0.0
900
912
  */
901
913
  var PerformanceEntry: typeof globalThis extends {
@@ -905,7 +917,7 @@ declare module "perf_hooks" {
905
917
  : typeof _PerformanceEntry;
906
918
  /**
907
919
  * `PerformanceMark` is a global reference for `import { PerformanceMark } from 'node:perf_hooks'`
908
- * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performancemark
920
+ * @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performancemark
909
921
  * @since v19.0.0
910
922
  */
911
923
  var PerformanceMark: typeof globalThis extends {
@@ -915,7 +927,7 @@ declare module "perf_hooks" {
915
927
  : typeof _PerformanceMark;
916
928
  /**
917
929
  * `PerformanceMeasure` is a global reference for `import { PerformanceMeasure } from 'node:perf_hooks'`
918
- * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performancemeasure
930
+ * @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performancemeasure
919
931
  * @since v19.0.0
920
932
  */
921
933
  var PerformanceMeasure: typeof globalThis extends {
@@ -925,7 +937,7 @@ declare module "perf_hooks" {
925
937
  : typeof _PerformanceMeasure;
926
938
  /**
927
939
  * `PerformanceObserver` is a global reference for `import { PerformanceObserver } from 'node:perf_hooks'`
928
- * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceobserver
940
+ * @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performanceobserver
929
941
  * @since v19.0.0
930
942
  */
931
943
  var PerformanceObserver: typeof globalThis extends {
@@ -935,7 +947,7 @@ declare module "perf_hooks" {
935
947
  : typeof _PerformanceObserver;
936
948
  /**
937
949
  * `PerformanceObserverEntryList` is a global reference for `import { PerformanceObserverEntryList } from 'node:perf_hooks'`
938
- * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceobserverentrylist
950
+ * @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performanceobserverentrylist
939
951
  * @since v19.0.0
940
952
  */
941
953
  var PerformanceObserverEntryList: typeof globalThis extends {
@@ -945,7 +957,7 @@ declare module "perf_hooks" {
945
957
  : typeof _PerformanceObserverEntryList;
946
958
  /**
947
959
  * `PerformanceResourceTiming` is a global reference for `import { PerformanceResourceTiming } from 'node:perf_hooks'`
948
- * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceresourcetiming
960
+ * @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performanceresourcetiming
949
961
  * @since v19.0.0
950
962
  */
951
963
  var PerformanceResourceTiming: typeof globalThis extends {
@@ -955,7 +967,7 @@ declare module "perf_hooks" {
955
967
  : typeof _PerformanceResourceTiming;
956
968
  /**
957
969
  * `performance` is a global reference for `import { performance } from 'node:perf_hooks'`
958
- * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performance
970
+ * @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performance
959
971
  * @since v16.0.0
960
972
  */
961
973
  var performance: typeof globalThis extends {
@@ -1,4 +1,6 @@
1
1
  declare module "process" {
2
+ import { Control, MessageOptions, SendHandle } from "node:child_process";
3
+ import { PathLike } from "node:fs";
2
4
  import * as tty from "node:tty";
3
5
  import { Worker } from "node:worker_threads";
4
6
 
@@ -194,7 +196,7 @@ declare module "process" {
194
196
  readonly ipv6: boolean;
195
197
  /**
196
198
  * A boolean value that is `true` if the current Node.js build supports
197
- * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v22.x/api/modules.md#loading-ecmascript-modules-using-require).
199
+ * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v24.x/api/modules.md#loading-ecmascript-modules-using-require).
198
200
  * @since v22.10.0
199
201
  */
200
202
  readonly require_module: boolean;
@@ -231,8 +233,9 @@ declare module "process" {
231
233
  */
232
234
  readonly tls_sni: boolean;
233
235
  /**
234
- * A value that is `"strip"` if Node.js is run with `--experimental-strip-types`,
235
- * `"transform"` if Node.js is run with `--experimental-transform-types`, and `false` otherwise.
236
+ * A value that is `"strip"` by default,
237
+ * `"transform"` if Node.js is run with `--experimental-transform-types`, and `false` if
238
+ * Node.js is run with `--no-experimental-strip-types`.
236
239
  * @since v22.10.0
237
240
  */
238
241
  readonly typescript: "strip" | "transform" | false;
@@ -274,10 +277,8 @@ declare module "process" {
274
277
  | "loong64"
275
278
  | "mips"
276
279
  | "mipsel"
277
- | "ppc"
278
280
  | "ppc64"
279
281
  | "riscv64"
280
- | "s390"
281
282
  | "s390x"
282
283
  | "x64";
283
284
  type Signals =
@@ -331,7 +332,7 @@ declare module "process" {
331
332
  */
332
333
  type UnhandledRejectionListener = (reason: unknown, promise: Promise<unknown>) => void;
333
334
  type WarningListener = (warning: Error) => void;
334
- type MessageListener = (message: unknown, sendHandle: unknown) => void;
335
+ type MessageListener = (message: unknown, sendHandle: SendHandle) => void;
335
336
  type SignalsListener = (signal: Signals) => void;
336
337
  type MultipleResolveListener = (
337
338
  type: MultipleResolveType,
@@ -347,7 +348,7 @@ declare module "process" {
347
348
  /**
348
349
  * Can be used to change the default timezone at runtime
349
350
  */
350
- TZ?: string;
351
+ TZ?: string | undefined;
351
352
  }
352
353
  interface HRTime {
353
354
  /**
@@ -471,6 +472,11 @@ declare module "process" {
471
472
  * @default false
472
473
  */
473
474
  reportOnUncaughtException: boolean;
475
+ /**
476
+ * If true, a diagnostic report is generated without the environment variables.
477
+ * @default false
478
+ */
479
+ excludeEnv: boolean;
474
480
  /**
475
481
  * The signal used to trigger the creation of a diagnostic report.
476
482
  * @default 'SIGUSR2'
@@ -748,7 +754,7 @@ declare module "process" {
748
754
  * should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()`
749
755
  * unless there are specific reasons such as custom dlopen flags or loading from ES modules.
750
756
  *
751
- * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v22.x/api/os.html#dlopen-constants)`
757
+ * 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)`
752
758
  * documentation for details.
753
759
  *
754
760
  * An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon
@@ -991,7 +997,7 @@ declare module "process" {
991
997
  * @since v0.1.13
992
998
  * @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed.
993
999
  */
994
- exit(code?: number | string | null | undefined): never;
1000
+ exit(code?: number | string | null): never;
995
1001
  /**
996
1002
  * A number which will be the process exit code, when the process either
997
1003
  * exits gracefully, or is exited via {@link exit} without specifying
@@ -1002,7 +1008,7 @@ declare module "process" {
1002
1008
  * @default undefined
1003
1009
  * @since v0.11.8
1004
1010
  */
1005
- exitCode?: number | string | number | undefined;
1011
+ exitCode: number | string | null | undefined;
1006
1012
  finalization: {
1007
1013
  /**
1008
1014
  * This function registers a callback to be called when the process emits the `exit` event if the `ref` object was not garbage collected.
@@ -1466,7 +1472,7 @@ declare module "process" {
1466
1472
  * @since v20.12.0
1467
1473
  * @param path The path to the .env file
1468
1474
  */
1469
- loadEnvFile(path?: string | URL | Buffer): void;
1475
+ loadEnvFile(path?: PathLike): void;
1470
1476
  /**
1471
1477
  * The `process.pid` property returns the PID of the process.
1472
1478
  *
@@ -1490,6 +1496,18 @@ declare module "process" {
1490
1496
  * @since v9.2.0, v8.10.0, v6.13.0
1491
1497
  */
1492
1498
  readonly ppid: number;
1499
+ /**
1500
+ * The `process.threadCpuUsage()` method returns the user and system CPU time usage of
1501
+ * the current worker thread, in an object with properties `user` and `system`, whose
1502
+ * values are microsecond values (millionth of a second).
1503
+ *
1504
+ * The result of a previous call to `process.threadCpuUsage()` can be passed as the
1505
+ * argument to the function, to get a diff reading.
1506
+ * @since v23.9.0
1507
+ * @param previousValue A previous return value from calling
1508
+ * `process.threadCpuUsage()`
1509
+ */
1510
+ threadCpuUsage(previousValue?: CpuUsage): CpuUsage;
1493
1511
  /**
1494
1512
  * The `process.title` property returns the current process title (i.e. returns
1495
1513
  * the current value of `ps`). Assigning a new value to `process.title` modifies
@@ -1510,7 +1528,8 @@ declare module "process" {
1510
1528
  title: string;
1511
1529
  /**
1512
1530
  * The operating system CPU architecture for which the Node.js binary was compiled.
1513
- * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`.
1531
+ * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`,
1532
+ * `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`.
1514
1533
  *
1515
1534
  * ```js
1516
1535
  * import { arch } from 'node:process';
@@ -1556,7 +1575,7 @@ declare module "process" {
1556
1575
  * @since v0.1.17
1557
1576
  * @deprecated Since v14.0.0 - Use `main` instead.
1558
1577
  */
1559
- mainModule?: Module | undefined;
1578
+ mainModule?: Module;
1560
1579
  memoryUsage: MemoryUsageFn;
1561
1580
  /**
1562
1581
  * Gets the amount of memory available to the process (in bytes) based on
@@ -1566,13 +1585,11 @@ declare module "process" {
1566
1585
  * See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more
1567
1586
  * information.
1568
1587
  * @since v19.6.0, v18.15.0
1569
- * @experimental
1570
1588
  */
1571
1589
  constrainedMemory(): number;
1572
1590
  /**
1573
1591
  * Gets the amount of free memory that is still available to the process (in bytes).
1574
- * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v22.x/api/process.html#processavailablememory) for more information.
1575
- * @experimental
1592
+ * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v24.x/api/process.html#processavailablememory) for more information.
1576
1593
  * @since v20.13.0
1577
1594
  */
1578
1595
  availableMemory(): number;
@@ -1692,6 +1709,11 @@ declare module "process" {
1692
1709
  * @param args Additional arguments to pass when invoking the `callback`
1693
1710
  */
1694
1711
  nextTick(callback: Function, ...args: any[]): void;
1712
+ /**
1713
+ * The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process.
1714
+ * See the documentation for the ['warning' event](https://nodejs.org/docs/latest/api/process.html#event-warning) and the [emitWarning()](https://nodejs.org/docs/latest/api/process.html#processemitwarningwarning-type-code-ctor) method for more information about this flag's behavior.
1715
+ */
1716
+ noDeprecation?: boolean;
1695
1717
  /**
1696
1718
  * This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag.
1697
1719
  *
@@ -1750,18 +1772,7 @@ declare module "process" {
1750
1772
  * If no IPC channel exists, this property is undefined.
1751
1773
  * @since v7.1.0
1752
1774
  */
1753
- channel?: {
1754
- /**
1755
- * This method makes the IPC channel keep the event loop of the process running if .unref() has been called before.
1756
- * @since v7.1.0
1757
- */
1758
- ref(): void;
1759
- /**
1760
- * This method makes the IPC channel not keep the event loop of the process running, and lets it finish even while the channel is open.
1761
- * @since v7.1.0
1762
- */
1763
- unref(): void;
1764
- };
1775
+ channel?: Control;
1765
1776
  /**
1766
1777
  * If Node.js is spawned with an IPC channel, the `process.send()` method can be
1767
1778
  * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object.
@@ -1775,10 +1786,17 @@ declare module "process" {
1775
1786
  */
1776
1787
  send?(
1777
1788
  message: any,
1778
- sendHandle?: any,
1779
- options?: {
1780
- keepOpen?: boolean | undefined;
1781
- },
1789
+ callback?: (error: Error | null) => void,
1790
+ ): boolean;
1791
+ send?(
1792
+ message: any,
1793
+ sendHandle: SendHandle,
1794
+ callback?: (error: Error | null) => void,
1795
+ ): boolean;
1796
+ send?(
1797
+ message: any,
1798
+ sendHandle: SendHandle,
1799
+ options: MessageOptions,
1782
1800
  callback?: (error: Error | null) => void,
1783
1801
  ): boolean;
1784
1802
  /**
@@ -1845,7 +1863,7 @@ declare module "process" {
1845
1863
  allowedNodeEnvironmentFlags: ReadonlySet<string>;
1846
1864
  /**
1847
1865
  * `process.report` is an object whose methods are used to generate diagnostic reports for the current process.
1848
- * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v22.x/api/report.html).
1866
+ * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v24.x/api/report.html).
1849
1867
  * @since v11.8.0
1850
1868
  */
1851
1869
  report: ProcessReport;
@@ -1970,6 +1988,7 @@ declare module "process" {
1970
1988
  addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
1971
1989
  addListener(event: "warning", listener: WarningListener): this;
1972
1990
  addListener(event: "message", listener: MessageListener): this;
1991
+ addListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
1973
1992
  addListener(event: Signals, listener: SignalsListener): this;
1974
1993
  addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
1975
1994
  addListener(event: "worker", listener: WorkerListener): this;
@@ -1981,7 +2000,8 @@ declare module "process" {
1981
2000
  emit(event: "uncaughtExceptionMonitor", error: Error): boolean;
1982
2001
  emit(event: "unhandledRejection", reason: unknown, promise: Promise<unknown>): boolean;
1983
2002
  emit(event: "warning", warning: Error): boolean;
1984
- emit(event: "message", message: unknown, sendHandle: unknown): this;
2003
+ emit(event: "message", message: unknown, sendHandle: SendHandle): this;
2004
+ emit(event: "workerMessage", value: any, source: number): this;
1985
2005
  emit(event: Signals, signal?: Signals): boolean;
1986
2006
  emit(
1987
2007
  event: "multipleResolves",
@@ -2002,6 +2022,7 @@ declare module "process" {
2002
2022
  on(event: Signals, listener: SignalsListener): this;
2003
2023
  on(event: "multipleResolves", listener: MultipleResolveListener): this;
2004
2024
  on(event: "worker", listener: WorkerListener): this;
2025
+ on(event: "workerMessage", listener: (value: any, source: number) => void): this;
2005
2026
  on(event: string | symbol, listener: (...args: any[]) => void): this;
2006
2027
  once(event: "beforeExit", listener: BeforeExitListener): this;
2007
2028
  once(event: "disconnect", listener: DisconnectListener): this;
@@ -2015,6 +2036,7 @@ declare module "process" {
2015
2036
  once(event: Signals, listener: SignalsListener): this;
2016
2037
  once(event: "multipleResolves", listener: MultipleResolveListener): this;
2017
2038
  once(event: "worker", listener: WorkerListener): this;
2039
+ once(event: "workerMessage", listener: (value: any, source: number) => void): this;
2018
2040
  once(event: string | symbol, listener: (...args: any[]) => void): this;
2019
2041
  prependListener(event: "beforeExit", listener: BeforeExitListener): this;
2020
2042
  prependListener(event: "disconnect", listener: DisconnectListener): this;
@@ -2025,6 +2047,7 @@ declare module "process" {
2025
2047
  prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2026
2048
  prependListener(event: "warning", listener: WarningListener): this;
2027
2049
  prependListener(event: "message", listener: MessageListener): this;
2050
+ prependListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
2028
2051
  prependListener(event: Signals, listener: SignalsListener): this;
2029
2052
  prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
2030
2053
  prependListener(event: "worker", listener: WorkerListener): this;
@@ -2037,6 +2060,7 @@ declare module "process" {
2037
2060
  prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2038
2061
  prependOnceListener(event: "warning", listener: WarningListener): this;
2039
2062
  prependOnceListener(event: "message", listener: MessageListener): this;
2063
+ prependOnceListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
2040
2064
  prependOnceListener(event: Signals, listener: SignalsListener): this;
2041
2065
  prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
2042
2066
  prependOnceListener(event: "worker", listener: WorkerListener): this;
@@ -2049,6 +2073,7 @@ declare module "process" {
2049
2073
  listeners(event: "unhandledRejection"): UnhandledRejectionListener[];
2050
2074
  listeners(event: "warning"): WarningListener[];
2051
2075
  listeners(event: "message"): MessageListener[];
2076
+ listeners(event: "workerMessage"): ((value: any, source: number) => void)[];
2052
2077
  listeners(event: Signals): SignalsListener[];
2053
2078
  listeners(event: "multipleResolves"): MultipleResolveListener[];
2054
2079
  listeners(event: "worker"): WorkerListener[];
@@ -24,7 +24,7 @@
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
26
  * @deprecated Since v7.0.0 - Deprecated
27
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/punycode.js)
27
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/punycode.js)
28
28
  */
29
29
  declare module "punycode" {
30
30
  /**
@@ -9,7 +9,7 @@
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/v22.x/lib/querystring.js)
12
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/querystring.js)
13
13
  */
14
14
  declare module "querystring" {
15
15
  interface StringifyOptions {
@@ -1,6 +1,5 @@
1
1
  /**
2
2
  * @since v17.0.0
3
- * @experimental
4
3
  */
5
4
  declare module "readline/promises" {
6
5
  import { Abortable } from "node:events";
@@ -65,7 +64,7 @@ declare module "readline/promises" {
65
64
  constructor(
66
65
  stream: NodeJS.WritableStream,
67
66
  options?: {
68
- autoCommit?: boolean;
67
+ autoCommit?: boolean | undefined;
69
68
  },
70
69
  );
71
70
  /**
@@ -1,6 +1,6 @@
1
1
  /**
2
- * The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v22.x/api/stream.html#readable-streams) stream
3
- * (such as [`process.stdin`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstdin)) one line at a time.
2
+ * The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream
3
+ * (such as [`process.stdin`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdin)) one line at a time.
4
4
  *
5
5
  * To use the promise-based APIs:
6
6
  *
@@ -31,7 +31,7 @@
31
31
  *
32
32
  * Once this code is invoked, the Node.js application will not terminate until the `readline.Interface` is closed because the interface waits for data to be
33
33
  * received on the `input` stream.
34
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/readline.js)
34
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/readline.js)
35
35
  */
36
36
  declare module "readline" {
37
37
  import { Abortable, EventEmitter } from "node:events";
@@ -46,7 +46,7 @@ declare module "readline" {
46
46
  }
47
47
  /**
48
48
  * Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a
49
- * single `input` [Readable](https://nodejs.org/docs/latest-v22.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v22.x/api/stream.html#writable-streams) stream.
49
+ * single `input` [Readable](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v24.x/api/stream.html#writable-streams) stream.
50
50
  * The `output` stream is used to print prompts for user input that arrives on,
51
51
  * and is read from, the `input` stream.
52
52
  * @since v0.1.104
@@ -100,7 +100,7 @@ declare module "readline" {
100
100
  * > Instances of the `readline.Interface` class are constructed using the
101
101
  * > `readline.createInterface()` method.
102
102
  *
103
- * @see https://nodejs.org/dist/latest-v22.x/docs/api/readline.html#class-interfaceconstructor
103
+ * @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#class-interfaceconstructor
104
104
  */
105
105
  protected constructor(
106
106
  input: NodeJS.ReadableStream,
@@ -114,7 +114,7 @@ declare module "readline" {
114
114
  * > Instances of the `readline.Interface` class are constructed using the
115
115
  * > `readline.createInterface()` method.
116
116
  *
117
- * @see https://nodejs.org/dist/latest-v22.x/docs/api/readline.html#class-interfaceconstructor
117
+ * @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#class-interfaceconstructor
118
118
  */
119
119
  protected constructor(options: ReadLineOptions);
120
120
  /**
@@ -320,11 +320,11 @@ declare module "readline" {
320
320
  export type CompleterResult = [string[], string];
321
321
  export interface ReadLineOptions {
322
322
  /**
323
- * The [`Readable`](https://nodejs.org/docs/latest-v22.x/api/stream.html#readable-streams) stream to listen to
323
+ * The [`Readable`](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream to listen to
324
324
  */
325
325
  input: NodeJS.ReadableStream;
326
326
  /**
327
- * The [`Writable`](https://nodejs.org/docs/latest-v22.x/api/stream.html#writable-streams) stream to write readline data to.
327
+ * The [`Writable`](https://nodejs.org/docs/latest-v24.x/api/stream.html#writable-streams) stream to write readline data to.
328
328
  */
329
329
  output?: NodeJS.WritableStream | undefined;
330
330
  /**
@@ -369,7 +369,7 @@ declare module "readline" {
369
369
  * `crlfDelay` will be coerced to a number no less than `100`.
370
370
  * It can be set to `Infinity`, in which case
371
371
  * `\r` followed by `\n` will always be considered a single newline
372
- * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v22.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter).
372
+ * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v24.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter).
373
373
  * @default 100
374
374
  */
375
375
  crlfDelay?: number | undefined;
@@ -557,7 +557,7 @@ declare module "readline" {
557
557
  cols: number;
558
558
  }
559
559
  /**
560
- * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) stream
560
+ * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) stream
561
561
  * in a specified direction identified by `dir`.
562
562
  * @since v0.7.7
563
563
  * @param callback Invoked once the operation completes.
@@ -565,7 +565,7 @@ declare module "readline" {
565
565
  */
566
566
  export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
567
567
  /**
568
- * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) stream from
568
+ * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) stream from
569
569
  * the current position of the cursor down.
570
570
  * @since v0.7.7
571
571
  * @param callback Invoked once the operation completes.
@@ -574,7 +574,7 @@ declare module "readline" {
574
574
  export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
575
575
  /**
576
576
  * The `readline.cursorTo()` method moves cursor to the specified position in a
577
- * given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) `stream`.
577
+ * given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) `stream`.
578
578
  * @since v0.7.7
579
579
  * @param callback Invoked once the operation completes.
580
580
  * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
@@ -582,7 +582,7 @@ declare module "readline" {
582
582
  export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
583
583
  /**
584
584
  * The `readline.moveCursor()` method moves the cursor _relative_ to its current
585
- * position in a given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) `stream`.
585
+ * position in a given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) `stream`.
586
586
  * @since v0.7.7
587
587
  * @param callback Invoked once the operation completes.
588
588
  * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.