@types/node 22.15.28 → 22.15.30

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/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, 30 May 2025 15:02:22 GMT
11
+ * Last updated: Thu, 05 Jun 2025 18:56:28 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -297,7 +297,12 @@ declare module "diagnostics_channel" {
297
297
  * @param thisArg The receiver to be used for the function call.
298
298
  * @param args Optional arguments to pass to the function.
299
299
  */
300
- runStores(): void;
300
+ runStores<ThisArg = any, Args extends any[] = any[], Result = any>(
301
+ context: ContextType,
302
+ fn: (this: ThisArg, ...args: Args) => Result,
303
+ thisArg?: ThisArg,
304
+ ...args: Args
305
+ ): Result;
301
306
  }
302
307
  interface TracingChannelSubscribers<ContextType extends object> {
303
308
  start: (message: ContextType) => void;
@@ -441,12 +446,12 @@ declare module "diagnostics_channel" {
441
446
  * @param args Optional arguments to pass to the function
442
447
  * @return The return value of the given function
443
448
  */
444
- traceSync<ThisArg = any, Args extends any[] = any[]>(
445
- fn: (this: ThisArg, ...args: Args) => any,
449
+ traceSync<ThisArg = any, Args extends any[] = any[], Result = any>(
450
+ fn: (this: ThisArg, ...args: Args) => Result,
446
451
  context?: ContextType,
447
452
  thisArg?: ThisArg,
448
453
  ...args: Args
449
- ): void;
454
+ ): Result;
450
455
  /**
451
456
  * Trace a promise-returning function call. This will always produce a `start event` and `end event` around the synchronous portion of the
452
457
  * function execution, and will produce an `asyncStart event` and `asyncEnd event` when a promise continuation is reached. It may also
@@ -476,12 +481,12 @@ declare module "diagnostics_channel" {
476
481
  * @param args Optional arguments to pass to the function
477
482
  * @return Chained from promise returned by the given function
478
483
  */
479
- tracePromise<ThisArg = any, Args extends any[] = any[]>(
480
- fn: (this: ThisArg, ...args: Args) => Promise<any>,
484
+ tracePromise<ThisArg = any, Args extends any[] = any[], Result = any>(
485
+ fn: (this: ThisArg, ...args: Args) => Promise<Result>,
481
486
  context?: ContextType,
482
487
  thisArg?: ThisArg,
483
488
  ...args: Args
484
- ): void;
489
+ ): Promise<Result>;
485
490
  /**
486
491
  * Trace a callback-receiving function call. This will always produce a `start event` and `end event` around the synchronous portion of the
487
492
  * function execution, and will produce a `asyncStart event` and `asyncEnd event` around the callback execution. It may also produce an `error event` if the given function throws an error or
@@ -540,13 +545,13 @@ declare module "diagnostics_channel" {
540
545
  * @param args Optional arguments to pass to the function
541
546
  * @return The return value of the given function
542
547
  */
543
- traceCallback<Fn extends (this: any, ...args: any[]) => any>(
544
- fn: Fn,
548
+ traceCallback<ThisArg = any, Args extends any[] = any[], Result = any>(
549
+ fn: (this: ThisArg, ...args: Args) => Result,
545
550
  position?: number,
546
551
  context?: ContextType,
547
- thisArg?: any,
548
- ...args: Parameters<Fn>
549
- ): void;
552
+ thisArg?: ThisArg,
553
+ ...args: Args
554
+ ): Result;
550
555
  /**
551
556
  * `true` if any of the individual channels has a subscriber, `false` if not.
552
557
  *
node/http2.d.ts CHANGED
@@ -1223,14 +1223,66 @@ declare module "http2" {
1223
1223
  }
1224
1224
  // Http2Server
1225
1225
  export interface SessionOptions {
1226
+ /**
1227
+ * Sets the maximum dynamic table size for deflating header fields.
1228
+ * @default 4Kib
1229
+ */
1226
1230
  maxDeflateDynamicTableSize?: number | undefined;
1231
+ /**
1232
+ * Sets the maximum number of settings entries per `SETTINGS` frame.
1233
+ * The minimum value allowed is `1`.
1234
+ * @default 32
1235
+ */
1236
+ maxSettings?: number | undefined;
1237
+ /**
1238
+ * Sets the maximum memory that the `Http2Session` is permitted to use.
1239
+ * The value is expressed in terms of number of megabytes, e.g. `1` equal 1 megabyte.
1240
+ * The minimum value allowed is `1`.
1241
+ * This is a credit based limit, existing `Http2Stream`s may cause this limit to be exceeded,
1242
+ * but new `Http2Stream` instances will be rejected while this limit is exceeded.
1243
+ * The current number of `Http2Stream` sessions, the current memory use of the header compression tables,
1244
+ * current data queued to be sent, and unacknowledged `PING` and `SETTINGS` frames are all counted towards the current limit.
1245
+ * @default 10
1246
+ */
1227
1247
  maxSessionMemory?: number | undefined;
1248
+ /**
1249
+ * Sets the maximum number of header entries.
1250
+ * This is similar to `server.maxHeadersCount` or `request.maxHeadersCount` in the `node:http` module.
1251
+ * The minimum value is `1`.
1252
+ * @default 128
1253
+ */
1228
1254
  maxHeaderListPairs?: number | undefined;
1255
+ /**
1256
+ * Sets the maximum number of outstanding, unacknowledged pings.
1257
+ * @default 10
1258
+ */
1229
1259
  maxOutstandingPings?: number | undefined;
1260
+ /**
1261
+ * Sets the maximum allowed size for a serialized, compressed block of headers.
1262
+ * Attempts to send headers that exceed this limit will result in
1263
+ * a `'frameError'` event being emitted and the stream being closed and destroyed.
1264
+ */
1230
1265
  maxSendHeaderBlockLength?: number | undefined;
1266
+ /**
1267
+ * Strategy used for determining the amount of padding to use for `HEADERS` and `DATA` frames.
1268
+ * @default http2.constants.PADDING_STRATEGY_NONE
1269
+ */
1231
1270
  paddingStrategy?: number | undefined;
1271
+ /**
1272
+ * Sets the maximum number of concurrent streams for the remote peer as if a `SETTINGS` frame had been received.
1273
+ * Will be overridden if the remote peer sets its own value for `maxConcurrentStreams`.
1274
+ * @default 100
1275
+ */
1232
1276
  peerMaxConcurrentStreams?: number | undefined;
1277
+ /**
1278
+ * The initial settings to send to the remote peer upon connection.
1279
+ */
1233
1280
  settings?: Settings | undefined;
1281
+ /**
1282
+ * The array of integer values determines the settings types,
1283
+ * which are included in the `CustomSettings`-property of the received remoteSettings.
1284
+ * Please see the `CustomSettings`-property of the `Http2Settings` object for more information, on the allowed setting types.
1285
+ */
1234
1286
  remoteCustomSettings?: number[] | undefined;
1235
1287
  /**
1236
1288
  * Specifies a timeout in milliseconds that
@@ -1239,11 +1291,27 @@ declare module "http2" {
1239
1291
  * @default 100000
1240
1292
  */
1241
1293
  unknownProtocolTimeout?: number | undefined;
1242
- selectPadding?(frameLen: number, maxFrameLen: number): number;
1243
1294
  }
1244
1295
  export interface ClientSessionOptions extends SessionOptions {
1296
+ /**
1297
+ * Sets the maximum number of reserved push streams the client will accept at any given time.
1298
+ * Once the current number of currently reserved push streams exceeds reaches this limit,
1299
+ * new push streams sent by the server will be automatically rejected.
1300
+ * The minimum allowed value is 0. The maximum allowed value is 2<sup>32</sup>-1.
1301
+ * A negative value sets this option to the maximum allowed value.
1302
+ * @default 200
1303
+ */
1245
1304
  maxReservedRemoteStreams?: number | undefined;
1305
+ /**
1306
+ * An optional callback that receives the `URL` instance passed to `connect` and the `options` object,
1307
+ * and returns any `Duplex` stream that is to be used as the connection for this session.
1308
+ */
1246
1309
  createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined;
1310
+ /**
1311
+ * The protocol to connect with, if not set in the `authority`.
1312
+ * Value may be either `'http:'` or `'https:'`.
1313
+ * @default 'https:'
1314
+ */
1247
1315
  protocol?: "http:" | "https:" | undefined;
1248
1316
  }
1249
1317
  export interface ServerSessionOptions<
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.15.28",
3
+ "version": "22.15.30",
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": "db44d4d8e306b0a65418c772ae0993c94eeed587664db5b3b7b195e7f4b2e0aa",
223
+ "typesPublisherContentHash": "e608b189ccd6623034719d736dfcdaf6bae11f1e8fe989b19c4a6d3221277a64",
224
224
  "typeScriptVersion": "5.1"
225
225
  }
node/util.d.ts CHANGED
@@ -1411,7 +1411,7 @@ declare module "util" {
1411
1411
  * @param content The raw contents of a `.env` file.
1412
1412
  * @since v20.12.0
1413
1413
  */
1414
- export function parseEnv(content: string): object;
1414
+ export function parseEnv(content: string): NodeJS.Dict<string>;
1415
1415
  // https://nodejs.org/docs/latest/api/util.html#foreground-colors
1416
1416
  type ForegroundColors =
1417
1417
  | "black"