@types/node 22.15.29 → 22.15.31

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 (67) hide show
  1. node/README.md → node v22.15/README.md +2 -2
  2. node/compatibility/disposable.d.ts → node v22.15/compatibility/disposable.d.ts +0 -2
  3. node/compatibility/indexable.d.ts → node v22.15/compatibility/indexable.d.ts +0 -3
  4. node/compatibility/iterators.d.ts → node v22.15/compatibility/iterators.d.ts +0 -1
  5. node/globals.d.ts → node v22.15/globals.d.ts +0 -2
  6. node/http2.d.ts → node v22.15/http2.d.ts +69 -1
  7. node/module.d.ts → node v22.15/module.d.ts +0 -1
  8. node/package.json → node v22.15/package.json +2 -2
  9. node/test.d.ts → node v22.15/test.d.ts +0 -2
  10. node/util.d.ts → node v22.15/util.d.ts +1 -1
  11. node/worker_threads.d.ts → node v22.15/worker_threads.d.ts +0 -1
  12. {node → node v22.15}/LICENSE +0 -0
  13. {node → node v22.15}/assert/strict.d.ts +0 -0
  14. {node → node v22.15}/assert.d.ts +0 -0
  15. {node → node v22.15}/async_hooks.d.ts +0 -0
  16. {node → node v22.15}/buffer.buffer.d.ts +0 -0
  17. {node → node v22.15}/buffer.d.ts +0 -0
  18. {node → node v22.15}/child_process.d.ts +0 -0
  19. {node → node v22.15}/cluster.d.ts +0 -0
  20. {node → node v22.15}/compatibility/index.d.ts +0 -0
  21. {node → node v22.15}/console.d.ts +0 -0
  22. {node → node v22.15}/constants.d.ts +0 -0
  23. {node → node v22.15}/crypto.d.ts +0 -0
  24. {node → node v22.15}/dgram.d.ts +0 -0
  25. {node → node v22.15}/diagnostics_channel.d.ts +0 -0
  26. {node → node v22.15}/dns/promises.d.ts +0 -0
  27. {node → node v22.15}/dns.d.ts +0 -0
  28. {node → node v22.15}/dom-events.d.ts +0 -0
  29. {node → node v22.15}/domain.d.ts +0 -0
  30. {node → node v22.15}/events.d.ts +0 -0
  31. {node → node v22.15}/fs/promises.d.ts +0 -0
  32. {node → node v22.15}/fs.d.ts +0 -0
  33. {node → node v22.15}/globals.typedarray.d.ts +0 -0
  34. {node → node v22.15}/http.d.ts +0 -0
  35. {node → node v22.15}/https.d.ts +0 -0
  36. {node → node v22.15}/index.d.ts +0 -0
  37. {node → node v22.15}/inspector.d.ts +0 -0
  38. {node → node v22.15}/net.d.ts +0 -0
  39. {node → node v22.15}/os.d.ts +0 -0
  40. {node → node v22.15}/path.d.ts +0 -0
  41. {node → node v22.15}/perf_hooks.d.ts +0 -0
  42. {node → node v22.15}/process.d.ts +0 -0
  43. {node → node v22.15}/punycode.d.ts +0 -0
  44. {node → node v22.15}/querystring.d.ts +0 -0
  45. {node → node v22.15}/readline/promises.d.ts +0 -0
  46. {node → node v22.15}/readline.d.ts +0 -0
  47. {node → node v22.15}/repl.d.ts +0 -0
  48. {node → node v22.15}/sea.d.ts +0 -0
  49. {node → node v22.15}/sqlite.d.ts +0 -0
  50. {node → node v22.15}/stream/consumers.d.ts +0 -0
  51. {node → node v22.15}/stream/promises.d.ts +0 -0
  52. {node → node v22.15}/stream/web.d.ts +0 -0
  53. {node → node v22.15}/stream.d.ts +0 -0
  54. {node → node v22.15}/string_decoder.d.ts +0 -0
  55. {node → node v22.15}/timers/promises.d.ts +0 -0
  56. {node → node v22.15}/timers.d.ts +0 -0
  57. {node → node v22.15}/tls.d.ts +0 -0
  58. {node → node v22.15}/trace_events.d.ts +0 -0
  59. {node → node v22.15}/ts5.6/buffer.buffer.d.ts +0 -0
  60. {node → node v22.15}/ts5.6/globals.typedarray.d.ts +0 -0
  61. {node → node v22.15}/ts5.6/index.d.ts +0 -0
  62. {node → node v22.15}/tty.d.ts +0 -0
  63. {node → node v22.15}/url.d.ts +0 -0
  64. {node → node v22.15}/v8.d.ts +0 -0
  65. {node → node v22.15}/vm.d.ts +0 -0
  66. {node → node v22.15}/wasi.d.ts +0 -0
  67. {node → node v22.15}/zlib.d.ts +0 -0
