@types/node 22.18.7 → 22.18.9

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, 29 Sep 2025 18:40:16 GMT
11
+ * Last updated: Thu, 09 Oct 2025 17:35:09 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node v22.18/events.d.ts CHANGED
@@ -36,39 +36,6 @@
36
36
  */
37
37
  declare module "events" {
38
38
  import { AsyncResource, AsyncResourceOptions } from "node:async_hooks";
39
- // NOTE: This class is in the docs but is **not actually exported** by Node.
40
- // If https://github.com/nodejs/node/issues/39903 gets resolved and Node
41
- // actually starts exporting the class, uncomment below.
42
- // import { EventListener, EventListenerObject } from '__dom-events';
43
- // /** The NodeEventTarget is a Node.js-specific extension to EventTarget that emulates a subset of the EventEmitter API. */
44
- // interface NodeEventTarget extends EventTarget {
45
- // /**
46
- // * Node.js-specific extension to the `EventTarget` class that emulates the equivalent `EventEmitter` API.
47
- // * The only difference between `addListener()` and `addEventListener()` is that addListener() will return a reference to the EventTarget.
48
- // */
49
- // addListener(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
50
- // /** Node.js-specific extension to the `EventTarget` class that returns an array of event `type` names for which event listeners are registered. */
51
- // eventNames(): string[];
52
- // /** Node.js-specific extension to the `EventTarget` class that returns the number of event listeners registered for the `type`. */
53
- // listenerCount(type: string): number;
54
- // /** Node.js-specific alias for `eventTarget.removeListener()`. */
55
- // off(type: string, listener: EventListener | EventListenerObject): this;
56
- // /** Node.js-specific alias for `eventTarget.addListener()`. */
57
- // on(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
58
- // /** Node.js-specific extension to the `EventTarget` class that adds a `once` listener for the given event `type`. This is equivalent to calling `on` with the `once` option set to `true`. */
59
- // once(type: string, listener: EventListener | EventListenerObject): this;
60
- // /**
61
- // * Node.js-specific extension to the `EventTarget` class.
62
- // * If `type` is specified, removes all registered listeners for `type`,
63
- // * otherwise removes all registered listeners.
64
- // */
65
- // removeAllListeners(type: string): this;
66
- // /**
67
- // * Node.js-specific extension to the `EventTarget` class that removes the listener for the given `type`.
68
- // * The only difference between `removeListener()` and `removeEventListener()` is that `removeListener()` will return a reference to the `EventTarget`.
69
- // */
70
- // removeListener(type: string, listener: EventListener | EventListenerObject): this;
71
- // }
72
39
  interface EventEmitterOptions {
73
40
  /**
74
41
  * Enables automatic capturing of promise rejection.
@@ -143,6 +143,8 @@ declare namespace NodeJS {
143
143
  readonly [key: string]: T | undefined;
144
144
  }
145
145
 
146
+ type PartialOptions<T> = { [K in keyof T]?: T[K] | undefined };
147
+
146
148
  interface GCFunction {
147
149
  (minor?: boolean): void;
148
150
  (options: NodeJS.GCOptions & { execution: "async" }): Promise<void>;
node v22.18/http.d.ts CHANGED
@@ -1419,7 +1419,7 @@ declare module "http" {
1419
1419
  */
1420
1420
  destroy(error?: Error): this;
1421
1421
  }
1422
- interface AgentOptions extends Partial<TcpSocketConnectOpts> {
1422
+ interface AgentOptions extends NodeJS.PartialOptions<TcpSocketConnectOpts> {
1423
1423
  /**
1424
1424
  * Keep sockets around in a pool to be used by other requests in the future. Default = false
1425
1425
  */
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.18.7",
3
+ "version": "22.18.9",
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": "39c99d2d62ee93ed3ecad0b25c74b1a11b51ee4b9dc3931c0e85f96c69c25e04",
143
+ "typesPublisherContentHash": "6b0f459bde791c079af2fa491f14b70ca7fb1136572f3151dd7c0b899f68651c",
144
144
  "typeScriptVersion": "5.2"
145
145
  }
@@ -111,7 +111,7 @@ declare module "worker_threads" {
111
111
  * This implementation matches [browser `MessagePort`](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort) s.
112
112
  * @since v10.5.0
113
113
  */
114
- class MessagePort extends EventTarget {
114
+ class MessagePort implements EventTarget {
115
115
  /**
116
116
  * Disables further sending of messages on either side of the connection.
117
117
  * This method can be called when no further communication will happen over this `MessagePort`.