@idlebox/stripe-node-types 24.0.14 → 24.0.15

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. package/README.md +1 -1
  2. package/assert/strict.d.ts +98 -1
  3. package/assert.d.ts +147 -248
  4. package/async_hooks.d.ts +5 -5
  5. package/buffer.buffer.d.ts +9 -6
  6. package/buffer.d.ts +49 -169
  7. package/child_process.d.ts +102 -223
  8. package/cluster.d.ts +236 -329
  9. package/console.d.ts +45 -346
  10. package/constants.d.ts +0 -1
  11. package/crypto.d.ts +698 -1149
  12. package/dgram.d.ts +15 -50
  13. package/diagnostics_channel.d.ts +1 -3
  14. package/dns.d.ts +135 -131
  15. package/domain.d.ts +10 -14
  16. package/events.d.ts +846 -722
  17. package/fs/promises.d.ts +102 -53
  18. package/fs.d.ts +714 -484
  19. package/globals.d.ts +130 -347
  20. package/globals.typedarray.d.ts +79 -0
  21. package/http.d.ts +343 -246
  22. package/http2.d.ts +563 -711
  23. package/https.d.ts +70 -216
  24. package/index.d.ts +24 -3
  25. package/inspector/promises.d.ts +54 -0
  26. package/inspector.d.ts +167 -3938
  27. package/inspector.generated.d.ts +4242 -0
  28. package/module.d.ts +45 -95
  29. package/net.d.ts +87 -186
  30. package/os.d.ts +17 -6
  31. package/package.json +3 -8
  32. package/path/posix.d.ts +20 -0
  33. package/path/win32.d.ts +20 -0
  34. package/path.d.ts +117 -122
  35. package/perf_hooks.d.ts +295 -644
  36. package/process.d.ts +177 -138
  37. package/punycode.d.ts +2 -2
  38. package/querystring.d.ts +1 -1
  39. package/quic.d.ts +926 -0
  40. package/readline/promises.d.ts +1 -1
  41. package/readline.d.ts +65 -118
  42. package/repl.d.ts +83 -96
  43. package/sea.d.ts +10 -1
  44. package/sqlite.d.ts +262 -13
  45. package/stream/consumers.d.ts +7 -7
  46. package/stream/promises.d.ts +133 -12
  47. package/stream/web.d.ts +173 -495
  48. package/stream.d.ts +593 -490
  49. package/string_decoder.d.ts +3 -3
  50. package/test/reporters.d.ts +112 -0
  51. package/test.d.ts +223 -199
  52. package/timers/promises.d.ts +1 -1
  53. package/timers.d.ts +1 -129
  54. package/tls.d.ts +148 -163
  55. package/trace_events.d.ts +6 -6
  56. package/ts5.6/buffer.buffer.d.ts +10 -8
  57. package/ts5.6/globals.typedarray.d.ts +16 -0
  58. package/ts5.6/index.d.ts +24 -3
  59. package/ts5.7/index.d.ts +24 -3
  60. package/tty.d.ts +55 -13
  61. package/url.d.ts +92 -587
  62. package/util/types.d.ts +571 -0
  63. package/util.d.ts +143 -792
  64. package/v8.d.ts +67 -7
  65. package/vm.d.ts +252 -108
  66. package/wasi.d.ts +23 -2
  67. package/web-globals/abortcontroller.d.ts +75 -0
  68. package/web-globals/blob.d.ts +39 -0
  69. package/{ts5.1/compatibility/disposable.d.ts → web-globals/console.d.ts} +6 -9
  70. package/web-globals/crypto.d.ts +55 -0
  71. package/web-globals/domexception.d.ts +84 -0
  72. package/web-globals/encoding.d.ts +27 -0
  73. package/{dom-events.d.ts → web-globals/events.d.ts} +57 -50
  74. package/web-globals/fetch.d.ts +70 -0
  75. package/web-globals/importmeta.d.ts +29 -0
  76. package/web-globals/messaging.d.ts +39 -0
  77. package/web-globals/navigator.d.ts +41 -0
  78. package/web-globals/performance.d.ts +61 -0
  79. package/web-globals/storage.d.ts +40 -0
  80. package/web-globals/streams.d.ts +131 -0
  81. package/web-globals/timers.d.ts +60 -0
  82. package/web-globals/url.d.ts +40 -0
  83. package/worker_threads.d.ts +291 -349
  84. package/zlib.d.ts +44 -94
  85. package/ts5.1/index.d.ts +0 -115
package/dns.d.ts CHANGED
@@ -56,29 +56,28 @@
56
56
  * });
57
57
  * ```
58
58
  *
59
- * See the [Implementation considerations section](https://nodejs.org/docs/latest-v24.x/api/dns.html#implementation-considerations) for more information.
60
- * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/dns.js)
59
+ * See the [Implementation considerations section](https://nodejs.org/docs/latest-v25.x/api/dns.html#implementation-considerations) for more information.
60
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/dns.js)
61
61
  */
62
62
 
63
63
  declare module "_not-use-node-type_dns" {
64
- import * as dnsPromises from 'node:dns/promises';
65
64
  // Supported getaddrinfo flags.
66
65
  /**
67
66
  * Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are
68
67
  * only returned if the current system has at least one IPv4 address configured.
69
68
  */
70
- export const ADDRCONFIG: number;
69
+ const ADDRCONFIG: number;
71
70
  /**
72
71
  * If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported
73
72
  * on some operating systems (e.g. FreeBSD 10.1).
74
73
  */
75
- export const V4MAPPED: number;
74
+ const V4MAPPED: number;
76
75
  /**
77
76
  * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
78
77
  * well as IPv4 mapped IPv6 addresses.
79
78
  */
80
- export const ALL: number;
81
- export interface LookupOptions {
79
+ const ALL: number;
80
+ interface LookupOptions {
82
81
  /**
83
82
  * The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted
84
83
  * as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used
@@ -87,7 +86,7 @@ declare module "_not-use-node-type_dns" {
87
86
  */
88
87
  family?: number | "IPv4" | "IPv6" | undefined;
89
88
  /**
90
- * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v24.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be
89
+ * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v25.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be
91
90
  * passed by bitwise `OR`ing their values.
92
91
  */
93
92
  hints?: number | undefined;
@@ -100,7 +99,7 @@ declare module "_not-use-node-type_dns" {
100
99
  * When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted
101
100
  * by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6
102
101
  * addresses before IPv4 addresses. Default value is configurable using
103
- * {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--dns-result-orderorder).
102
+ * {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--dns-result-orderorder).
104
103
  * @default `verbatim` (addresses are not reordered)
105
104
  * @since v22.1.0
106
105
  */
@@ -114,13 +113,13 @@ declare module "_not-use-node-type_dns" {
114
113
  */
115
114
  verbatim?: boolean | undefined;
116
115
  }
117
- export interface LookupOneOptions extends LookupOptions {
116
+ interface LookupOneOptions extends LookupOptions {
118
117
  all?: false | undefined;
119
118
  }
120
- export interface LookupAllOptions extends LookupOptions {
119
+ interface LookupAllOptions extends LookupOptions {
121
120
  all: true;
122
121
  }
123
- export interface LookupAddress {
122
+ interface LookupAddress {
124
123
  /**
125
124
  * A string representation of an IPv4 or IPv6 address.
126
125
  */
@@ -149,7 +148,7 @@ declare module "_not-use-node-type_dns" {
149
148
  * The implementation uses an operating system facility that can associate names
150
149
  * with addresses and vice versa. This implementation can have subtle but
151
150
  * important consequences on the behavior of any Node.js program. Please take some
152
- * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v24.x/api/dns.html#implementation-considerations)
151
+ * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v25.x/api/dns.html#implementation-considerations)
153
152
  * before using `dns.lookup()`.
154
153
  *
155
154
  * Example usage:
@@ -171,35 +170,35 @@ declare module "_not-use-node-type_dns" {
171
170
  * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
172
171
  * ```
