@types/node 22.15.21 → 24.10.4

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 (85) hide show
  1. node v24.10/README.md +15 -0
  2. node v24.10/assert/strict.d.ts +111 -0
  3. node/assert.d.ts → node v24.10/assert.d.ts +162 -101
  4. node/async_hooks.d.ts → node v24.10/async_hooks.d.ts +26 -6
  5. node/buffer.buffer.d.ts → node v24.10/buffer.buffer.d.ts +9 -0
  6. node/buffer.d.ts → node v24.10/buffer.d.ts +15 -7
  7. node/child_process.d.ts → node v24.10/child_process.d.ts +91 -164
  8. node/cluster.d.ts → node v24.10/cluster.d.ts +19 -20
  9. node/console.d.ts → node v24.10/console.d.ts +19 -18
  10. node/crypto.d.ts → node v24.10/crypto.d.ts +1264 -356
  11. node/dgram.d.ts → node v24.10/dgram.d.ts +10 -9
  12. node/diagnostics_channel.d.ts → node v24.10/diagnostics_channel.d.ts +18 -15
  13. node/dns/promises.d.ts → node v24.10/dns/promises.d.ts +36 -9
  14. node/dns.d.ts → node v24.10/dns.d.ts +95 -37
  15. node/domain.d.ts → node v24.10/domain.d.ts +1 -1
  16. node/events.d.ts → node v24.10/events.d.ts +81 -36
  17. node/fs/promises.d.ts → node v24.10/fs/promises.d.ts +104 -59
  18. node/fs.d.ts → node v24.10/fs.d.ts +414 -137
  19. node v24.10/globals.d.ts +170 -0
  20. node v24.10/globals.typedarray.d.ts +41 -0
  21. node/http.d.ts → node v24.10/http.d.ts +187 -37
  22. node/http2.d.ts → node v24.10/http2.d.ts +266 -67
  23. node/https.d.ts → node v24.10/https.d.ts +97 -63
  24. node/index.d.ts → node v24.10/index.d.ts +16 -7
  25. node v24.10/inspector.d.ts +277 -0
  26. node/inspector.d.ts → node v24.10/inspector.generated.d.ts +1059 -828
  27. node/module.d.ts → node v24.10/module.d.ts +153 -31
  28. node/net.d.ts → node v24.10/net.d.ts +35 -16
  29. node/os.d.ts → node v24.10/os.d.ts +22 -10
  30. node/package.json → node v24.10/package.json +14 -84
  31. node/path.d.ts → node v24.10/path.d.ts +2 -2
  32. node/perf_hooks.d.ts → node v24.10/perf_hooks.d.ts +30 -18
  33. node/process.d.ts → node v24.10/process.d.ts +45 -34
  34. node/punycode.d.ts → node v24.10/punycode.d.ts +1 -1
  35. node/querystring.d.ts → node v24.10/querystring.d.ts +1 -1
  36. node/readline/promises.d.ts → node v24.10/readline/promises.d.ts +1 -2
  37. node/readline.d.ts → node v24.10/readline.d.ts +13 -13
  38. node/repl.d.ts → node v24.10/repl.d.ts +25 -17
  39. node/sea.d.ts → node v24.10/sea.d.ts +10 -1
  40. node/sqlite.d.ts → node v24.10/sqlite.d.ts +438 -9
  41. node/stream/consumers.d.ts → node v24.10/stream/consumers.d.ts +2 -2
  42. node/stream/web.d.ts → node v24.10/stream/web.d.ts +13 -54
  43. node/stream.d.ts → node v24.10/stream.d.ts +68 -47
  44. node/string_decoder.d.ts → node v24.10/string_decoder.d.ts +3 -3
  45. node v24.10/test.d.ts +2339 -0
  46. node/timers/promises.d.ts → node v24.10/timers/promises.d.ts +1 -1
  47. node/timers.d.ts → node v24.10/timers.d.ts +1 -3
  48. node/tls.d.ts → node v24.10/tls.d.ts +124 -114
  49. node/trace_events.d.ts → node v24.10/trace_events.d.ts +6 -6
  50. node/ts5.6/buffer.buffer.d.ts → node v24.10/ts5.6/buffer.buffer.d.ts +10 -2
  51. node v24.10/ts5.6/compatibility/float16array.d.ts +71 -0
  52. node v24.10/ts5.6/globals.typedarray.d.ts +36 -0
  53. node/ts5.6/index.d.ts → node v24.10/ts5.6/index.d.ts +18 -7
  54. node v24.10/ts5.7/compatibility/float16array.d.ts +72 -0
  55. node v24.10/ts5.7/index.d.ts +103 -0
  56. node/tty.d.ts → node v24.10/tty.d.ts +1 -1
  57. node/url.d.ts → node v24.10/url.d.ts +119 -34
  58. node/util.d.ts → node v24.10/util.d.ts +46 -305
  59. node/v8.d.ts → node v24.10/v8.d.ts +100 -37
  60. node/vm.d.ts → node v24.10/vm.d.ts +299 -110
  61. node/wasi.d.ts → node v24.10/wasi.d.ts +23 -2
  62. node v24.10/web-globals/abortcontroller.d.ts +34 -0
  63. node v24.10/web-globals/crypto.d.ts +32 -0
  64. node v24.10/web-globals/domexception.d.ts +68 -0
  65. node v24.10/web-globals/events.d.ts +97 -0
  66. node v24.10/web-globals/fetch.d.ts +50 -0
  67. node v24.10/web-globals/navigator.d.ts +25 -0
  68. node v24.10/web-globals/storage.d.ts +24 -0
  69. node v24.10/web-globals/streams.d.ts +22 -0
  70. node/worker_threads.d.ts → node v24.10/worker_threads.d.ts +225 -75
  71. node/zlib.d.ts → node v24.10/zlib.d.ts +44 -33
  72. node/README.md +0 -15
  73. node/assert/strict.d.ts +0 -8
  74. node/compatibility/disposable.d.ts +0 -16
  75. node/compatibility/index.d.ts +0 -9
  76. node/compatibility/indexable.d.ts +0 -23
  77. node/dom-events.d.ts +0 -124
  78. node/globals.d.ts +0 -371
  79. node/globals.typedarray.d.ts +0 -21
  80. node/test.d.ts +0 -2280
  81. node/ts5.6/globals.typedarray.d.ts +0 -19
  82. {node → node v24.10}/LICENSE +0 -0
  83. {node → node v24.10}/compatibility/iterators.d.ts +0 -0
  84. {node → node v24.10}/constants.d.ts +0 -0
  85. {node → node v24.10}/stream/promises.d.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.15.21",
