@types/node 20.6.3 → 20.6.5

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 (104) hide show
  1. node/README.md +1 -1
  2. node/assert/strict.d.ts +4 -4
  3. node/assert.d.ts +48 -24
  4. node/async_hooks.d.ts +13 -6
  5. node/buffer.d.ts +32 -34
  6. node/child_process.d.ts +262 -122
  7. node/cluster.d.ts +107 -89
  8. node/console.d.ts +7 -7
  9. node/constants.d.ts +12 -11
  10. node/crypto.d.ts +746 -268
  11. node/dgram.d.ts +81 -45
  12. node/diagnostics_channel.d.ts +3 -3
  13. node/dns/promises.d.ts +28 -25
  14. node/dns.d.ts +203 -62
  15. node/dom-events.d.ts +67 -71
  16. node/domain.d.ts +4 -4
  17. node/events.d.ts +15 -7
  18. node/fs/promises.d.ts +102 -73
  19. node/fs.d.ts +513 -311
  20. node/globals.d.ts +18 -20
  21. node/http.d.ts +238 -186
  22. node/http2.d.ts +628 -376
  23. node/https.d.ts +221 -112
  24. node/module.d.ts +16 -9
  25. node/net.d.ts +112 -93
  26. node/os.d.ts +7 -7
  27. node/package.json +2 -2
  28. node/path.d.ts +13 -13
  29. node/perf_hooks.d.ts +19 -18
  30. node/process.d.ts +155 -125
  31. node/punycode.d.ts +3 -3
  32. node/querystring.d.ts +14 -4
  33. node/readline/promises.d.ts +12 -7
  34. node/readline.d.ts +69 -56
  35. node/repl.d.ts +67 -61
  36. node/stream/consumers.d.ts +5 -5
  37. node/stream/promises.d.ts +56 -15
  38. node/stream/web.d.ts +26 -20
  39. node/stream.d.ts +361 -228
  40. node/string_decoder.d.ts +3 -3
  41. node/test.d.ts +78 -93
  42. node/timers/promises.d.ts +4 -4
  43. node/timers.d.ts +23 -8
  44. node/tls.d.ts +151 -71
  45. node/trace_events.d.ts +3 -3
  46. node/ts4.8/assert/strict.d.ts +4 -4
  47. node/ts4.8/assert.d.ts +48 -24
  48. node/ts4.8/async_hooks.d.ts +13 -6
  49. node/ts4.8/buffer.d.ts +32 -34
  50. node/ts4.8/child_process.d.ts +262 -122
  51. node/ts4.8/cluster.d.ts +107 -89
  52. node/ts4.8/console.d.ts +7 -7
  53. node/ts4.8/constants.d.ts +12 -11
  54. node/ts4.8/crypto.d.ts +746 -268
  55. node/ts4.8/dgram.d.ts +81 -45
  56. node/ts4.8/diagnostics_channel.d.ts +3 -3
  57. node/ts4.8/dns/promises.d.ts +28 -25
  58. node/ts4.8/dns.d.ts +203 -62
  59. node/ts4.8/dom-events.d.ts +67 -71
  60. node/ts4.8/domain.d.ts +4 -4
  61. node/ts4.8/events.d.ts +15 -7
  62. node/ts4.8/fs/promises.d.ts +102 -73
  63. node/ts4.8/fs.d.ts +513 -311
  64. node/ts4.8/globals.d.ts +18 -20
  65. node/ts4.8/http.d.ts +238 -186
  66. node/ts4.8/http2.d.ts +628 -376
  67. node/ts4.8/https.d.ts +221 -112
  68. node/ts4.8/module.d.ts +16 -9
  69. node/ts4.8/net.d.ts +112 -93
  70. node/ts4.8/os.d.ts +7 -7
  71. node/ts4.8/path.d.ts +13 -13
  72. node/ts4.8/perf_hooks.d.ts +19 -18
  73. node/ts4.8/process.d.ts +155 -125
  74. node/ts4.8/punycode.d.ts +3 -3
  75. node/ts4.8/querystring.d.ts +14 -4
  76. node/ts4.8/readline/promises.d.ts +12 -7
  77. node/ts4.8/readline.d.ts +69 -56
  78. node/ts4.8/repl.d.ts +67 -61
  79. node/ts4.8/stream/consumers.d.ts +5 -5
  80. node/ts4.8/stream/promises.d.ts +56 -15
  81. node/ts4.8/stream/web.d.ts +26 -20
  82. node/ts4.8/stream.d.ts +326 -219
  83. node/ts4.8/string_decoder.d.ts +3 -3
  84. node/ts4.8/test.d.ts +78 -93
  85. node/ts4.8/timers/promises.d.ts +4 -4
  86. node/ts4.8/timers.d.ts +23 -8
  87. node/ts4.8/tls.d.ts +151 -71
  88. node/ts4.8/trace_events.d.ts +3 -3
  89. node/ts4.8/tty.d.ts +10 -10
  90. node/ts4.8/url.d.ts +26 -14
  91. node/ts4.8/util.d.ts +178 -116
  92. node/ts4.8/v8.d.ts +4 -4
  93. node/ts4.8/vm.d.ts +52 -46
  94. node/ts4.8/wasi.d.ts +3 -3
  95. node/ts4.8/worker_threads.d.ts +81 -84
  96. node/ts4.8/zlib.d.ts +9 -9
  97. node/tty.d.ts +10 -10
  98. node/url.d.ts +26 -14
  99. node/util.d.ts +178 -116
  100. node/v8.d.ts +4 -4
  101. node/vm.d.ts +52 -46
  102. node/wasi.d.ts +3 -3
  103. node/worker_threads.d.ts +81 -84
  104. node/zlib.d.ts +9 -9
