@types/node 24.0.10 → 24.0.12

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 (5) hide show
  1. node/README.md +1 -1
  2. node/buffer.d.ts +3 -0
  3. node/dns/promises.d.ts +11 -10
  4. node/dns.d.ts +18 -19
  5. node/package.json +2 -2
node/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.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 01 Jul 2025 20:02:28 GMT
11
+ * Last updated: Wed, 09 Jul 2025 00:04:35 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node/buffer.d.ts CHANGED
@@ -1772,6 +1772,7 @@ declare module "buffer" {
1772
1772
  * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
1773
1773
  */
1774
1774
  indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
1775
+ indexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number;
1775
1776
  /**
1776
1777
  * Identical to `buf.indexOf()`, except the last occurrence of `value` is found
1777
1778
  * rather than the first occurrence.
@@ -1840,6 +1841,7 @@ declare module "buffer" {
1840
1841
  * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
1841
1842
  */
1842
1843
  lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
1844
+ lastIndexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number;
1843
1845
  /**
1844
1846
  * Equivalent to `buf.indexOf() !== -1`.
1845
1847
  *
@@ -1870,6 +1872,7 @@ declare module "buffer" {
1870
1872
  * @return `true` if `value` was found in `buf`, `false` otherwise.
1871
1873
  */
1872
1874
  includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
1875
+ includes(value: string | number | Buffer, encoding: BufferEncoding): boolean;
1873
1876
  }
1874
1877
  var Buffer: BufferConstructor;
1875
1878
  /**
node/dns/promises.d.ts CHANGED
@@ -127,24 +127,25 @@ declare module "dns/promises" {
127
127
  * @param [rrtype='A'] Resource record type.
128
128
  */
129
129
  function resolve(hostname: string): Promise<string[]>;
130
- function resolve(hostname: string, rrtype: "A"): Promise<string[]>;
131
- function resolve(hostname: string, rrtype: "AAAA"): Promise<string[]>;
130
+ function resolve(hostname: string, rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
132
131
  function resolve(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
133
132
  function resolve(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
134
- function resolve(hostname: string, rrtype: "CNAME"): Promise<string[]>;
135
133
  function resolve(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
136
134
  function resolve(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
137
- function resolve(hostname: string, rrtype: "NS"): Promise<string[]>;
138
- function resolve(hostname: string, rrtype: "PTR"): Promise<string[]>;
139
135
  function resolve(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
140
136
  function resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
141
137
  function resolve(hostname: string, rrtype: "TLSA"): Promise<TlsaRecord[]>;
142
138
  function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
143
- function resolve(
144
- hostname: string,
145
- rrtype: string,
146
- ): Promise<
147
- string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | TlsaRecord[] | string[][] | AnyRecord[]
139
+ function resolve(hostname: string, rrtype: string): Promise<
140
+ | string[]
141
+ | CaaRecord[]
142
+ | MxRecord[]
143
+ | NaptrRecord[]
144
+ | SoaRecord
145
+ | SrvRecord[]
146
+ | TlsaRecord[]
147
+ | string[][]
148
+ | AnyRecord[]
148
149
  >;
149
150
  /**
150
151
  * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4
node/dns.d.ts CHANGED
@@ -250,6 +250,9 @@ declare module "dns" {
250
250
  contactemail?: string | undefined;
251
251
  contactphone?: string | undefined;
252
252
  }
253
+ export interface AnyCaaRecord extends CaaRecord {
254
+ type: "CAA";
255
+ }
253
256
  export interface MxRecord {
254
257
  priority: number;
255
258
  exchange: string;
@@ -317,6 +320,7 @@ declare module "dns" {
317
320
  export type AnyRecord =
318
321
  | AnyARecord
319
322
  | AnyAaaaRecord
323
+ | AnyCaaRecord
320
324
  | AnyCnameRecord
321
325
  | AnyMxRecord
322
326
  | AnyNaptrRecord
@@ -345,12 +349,7 @@ declare module "dns" {
345
349
  ): void;
346
350
  export function resolve(
347
351
  hostname: string,
348
- rrtype: "A",
349
- callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
350
- ): void;
351
- export function resolve(
352
- hostname: string,
353
- rrtype: "AAAA",
352
+ rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR",
354
353
  callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
355
354
  ): void;
356
355
  export function resolve(
@@ -360,8 +359,8 @@ declare module "dns" {
360
359
  ): void;
361
360
  export function resolve(
362
361
  hostname: string,
363
- rrtype: "CNAME",
364
- callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
362
+ rrtype: "CAA",
363
+ callback: (err: NodeJS.ErrnoException | null, address: CaaRecord[]) => void,
365
364
  ): void;
366
365
  export function resolve(
367
366
  hostname: string,
@@ -373,16 +372,6 @@ declare module "dns" {
373
372
  rrtype: "NAPTR",
374
373
  callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
375
374
  ): void;
376
- export function resolve(
377
- hostname: string,
378
- rrtype: "NS",
379
- callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
380
- ): void;
381
- export function resolve(
382
- hostname: string,
383
- rrtype: "PTR",
384
- callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
385
- ): void;
386
375
  export function resolve(
387
376
  hostname: string,
388
377
  rrtype: "SOA",
@@ -410,6 +399,7 @@ declare module "dns" {
410
399
  err: NodeJS.ErrnoException | null,
411
400
  addresses:
412
401
  | string[]
402
+ | CaaRecord[]
413
403
  | MxRecord[]
414
404
  | NaptrRecord[]
415
405
  | SoaRecord
@@ -422,6 +412,7 @@ declare module "dns" {
422
412
  export namespace resolve {
423
413
  function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
424
414
  function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
415
+ function __promisify__(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
425
416
  function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
426
417
  function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
427
418
  function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
@@ -432,7 +423,15 @@ declare module "dns" {
432
423
  hostname: string,
433
424
  rrtype: string,
434
425
  ): Promise<
435
- string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | TlsaRecord[] | string[][] | AnyRecord[]
426
+ | string[]
427
+ | CaaRecord[]
428
+ | MxRecord[]
429
+ | NaptrRecord[]
430
+ | SoaRecord
431
+ | SrvRecord[]
432
+ | TlsaRecord[]
433
+ | string[][]
434
+ | AnyRecord[]
436
435
  >;
437
436
  }
438
437
  /**
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "24.0.10",
3
+ "version": "24.0.12",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -235,6 +235,6 @@
235
235
  "undici-types": "~7.8.0"
236
236
  },
237
237
  "peerDependencies": {},
238
- "typesPublisherContentHash": "464b96dccd7c47e0adb34fde987b6d7a19fb2e6ad42315aa4ffc9f9b4be85fd9",
238
+ "typesPublisherContentHash": "8e4c85a4e3eaa197d6a1deb2bcccfbcd34ad8ba2f260d598e3576078dbf913d1",
239
239
  "typeScriptVersion": "5.1"
240
240
  }