@types/node 20.17.31 → 20.17.33

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: Fri, 25 Apr 2025 06:39:35 GMT
11
+ * Last updated: Mon, 05 May 2025 19:32:26 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -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.31",
3
+ "version": "20.17.33",
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": "e970c2c5a2155536b73b743dd495c7ee7640d8bf183e27b8ba2c2592373a14f0",
218
+ "typesPublisherContentHash": "a41c48930ae9368e6eae3c5393cc7b7e346bac616f5199081680b893f62e348b",
219
219
  "typeScriptVersion": "5.1"
220
220
  }
node v20.17/tls.d.ts CHANGED
@@ -398,6 +398,14 @@ declare module "tls" {
398
398
  },
399
399
  callback: (err: Error | null) => void,
400
400
  ): undefined | boolean;
401
+ /**
402
+ * The `tlsSocket.setKeyCert()` method sets the private key and certificate to use for the socket.
403
+ * This is mainly useful if you wish to select a server certificate from a TLS server's `ALPNCallback`.
404
+ * @since v22.5.0, v20.17.0
405
+ * @param context An object containing at least `key` and `cert` properties from the {@link createSecureContext()} `options`,
406
+ * or a TLS context object created with {@link createSecureContext()} itself.
407
+ */
408
+ setKeyCert(context: SecureContextOptions | SecureContext): void;
401
409
  /**
402
410
  * The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size.
403
411
  * Returns `true` if setting the limit succeeded; `false` otherwise.
@@ -639,7 +647,7 @@ declare module "tls" {
639
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
640
648
  * with {@link createSecureContext} itself.
641
649
  */
642
- addContext(hostname: string, context: SecureContextOptions): void;
650
+ addContext(hostname: string, context: SecureContextOptions | SecureContext): void;
643
651
  /**
644
652
  * Returns the session ticket keys.
645
653
  *