node/dns.d.ts CHANGED
@@ -44,8 +44,8 @@
44
44
  * See the `Implementation considerations section` for more information.
45
45
  * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/dns.js)
46
46
  */
47
- declare module 'dns' {
48
- import * as dnsPromises from 'node:dns/promises';
47
+ declare module "dns" {
48
+ import * as dnsPromises from "node:dns/promises";
49
49
  // Supported getaddrinfo flags.
50
50
  export const ADDRCONFIG: number;
51
51
  export const V4MAPPED: number;
@@ -115,11 +115,30 @@ declare module 'dns' {
115
115
  * If this method is invoked as its `util.promisify()` ed version, and `all`is not set to `true`, it returns a `Promise` for an `Object` with `address` and`family` properties.
116
116
  * @since v0.1.90
117
117
  */
118
- export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
119
- export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
120
- export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void;
121
- export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void;
122
- export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
118
+ export function lookup(
119
+ hostname: string,
120
+ family: number,
121
+ callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
122
+ ): void;
123
+ export function lookup(
124
+ hostname: string,
125
+ options: LookupOneOptions,
126
+ callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
127
+ ): void;
128
+ export function lookup(
129
+ hostname: string,
130
+ options: LookupAllOptions,
131
+ callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void,
132
+ ): void;
133
+ export function lookup(
134
+ hostname: string,
135
+ options: LookupOptions,
136
+ callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void,
137
+ ): void;
138
+ export function lookup(
139
+ hostname: string,
140
+ callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
141
+ ): void;
123
142
  export namespace lookup {
124
143
  function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
125
144
  function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
@@ -145,11 +164,15 @@ declare module 'dns' {
145
164
  * If this method is invoked as its `util.promisify()` ed version, it returns a`Promise` for an `Object` with `hostname` and `service` properties.
146
165
  * @since v0.11.14
147
166
  */
148
- export function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
167
+ export function lookupService(
168
+ address: string,
169
+ port: number,
170
+ callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void,
171
+ ): void;
149
172
  export namespace lookupService {
150
173
  function __promisify__(
151
174
  address: string,
152
- port: number
175
+ port: number,
153
176
  ): Promise<{
154
177
  hostname: string;
155
178
  service: string;
@@ -168,10 +191,10 @@ declare module 'dns' {
168
191
  /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
169
192
  export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
170
193
  export interface AnyARecord extends RecordWithTtl {
171
- type: 'A';
194
+ type: "A";
172
195
  }
173
196
  export interface AnyAaaaRecord extends RecordWithTtl {
174
- type: 'AAAA';
197
+ type: "AAAA";
175
198
  }
176
199
  export interface CaaRecord {
177
200
  critical: number;
@@ -186,7 +209,7 @@ declare module 'dns' {
186
209
  exchange: string;
187
210
  }
188
211
  export interface AnyMxRecord extends MxRecord {
189
- type: 'MX';
212
+ type: "MX";
190
213
  }
191
214
  export interface NaptrRecord {
192
215
  flags: string;
@@ -197,7 +220,7 @@ declare module 'dns' {
197
220
  preference: number;
198
221
  }
199
222
  export interface AnyNaptrRecord extends NaptrRecord {
200
- type: 'NAPTR';
223
+ type: "NAPTR";
201
224
  }
202
225
  export interface SoaRecord {
203
226
  nsname: string;
@@ -209,7 +232,7 @@ declare module 'dns' {
209
232
  minttl: number;
210
233
  }
211
234
  export interface AnySoaRecord extends SoaRecord {
212
- type: 'SOA';
235
+ type: "SOA";
213
236
  }
214
237
  export interface SrvRecord {
215
238
  priority: number;
@@ -218,25 +241,35 @@ declare module 'dns' {
218
241
  name: string;
219
242
  }
220
243
  export interface AnySrvRecord extends SrvRecord {
221
- type: 'SRV';
244
+ type: "SRV";
222
245
  }
223
246
  export interface AnyTxtRecord {
224
- type: 'TXT';
247
+ type: "TXT";
225
248
  entries: string[];
226
249
  }
227
250
  export interface AnyNsRecord {
228
- type: 'NS';
251
+ type: "NS";
229
252
  value: string;
230
253
  }
231
254
  export interface AnyPtrRecord {
232
- type: 'PTR';
255
+ type: "PTR";
233
256
  value: string;
234
257
  }
235
258
  export interface AnyCnameRecord {
236
- type: 'CNAME';
259
+ type: "CNAME";
237
260
  value: string;
238
261
  }
239
- export type AnyRecord = AnyARecord | AnyAaaaRecord | AnyCnameRecord | AnyMxRecord | AnyNaptrRecord | AnyNsRecord | AnyPtrRecord | AnySoaRecord | AnySrvRecord | AnyTxtRecord;
262
+ export type AnyRecord =
263
+ | AnyARecord
264
+ | AnyAaaaRecord
265
+ | AnyCnameRecord
266
+ | AnyMxRecord
267
+ | AnyNaptrRecord
268
+ | AnyNsRecord
269
+ | AnyPtrRecord
270
+ | AnySoaRecord
271
+ | AnySrvRecord
272
+ | AnyTxtRecord;
240
273
  /**
241
274
  * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
242
275
  * of the resource records. The `callback` function has arguments`(err, records)`. When successful, `records` will be an array of resource
@@ -249,32 +282,85 @@ declare module 'dns' {
249
282
  * @param hostname Host name to resolve.
250
283
  * @param [rrtype='A'] Resource record type.
251
284
  */
252
- export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
253
- export function resolve(hostname: string, rrtype: 'A', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
254
- export function resolve(hostname: string, rrtype: 'AAAA', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
255
- export function resolve(hostname: string, rrtype: 'ANY', callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
256
- export function resolve(hostname: string, rrtype: 'CNAME', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
257
- export function resolve(hostname: string, rrtype: 'MX', callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
258
- export function resolve(hostname: string, rrtype: 'NAPTR', callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
259
- export function resolve(hostname: string, rrtype: 'NS', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
260
- export function resolve(hostname: string, rrtype: 'PTR', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
261
- export function resolve(hostname: string, rrtype: 'SOA', callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
262
- export function resolve(hostname: string, rrtype: 'SRV', callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
263
- export function resolve(hostname: string, rrtype: 'TXT', callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
285
+ export function resolve(
286
+ hostname: string,
287
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
288
+ ): void;
289
+ export function resolve(
290
+ hostname: string,
291
+ rrtype: "A",
292
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
293
+ ): void;
294
+ export function resolve(
295
+ hostname: string,
296
+ rrtype: "AAAA",
297
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
298
+ ): void;
299
+ export function resolve(
300
+ hostname: string,
301
+ rrtype: "ANY",
302
+ callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
303
+ ): void;
304
+ export function resolve(
305
+ hostname: string,
306
+ rrtype: "CNAME",
307
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
308
+ ): void;
309
+ export function resolve(
310
+ hostname: string,
311
+ rrtype: "MX",
312
+ callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
313
+ ): void;
314
+ export function resolve(
315
+ hostname: string,
316
+ rrtype: "NAPTR",
317
+ callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
318
+ ): void;
319
+ export function resolve(
320
+ hostname: string,
321
+ rrtype: "NS",
322
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
323
+ ): void;
324
+ export function resolve(
325
+ hostname: string,
326
+ rrtype: "PTR",
327
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
328
+ ): void;
329
+ export function resolve(
330
+ hostname: string,
331
+ rrtype: "SOA",
332
+ callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void,
333
+ ): void;
334
+ export function resolve(
335
+ hostname: string,
336
+ rrtype: "SRV",
337
+ callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
338
+ ): void;
339
+ export function resolve(
340
+ hostname: string,
341
+ rrtype: "TXT",
342
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
343
+ ): void;
264
344
  export function resolve(
265
345
  hostname: string,
266
346
  rrtype: string,
267
- callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void
347
+ callback: (
348
+ err: NodeJS.ErrnoException | null,
349
+ addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[],
350
+ ) => void,
268
351
  ): void;
269
352
  export namespace resolve {
270
- function __promisify__(hostname: string, rrtype?: 'A' | 'AAAA' | 'CNAME' | 'NS' | 'PTR'): Promise<string[]>;
271
- function __promisify__(hostname: string, rrtype: 'ANY'): Promise<AnyRecord[]>;
272
- function __promisify__(hostname: string, rrtype: 'MX'): Promise<MxRecord[]>;
273
- function __promisify__(hostname: string, rrtype: 'NAPTR'): Promise<NaptrRecord[]>;
274
- function __promisify__(hostname: string, rrtype: 'SOA'): Promise<SoaRecord>;
275
- function __promisify__(hostname: string, rrtype: 'SRV'): Promise<SrvRecord[]>;
276
- function __promisify__(hostname: string, rrtype: 'TXT'): Promise<string[][]>;
277
- function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
353
+ function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
354
+ function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
355
+ function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
356
+ function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
357
+ function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
358
+ function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
359
+ function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
360
+ function __promisify__(
361
+ hostname: string,
362
+ rrtype: string,
363
+ ): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
278
364
  }
279
365
  /**
280
366
  * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the`hostname`. The `addresses` argument passed to the `callback` function
@@ -282,9 +368,20 @@ declare module 'dns' {
282
368
  * @since v0.1.16
283
369
  * @param hostname Host name to resolve.
284
370
  */
285
- export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
286
- export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
287
- export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
371
+ export function resolve4(
372
+ hostname: string,
373
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
374
+ ): void;
375
+ export function resolve4(
376
+ hostname: string,
377
+ options: ResolveWithTtlOptions,
378
+ callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
379
+ ): void;
380
+ export function resolve4(
381
+ hostname: string,
382
+ options: ResolveOptions,
383
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
384
+ ): void;
288
385
  export namespace resolve4 {
289
386
  function __promisify__(hostname: string): Promise<string[]>;
290
387
  function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
@@ -296,9 +393,20 @@ declare module 'dns' {
296
393
  * @since v0.1.16
297
394
  * @param hostname Host name to resolve.
298
395
  */
299
- export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
300
- export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
301
- export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
396
+ export function resolve6(
397
+ hostname: string,
398
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
399
+ ): void;
400
+ export function resolve6(
401
+ hostname: string,
402
+ options: ResolveWithTtlOptions,
403
+ callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
404
+ ): void;
405
+ export function resolve6(
406
+ hostname: string,
407
+ options: ResolveOptions,
408
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
409
+ ): void;
302
410
  export namespace resolve6 {
303
411
  function __promisify__(hostname: string): Promise<string[]>;
304
412
  function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
@@ -309,7 +417,10 @@ declare module 'dns' {
309
417
  * will contain an array of canonical name records available for the `hostname`(e.g. `['bar.example.com']`).
310
418
  * @since v0.3.2
311
419
  */
312
- export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
420
+ export function resolveCname(
421
+ hostname: string,
422
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
423
+ ): void;
313
424
  export namespace resolveCname {
314
425
  function __promisify__(hostname: string): Promise<string[]>;
315
426
  }
@@ -319,7 +430,10 @@ declare module 'dns' {
319
430
  * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
320
431
  * @since v15.0.0, v14.17.0
321
432
  */
322
- export function resolveCaa(hostname: string, callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void): void;
433
+ export function resolveCaa(
434
+ hostname: string,
435
+ callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void,
436
+ ): void;
323
437
  export namespace resolveCaa {
324
438
  function __promisify__(hostname: string): Promise<CaaRecord[]>;
325
439
  }
@@ -328,7 +442,10 @@ declare module 'dns' {
328
442
  * contain an array of objects containing both a `priority` and `exchange`property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
329
443
  * @since v0.1.27
330
444
  */
331
- export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
445
+ export function resolveMx(
446
+ hostname: string,
447
+ callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
448
+ ): void;
332
449
  export namespace resolveMx {
333
450
  function __promisify__(hostname: string): Promise<MxRecord[]>;
334
451
  }
@@ -355,7 +472,10 @@ declare module 'dns' {
355
472
  * ```
356
473
  * @since v0.9.12
357
474
  */
358
- export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
475
+ export function resolveNaptr(
476
+ hostname: string,
477
+ callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
478
+ ): void;
359
479
  export namespace resolveNaptr {
360
480
  function __promisify__(hostname: string): Promise<NaptrRecord[]>;
361
481
  }
@@ -364,7 +484,10 @@ declare module 'dns' {
364
484
  * contain an array of name server records available for `hostname`(e.g. `['ns1.example.com', 'ns2.example.com']`).
365
485
  * @since v0.1.90
366
486
  */
367
- export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
487
+ export function resolveNs(
488
+ hostname: string,
489
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
490
+ ): void;
368
491
  export namespace resolveNs {
369
492
  function __promisify__(hostname: string): Promise<string[]>;
370
493
  }
@@ -373,7 +496,10 @@ declare module 'dns' {
373
496
  * be an array of strings containing the reply records.
374
497
  * @since v6.0.0
375
498
  */
376
- export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
499
+ export function resolvePtr(
500
+ hostname: string,
501
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
502
+ ): void;
377
503
  export namespace resolvePtr {
378
504
  function __promisify__(hostname: string): Promise<string[]>;
379
505
  }
@@ -403,7 +529,10 @@ declare module 'dns' {
403
529
  * ```
404
530
  * @since v0.11.10
405
531
  */
406
- export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
532
+ export function resolveSoa(
533
+ hostname: string,
534
+ callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void,
535
+ ): void;
407
536
  export namespace resolveSoa {
408
537
  function __promisify__(hostname: string): Promise<SoaRecord>;
409
538
  }
@@ -426,7 +555,10 @@ declare module 'dns' {
426
555
  * ```
427
556
  * @since v0.1.27
428
557
  */
429
- export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
558
+ export function resolveSrv(
559
+ hostname: string,
560
+ callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
561
+ ): void;
430
562
  export namespace resolveSrv {
431
563
  function __promisify__(hostname: string): Promise<SrvRecord[]>;
432
564
  }
@@ -437,7 +569,10 @@ declare module 'dns' {
437
569
  * treated separately.
438
570
  * @since v0.1.27
439
571
  */
440
- export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
572
+ export function resolveTxt(
573
+ hostname: string,
574
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
575
+ ): void;
441
576
  export namespace resolveTxt {
442
577
  function __promisify__(hostname: string): Promise<string[][]>;
443
578
  }
@@ -471,7 +606,10 @@ declare module 'dns' {
471
606
  * DNS server operators may choose not to respond to `ANY`queries. It may be better to call individual methods like {@link resolve4},{@link resolveMx}, and so on. For more details, see [RFC
472
607
  * 8482](https://tools.ietf.org/html/rfc8482).
473
608
  */
474
- export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
609
+ export function resolveAny(
610
+ hostname: string,
611
+ callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
612
+ ): void;
475
613
  export namespace resolveAny {
476
614
  function __promisify__(hostname: string): Promise<AnyRecord[]>;
477
615
  }
@@ -483,7 +621,10 @@ declare module 'dns' {
483
621
  * one of the `DNS error codes`.
484
622
  * @since v0.1.16
485
623
  */
486
- export function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void;
624
+ export function reverse(
625
+ ip: string,
626
+ callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
627
+ ): void;
487
628
  /**
488
629
  * Get the default value for `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be:
489
630
  *
@@ -491,7 +632,7 @@ declare module 'dns' {
491
632
  * * `verbatim`: for `verbatim` defaulting to `true`.
492
633
  * @since v20.1.0
493
634
  */
494
- export function getDefaultResultOrder(): 'ipv4first' | 'verbatim';
635
+ export function getDefaultResultOrder(): "ipv4first" | "verbatim";
495
636
  /**
496
637
  * Sets the IP address and port of servers to be used when performing DNS
497
638
  * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
@@ -549,7 +690,7 @@ declare module 'dns' {
549
690
  * @since v16.4.0, v14.18.0
550
691
  * @param order must be `'ipv4first'` or `'verbatim'`.
551
692
  */
552
- export function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
693
+ export function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;
553
694
  // Error codes
554
695
  export const NODATA: string;
555
696
  export const FORMERR: string;
@@ -663,6 +804,6 @@ declare module 'dns' {
663
804
  }
664
805
  export { dnsPromises as promises };
665
806
  }
666
- declare module 'node:dns' {
667
- export * from 'dns';
807
+ declare module "node:dns" {
808
+ export * from "dns";
668
809
  }
node/dom-events.d.ts CHANGED
@@ -8,72 +8,70 @@ export {}; // Don't export anything!
8
8
 
9
9
  // This conditional type will be the existing global Event in a browser, or
10
10
  // the copy below in a Node environment.
11
- type __Event = typeof globalThis extends { onmessage: any, Event: any }
12
- ? {}
13
- : {
14
- /** This is not used in Node.js and is provided purely for completeness. */
15
- readonly bubbles: boolean;
16
- /** Alias for event.stopPropagation(). This is not used in Node.js and is provided purely for completeness. */
17
- cancelBubble: () => void;
18
- /** True if the event was created with the cancelable option */
19
- readonly cancelable: boolean;
20
- /** This is not used in Node.js and is provided purely for completeness. */
21
- readonly composed: boolean;
22
- /** Returns an array containing the current EventTarget as the only entry or empty if the event is not being dispatched. This is not used in Node.js and is provided purely for completeness. */
23
- composedPath(): [EventTarget?]
24
- /** Alias for event.target. */
25
- readonly currentTarget: EventTarget | null;
26
- /** Is true if cancelable is true and event.preventDefault() has been called. */
27
- readonly defaultPrevented: boolean;
28
- /** This is not used in Node.js and is provided purely for completeness. */
29
- readonly eventPhase: 0 | 2;
30
- /** The `AbortSignal` "abort" event is emitted with `isTrusted` set to `true`. The value is `false` in all other cases. */
31
- readonly isTrusted: boolean;
32
- /** Sets the `defaultPrevented` property to `true` if `cancelable` is `true`. */
33
- preventDefault(): void;
34
- /** This is not used in Node.js and is provided purely for completeness. */
35
- returnValue: boolean;
36
- /** Alias for event.target. */
37
- readonly srcElement: EventTarget | null;
38
- /** Stops the invocation of event listeners after the current one completes. */
39
- stopImmediatePropagation(): void;
40
- /** This is not used in Node.js and is provided purely for completeness. */
41
- stopPropagation(): void;
42
- /** The `EventTarget` dispatching the event */
43
- readonly target: EventTarget | null;
44
- /** The millisecond timestamp when the Event object was created. */
45
- readonly timeStamp: number;
46
- /** Returns the type of event, e.g. "click", "hashchange", or "submit". */
47
- readonly type: string;
48
- };
11
+ type __Event = typeof globalThis extends { onmessage: any; Event: any } ? {}
12
+ : {
13
+ /** This is not used in Node.js and is provided purely for completeness. */
14
+ readonly bubbles: boolean;
15
+ /** Alias for event.stopPropagation(). This is not used in Node.js and is provided purely for completeness. */
16
+ cancelBubble: () => void;
17
+ /** True if the event was created with the cancelable option */
18
+ readonly cancelable: boolean;
19
+ /** This is not used in Node.js and is provided purely for completeness. */
20
+ readonly composed: boolean;
21
+ /** Returns an array containing the current EventTarget as the only entry or empty if the event is not being dispatched. This is not used in Node.js and is provided purely for completeness. */
22
+ composedPath(): [EventTarget?];
23
+ /** Alias for event.target. */
24
+ readonly currentTarget: EventTarget | null;
25
+ /** Is true if cancelable is true and event.preventDefault() has been called. */
26
+ readonly defaultPrevented: boolean;
27
+ /** This is not used in Node.js and is provided purely for completeness. */
28
+ readonly eventPhase: 0 | 2;
29
+ /** The `AbortSignal` "abort" event is emitted with `isTrusted` set to `true`. The value is `false` in all other cases. */
30
+ readonly isTrusted: boolean;
31
+ /** Sets the `defaultPrevented` property to `true` if `cancelable` is `true`. */
32
+ preventDefault(): void;
33
+ /** This is not used in Node.js and is provided purely for completeness. */
34
+ returnValue: boolean;
35
+ /** Alias for event.target. */
36
+ readonly srcElement: EventTarget | null;
37
+ /** Stops the invocation of event listeners after the current one completes. */
38
+ stopImmediatePropagation(): void;
39
+ /** This is not used in Node.js and is provided purely for completeness. */
40
+ stopPropagation(): void;
41
+ /** The `EventTarget` dispatching the event */
42
+ readonly target: EventTarget | null;
43
+ /** The millisecond timestamp when the Event object was created. */
44
+ readonly timeStamp: number;
45
+ /** Returns the type of event, e.g. "click", "hashchange", or "submit". */
46
+ readonly type: string;
47
+ };
49
48
 
50
49
  // See comment above explaining conditional type
51
- type __EventTarget = typeof globalThis extends { onmessage: any, EventTarget: any }
52
- ? {}
53
- : {
54
- /**
55
- * Adds a new handler for the `type` event. Any given `listener` is added only once per `type` and per `capture` option value.
56
- *
57
- * If the `once` option is true, the `listener` is removed after the next time a `type` event is dispatched.
58
- *
59
- * The `capture` option is not used by Node.js in any functional way other than tracking registered event listeners per the `EventTarget` specification.
60
- * Specifically, the `capture` option is used as part of the key when registering a `listener`.
61
- * Any individual `listener` may be added once with `capture = false`, and once with `capture = true`.
62
- */
63
- addEventListener(
64
- type: string,
65
- listener: EventListener | EventListenerObject,
66
- options?: AddEventListenerOptions | boolean,
67
- ): void;
68
- /** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
69
- dispatchEvent(event: Event): boolean;
70
- /** Removes the event listener in target's event listener list with the same type, callback, and options. */
71
- removeEventListener(
72
- type: string,
73
- listener: EventListener | EventListenerObject,
74
- options?: EventListenerOptions | boolean,
75
- ): void;
76
- };
50
+ type __EventTarget = typeof globalThis extends { onmessage: any; EventTarget: any } ? {}
51
+ : {
52
+ /**
53
+ * Adds a new handler for the `type` event. Any given `listener` is added only once per `type` and per `capture` option value.
54
+ *
55
+ * If the `once` option is true, the `listener` is removed after the next time a `type` event is dispatched.
56
+ *
57
+ * The `capture` option is not used by Node.js in any functional way other than tracking registered event listeners per the `EventTarget` specification.
58
+ * Specifically, the `capture` option is used as part of the key when registering a `listener`.
59
+ * Any individual `listener` may be added once with `capture = false`, and once with `capture = true`.
60
+ */
61
+ addEventListener(
62
+ type: string,
63
+ listener: EventListener | EventListenerObject,
64
+ options?: AddEventListenerOptions | boolean,
65
+ ): void;
66
+ /** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
67
+ dispatchEvent(event: Event): boolean;
68
+ /** Removes the event listener in target's event listener list with the same type, callback, and options. */
69
+ removeEventListener(
70
+ type: string,
71
+ listener: EventListener | EventListenerObject,
72
+ options?: EventListenerOptions | boolean,
73
+ ): void;
74
+ };
77
75
 
78
76
  interface EventInit {
79
77
  bubbles?: boolean;
@@ -101,15 +99,14 @@ interface EventListenerObject {
101
99
  handleEvent(object: Event): void;
102
100
  }
103
101
 
104
- import {} from 'events'; // Make this an ambient declaration
102
+ import {} from "events"; // Make this an ambient declaration
105
103
  declare global {
106
104
  /** An event which takes place in the DOM. */
107
105
  interface Event extends __Event {}
108
- var Event: typeof globalThis extends { onmessage: any, Event: infer T }
109
- ? T
106
+ var Event: typeof globalThis extends { onmessage: any; Event: infer T } ? T
110
107
  : {
111
108
  prototype: __Event;
112
- new (type: string, eventInitDict?: EventInit): __Event;
109
+ new(type: string, eventInitDict?: EventInit): __Event;
113
110
  };
114
111
 
115
112
  /**
@@ -117,10 +114,9 @@ declare global {
117
114
  * receive events and may have listeners for them.
118
115
  */
119
116
  interface EventTarget extends __EventTarget {}
120
- var EventTarget: typeof globalThis extends { onmessage: any, EventTarget: infer T }
121
- ? T
117
+ var EventTarget: typeof globalThis extends { onmessage: any; EventTarget: infer T } ? T
122
118
  : {
123
119
  prototype: __EventTarget;
124
- new (): __EventTarget;
120
+ new(): __EventTarget;
125
121
  };
126
122
  }
node/domain.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * @deprecated Since v1.4.2 - Deprecated
15
15
  * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/domain.js)
16
16
  */
17
- declare module 'domain' {
18
- import EventEmitter = require('node:events');
17
+ declare module "domain" {
18
+ import EventEmitter = require("node:events");
19
19
  /**
20
20
  * The `Domain` class encapsulates the functionality of routing errors and
21
21
  * uncaught exceptions to the active `Domain` object.
@@ -165,6 +165,6 @@ declare module 'domain' {
165
165
  }
166
166
  function create(): Domain;
167
167
  }
168
- declare module 'node:domain' {
169
- export * from 'domain';
168
+ declare module "node:domain" {
169
+ export * from "domain";
170
170
  }