@types/node 22.18.1 → 22.18.3

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: Thu, 04 Sep 2025 10:02:38 GMT
11
+ * Last updated: Sat, 13 Sep 2025 00:03:47 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node v22.18/http.d.ts CHANGED
@@ -2031,15 +2031,15 @@ declare module "http" {
2031
2031
  * A browser-compatible implementation of `WebSocket`.
2032
2032
  * @since v22.5.0
2033
2033
  */
2034
- const WebSocket: import("undici-types").WebSocket;
2034
+ const WebSocket: typeof import("undici-types").WebSocket;
2035
2035
  /**
2036
2036
  * @since v22.5.0
2037
2037
  */
2038
- const CloseEvent: import("undici-types").CloseEvent;
2038
+ const CloseEvent: typeof import("undici-types").CloseEvent;
2039
2039
  /**
2040
2040
  * @since v22.5.0
2041
2041
  */
2042
- const MessageEvent: import("undici-types").MessageEvent;
2042
+ const MessageEvent: typeof import("undici-types").MessageEvent;
2043
2043
  }
2044
2044
  declare module "node:http" {
2045
2045
  export * from "http";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.18.1",
3
+ "version": "22.18.3",
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": "ac2c8f7bae3ace55de8cc6e3e0972fd50a4ba54caa6840816e1367bed47e1022",
143
+ "typesPublisherContentHash": "acbaf201149c3552c80f99f06f03140607c0267963779b7c3a1dac5f5de070b9",
144
144
  "typeScriptVersion": "5.2"
145
145
  }
@@ -738,6 +738,24 @@ declare module "worker_threads" {
738
738
  * for the `key` will be deleted.
739
739
  */
740
740
  function setEnvironmentData(key: Serializable, value?: Serializable): void;
741
+ /**
742
+ * Sends a value to another worker, identified by its thread ID.
743
+ * @param threadId The target thread ID. If the thread ID is invalid, a `ERR_WORKER_MESSAGING_FAILED` error will be thrown.
744
+ * If the target thread ID is the current thread ID, a `ERR_WORKER_MESSAGING_SAME_THREAD` error will be thrown.
745
+ * @param value The value to send.
746
+ * @param transferList If one or more `MessagePort`-like objects are passed in value, a `transferList` is required for those items
747
+ * or `ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST` is thrown. See `port.postMessage()` for more information.
748
+ * @param timeout Time to wait for the message to be delivered in milliseconds. By default it's `undefined`, which means wait forever.
749
+ * If the operation times out, a `ERR_WORKER_MESSAGING_TIMEOUT` error is thrown.
750
+ * @since v22.5.0
751
+ */
752
+ function postMessageToThread(threadId: number, value: any, timeout?: number): Promise<void>;
753
+ function postMessageToThread(
754
+ threadId: number,
755
+ value: any,
756
+ transferList: readonly Transferable[],
757
+ timeout?: number,
758
+ ): Promise<void>;
741
759
 
742
760
  import {
743
761
  BroadcastChannel as _BroadcastChannel,