173
172
  *
174
- * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v24.x/api/util.html#utilpromisifyoriginal) ed
173
+ * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v25.x/api/util.html#utilpromisifyoriginal) ed
175
174
  * version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties.
176
175
  * @since v0.1.90
177
176
  */
178
- export function lookup(
177
+ function lookup(
179
178
  hostname: string,
180
179
  family: number,
181
180
  callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
182
181
  ): void;
183
- export function lookup(
182
+ function lookup(
184
183
  hostname: string,
185
184
  options: LookupOneOptions,
186
185
  callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
187
186
  ): void;
188
- export function lookup(
187
+ function lookup(
189
188
  hostname: string,
190
189
  options: LookupAllOptions,
191
190
  callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void,
192
191
  ): void;
193
- export function lookup(
192
+ function lookup(
194
193
  hostname: string,
195
194
  options: LookupOptions,
196
195
  callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void,
197
196
  ): void;
198
- export function lookup(
197
+ function lookup(
199
198
  hostname: string,
200
199
  callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
201
200
  ): void;
202
- export namespace lookup {
201
+ namespace lookup {
203
202
  function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
204
203
  function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
205
204
  function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
@@ -211,7 +210,7 @@ declare module "_not-use-node-type_dns" {
211
210
  * If `address` is not a valid IP address, a `TypeError` will be thrown.
212
211
  * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown.
213
212
  *
214
- * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object,
213
+ * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object,
215
214
  * where `err.code` is the error code.
216
215
  *
217
216
  * ```js
@@ -222,16 +221,16 @@ declare module "_not-use-node-type_dns" {
222
221
  * });
223
222
  * ```
224
223
  *
225
- * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v24.x/api/util.html#utilpromisifyoriginal) ed
224
+ * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v25.x/api/util.html#utilpromisifyoriginal) ed
226
225
  * version, it returns a `Promise` for an `Object` with `hostname` and `service` properties.
227
226
  * @since v0.11.14
228
227
  */
229
- export function lookupService(
228
+ function lookupService(
230
229
  address: string,
231
230
  port: number,
232
231
  callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void,
233
232
  ): void;
234
- export namespace lookupService {
233
+ namespace lookupService {
235
234
  function __promisify__(
236
235
  address: string,
237
236
  port: number,
@@ -240,25 +239,23 @@ declare module "_not-use-node-type_dns" {
240
239
  service: string;
241
240
  }>;
242
241
  }
243
- export interface ResolveOptions {
242
+ interface ResolveOptions {
244
243
  ttl: boolean;
245
244
  }
246
- export interface ResolveWithTtlOptions extends ResolveOptions {
245
+ interface ResolveWithTtlOptions extends ResolveOptions {
247
246
  ttl: true;
248
247
  }
249
- export interface RecordWithTtl {
248
+ interface RecordWithTtl {
250
249
  address: string;
251
250
  ttl: number;
252
251
  }
253
- /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
254
- export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
255
- export interface AnyARecord extends RecordWithTtl {
252
+ interface AnyARecord extends RecordWithTtl {
256
253
  type: "A";
257
254
  }
258
- export interface AnyAaaaRecord extends RecordWithTtl {
255
+ interface AnyAaaaRecord extends RecordWithTtl {
259
256
  type: "AAAA";
260
257
  }
261
- export interface CaaRecord {
258
+ interface CaaRecord {
262
259
  critical: number;
263
260
  issue?: string | undefined;
264
261
  issuewild?: string | undefined;
@@ -266,17 +263,17 @@ declare module "_not-use-node-type_dns" {
266
263
  contactemail?: string | undefined;
267
264
  contactphone?: string | undefined;
268
265
  }
269
- export interface AnyCaaRecord extends CaaRecord {
266
+ interface AnyCaaRecord extends CaaRecord {
270
267
  type: "CAA";
271
268
  }
272
- export interface MxRecord {
269
+ interface MxRecord {
273
270
  priority: number;
274
271
  exchange: string;
275
272
  }
276
- export interface AnyMxRecord extends MxRecord {
273
+ interface AnyMxRecord extends MxRecord {
277
274
  type: "MX";
278
275
  }
279
- export interface NaptrRecord {
276
+ interface NaptrRecord {
280
277
  flags: string;
281
278
  service: string;
282
279
  regexp: string;
@@ -284,10 +281,10 @@ declare module "_not-use-node-type_dns" {
284
281
  order: number;
285
282
  preference: number;
286
283
  }
287
- export interface AnyNaptrRecord extends NaptrRecord {
284
+ interface AnyNaptrRecord extends NaptrRecord {
288
285
  type: "NAPTR";
289
286
  }
290
- export interface SoaRecord {
287
+ interface SoaRecord {
291
288
  nsname: string;
292
289
  hostmaster: string;
293
290
  serial: number;
@@ -296,44 +293,44 @@ declare module "_not-use-node-type_dns" {
296
293
  expire: number;
297
294
  minttl: number;
298
295
  }
299
- export interface AnySoaRecord extends SoaRecord {
296
+ interface AnySoaRecord extends SoaRecord {
300
297
  type: "SOA";
301
298
  }
302
- export interface SrvRecord {
299
+ interface SrvRecord {
303
300
  priority: number;
304
301
  weight: number;
305
302
  port: number;
306
303
  name: string;
307
304
  }
308
- export interface AnySrvRecord extends SrvRecord {
305
+ interface AnySrvRecord extends SrvRecord {
309
306
  type: "SRV";
310
307
  }
311
- export interface TlsaRecord {
308
+ interface TlsaRecord {
312
309
  certUsage: number;
313
310
  selector: number;
314
311
  match: number;
315
312
  data: ArrayBuffer;
316
313
  }
317
- export interface AnyTlsaRecord extends TlsaRecord {
314
+ interface AnyTlsaRecord extends TlsaRecord {
318
315
  type: "TLSA";
319
316
  }
320
- export interface AnyTxtRecord {
317
+ interface AnyTxtRecord {
321
318
  type: "TXT";
322
319
  entries: string[];
323
320
  }
324
- export interface AnyNsRecord {
321
+ interface AnyNsRecord {
325
322
  type: "NS";
326
323
  value: string;
327
324
  }
328
- export interface AnyPtrRecord {
325
+ interface AnyPtrRecord {
329
326
  type: "PTR";
330
327
  value: string;
331
328
  }
332
- export interface AnyCnameRecord {
329
+ interface AnyCnameRecord {
333
330
  type: "CNAME";
334
331
  value: string;
335
332
  }
336
- export type AnyRecord =
333
+ type AnyRecord =
337
334
  | AnyARecord
338
335
  | AnyAaaaRecord
339
336
  | AnyCaaRecord
@@ -353,62 +350,62 @@ declare module "_not-use-node-type_dns" {
353
350
  *
354
351
  * <omitted>
355
352
  *
356
- * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object,
353
+ * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object,
357
354
  * where `err.code` is one of the `DNS error codes`.
358
355
  * @since v0.1.27
359
356
  * @param hostname Host name to resolve.
360
357
  * @param [rrtype='A'] Resource record type.
361
358
  */
362
- export function resolve(
359
+ function resolve(
363
360
  hostname: string,
364
361
  callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
365
362
  ): void;
366
- export function resolve(
363
+ function resolve(
367
364
  hostname: string,
368
365
  rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR",
369
366
  callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
370
367
  ): void;
371
- export function resolve(
368
+ function resolve(
372
369
  hostname: string,
373
370
  rrtype: "ANY",
374
371
  callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
375
372
  ): void;
376
- export function resolve(
373
+ function resolve(
377
374
  hostname: string,
378
375
  rrtype: "CAA",
379
376
  callback: (err: NodeJS.ErrnoException | null, address: CaaRecord[]) => void,
380
377
  ): void;
381
- export function resolve(
378
+ function resolve(
382
379
  hostname: string,
383
380
  rrtype: "MX",
384
381
  callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
385
382
  ): void;
386
- export function resolve(
383
+ function resolve(
387
384
  hostname: string,
388
385
  rrtype: "NAPTR",
389
386
  callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
390
387
  ): void;
391
- export function resolve(
388
+ function resolve(
392
389
  hostname: string,
393
390
  rrtype: "SOA",
394
391
  callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void,
395
392
  ): void;
396
- export function resolve(
393
+ function resolve(
397
394
  hostname: string,
398
395
  rrtype: "SRV",
399
396
  callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
400
397
  ): void;
401
- export function resolve(
398
+ function resolve(
402
399
  hostname: string,
403
400
  rrtype: "TLSA",
404
401
  callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void,
405
402
  ): void;
406
- export function resolve(
403
+ function resolve(
407
404
  hostname: string,
408
405
  rrtype: "TXT",
409
406
  callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
410
407
  ): void;
411
- export function resolve(
408
+ function resolve(
412
409
  hostname: string,
413
410
  rrtype: string,
414
411
  callback: (
@@ -425,7 +422,7 @@ declare module "_not-use-node-type_dns" {
425
422
  | AnyRecord[],
426
423
  ) => void,
427
424
  ): void;
428
- export namespace resolve {
425
+ namespace resolve {
429
426
  function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
430
427
  function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
431
428
  function __promisify__(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
@@ -456,21 +453,21 @@ declare module "_not-use-node-type_dns" {
456
453
  * @since v0.1.16
457
454
  * @param hostname Host name to resolve.
458
455
  */
459
- export function resolve4(
456
+ function resolve4(
460
457
  hostname: string,
461
458
  callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
462
459
  ): void;
463
- export function resolve4(
460
+ function resolve4(
464
461
  hostname: string,
465
462
  options: ResolveWithTtlOptions,
466
463
  callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
467
464
  ): void;
468
- export function resolve4(
465
+ function resolve4(
469
466
  hostname: string,
470
467
  options: ResolveOptions,
471
468
  callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
472
469
  ): void;
473
- export namespace resolve4 {
470
+ namespace resolve4 {
474
471
  function __promisify__(hostname: string): Promise<string[]>;
475
472
  function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
476
473
  function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
@@ -481,21 +478,21 @@ declare module "_not-use-node-type_dns" {
481
478
  * @since v0.1.16
482
479
  * @param hostname Host name to resolve.
483
480
  */
484
- export function resolve6(
481
+ function resolve6(
485
482
  hostname: string,
486
483
  callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
487
484
  ): void;
488
- export function resolve6(
485
+ function resolve6(
489
486
  hostname: string,
490
487
  options: ResolveWithTtlOptions,
491
488
  callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
492
489
  ): void;
493
- export function resolve6(
490
+ function resolve6(
494
491
  hostname: string,
495
492
  options: ResolveOptions,
496
493
  callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
497
494
  ): void;
498
- export namespace resolve6 {
495
+ namespace resolve6 {
499
496
  function __promisify__(hostname: string): Promise<string[]>;
500
497
  function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
501
498
  function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
@@ -505,11 +502,11 @@ declare module "_not-use-node-type_dns" {
505
502
  * will contain an array of canonical name records available for the `hostname` (e.g. `['bar.example.com']`).
506
503
  * @since v0.3.2
507
504
  */
508
- export function resolveCname(
505
+ function resolveCname(
509
506
  hostname: string,
510
507
  callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
511
508
  ): void;
512
- export namespace resolveCname {
509
+ namespace resolveCname {
513
510
  function __promisify__(hostname: string): Promise<string[]>;
514
511
  }
515
512
  /**
@@ -518,11 +515,11 @@ declare module "_not-use-node-type_dns" {
518
515
  * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
519
516
  * @since v15.0.0, v14.17.0
520
517
  */
521
- export function resolveCaa(
518
+ function resolveCaa(
522
519
  hostname: string,
523
520
  callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void,
524
521
  ): void;
525
- export namespace resolveCaa {
522
+ namespace resolveCaa {
526
523
  function __promisify__(hostname: string): Promise<CaaRecord[]>;
527
524
  }
528
525
  /**
@@ -530,11 +527,11 @@ declare module "_not-use-node-type_dns" {
530
527
  * contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
531
528
  * @since v0.1.27
532
529
  */
533
- export function resolveMx(
530
+ function resolveMx(
534
531
  hostname: string,
535
532
  callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
536
533
  ): void;
537
- export namespace resolveMx {
534
+ namespace resolveMx {
538
535
  function __promisify__(hostname: string): Promise<MxRecord[]>;
539
536
  }
540
537
  /**
@@ -560,11 +557,11 @@ declare module "_not-use-node-type_dns" {
560
557
  * ```
561
558
  * @since v0.9.12
562
559
  */
563
- export function resolveNaptr(
560
+ function resolveNaptr(
564
561
  hostname: string,
565
562
  callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
566
563
  ): void;
567
- export namespace resolveNaptr {
564
+ namespace resolveNaptr {
568
565
  function __promisify__(hostname: string): Promise<NaptrRecord[]>;
569
566
  }
570
567
  /**
@@ -572,11 +569,11 @@ declare module "_not-use-node-type_dns" {
572
569
  * contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`).
573
570
  * @since v0.1.90
574
571
  */
575
- export function resolveNs(
572
+ function resolveNs(
576
573
  hostname: string,
577
574
  callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
578
575
  ): void;
579
- export namespace resolveNs {
576
+ namespace resolveNs {
580
577
  function __promisify__(hostname: string): Promise<string[]>;
581
578
  }
582
579
  /**
@@ -584,11 +581,11 @@ declare module "_not-use-node-type_dns" {
584
581
  * be an array of strings containing the reply records.
585
582
  * @since v6.0.0
586
583
  */
587
- export function resolvePtr(
584
+ function resolvePtr(
588
585
  hostname: string,
589
586
  callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
590
587
  ): void;
591
- export namespace resolvePtr {
588
+ namespace resolvePtr {
592
589
  function __promisify__(hostname: string): Promise<string[]>;
593
590
  }
594
591
  /**
@@ -617,11 +614,11 @@ declare module "_not-use-node-type_dns" {
617
614
  * ```
618
615
  * @since v0.11.10
619
616
  */
620
- export function resolveSoa(
617
+ function resolveSoa(
621
618
  hostname: string,
622
619
  callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void,
623
620
  ): void;
624
- export namespace resolveSoa {
621
+ namespace resolveSoa {
625
622
  function __promisify__(hostname: string): Promise<SoaRecord>;
626
623
  }
627
624
  /**
@@ -643,11 +640,11 @@ declare module "_not-use-node-type_dns" {
643
640
  * ```
644
641
  * @since v0.1.27
645
642
  */
646
- export function resolveSrv(
643
+ function resolveSrv(
647
644
  hostname: string,
648
645
  callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
649
646
  ): void;
650
- export namespace resolveSrv {
647
+ namespace resolveSrv {
651
648
  function __promisify__(hostname: string): Promise<SrvRecord[]>;
652
649
  }
653
650
  /**
@@ -670,11 +667,11 @@ declare module "_not-use-node-type_dns" {
670
667
  * ```
671
668
  * @since v23.9.0, v22.15.0
672
669
  */
673
- export function resolveTlsa(
670
+ function resolveTlsa(
674
671
  hostname: string,
675
672
  callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void,
676
673
  ): void;
677
- export namespace resolveTlsa {
674
+ namespace resolveTlsa {
678
675
  function __promisify__(hostname: string): Promise<TlsaRecord[]>;
679
676
  }
680
677
  /**
@@ -684,11 +681,11 @@ declare module "_not-use-node-type_dns" {
684
681
  * treated separately.
685
682
  * @since v0.1.27
686
683
  */
687
- export function resolveTxt(
684
+ function resolveTxt(
688
685
  hostname: string,
689
686
  callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
690
687
  ): void;
691
- export namespace resolveTxt {
688
+ namespace resolveTxt {
692
689
  function __promisify__(hostname: string): Promise<string[][]>;
693
690
  }
694
691
  /**
@@ -721,27 +718,27 @@ declare module "_not-use-node-type_dns" {
721
718
  * 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
722
719
  * [RFC 8482](https://tools.ietf.org/html/rfc8482).
723
720
  */
724
- export function resolveAny(
721
+ function resolveAny(
725
722
  hostname: string,
726
723
  callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
727
724
  ): void;
728
- export namespace resolveAny {
725
+ namespace resolveAny {
729
726
  function __promisify__(hostname: string): Promise<AnyRecord[]>;
730
727
  }
731
728
  /**
732
729
  * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
733
730
  * array of host names.
734
731
  *
735
- * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object, where `err.code` is
736
- * one of the [DNS error codes](https://nodejs.org/docs/latest-v24.x/api/dns.html#error-codes).
732
+ * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object, where `err.code` is
733
+ * one of the [DNS error codes](https://nodejs.org/docs/latest-v25.x/api/dns.html#error-codes).
737
734
  * @since v0.1.16
738
735
  */
739
- export function reverse(
736
+ function reverse(
740
737
  ip: string,
741
738
  callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
742
739
  ): void;
743
740
  /**
744
- * Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnspromiseslookuphostname-options).
741
+ * Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnspromiseslookuphostname-options).
745
742
  * The value could be:
746
743
  *
747
744
  * * `ipv4first`: for `order` defaulting to `ipv4first`.
@@ -749,7 +746,7 @@ declare module "_not-use-node-type_dns" {
749
746
  * * `verbatim`: for `order` defaulting to `verbatim`.
750
747
  * @since v18.17.0
751
748
  */
752
- export function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim";
749
+ function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim";
753
750
  /**
754
751
  * Sets the IP address and port of servers to be used when performing DNS
755
752
  * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
@@ -778,7 +775,7 @@ declare module "_not-use-node-type_dns" {
778
775
  * @since v0.11.3
779
776
  * @param servers array of [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952#section-6) formatted addresses
780
777
  */
781
- export function setServers(servers: readonly string[]): void;
778
+ function setServers(servers: readonly string[]): void;
782
779
  /**
783
780
  * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
784
781
  * that are currently configured for DNS resolution. A string will include a port
@@ -794,9 +791,9 @@ declare module "_not-use-node-type_dns" {
794
791
  * ```
795
792
  * @since v0.11.3
796
793
  */
797
- export function getServers(): string[];
794
+ function getServers(): string[];
798
795
  /**
799
- * Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnspromiseslookuphostname-options).
796
+ * Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnspromiseslookuphostname-options).
800
797
  * The value could be:
801
798
  *
802
799
  * * `ipv4first`: sets default `order` to `ipv4first`.
@@ -804,39 +801,39 @@ declare module "_not-use-node-type_dns" {
804
801
  * * `verbatim`: sets default `order` to `verbatim`.
805
802
  *
806
803
  * The default is `verbatim` and {@link setDefaultResultOrder} have higher
807
- * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--dns-result-orderorder). When using
808
- * [worker threads](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
804
+ * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--dns-result-orderorder). When using
805
+ * [worker threads](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
809
806
  * thread won't affect the default dns orders in workers.
810
807
  * @since v16.4.0, v14.18.0
811
808
  * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
812
809
  */
813
- export function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
810
+ function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
814
811
  // Error codes
815
- export const NODATA: "ENODATA";
816
- export const FORMERR: "EFORMERR";
817
- export const SERVFAIL: "ESERVFAIL";
818
- export const NOTFOUND: "ENOTFOUND";
819
- export const NOTIMP: "ENOTIMP";
820
- export const REFUSED: "EREFUSED";
821
- export const BADQUERY: "EBADQUERY";
822
- export const BADNAME: "EBADNAME";
823
- export const BADFAMILY: "EBADFAMILY";
824
- export const BADRESP: "EBADRESP";
825
- export const CONNREFUSED: "ECONNREFUSED";
826
- export const TIMEOUT: "ETIMEOUT";
827
- export const EOF: "EOF";
828
- export const FILE: "EFILE";
829
- export const NOMEM: "ENOMEM";
830
- export const DESTRUCTION: "EDESTRUCTION";
831
- export const BADSTR: "EBADSTR";
832
- export const BADFLAGS: "EBADFLAGS";
833
- export const NONAME: "ENONAME";
834
- export const BADHINTS: "EBADHINTS";
835
- export const NOTINITIALIZED: "ENOTINITIALIZED";
836
- export const LOADIPHLPAPI: "ELOADIPHLPAPI";
837
- export const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS";
838
- export const CANCELLED: "ECANCELLED";
839
- export interface ResolverOptions {
812
+ const NODATA: "ENODATA";
813
+ const FORMERR: "EFORMERR";
814
+ const SERVFAIL: "ESERVFAIL";
815
+ const NOTFOUND: "ENOTFOUND";
816
+ const NOTIMP: "ENOTIMP";
817
+ const REFUSED: "EREFUSED";
818
+ const BADQUERY: "EBADQUERY";
819
+ const BADNAME: "EBADNAME";
820
+ const BADFAMILY: "EBADFAMILY";
821
+ const BADRESP: "EBADRESP";
822
+ const CONNREFUSED: "ECONNREFUSED";
823
+ const TIMEOUT: "ETIMEOUT";
824
+ const EOF: "EOF";
825
+ const FILE: "EFILE";
826
+ const NOMEM: "ENOMEM";
827
+ const DESTRUCTION: "EDESTRUCTION";
828
+ const BADSTR: "EBADSTR";
829
+ const BADFLAGS: "EBADFLAGS";
830
+ const NONAME: "ENONAME";
831
+ const BADHINTS: "EBADHINTS";
832
+ const NOTINITIALIZED: "ENOTINITIALIZED";
833
+ const LOADIPHLPAPI: "ELOADIPHLPAPI";
834
+ const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS";
835
+ const CANCELLED: "ECANCELLED";
836
+ interface ResolverOptions {
840
837
  /**
841
838
  * Query timeout in milliseconds, or `-1` to use the default timeout.
842
839
  */
@@ -845,13 +842,18 @@ declare module "_not-use-node-type_dns" {
845
842
  * The number of tries the resolver will try contacting each name server before giving up.
846
843
  * @default 4
847
844
  */
848
- tries?: number;
845
+ tries?: number | undefined;
846
+ /**
847
+ * The max retry timeout, in milliseconds.
848
+ * @default 0
849
+ */
850
+ maxTimeout?: number | undefined;
849
851
  }
850
852
  /**
851
853
  * An independent resolver for DNS requests.
852
854
  *
853
855
  * Creating a new resolver uses the default server settings. Setting
854
- * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnssetserversservers) does not affect
856
+ * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnssetserversservers) does not affect
855
857
  * other resolvers:
856
858
  *
857
859
  * ```js
@@ -885,7 +887,7 @@ declare module "_not-use-node-type_dns" {
885
887
  * * `resolver.setServers()`
886
888
  * @since v8.3.0
887
889
  */
888
- export class Resolver {
890
+ class Resolver {
889
891
  constructor(options?: ResolverOptions);
890
892
  /**
891
893
  * Cancel all outstanding DNS queries made by this resolver. The corresponding
@@ -927,5 +929,7 @@ declare module "_not-use-node-type_dns" {
927
929
  setLocalAddress(ipv4?: string, ipv6?: string): void;
928
930
  setServers: typeof setServers;
929
931
  }
930
- export { dnsPromises as promises };
932
+ }
933
+ declare module "_not-use-node-type_dns" {
934
+ export * as promises from "node:dns/promises";
931
935
  }