3
+ "version": "24.10.4",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -15,11 +15,6 @@
15
15
  "githubUsername": "jkomyno",
16
16
  "url": "https://github.com/jkomyno"
17
17
  },
18
- {
19
- "name": "Alvis HT Tang",
20
- "githubUsername": "alvis",
21
- "url": "https://github.com/alvis"
22
- },
23
18
  {
24
19
  "name": "Andrew Makarov",
25
20
  "githubUsername": "r3nya",
@@ -30,56 +25,11 @@
30
25
  "githubUsername": "btoueg",
31
26
  "url": "https://github.com/btoueg"
32
27
  },
33
- {
34
- "name": "Chigozirim C.",
35
- "githubUsername": "smac89",
36
- "url": "https://github.com/smac89"
37
- },
38
28
  {
39
29
  "name": "David Junger",
40
30
  "githubUsername": "touffy",
41
31
  "url": "https://github.com/touffy"
42
32
  },
43
- {
44
- "name": "Deividas Bakanas",
45
- "githubUsername": "DeividasBakanas",
46
- "url": "https://github.com/DeividasBakanas"
47
- },
48
- {
49
- "name": "Eugene Y. Q. Shen",
50
- "githubUsername": "eyqs",
51
- "url": "https://github.com/eyqs"
52
- },
53
- {
54
- "name": "Hannes Magnusson",
55
- "githubUsername": "Hannes-Magnusson-CK",
56
- "url": "https://github.com/Hannes-Magnusson-CK"
57
- },
58
- {
59
- "name": "Huw",
60
- "githubUsername": "hoo29",
61
- "url": "https://github.com/hoo29"
62
- },
63
- {
64
- "name": "Kelvin Jin",
65
- "githubUsername": "kjin",
66
- "url": "https://github.com/kjin"
67
- },
68
- {
69
- "name": "Klaus Meinhardt",
70
- "githubUsername": "ajafff",
71
- "url": "https://github.com/ajafff"
72
- },
73
- {
74
- "name": "Lishude",
75
- "githubUsername": "islishude",
76
- "url": "https://github.com/islishude"
77
- },
78
- {
79
- "name": "Mariusz Wiktorczyk",
80
- "githubUsername": "mwiktorczyk",
81
- "url": "https://github.com/mwiktorczyk"
82
- },
83
33
  {
84
34
  "name": "Mohsen Azimi",
85
35
  "githubUsername": "mohsen1",
@@ -90,46 +40,16 @@
90
40
  "githubUsername": "galkin",
91
41
  "url": "https://github.com/galkin"
92
42
  },
