@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,13 +1,12 @@
1
1
  /**
2
2
  * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
3
3
  * separate module.
4
- * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/https.js)
4
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/https.js)
5
5
  */
6
- declare module "https" {
7
- import { NonSharedBuffer } from "node:buffer";
6
+ declare module "node:https" {
7
+ import * as http from "node:http";
8
8
  import { Duplex } from "node:stream";
9
9
  import * as tls from "node:tls";
10
- import * as http from "node:http";
11
10
  import { URL } from "node:url";
12
11
  interface ServerOptions<
13
12
  Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
@@ -26,11 +25,11 @@ declare module "https" {
26
25
  /**
27
26
  * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information.
28
27
  *
29
- * Like `http.Agent`, the `createConnection(options[, callback])` method can be overridden to customize
30
- * how TLS connections are established.
28
+ * Like `http.Agent`, the `createConnection(options[, callback])` method can be overridden
29
+ * to customize how TLS connections are established.
31
30
  *
32
- * > See [`agent.createConnection()`](https://nodejs.org/docs/latest-v24.x/api/http.html#agentcreateconnectionoptions-callback)
33
- * for details on overriding this method, including asynchronous socket creation with a callback.
31
+ * > See `agent.createConnection()` for details on overriding this method,
32
+ * > including asynchronous socket creation with a callback.
34
33
  * @since v0.4.5
35
34
  */
36
35
  class Agent extends http.Agent {
@@ -42,10 +41,10 @@ declare module "https" {
42
41
  ): Duplex | null | undefined;
43
42
  getName(options?: RequestOptions): string;
44
43
  }
45
- interface Server<
44
+ interface ServerEventMap<
46
45
  Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
47
46
  Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
48
- > extends http.Server<Request, Response> {}
47
+ > extends http.ServerEventMap<Request, Response>, tls.ServerEventMap {}
49
48
  /**
50
49
  * See `http.Server` for more information.
51
50
  * @since v0.3.4
@@ -69,245 +68,66 @@ declare module "https" {
69
68
  * @since v18.2.0
70
69
  */
71
70
  closeIdleConnections(): void;
72
- addListener(event: string, listener: (...args: any[]) => void): this;
73
- addListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
74
- addListener(
75
- event: "newSession",
76
- listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
77
- ): this;
78
- addListener(
79
- event: "OCSPRequest",
80
- listener: (
81
- certificate: NonSharedBuffer,
82
- issuer: NonSharedBuffer,
83
- callback: (err: Error | null, resp: Buffer | null) => void,
84
- ) => void,
85
- ): this;
86
- addListener(
87
- event: "resumeSession",
88
- listener: (
89
- sessionId: NonSharedBuffer,
90
- callback: (err: Error | null, sessionData: Buffer | null) => void,
91
- ) => void,
92
- ): this;
93
- addListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
94
- addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
95
- addListener(event: "close", listener: () => void): this;
96
- addListener(event: "connection", listener: (socket: Duplex) => void): this;
97
- addListener(event: "error", listener: (err: Error) => void): this;
98
- addListener(event: "listening", listener: () => void): this;
99
- addListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
100
- addListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
101
- addListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
102
- addListener(
103
- event: "connect",
104
- listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
105
- ): this;
106
- addListener(event: "request", listener: http.RequestListener<Request, Response>): this;
107
- addListener(
108
- event: "upgrade",
109
- listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
110
- ): this;
111
- emit(event: string, ...args: any[]): boolean;
112
- emit(event: "keylog", line: NonSharedBuffer, tlsSocket: tls.TLSSocket): boolean;
113
- emit(
114
- event: "newSession",
115
- sessionId: NonSharedBuffer,
116
- sessionData: NonSharedBuffer,
117
- callback: () => void,
118
- ): boolean;
119
- emit(
120
- event: "OCSPRequest",
121
- certificate: NonSharedBuffer,
122
- issuer: NonSharedBuffer,
123
- callback: (err: Error | null, resp: Buffer | null) => void,
124
- ): boolean;
125
- emit(
126
- event: "resumeSession",
127
- sessionId: NonSharedBuffer,
128
- callback: (err: Error | null, sessionData: Buffer | null) => void,
129
- ): boolean;
130
- emit(event: "secureConnection", tlsSocket: tls.TLSSocket): boolean;
131
- emit(event: "tlsClientError", err: Error, tlsSocket: tls.TLSSocket): boolean;
132
- emit(event: "close"): boolean;
133
- emit(event: "connection", socket: Duplex): boolean;
134
- emit(event: "error", err: Error): boolean;
135
- emit(event: "listening"): boolean;
136
- emit(
137
- event: "checkContinue",
138
- req: InstanceType<Request>,
139
- res: InstanceType<Response>,
140
- ): boolean;
141
- emit(
142
- event: "checkExpectation",
143
- req: InstanceType<Request>,
144
- res: InstanceType<Response>,
145
- ): boolean;
146
- emit(event: "clientError", err: Error, socket: Duplex): boolean;
147
- emit(event: "connect", req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer): boolean;
148
- emit(
149
- event: "request",
150
- req: InstanceType<Request>,
151
- res: InstanceType<Response>,
152
- ): boolean;
153
- emit(event: "upgrade", req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer): boolean;
154
- on(event: string, listener: (...args: any[]) => void): this;
155
- on(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
156
- on(
157
- event: "newSession",
158
- listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
159
- ): this;
160
- on(
161
- event: "OCSPRequest",
162
- listener: (
163
- certificate: NonSharedBuffer,
164
- issuer: NonSharedBuffer,
165
- callback: (err: Error | null, resp: Buffer | null) => void,
166
- ) => void,
167
- ): this;
168
- on(
169
- event: "resumeSession",
170
- listener: (
171
- sessionId: NonSharedBuffer,
172
- callback: (err: Error | null, sessionData: Buffer | null) => void,
173
- ) => void,
174
- ): this;
175
- on(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
176
- on(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
177
- on(event: "close", listener: () => void): this;
178
- on(event: "connection", listener: (socket: Duplex) => void): this;
179
- on(event: "error", listener: (err: Error) => void): this;
180
- on(event: "listening", listener: () => void): this;
181
- on(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
182
- on(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
183
- on(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
184
- on(
185
- event: "connect",
186
- listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
187
- ): this;
188
- on(event: "request", listener: http.RequestListener<Request, Response>): this;
189
- on(
190
- event: "upgrade",
191
- listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
71
+ // #region InternalEventEmitter
72
+ addListener<E extends keyof ServerEventMap>(
73
+ eventName: E,
74
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
192
75
  ): this;
193
- once(event: string, listener: (...args: any[]) => void): this;
194
- once(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
195
- once(
196
- event: "newSession",
197
- listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
76
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
77
+ emit<E extends keyof ServerEventMap>(eventName: E, ...args: ServerEventMap<Request, Response>[E]): boolean;
78
+ emit(eventName: string | symbol, ...args: any[]): boolean;
79
+ listenerCount<E extends keyof ServerEventMap>(
80
+ eventName: E,
81
+ listener?: (...args: ServerEventMap<Request, Response>[E]) => void,
82
+ ): number;
83
+ listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
84
+ listeners<E extends keyof ServerEventMap>(
85
+ eventName: E,
86
+ ): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
87
+ listeners(eventName: string | symbol): ((...args: any[]) => void)[];
88
+ off<E extends keyof ServerEventMap>(
89
+ eventName: E,
90
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
198
91
  ): this;
199
- once(
200
- event: "OCSPRequest",
201
- listener: (
202
- certificate: NonSharedBuffer,
203
- issuer: NonSharedBuffer,
204
- callback: (err: Error | null, resp: Buffer | null) => void,
205
- ) => void,
92
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
93
+ on<E extends keyof ServerEventMap>(
94
+ eventName: E,
95
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
206
96
  ): this;
207
- once(
208
- event: "resumeSession",
209
- listener: (
210
- sessionId: NonSharedBuffer,
211
- callback: (err: Error | null, sessionData: Buffer | null) => void,
212
- ) => void,
97
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
98
+ once<E extends keyof ServerEventMap>(
99
+ eventName: E,
100
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
213
101
  ): this;
214
- once(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
215
- once(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
216
- once(event: "close", listener: () => void): this;
217
- once(event: "connection", listener: (socket: Duplex) => void): this;
218
- once(event: "error", listener: (err: Error) => void): this;
219
- once(event: "listening", listener: () => void): this;
220
- once(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
221
- once(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
222
- once(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
223
- once(
224
- event: "connect",
225
- listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
102
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
103
+ prependListener<E extends keyof ServerEventMap>(
104
+ eventName: E,
105
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
226
106
  ): this;
227
- once(event: "request", listener: http.RequestListener<Request, Response>): this;
228
- once(
229
- event: "upgrade",
230
- listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
107
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
108
+ prependOnceListener<E extends keyof ServerEventMap>(
109
+ eventName: E,
110
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
231
111
  ): this;
232
- prependListener(event: string, listener: (...args: any[]) => void): this;
233
- prependListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
234
- prependListener(
235
- event: "newSession",
236
- listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
237
- ): this;
238
- prependListener(
239
- event: "OCSPRequest",
240
- listener: (
241
- certificate: NonSharedBuffer,
242
- issuer: NonSharedBuffer,
243
- callback: (err: Error | null, resp: Buffer | null) => void,
244
- ) => void,
245
- ): this;
246
- prependListener(
247
- event: "resumeSession",
248
- listener: (
249
- sessionId: NonSharedBuffer,
250
- callback: (err: Error | null, sessionData: Buffer | null) => void,
251
- ) => void,
252
- ): this;
253
- prependListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
254
- prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
255
- prependListener(event: "close", listener: () => void): this;
256
- prependListener(event: "connection", listener: (socket: Duplex) => void): this;
257
- prependListener(event: "error", listener: (err: Error) => void): this;
258
- prependListener(event: "listening", listener: () => void): this;
259
- prependListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
260
- prependListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
261
- prependListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
262
- prependListener(
263
- event: "connect",
264
- listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
265
- ): this;
266
- prependListener(event: "request", listener: http.RequestListener<Request, Response>): this;
267
- prependListener(
268
- event: "upgrade",
269
- listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
270
- ): this;
271
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
272
- prependOnceListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
273
- prependOnceListener(
274
- event: "newSession",
275
- listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
276
- ): this;
277
- prependOnceListener(
278
- event: "OCSPRequest",
279
- listener: (
280
- certificate: NonSharedBuffer,
281
- issuer: NonSharedBuffer,
282
- callback: (err: Error | null, resp: Buffer | null) => void,
283
- ) => void,
284
- ): this;
285
- prependOnceListener(
286
- event: "resumeSession",
287
- listener: (
288
- sessionId: NonSharedBuffer,
289
- callback: (err: Error | null, sessionData: Buffer | null) => void,
290
- ) => void,
291
- ): this;
292
- prependOnceListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
293
- prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
294
- prependOnceListener(event: "close", listener: () => void): this;
295
- prependOnceListener(event: "connection", listener: (socket: Duplex) => void): this;
296
- prependOnceListener(event: "error", listener: (err: Error) => void): this;
297
- prependOnceListener(event: "listening", listener: () => void): this;
298
- prependOnceListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
299
- prependOnceListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
300
- prependOnceListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
301
- prependOnceListener(
302
- event: "connect",
303
- listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
304
- ): this;
305
- prependOnceListener(event: "request", listener: http.RequestListener<Request, Response>): this;
306
- prependOnceListener(
307
- event: "upgrade",
308
- listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
112
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
113
+ rawListeners<E extends keyof ServerEventMap>(
114
+ eventName: E,
115
+ ): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
116
+ rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
117
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
118
+ removeAllListeners<E extends keyof ServerEventMap>(eventName?: E): this;
119
+ removeAllListeners(eventName?: string | symbol): this;
120
+ removeListener<E extends keyof ServerEventMap>(
121
+ eventName: E,
122
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
309
123
  ): this;
124
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
125
+ // #endregion
310
126
  }
127
+ interface Server<
128
+ Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
129
+ Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
130
+ > extends http.Server<Request, Response> {}
311
131
  /**
312
132
  * ```js
313
133
  * // curl -k https://localhost:8000/
@@ -580,6 +400,6 @@ declare module "https" {
580
400
  ): http.ClientRequest;
581
401
  let globalAgent: Agent;
582
402
  }
583
- declare module "node:https" {
584
- export * from "https";
403
+ declare module "https" {
404
+ export * from "node:https";
585
405
  }
@@ -39,13 +39,21 @@
39
39
  // Definitions for Node.js modules that are not specific to any version of TypeScript:
40
40
  /// <reference path="globals.d.ts" />
41
41
  /// <reference path="web-globals/abortcontroller.d.ts" />
42
+ /// <reference path="web-globals/blob.d.ts" />
43
+ /// <reference path="web-globals/console.d.ts" />
42
44
  /// <reference path="web-globals/crypto.d.ts" />
43
45
  /// <reference path="web-globals/domexception.d.ts" />
46
+ /// <reference path="web-globals/encoding.d.ts" />
44
47
  /// <reference path="web-globals/events.d.ts" />
45
48
  /// <reference path="web-globals/fetch.d.ts" />
49
+ /// <reference path="web-globals/importmeta.d.ts" />
50
+ /// <reference path="web-globals/messaging.d.ts" />
46
51
  /// <reference path="web-globals/navigator.d.ts" />
52
+ /// <reference path="web-globals/performance.d.ts" />
47
53
  /// <reference path="web-globals/storage.d.ts" />
48
54
  /// <reference path="web-globals/streams.d.ts" />
55
+ /// <reference path="web-globals/timers.d.ts" />
56
+ /// <reference path="web-globals/url.d.ts" />
49
57
  /// <reference path="assert.d.ts" />
50
58
  /// <reference path="assert/strict.d.ts" />
51
59
  /// <reference path="async_hooks.d.ts" />
@@ -68,25 +76,30 @@
68
76
  /// <reference path="https.d.ts" />
69
77
  /// <reference path="inspector.d.ts" />
70
78
  /// <reference path="inspector.generated.d.ts" />
79
+ /// <reference path="inspector/promises.d.ts" />
71
80
  /// <reference path="module.d.ts" />
72
81
  /// <reference path="net.d.ts" />
73
82
  /// <reference path="os.d.ts" />
74
83
  /// <reference path="path.d.ts" />
84
+ /// <reference path="path/posix.d.ts" />
85
+ /// <reference path="path/win32.d.ts" />
75
86
  /// <reference path="perf_hooks.d.ts" />
76
87
  /// <reference path="process.d.ts" />
77
88
  /// <reference path="punycode.d.ts" />
78
89
  /// <reference path="querystring.d.ts" />
90
+ /// <reference path="quic.d.ts" />
79
91
  /// <reference path="readline.d.ts" />
80
92
  /// <reference path="readline/promises.d.ts" />
81
93
  /// <reference path="repl.d.ts" />
82
94
  /// <reference path="sea.d.ts" />
83
95
  /// <reference path="sqlite.d.ts" />
84
96
  /// <reference path="stream.d.ts" />
85
- /// <reference path="stream/promises.d.ts" />
86
97
  /// <reference path="stream/consumers.d.ts" />
98
+ /// <reference path="stream/promises.d.ts" />
87
99
  /// <reference path="stream/web.d.ts" />
88
100
  /// <reference path="string_decoder.d.ts" />
89
101
  /// <reference path="test.d.ts" />
102
+ /// <reference path="test/reporters.d.ts" />
90
103
  /// <reference path="timers.d.ts" />
91
104
  /// <reference path="timers/promises.d.ts" />
92
105
  /// <reference path="tls.d.ts" />
@@ -94,6 +107,7 @@
94
107
  /// <reference path="tty.d.ts" />
95
108
  /// <reference path="url.d.ts" />
96
109
  /// <reference path="util.d.ts" />
110
+ /// <reference path="util/types.d.ts" />
97
111
  /// <reference path="v8.d.ts" />
98
112
  /// <reference path="vm.d.ts" />
99
113
  /// <reference path="wasi.d.ts" />
@@ -0,0 +1,41 @@
1
+ /**
2
+ * The `node:inspector/promises` module provides an API for interacting with the V8
3
+ * inspector.
4
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/inspector/promises.js)
5
+ * @since v19.0.0
6
+ */
7
+ declare module "node:inspector/promises" {
8
+ import { EventEmitter } from "node:events";
9
+ export { close, console, NetworkResources, open, url, waitForDebugger } from "node:inspector";
10
+ /**
11
+ * The `inspector.Session` is used for dispatching messages to the V8 inspector
12
+ * back-end and receiving message responses and notifications.
13
+ * @since v19.0.0
14
+ */
15
+ export class Session extends EventEmitter {
16
+ /**
17
+ * Create a new instance of the inspector.Session class.
18
+ * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend.
19
+ */
20
+ constructor();
21
+ /**
22
+ * Connects a session to the inspector back-end.
23
+ */
24
+ connect(): void;
25
+ /**
26
+ * Connects a session to the inspector back-end.
27
+ * An exception will be thrown if this API was not called on a Worker thread.
28
+ * @since v12.11.0
29
+ */
30
+ connectToMainThread(): void;
31
+ /**
32
+ * Immediately close the session. All pending message callbacks will be called with an error.
33
+ * `session.connect()` will need to be called to be able to send messages again.
34
+ * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
35
+ */
36
+ disconnect(): void;
37
+ }
38
+ }
39
+ declare module "inspector/promises" {
40
+ export * from "node:inspector/promises";
41
+ }
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * The `node:inspector` module provides an API for interacting with the V8
3
3
  * inspector.
4
- * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/inspector.js)
4
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/inspector.js)
5
5
  */
6
- declare module "inspector" {
7
- import EventEmitter = require("node:events");
6
+ declare module "node:inspector" {
7
+ import { EventEmitter } from "node:events";
8
8
  /**
9
9
  * The `inspector.Session` is used for dispatching messages to the V8 inspector
10
10
  * back-end and receiving message responses and notifications.
@@ -39,7 +39,7 @@ declare module "inspector" {
39
39
  * If wait is `true`, will block until a client has connected to the inspect port
40
40
  * and flow control has been passed to the debugger client.
41
41
  *
42
- * See the [security warning](https://nodejs.org/docs/latest-v24.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure)
42
+ * See the [security warning](https://nodejs.org/docs/latest-v25.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure)
43
43
  * regarding the `host` parameter usage.
44
44
  * @param port Port to listen on for inspector connections. Defaults to what was specified on the CLI.
45
45
  * @param host Host to listen on for inspector connections. Defaults to what was specified on the CLI.
@@ -218,60 +218,52 @@ declare module "inspector" {
218
218
  */
219
219
  function put(url: string, data: string): void;
220
220
  }
221
- }
222
-
223
- /**
224
- * The `node:inspector` module provides an API for interacting with the V8
225
- * inspector.
226
- */
227
- declare module "node:inspector" {
228
- export * from "inspector";
229
- }
230
-
231
- /**
232
- * The `node:inspector/promises` module provides an API for interacting with the V8
233
- * inspector.
234
- * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/inspector/promises.js)
235
- * @since v19.0.0
236
- */
237
- declare module "inspector/promises" {
238
- import EventEmitter = require("node:events");
239
- export { close, console, NetworkResources, open, url, waitForDebugger } from "inspector";
240
- /**
241
- * The `inspector.Session` is used for dispatching messages to the V8 inspector
242
- * back-end and receiving message responses and notifications.
243
- * @since v19.0.0
244
- */
245
- export class Session extends EventEmitter {
221
+ namespace DOMStorage {
246
222
  /**
247
- * Create a new instance of the inspector.Session class.
248
- * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend.
223
+ * This feature is only available with the
224
+ * `--experimental-storage-inspection` flag enabled.
225
+ *
226
+ * Broadcasts the `DOMStorage.domStorageItemAdded` event to connected frontends.
227
+ * This event indicates that a new item has been added to the storage.
228
+ * @since v25.5.0
249
229
  */
250
- constructor();
230
+ function domStorageItemAdded(params: DomStorageItemAddedEventDataType): void;
251
231
  /**
252
- * Connects a session to the inspector back-end.
232
+ * This feature is only available with the
233
+ * `--experimental-storage-inspection` flag enabled.
234
+ *
235
+ * Broadcasts the `DOMStorage.domStorageItemRemoved` event to connected frontends.
236
+ * This event indicates that an item has been removed from the storage.
237
+ * @since v25.5.0
253
238
  */
254
- connect(): void;
239
+ function domStorageItemRemoved(params: DomStorageItemRemovedEventDataType): void;
255
240
  /**
256
- * Connects a session to the inspector back-end.
257
- * An exception will be thrown if this API was not called on a Worker thread.
258
- * @since v12.11.0
241
+ * This feature is only available with the
242
+ * `--experimental-storage-inspection` flag enabled.
243
+
244
+ * Broadcasts the `DOMStorage.domStorageItemUpdated` event to connected frontends.
245
+ * This event indicates that a storage item has been updated.
246
+ * @since v25.5.0
259
247
  */
260
- connectToMainThread(): void;
248
+ function domStorageItemUpdated(params: DomStorageItemUpdatedEventDataType): void;
261
249
  /**
262
- * Immediately close the session. All pending message callbacks will be called with an error.
263
- * `session.connect()` will need to be called to be able to send messages again.
264
- * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
250
+ * This feature is only available with the
251
+ * `--experimental-storage-inspection` flag enabled.
252
+ *
253
+ * Broadcasts the `DOMStorage.domStorageItemsCleared` event to connected
254
+ * frontends. This event indicates that all items have been cleared from the
255
+ * storage.
256
+ * @since v25.5.0
265
257
  */
266
- disconnect(): void;
258
+ function domStorageItemsCleared(params: DomStorageItemsClearedEventDataType): void;
259
+ /**
260
+ * This feature is only available with the
261
+ * `--experimental-storage-inspection` flag enabled.
262
+ * @since v25.5.0
263
+ */
264
+ function registerStorage(params: unknown): void;
267
265
  }
268
266
  }
269
-
270
- /**
271
- * The `node:inspector/promises` module provides an API for interacting with the V8
272
- * inspector.
273
- * @since v19.0.0
274
- */
275
- declare module "node:inspector/promises" {
276
- export * from "inspector/promises";
267
+ declare module "inspector" {
268
+ export * from "node:inspector";
277
269
  }