@types/node 22.15.2 → 22.15.4

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 (4) hide show
  1. node/README.md +1 -1
  2. node/fs/promises.d.ts +5 -15
  3. node/package.json +2 -2
  4. node/tls.d.ts +9 -1
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: 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
node/fs/promises.d.ts CHANGED
@@ -277,36 +277,26 @@ declare module "fs/promises" {
277
277
  * data will be a string.
278
278
  */
279
279
  readFile(
280
- options?: {
281
- encoding?: null | undefined;
282
- flag?: OpenMode | undefined;
283
- } | null,
280
+ options?:
281
+ | ({ encoding?: null | undefined } & Abortable)
282
+ | null,
284
283
  ): Promise<Buffer>;
285
284
  /**
286
285
  * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
287
286
  * The `FileHandle` must have been opened for reading.
288
- * @param options An object that may contain an optional flag.
289
- * If a flag is not provided, it defaults to `'r'`.
290
287
  */
291
288
  readFile(
292
289
  options:
293
- | {
294
- encoding: BufferEncoding;
295
- flag?: OpenMode | undefined;
296
- }
290
+ | ({ encoding: BufferEncoding } & Abortable)
297
291
  | BufferEncoding,
298
292
  ): Promise<string>;
299
293
  /**
300
294
  * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
301
295
  * The `FileHandle` must have been opened for reading.
302
- * @param options An object that may contain an optional flag.
303
- * If a flag is not provided, it defaults to `'r'`.
304
296
  */
305
297
  readFile(
306
298
  options?:
307
- | (ObjectEncodingOptions & {
308
- flag?: OpenMode | undefined;
309
- })
299
+ | (ObjectEncodingOptions & Abortable)
310
300
  | BufferEncoding
311
301
  | null,
312
302
  ): Promise<string | Buffer>;
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.15.2",
3
+ "version": "22.15.4",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -220,6 +220,6 @@
220
220
  "undici-types": "~6.21.0"
221
221
  },
222
222
  "peerDependencies": {},
223
- "typesPublisherContentHash": "d085d9c0d3e99c0e735cdf3c1c2fc6306151bce10b3b32f83e3e0b237544488a",
223
+ "typesPublisherContentHash": "d88fc8149f5eeb415661ed941d3cb3078a746933bb782b346a9c8a6e53f19fa0",
224
224
  "typeScriptVersion": "5.1"
225
225
  }
node/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
  *