@types/node 22.18.4 → 22.18.6

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 v22.18/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/v22.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 15 Sep 2025 20:02:30 GMT
11
+ * Last updated: Thu, 18 Sep 2025 00:04:03 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node v22.18/http.d.ts CHANGED
@@ -1591,7 +1591,7 @@ declare module "http" {
1591
1591
  createConnection(
1592
1592
  options: ClientRequestArgs,
1593
1593
  callback?: (err: Error | null, stream: stream.Duplex) => void,
1594
- ): stream.Duplex;
1594
+ ): stream.Duplex | null | undefined;
1595
1595
  /**
1596
1596
  * Called when `socket` is detached from a request and could be persisted by the`Agent`. Default behavior is to:
1597
1597
  *
node v22.18/https.d.ts CHANGED
@@ -32,6 +32,11 @@ declare module "https" {
32
32
  class Agent extends http.Agent {
33
33
  constructor(options?: AgentOptions);
34
34
  options: AgentOptions;
35
+ createConnection(
36
+ options: RequestOptions,
37
+ callback?: (err: Error | null, stream: Duplex) => void,
38
+ ): Duplex | null | undefined;
39
+ getName(options?: RequestOptions): string;
35
40
  }
36
41
  interface Server<
37
42
  Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.18.4",
3
+ "version": "22.18.6",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -140,6 +140,6 @@
140
140
  "undici-types": "~6.21.0"
141
141
  },
142
142
  "peerDependencies": {},
143
- "typesPublisherContentHash": "778d2de06d03e5b08ab50b6511ddcf87d05529036d59754763a73c752aac06c2",
143
+ "typesPublisherContentHash": "223d0ed2825fc2dbdef1d6dd0cb95b10912c9cb13dc3bdb5a089e502d84cbb1b",
144
144
  "typeScriptVersion": "5.2"
145
145
  }
@@ -63,6 +63,7 @@ declare module "worker_threads" {
63
63
  import { ReadableStream, TransformStream, WritableStream } from "node:stream/web";
64
64
  import { URL } from "node:url";
65
65
  import { HeapInfo } from "node:v8";
66
+ import { MessageEvent } from "undici-types";
66
67
  const isInternalThread: boolean;
67
68
  const isMainThread: boolean;
68
69
  const parentPort: null | MessagePort;
@@ -573,18 +574,18 @@ declare module "worker_threads" {
573
574
  * ```
574
575
  * @since v15.4.0
575
576
  */
576
- class BroadcastChannel {
577
+ class BroadcastChannel extends EventTarget {
577
578
  readonly name: string;
578
579
  /**
579
580
  * Invoked with a single \`MessageEvent\` argument when a message is received.
580
581
  * @since v15.4.0
581
582
  */
582
- onmessage: (message: unknown) => void;
583
+ onmessage: (message: MessageEvent) => void;
583
584
  /**
584
585
  * Invoked with a received message cannot be deserialized.
585
586
  * @since v15.4.0
586
587
  */
587
- onmessageerror: (message: unknown) => void;
588
+ onmessageerror: (message: MessageEvent) => void;
588
589
  constructor(name: string);
589
590
  /**
590
591
  * Closes the `BroadcastChannel` connection.