@types/node 20.19.4 → 20.19.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.
node v20.19/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v20.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 01 Jul 2025 20:02:28 GMT
11
+ * Last updated: Tue, 08 Jul 2025 17:03:33 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -126,22 +126,24 @@ declare module "dns/promises" {
126
126
  * @param [rrtype='A'] Resource record type.
127
127
  */
128
128
  function resolve(hostname: string): Promise<string[]>;
129
- function resolve(hostname: string, rrtype: "A"): Promise<string[]>;
130
- function resolve(hostname: string, rrtype: "AAAA"): Promise<string[]>;
129
+ function resolve(hostname: string, rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
131
130
  function resolve(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
132
131
  function resolve(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
133
- function resolve(hostname: string, rrtype: "CNAME"): Promise<string[]>;
134
132
  function resolve(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
135
133
  function resolve(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
136
- function resolve(hostname: string, rrtype: "NS"): Promise<string[]>;
137
- function resolve(hostname: string, rrtype: "PTR"): Promise<string[]>;
138
134
  function resolve(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
139
135
  function resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
140
136
  function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
141
- function resolve(
142
- hostname: string,
143
- rrtype: string,
144
- ): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
137
+ function resolve(hostname: string, rrtype: string): Promise<
138
+ | string[]
139
+ | CaaRecord[]
140
+ | MxRecord[]
141
+ | NaptrRecord[]
142
+ | SoaRecord
143
+ | SrvRecord[]
144
+ | string[][]
145
+ | AnyRecord[]
146
+ >;
145
147
  /**
146
148
  * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4
147
149
  * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
node v20.19/dns.d.ts CHANGED
@@ -249,6 +249,9 @@ declare module "dns" {
249
249
  contactemail?: string | undefined;
250
250
  contactphone?: string | undefined;
251
251
  }
252
+ export interface AnyCaaRecord extends CaaRecord {
253
+ type: "CAA";
254
+ }
252
255
  export interface MxRecord {
253
256
  priority: number;
254
257
  exchange: string;
@@ -307,6 +310,7 @@ declare module "dns" {
307
310
  export type AnyRecord =
308
311
  | AnyARecord
309
312
  | AnyAaaaRecord
313
+ | AnyCaaRecord
310
314
  | AnyCnameRecord
311
315
  | AnyMxRecord
312
316
  | AnyNaptrRecord
@@ -334,12 +338,7 @@ declare module "dns" {
334
338
  ): void;
335
339
  export function resolve(
336
340
  hostname: string,
337
- rrtype: "A",
338
- callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
339
- ): void;
340
- export function resolve(
341
- hostname: string,
342
- rrtype: "AAAA",
341
+ rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR",
343
342
  callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
344
343
  ): void;
345
344
  export function resolve(
@@ -349,8 +348,8 @@ declare module "dns" {
349
348
  ): void;
350
349
  export function resolve(
351
350
  hostname: string,
352
- rrtype: "CNAME",
353
- callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
351
+ rrtype: "CAA",
352
+ callback: (err: NodeJS.ErrnoException | null, address: CaaRecord[]) => void,
354
353
  ): void;
355
354
  export function resolve(
356
355
  hostname: string,
@@ -362,16 +361,6 @@ declare module "dns" {
362
361
  rrtype: "NAPTR",
363
362
  callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
364
363
  ): void;
365
- export function resolve(
366
- hostname: string,
367
- rrtype: "NS",
368
- callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
369
- ): void;
370
- export function resolve(
371
- hostname: string,
372
- rrtype: "PTR",
373
- callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
374
- ): void;
375
364
  export function resolve(
376
365
  hostname: string,
377
366
  rrtype: "SOA",
@@ -392,12 +381,21 @@ declare module "dns" {
392
381
  rrtype: string,
393
382
  callback: (
394
383
  err: NodeJS.ErrnoException | null,
395
- addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[],
384
+ addresses:
385
+ | string[]
386
+ | CaaRecord[]
387
+ | MxRecord[]
388
+ | NaptrRecord[]
389
+ | SoaRecord
390
+ | SrvRecord[]
391
+ | string[][]
392
+ | AnyRecord[],
396
393
  ) => void,
397
394
  ): void;
398
395
  export namespace resolve {
399
396
  function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
400
397
  function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
398
+ function __promisify__(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
401
399
  function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
402
400
  function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
403
401
  function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
@@ -406,7 +404,16 @@ declare module "dns" {
406
404
  function __promisify__(
407
405
  hostname: string,
408
406
  rrtype: string,
409
- ): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
407
+ ): Promise<
408
+ | string[]
409
+ | CaaRecord[]
410
+ | MxRecord[]
411
+ | NaptrRecord[]
412
+ | SoaRecord
413
+ | SrvRecord[]
414
+ | string[][]
415
+ | AnyRecord[]
416
+ >;
410
417
  }
411
418
  /**
412
419
  * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the `hostname`. The `addresses` argument passed to the `callback` function
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.19.4",
3
+ "version": "20.19.5",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -215,6 +215,6 @@
215
215
  "undici-types": "~6.21.0"
216
216
  },
217
217
  "peerDependencies": {},
218
- "typesPublisherContentHash": "e74236e50d1b077f167f304bcaa0e640d09e9d282ff6a85ddafffc085b5565fd",
218
+ "typesPublisherContentHash": "72acc427f5057b12882d2b7c1b6bdab0371f5dc2f67c10e8b86542a3b70a9802",
219
219
  "typeScriptVersion": "5.1"
220
220
  }