93
- {
94
- "name": "Parambir Singh",
95
- "githubUsername": "parambirs",
96
- "url": "https://github.com/parambirs"
97
- },
98
43
  {
99
44
  "name": "Sebastian Silbermann",
100
45
  "githubUsername": "eps1lon",
101
46
  "url": "https://github.com/eps1lon"
102
47
  },
103
- {
104
- "name": "Thomas den Hollander",
105
- "githubUsername": "ThomasdenH",
106
- "url": "https://github.com/ThomasdenH"
107
- },
108
48
  {
109
49
  "name": "Wilco Bakker",
110
50
  "githubUsername": "WilcoBakker",
111
51
  "url": "https://github.com/WilcoBakker"
112
52
  },
113
- {
114
- "name": "wwwy3y3",
115
- "githubUsername": "wwwy3y3",
116
- "url": "https://github.com/wwwy3y3"
117
- },
118
- {
119
- "name": "Samuel Ainsworth",
120
- "githubUsername": "samuela",
121
- "url": "https://github.com/samuela"
122
- },
123
- {
124
- "name": "Kyle Uehlein",
125
- "githubUsername": "kuehlein",
126
- "url": "https://github.com/kuehlein"
127
- },
128
- {
129
- "name": "Thanik Bhongbhibhat",
130
- "githubUsername": "bhongy",
131
- "url": "https://github.com/bhongy"
132
- },
133
53
  {
134
54
  "name": "Marcin Kopacz",
135
55
  "githubUsername": "chyzwar",
@@ -199,6 +119,11 @@
199
119
  "name": "René",
200
120
  "githubUsername": "Renegade334",
201
121
  "url": "https://github.com/Renegade334"
122
+ },
123
+ {
124
+ "name": "Yagiz Nizipli",
125
+ "githubUsername": "anonrig",
126
+ "url": "https://github.com/anonrig"
202
127
  }
203
128
  ],
204
129
  "main": "",
@@ -208,6 +133,11 @@
208
133
  "*": [
209
134
  "ts5.6/*"
210
135
  ]
136
+ },
137
+ "<=5.7": {
138
+ "*": [
139
+ "ts5.7/*"
140
+ ]
211
141
  }
212
142
  },
213
143
  "repository": {
@@ -217,9 +147,9 @@
217
147
  },
218
148
  "scripts": {},
219
149
  "dependencies": {
220
- "undici-types": "~6.21.0"
150
+ "undici-types": "~7.16.0"
221
151
  },
222
152
  "peerDependencies": {},
223
- "typesPublisherContentHash": "5d2f879a002d15b5c339ca2ceae4757f171fe11f54ad330e4325efc50af262a7",
224
- "typeScriptVersion": "5.1"
153
+ "typesPublisherContentHash": "3a9013632111e49759d702b082ccfa1cce713feb78de09513919546221062945",
154
+ "typeScriptVersion": "5.2"
225
155
  }
@@ -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
  /**
@@ -866,12 +878,12 @@ declare module "perf_hooks" {
866
878
  * The minimum recordable value. Must be an integer value greater than 0.
867
879
  * @default 1
868
880
  */
869
- min?: number | bigint | undefined;
881
+ lowest?: number | bigint | undefined;
870
882
  /**
871
883
  * The maximum recordable value. Must be an integer value greater than min.
872
884
  * @default Number.MAX_SAFE_INTEGER
873
885
  */
874
- max?: number | bigint | undefined;
886
+ highest?: number | bigint | undefined;
875
887
  /**
876
888
  * The number of accuracy digits. Must be a number between 1 and 5.
877
889
  * @default 3
@@ -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
  /**
@@ -748,7 +749,7 @@ declare module "process" {
748
749
  * should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()`
749
750
  * unless there are specific reasons such as custom dlopen flags or loading from ES modules.
750
751
  *
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)`
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)`
752
753
  * documentation for details.
753
754
  *
754
755
  * An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon
@@ -991,7 +992,7 @@ declare module "process" {
991
992
  * @since v0.1.13
992
993
  * @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed.
993
994
  */
994
- exit(code?: number | string | null | undefined): never;
995
+ exit(code?: number | string | null): never;
995
996
  /**
996
997
  * A number which will be the process exit code, when the process either
997
998
  * exits gracefully, or is exited via {@link exit} without specifying
@@ -1002,7 +1003,7 @@ declare module "process" {
1002
1003
  * @default undefined
1003
1004
  * @since v0.11.8
1004
1005
  */
1005
- exitCode?: number | string | number | undefined;
1006
+ exitCode: number | string | null | undefined;
1006
1007
  finalization: {
1007
1008
  /**
1008
1009
  * 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 +1467,7 @@ declare module "process" {
1466
1467
  * @since v20.12.0
1467
1468
  * @param path The path to the .env file
1468
1469
  */
1469
- loadEnvFile(path?: string | URL | Buffer): void;
1470
+ loadEnvFile(path?: PathLike): void;
1470
1471
  /**
1471
1472
  * The `process.pid` property returns the PID of the process.
1472
1473
  *
@@ -1490,6 +1491,18 @@ declare module "process" {
1490
1491
  * @since v9.2.0, v8.10.0, v6.13.0
1491
1492
  */
1492
1493
  readonly ppid: number;
1494
+ /**
1495
+ * The `process.threadCpuUsage()` method returns the user and system CPU time usage of
1496
+ * the current worker thread, in an object with properties `user` and `system`, whose
1497
+ * values are microsecond values (millionth of a second).
1498
+ *
1499
+ * The result of a previous call to `process.threadCpuUsage()` can be passed as the
1500
+ * argument to the function, to get a diff reading.
1501
+ * @since v23.9.0
1502
+ * @param previousValue A previous return value from calling
1503
+ * `process.threadCpuUsage()`
1504
+ */
1505
+ threadCpuUsage(previousValue?: CpuUsage): CpuUsage;
1493
1506
  /**
1494
1507
  * The `process.title` property returns the current process title (i.e. returns
1495
1508
  * the current value of `ps`). Assigning a new value to `process.title` modifies
@@ -1510,7 +1523,8 @@ declare module "process" {
1510
1523
  title: string;
1511
1524
  /**
1512
1525
  * 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'`.
1526
+ * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`,
1527
+ * `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`.
1514
1528
  *
1515
1529
  * ```js
1516
1530
  * import { arch } from 'node:process';
@@ -1556,7 +1570,7 @@ declare module "process" {
1556
1570
  * @since v0.1.17
1557
1571
  * @deprecated Since v14.0.0 - Use `main` instead.
1558
1572
  */
1559
- mainModule?: Module | undefined;
1573
+ mainModule?: Module;
1560
1574
  memoryUsage: MemoryUsageFn;
1561
1575
  /**
1562
1576
  * Gets the amount of memory available to the process (in bytes) based on
@@ -1566,13 +1580,11 @@ declare module "process" {
1566
1580
  * See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more
1567
1581
  * information.
1568
1582
  * @since v19.6.0, v18.15.0
1569
- * @experimental
1570
1583
  */
1571
1584
  constrainedMemory(): number;
1572
1585
  /**
1573
1586
  * 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
1587
+ * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v24.x/api/process.html#processavailablememory) for more information.
1576
1588
  * @since v20.13.0
1577
1589
  */
1578
1590
  availableMemory(): number;
@@ -1692,6 +1704,11 @@ declare module "process" {
1692
1704
  * @param args Additional arguments to pass when invoking the `callback`
1693
1705
  */
1694
1706
  nextTick(callback: Function, ...args: any[]): void;
1707
+ /**
1708
+ * The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process.
1709
+ * 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.
1710
+ */
1711
+ noDeprecation?: boolean;
1695
1712
  /**
1696
1713
  * This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag.
1697
1714
  *
@@ -1750,18 +1767,7 @@ declare module "process" {
1750
1767
  * If no IPC channel exists, this property is undefined.
1751
1768
  * @since v7.1.0
1752
1769
  */
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
- };
1770
+ channel?: Control;
1765
1771
  /**
1766
1772
  * If Node.js is spawned with an IPC channel, the `process.send()` method can be
1767
1773
  * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object.
@@ -1775,10 +1781,8 @@ declare module "process" {
1775
1781
  */
1776
1782
  send?(
1777
1783
  message: any,
1778
- sendHandle?: any,
1779
- options?: {
1780
- keepOpen?: boolean | undefined;
1781
- },
1784
+ sendHandle?: SendHandle,
1785
+ options?: MessageOptions,
1782
1786
  callback?: (error: Error | null) => void,
1783
1787
  ): boolean;
1784
1788
  /**
@@ -1845,7 +1849,7 @@ declare module "process" {
1845
1849
  allowedNodeEnvironmentFlags: ReadonlySet<string>;
1846
1850
  /**
1847
1851
  * `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).
1852
+ * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v24.x/api/report.html).
1849
1853
  * @since v11.8.0
1850
1854
  */
1851
1855
  report: ProcessReport;
@@ -1970,6 +1974,7 @@ declare module "process" {
1970
1974
  addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
1971
1975
  addListener(event: "warning", listener: WarningListener): this;
1972
1976
  addListener(event: "message", listener: MessageListener): this;
1977
+ addListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
1973
1978
  addListener(event: Signals, listener: SignalsListener): this;
1974
1979
  addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
1975
1980
  addListener(event: "worker", listener: WorkerListener): this;
@@ -1981,7 +1986,8 @@ declare module "process" {
1981
1986
  emit(event: "uncaughtExceptionMonitor", error: Error): boolean;
1982
1987
  emit(event: "unhandledRejection", reason: unknown, promise: Promise<unknown>): boolean;
1983
1988
  emit(event: "warning", warning: Error): boolean;
1984
- emit(event: "message", message: unknown, sendHandle: unknown): this;
1989
+ emit(event: "message", message: unknown, sendHandle: SendHandle): this;
1990
+ emit(event: "workerMessage", value: any, source: number): this;
1985
1991
  emit(event: Signals, signal?: Signals): boolean;
1986
1992
  emit(
1987
1993
  event: "multipleResolves",
@@ -2002,6 +2008,7 @@ declare module "process" {
2002
2008
  on(event: Signals, listener: SignalsListener): this;
2003
2009
  on(event: "multipleResolves", listener: MultipleResolveListener): this;
2004
2010
  on(event: "worker", listener: WorkerListener): this;
2011
+ on(event: "workerMessage", listener: (value: any, source: number) => void): this;
2005
2012
  on(event: string | symbol, listener: (...args: any[]) => void): this;
2006
2013
  once(event: "beforeExit", listener: BeforeExitListener): this;
2007
2014
  once(event: "disconnect", listener: DisconnectListener): this;
@@ -2015,6 +2022,7 @@ declare module "process" {
2015
2022
  once(event: Signals, listener: SignalsListener): this;
2016
2023
  once(event: "multipleResolves", listener: MultipleResolveListener): this;
2017
2024
  once(event: "worker", listener: WorkerListener): this;
2025
+ once(event: "workerMessage", listener: (value: any, source: number) => void): this;
2018
2026
  once(event: string | symbol, listener: (...args: any[]) => void): this;
2019
2027
  prependListener(event: "beforeExit", listener: BeforeExitListener): this;
2020
2028
  prependListener(event: "disconnect", listener: DisconnectListener): this;
@@ -2025,6 +2033,7 @@ declare module "process" {
2025
2033
  prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2026
2034
  prependListener(event: "warning", listener: WarningListener): this;
2027
2035
  prependListener(event: "message", listener: MessageListener): this;
2036
+ prependListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
2028
2037
  prependListener(event: Signals, listener: SignalsListener): this;
2029
2038
  prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
2030
2039
  prependListener(event: "worker", listener: WorkerListener): this;
@@ -2037,6 +2046,7 @@ declare module "process" {
2037
2046
  prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2038
2047
  prependOnceListener(event: "warning", listener: WarningListener): this;
2039
2048
  prependOnceListener(event: "message", listener: MessageListener): this;
2049
+ prependOnceListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
2040
2050
  prependOnceListener(event: Signals, listener: SignalsListener): this;
2041
2051
  prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
2042
2052
  prependOnceListener(event: "worker", listener: WorkerListener): this;
@@ -2049,6 +2059,7 @@ declare module "process" {
2049
2059
  listeners(event: "unhandledRejection"): UnhandledRejectionListener[];
2050
2060
  listeners(event: "warning"): WarningListener[];
2051
2061
  listeners(event: "message"): MessageListener[];
2062
+ listeners(event: "workerMessage"): ((value: any, source: number) => void)[];
2052
2063
  listeners(event: Signals): SignalsListener[];
2053
2064
  listeners(event: "multipleResolves"): MultipleResolveListener[];
2054
2065
  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
  /**