@@ -5,10 +5,10 @@
5
5
  This package contains type definitions for node (https://nodejs.org/).
6
6
 
7
7
  # Details
8
- Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v22.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 30 May 2025 18:40:02 GMT
11
+ * Last updated: Tue, 10 Jun 2025 02:18:06 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -1,6 +1,4 @@
1
1
  // Polyfills for the explicit resource management types added in TypeScript 5.2.
2
- // TODO: remove once this package no longer supports TS 5.1, and replace with a
3
- // <reference> to TypeScript's disposable library in index.d.ts.
4
2
 
5
3
  interface SymbolConstructor {
6
4
  readonly dispose: unique symbol;
@@ -1,7 +1,4 @@
1
1
  // Polyfill for ES2022's .at() method on string/array prototypes, added to TypeScript in 4.6.
2
- // TODO: these methods are not used within @types/node, and should be removed at the next
3
- // major @types/node version; users should include the es2022 TypeScript libraries
4
- // if they need these features.
5
2
 
6
3
  interface RelativeIndexable<T> {
7
4
  at(index: number): T | undefined;
@@ -3,7 +3,6 @@
3
3
  // are expected (eg. DOM-compatible APIs) if lib.esnext.iterator is loaded.
4
4
  // Also ensures that iterators returned by the Node API, which inherit from Iterator.prototype, correctly expose the iterator helper methods
5
5
  // if lib.esnext.iterator is loaded.
6
- // TODO: remove once this package no longer supports TS 5.5, and replace NodeJS.BuiltinIteratorReturn with BuiltinIteratorReturn.
7
6
 
8
7
  // Placeholders for TS <5.6
9
8
  interface IteratorObject<T, TReturn, TNext> {}
@@ -251,14 +251,12 @@ declare global {
251
251
 
252
252
  /** An iterable iterator returned by the Node.js API. */
253
253
  // Default TReturn/TNext in v22 is `any`, for compatibility with the previously-used IterableIterator.
254
- // TODO: In next major @types/node version, change default TReturn to undefined.
255
254
  interface Iterator<T, TReturn = any, TNext = any> extends IteratorObject<T, TReturn, TNext> {
256
255
  [Symbol.iterator](): NodeJS.Iterator<T, TReturn, TNext>;
257
256
  }
258
257
 
259
258
  /** An async iterable iterator returned by the Node.js API. */
260
259
  // Default TReturn/TNext in v22 is `any`, for compatibility with the previously-used AsyncIterableIterator.
261
- // TODO: In next major @types/node version, change default TReturn to undefined.
262
260
  interface AsyncIterator<T, TReturn = any, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
263
261
  [Symbol.asyncIterator](): NodeJS.AsyncIterator<T, TReturn, TNext>;
264
262
  }
@@ -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<
@@ -772,7 +772,6 @@ declare module "module" {
772
772
  */
773
773
  var require: NodeJS.Require;
774
774
  // Global-scope aliases for backwards compatibility with @types/node <13.0.x
775
- // TODO: consider removing in a future major version update
776
775
  /** @deprecated Use `NodeJS.Module` instead. */
777
776
  interface NodeModule extends NodeJS.Module {}
778
777
  /** @deprecated Use `NodeJS.Require` instead. */
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.15.29",
3
+ "version": "22.15.31",
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": "98b7a6aabffc6588a0865305b51b9dd48e81a270354b592630e8d37772f1f57a",
223
+ "typesPublisherContentHash": "1ba9213adf63443b1d408206cd7fef06bfb41aa3b67219d0ec8b8d922e74c9bc",
224
224
  "typeScriptVersion": "5.1"
225
225
  }
@@ -2272,8 +2272,6 @@ declare module "node:test/reporters" {
2272
2272
  * [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--experimental-test-coverage) flag.
2273
2273
  * @since v22.0.0
2274
2274
  */
2275
- // TODO: change the export to a wrapper function once node@0db38f0 is merged (breaking change)
2276
- // const lcov: ReporterConstructorWrapper<typeof LcovReporter>;
2277
2275
  const lcov: LcovReporter;
2278
2276
 
2279
2277
  export { dot, junit, lcov, spec, tap, TestEvent };
@@ -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"
@@ -97,7 +97,6 @@ declare module "worker_threads" {
97
97
  | WritableStream
98
98
  | TransformStream;
99
99
  /** @deprecated Use `import { Transferable } from "node:worker_threads"` instead. */
100
- // TODO: remove in a future major @types/node version.
101
100
  type TransferListItem = Transferable;
102
101
  /**
103
102
  * Instances of the `worker.MessagePort` class represent one end of an
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes