@types/node 22.18.2 → 22.18.4

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: Fri, 12 Sep 2025 19:32:39 GMT
11
+ * Last updated: Mon, 15 Sep 2025 20:02:30 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node v22.18/index.d.ts CHANGED
@@ -55,7 +55,6 @@
55
55
  /// <reference path="diagnostics_channel.d.ts" />
56
56
  /// <reference path="dns.d.ts" />
57
57
  /// <reference path="dns/promises.d.ts" />
58
- /// <reference path="dns/promises.d.ts" />
59
58
  /// <reference path="domain.d.ts" />
60
59
  /// <reference path="events.d.ts" />
61
60
  /// <reference path="fs.d.ts" />
@@ -63,7 +62,7 @@
63
62
  /// <reference path="http.d.ts" />
64
63
  /// <reference path="http2.d.ts" />
65
64
  /// <reference path="https.d.ts" />
66
- /// <reference path="inspector.d.ts" />
65
+ /// <reference path="inspector.generated.d.ts" />
67
66
  /// <reference path="module.d.ts" />
68
67
  /// <reference path="net.d.ts" />
69
68
  /// <reference path="os.d.ts" />
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.18.2",
3
+ "version": "22.18.4",
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": "83198f377c2306e358dd31a54282d4605bac51107db8c082a19ee3a99e936e6c",
143
+ "typesPublisherContentHash": "778d2de06d03e5b08ab50b6511ddcf87d05529036d59754763a73c752aac06c2",
144
144
  "typeScriptVersion": "5.2"
145
145
  }
@@ -55,7 +55,6 @@
55
55
  /// <reference path="../diagnostics_channel.d.ts" />
56
56
  /// <reference path="../dns.d.ts" />
57
57
  /// <reference path="../dns/promises.d.ts" />
58
- /// <reference path="../dns/promises.d.ts" />
59
58
  /// <reference path="../domain.d.ts" />
60
59
  /// <reference path="../events.d.ts" />
61
60
  /// <reference path="../fs.d.ts" />
@@ -63,7 +62,7 @@
63
62
  /// <reference path="../http.d.ts" />
64
63
  /// <reference path="../http2.d.ts" />
65
64
  /// <reference path="../https.d.ts" />
66
- /// <reference path="../inspector.d.ts" />
65
+ /// <reference path="../inspector.generated.d.ts" />
67
66
  /// <reference path="../module.d.ts" />
68
67
  /// <reference path="../net.d.ts" />
69
68
  /// <reference path="../os.d.ts" />
@@ -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,