@types/node 22.18.2 → 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 +1 -1
- node v22.18/package.json +2 -2
- node v22.18/worker_threads.d.ts +18 -0
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:
|
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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/node",
|
3
|
-
"version": "22.18.
|
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": "
|
143
|
+
"typesPublisherContentHash": "acbaf201149c3552c80f99f06f03140607c0267963779b7c3a1dac5f5de070b9",
|
144
144
|
"typeScriptVersion": "5.2"
|
145
145
|
}
|
node v22.18/worker_threads.d.ts
CHANGED
@@ -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,
|