@types/node 20.17.32 → 20.17.34

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.17/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: Mon, 28 Apr 2025 06:43:21 GMT
11
+ * Last updated: Mon, 05 May 2025 20:02:28 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node v20.17/buffer.d.ts CHANGED
@@ -69,7 +69,7 @@ declare module "buffer" {
69
69
  * @param input The input to validate.
70
70
  */
71
71
  export function isAscii(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean;
72
- export const INSPECT_MAX_BYTES: number;
72
+ export let INSPECT_MAX_BYTES: number;
73
73
  export const kMaxLength: number;
74
74
  export const kStringMaxLength: number;
75
75
  export const constants: {
@@ -276,36 +276,26 @@ declare module "fs/promises" {
276
276
  * data will be a string.
277
277
  */
278
278
  readFile(
279
- options?: {
280
- encoding?: null | undefined;
281
- flag?: OpenMode | undefined;
282
- } | null,
279
+ options?:
280
+ | ({ encoding?: null | undefined } & Abortable)
281
+ | null,
283
282
  ): Promise<Buffer>;
284
283
  /**
285
284
  * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
286
285
  * The `FileHandle` must have been opened for reading.
287
- * @param options An object that may contain an optional flag.
288
- * If a flag is not provided, it defaults to `'r'`.
289
286
  */
290
287
  readFile(
291
288
  options:
292
- | {
293
- encoding: BufferEncoding;
294
- flag?: OpenMode | undefined;
295
- }
289
+ | ({ encoding: BufferEncoding } & Abortable)
296
290
  | BufferEncoding,
297
291
  ): Promise<string>;
298
292
  /**
299
293
  * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
300
294
  * The `FileHandle` must have been opened for reading.
301
- * @param options An object that may contain an optional flag.
302
- * If a flag is not provided, it defaults to `'r'`.
303
295
  */
304
296
  readFile(
305
297
  options?:
306
- | (ObjectEncodingOptions & {
307
- flag?: OpenMode | undefined;
308
- })
298
+ | (ObjectEncodingOptions & Abortable)
309
299
  | BufferEncoding
310
300
  | null,
311
301
  ): Promise<string | Buffer>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.17.32",
3
+ "version": "20.17.34",
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.19.2"
216
216
  },
217
217
  "peerDependencies": {},
218
- "typesPublisherContentHash": "ac6f6b3ae845f232a487fc7d63f4c93d3a68ede239956f86f19f860d36d0fdb8",
218
+ "typesPublisherContentHash": "490d99077f4d229bf36ebbbe959ba63939c7ced03617795e19fc5cb4fda82347",
219
219
  "typeScriptVersion": "5.1"
220
220
  }
node v20.17/tls.d.ts CHANGED
@@ -647,7 +647,7 @@ declare module "tls" {
647
647
  * @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc), or a TLS context object created
648
648
  * with {@link createSecureContext} itself.
649
649
  */
650
- addContext(hostname: string, context: SecureContextOptions): void;
650
+ addContext(hostname: string, context: SecureContextOptions | SecureContext): void;
651
651
  /**
652
652
  * Returns the session ticket keys.
653
653
  *