@chainlink/external-adapter-framework 2.7.2 → 2.9.0

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.
Files changed (175) hide show
  1. package/README.md +1 -1
  2. package/adapter/basic.js +21 -4
  3. package/adapter/basic.js.map +1 -1
  4. package/adapter/endpoint.js +13 -0
  5. package/adapter/endpoint.js.map +1 -1
  6. package/adapter/por.js +6 -6
  7. package/adapter/por.js.map +1 -1
  8. package/adapter/price.js +1 -0
  9. package/adapter/price.js.map +1 -1
  10. package/cache/local.js +5 -1
  11. package/cache/local.js.map +1 -1
  12. package/cache/redis.js +3 -1
  13. package/cache/redis.js.map +1 -1
  14. package/cache/response.js +5 -0
  15. package/cache/response.js.map +1 -1
  16. package/config/index.js +9 -6
  17. package/config/index.js.map +1 -1
  18. package/generator-adapter/node_modules/.yarn-integrity +4 -4
  19. package/generator-adapter/node_modules/@types/node/README.md +3 -3
  20. package/generator-adapter/node_modules/@types/node/assert/strict.d.ts +105 -2
  21. package/generator-adapter/node_modules/@types/node/assert.d.ts +162 -101
  22. package/generator-adapter/node_modules/@types/node/async_hooks.d.ts +25 -5
  23. package/generator-adapter/node_modules/@types/node/buffer.buffer.d.ts +9 -0
  24. package/generator-adapter/node_modules/@types/node/buffer.d.ts +9 -5
  25. package/generator-adapter/node_modules/@types/node/child_process.d.ts +67 -44
  26. package/generator-adapter/node_modules/@types/node/cluster.d.ts +19 -20
  27. package/generator-adapter/node_modules/@types/node/compatibility/iterators.d.ts +1 -0
  28. package/generator-adapter/node_modules/@types/node/console.d.ts +19 -18
  29. package/generator-adapter/node_modules/@types/node/crypto.d.ts +1247 -355
  30. package/generator-adapter/node_modules/@types/node/dgram.d.ts +10 -9
  31. package/generator-adapter/node_modules/@types/node/diagnostics_channel.d.ts +1 -3
  32. package/generator-adapter/node_modules/@types/node/dns/promises.d.ts +1 -1
  33. package/generator-adapter/node_modules/@types/node/dns.d.ts +23 -18
  34. package/generator-adapter/node_modules/@types/node/domain.d.ts +1 -1
  35. package/generator-adapter/node_modules/@types/node/events.d.ts +81 -35
  36. package/generator-adapter/node_modules/@types/node/fs/promises.d.ts +62 -22
  37. package/generator-adapter/node_modules/@types/node/fs.d.ts +364 -98
  38. package/generator-adapter/node_modules/@types/node/globals.d.ts +4 -4
  39. package/generator-adapter/node_modules/@types/node/globals.typedarray.d.ts +20 -0
  40. package/generator-adapter/node_modules/@types/node/http.d.ts +120 -32
  41. package/generator-adapter/node_modules/@types/node/http2.d.ts +185 -65
  42. package/generator-adapter/node_modules/@types/node/https.d.ts +92 -63
  43. package/generator-adapter/node_modules/@types/node/index.d.ts +10 -5
  44. package/generator-adapter/node_modules/@types/node/inspector.d.ts +277 -0
  45. package/generator-adapter/node_modules/@types/node/inspector.generated.d.ts +908 -886
  46. package/generator-adapter/node_modules/@types/node/module.d.ts +21 -18
  47. package/generator-adapter/node_modules/@types/node/net.d.ts +35 -16
  48. package/generator-adapter/node_modules/@types/node/os.d.ts +22 -10
  49. package/generator-adapter/node_modules/@types/node/package.json +13 -3
  50. package/generator-adapter/node_modules/@types/node/path.d.ts +1 -1
  51. package/generator-adapter/node_modules/@types/node/perf_hooks.d.ts +28 -16
  52. package/generator-adapter/node_modules/@types/node/process.d.ts +30 -30
  53. package/generator-adapter/node_modules/@types/node/punycode.d.ts +1 -1
  54. package/generator-adapter/node_modules/@types/node/querystring.d.ts +1 -1
  55. package/generator-adapter/node_modules/@types/node/readline/promises.d.ts +1 -1
  56. package/generator-adapter/node_modules/@types/node/readline.d.ts +13 -13
  57. package/generator-adapter/node_modules/@types/node/repl.d.ts +23 -13
  58. package/generator-adapter/node_modules/@types/node/sea.d.ts +10 -1
  59. package/generator-adapter/node_modules/@types/node/sqlite.d.ts +245 -23
  60. package/generator-adapter/node_modules/@types/node/stream/consumers.d.ts +2 -2
  61. package/generator-adapter/node_modules/@types/node/stream/web.d.ts +6 -55
  62. package/generator-adapter/node_modules/@types/node/stream.d.ts +63 -37
  63. package/generator-adapter/node_modules/@types/node/string_decoder.d.ts +3 -3
  64. package/generator-adapter/node_modules/@types/node/test.d.ts +196 -40
  65. package/generator-adapter/node_modules/@types/node/timers/promises.d.ts +1 -1
  66. package/generator-adapter/node_modules/@types/node/timers.d.ts +1 -3
  67. package/generator-adapter/node_modules/@types/node/tls.d.ts +124 -114
  68. package/generator-adapter/node_modules/@types/node/trace_events.d.ts +6 -6
  69. package/generator-adapter/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
  70. package/generator-adapter/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  71. package/generator-adapter/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +17 -0
  72. package/generator-adapter/node_modules/@types/node/ts5.6/index.d.ts +12 -5
  73. package/generator-adapter/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  74. package/generator-adapter/node_modules/@types/node/ts5.7/index.d.ts +103 -0
  75. package/generator-adapter/node_modules/@types/node/tty.d.ts +1 -1
  76. package/generator-adapter/node_modules/@types/node/url.d.ts +109 -33
  77. package/generator-adapter/node_modules/@types/node/util.d.ts +31 -305
  78. package/generator-adapter/node_modules/@types/node/v8.d.ts +41 -8
  79. package/generator-adapter/node_modules/@types/node/vm.d.ts +258 -107
  80. package/generator-adapter/node_modules/@types/node/wasi.d.ts +23 -2
  81. package/generator-adapter/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
  82. package/generator-adapter/node_modules/@types/node/web-globals/events.d.ts +3 -0
  83. package/generator-adapter/node_modules/@types/node/web-globals/fetch.d.ts +4 -0
  84. package/generator-adapter/node_modules/@types/node/web-globals/navigator.d.ts +3 -0
  85. package/generator-adapter/node_modules/@types/node/web-globals/streams.d.ts +22 -0
  86. package/generator-adapter/node_modules/@types/node/worker_threads.d.ts +142 -51
  87. package/generator-adapter/node_modules/@types/node/zlib.d.ts +36 -31
  88. package/generator-adapter/node_modules/undici-types/agent.d.ts +12 -11
  89. package/generator-adapter/node_modules/undici-types/api.d.ts +24 -24
  90. package/generator-adapter/node_modules/undici-types/balanced-pool.d.ts +11 -11
  91. package/generator-adapter/node_modules/undici-types/cache-interceptor.d.ts +172 -0
  92. package/generator-adapter/node_modules/undici-types/client-stats.d.ts +15 -0
  93. package/generator-adapter/node_modules/undici-types/client.d.ts +18 -18
  94. package/generator-adapter/node_modules/undici-types/cookies.d.ts +2 -0
  95. package/generator-adapter/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
  96. package/generator-adapter/node_modules/undici-types/dispatcher.d.ts +119 -99
  97. package/generator-adapter/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
  98. package/generator-adapter/node_modules/undici-types/errors.d.ts +66 -54
  99. package/generator-adapter/node_modules/undici-types/eventsource.d.ts +9 -4
  100. package/generator-adapter/node_modules/undici-types/fetch.d.ts +18 -16
  101. package/generator-adapter/node_modules/undici-types/formdata.d.ts +7 -7
  102. package/generator-adapter/node_modules/undici-types/global-dispatcher.d.ts +4 -4
  103. package/generator-adapter/node_modules/undici-types/global-origin.d.ts +5 -5
  104. package/generator-adapter/node_modules/undici-types/h2c-client.d.ts +73 -0
  105. package/generator-adapter/node_modules/undici-types/handlers.d.ts +8 -8
  106. package/generator-adapter/node_modules/undici-types/header.d.ts +157 -1
  107. package/generator-adapter/node_modules/undici-types/index.d.ts +56 -47
  108. package/generator-adapter/node_modules/undici-types/interceptors.d.ts +30 -8
  109. package/generator-adapter/node_modules/undici-types/mock-agent.d.ts +36 -18
  110. package/generator-adapter/node_modules/undici-types/mock-call-history.d.ts +111 -0
  111. package/generator-adapter/node_modules/undici-types/mock-client.d.ts +6 -4
  112. package/generator-adapter/node_modules/undici-types/mock-errors.d.ts +3 -3
  113. package/generator-adapter/node_modules/undici-types/mock-interceptor.d.ts +21 -20
  114. package/generator-adapter/node_modules/undici-types/mock-pool.d.ts +6 -4
  115. package/generator-adapter/node_modules/undici-types/package.json +1 -1
  116. package/generator-adapter/node_modules/undici-types/patch.d.ts +0 -4
  117. package/generator-adapter/node_modules/undici-types/pool-stats.d.ts +8 -8
  118. package/generator-adapter/node_modules/undici-types/pool.d.ts +14 -12
  119. package/generator-adapter/node_modules/undici-types/proxy-agent.d.ts +5 -4
  120. package/generator-adapter/node_modules/undici-types/readable.d.ts +18 -15
  121. package/generator-adapter/node_modules/undici-types/retry-agent.d.ts +1 -1
  122. package/generator-adapter/node_modules/undici-types/retry-handler.d.ts +19 -10
  123. package/generator-adapter/node_modules/undici-types/snapshot-agent.d.ts +109 -0
  124. package/generator-adapter/node_modules/undici-types/util.d.ts +3 -3
  125. package/generator-adapter/node_modules/undici-types/utility.d.ts +7 -0
  126. package/generator-adapter/node_modules/undici-types/webidl.d.ts +142 -29
  127. package/generator-adapter/node_modules/undici-types/websocket.d.ts +38 -2
  128. package/generator-adapter/package.json +1 -1
  129. package/metrics/index.js +3 -0
  130. package/metrics/index.js.map +1 -1
  131. package/package.json +9 -9
  132. package/rate-limiting/burst.js +6 -6
  133. package/rate-limiting/burst.js.map +1 -1
  134. package/rate-limiting/fixed-interval.js +2 -3
  135. package/rate-limiting/fixed-interval.js.map +1 -1
  136. package/transports/abstract/streaming.js +7 -10
  137. package/transports/abstract/streaming.js.map +1 -1
  138. package/transports/abstract/subscription.js +4 -0
  139. package/transports/abstract/subscription.js.map +1 -1
  140. package/transports/http.js +5 -3
  141. package/transports/http.js.map +1 -1
  142. package/transports/index.js +1 -3
  143. package/transports/index.js.map +1 -1
  144. package/transports/sse.js +6 -2
  145. package/transports/sse.js.map +1 -1
  146. package/transports/websocket.d.ts +9 -1
  147. package/transports/websocket.js +41 -65
  148. package/transports/websocket.js.map +1 -1
  149. package/util/censor/censor-list.js +1 -1
  150. package/util/censor/censor-list.js.map +1 -1
  151. package/util/group-runner.js +3 -2
  152. package/util/group-runner.js.map +1 -1
  153. package/util/index.js +8 -1
  154. package/util/index.js.map +1 -1
  155. package/util/logger.js +8 -1
  156. package/util/logger.js.map +1 -1
  157. package/util/requester.js +11 -3
  158. package/util/requester.js.map +1 -1
  159. package/util/subscription-set/expiring-sorted-set.js +3 -0
  160. package/util/subscription-set/expiring-sorted-set.js.map +1 -1
  161. package/util/subscription-set/redis-sorted-set.js +3 -0
  162. package/util/subscription-set/redis-sorted-set.js.map +1 -1
  163. package/util/subscription-set/subscription-set.js +5 -0
  164. package/util/subscription-set/subscription-set.js.map +1 -1
  165. package/util/testing-utils.js +13 -6
  166. package/util/testing-utils.js.map +1 -1
  167. package/validation/error.js +13 -0
  168. package/validation/error.js.map +1 -1
  169. package/validation/input-params.js +14 -0
  170. package/validation/input-params.js.map +1 -1
  171. package/generator-adapter/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
  172. package/generator-adapter/node_modules/@types/node/compatibility/index.d.ts +0 -9
  173. package/generator-adapter/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  174. package/generator-adapter/node_modules/undici-types/file.d.ts +0 -39
  175. package/generator-adapter/node_modules/undici-types/filereader.d.ts +0 -54
@@ -23,9 +23,10 @@
23
23
  * server.bind(41234);
24
24
  * // Prints: server listening 0.0.0.0:41234
25
25
  * ```
26
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/dgram.js)
26
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/dgram.js)
27
27
  */
28
28
  declare module "dgram" {
29
+ import { NonSharedBuffer } from "node:buffer";
29
30
  import { AddressInfo, BlockList } from "node:net";
30
31
  import * as dns from "node:dns";
31
32
  import { Abortable, EventEmitter } from "node:events";
@@ -85,8 +86,8 @@ declare module "dgram" {
85
86
  * @param options Available options are:
86
87
  * @param callback Attached as a listener for `'message'` events. Optional.
87
88
  */
88
- function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
89
- function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
89
+ function createSocket(type: SocketType, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket;
90
+ function createSocket(options: SocketOptions, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket;
90
91
  /**
91
92
  * Encapsulates the datagram functionality.
92
93
  *
@@ -556,37 +557,37 @@ declare module "dgram" {
556
557
  addListener(event: "connect", listener: () => void): this;
557
558
  addListener(event: "error", listener: (err: Error) => void): this;
558
559
  addListener(event: "listening", listener: () => void): this;
559
- addListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
560
+ addListener(event: "message", listener: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): this;
560
561
  emit(event: string | symbol, ...args: any[]): boolean;
561
562
  emit(event: "close"): boolean;
562
563
  emit(event: "connect"): boolean;
563
564
  emit(event: "error", err: Error): boolean;
564
565
  emit(event: "listening"): boolean;
565
- emit(event: "message", msg: Buffer, rinfo: RemoteInfo): boolean;
566
+ emit(event: "message", msg: NonSharedBuffer, rinfo: RemoteInfo): boolean;
566
567
  on(event: string, listener: (...args: any[]) => void): this;
567
568
  on(event: "close", listener: () => void): this;
568
569
  on(event: "connect", listener: () => void): this;
569
570
  on(event: "error", listener: (err: Error) => void): this;
570
571
  on(event: "listening", listener: () => void): this;
571
- on(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
572
+ on(event: "message", listener: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): this;
572
573
  once(event: string, listener: (...args: any[]) => void): this;
573
574
  once(event: "close", listener: () => void): this;
574
575
  once(event: "connect", listener: () => void): this;
575
576
  once(event: "error", listener: (err: Error) => void): this;
576
577
  once(event: "listening", listener: () => void): this;
577
- once(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
578
+ once(event: "message", listener: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): this;
578
579
  prependListener(event: string, listener: (...args: any[]) => void): this;
579
580
  prependListener(event: "close", listener: () => void): this;
580
581
  prependListener(event: "connect", listener: () => void): this;
581
582
  prependListener(event: "error", listener: (err: Error) => void): this;
582
583
  prependListener(event: "listening", listener: () => void): this;
583
- prependListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
584
+ prependListener(event: "message", listener: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): this;
584
585
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
585
586
  prependOnceListener(event: "close", listener: () => void): this;
586
587
  prependOnceListener(event: "connect", listener: () => void): this;
587
588
  prependOnceListener(event: "error", listener: (err: Error) => void): this;
588
589
  prependOnceListener(event: "listening", listener: () => void): this;
589
- prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
590
+ prependOnceListener(event: "message", listener: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): this;
590
591
  /**
591
592
  * Calls `socket.close()` and returns a promise that fulfills when the socket has closed.
592
593
  * @since v20.5.0
@@ -20,7 +20,7 @@
20
20
  * should generally include the module name to avoid collisions with data from
21
21
  * other modules.
22
22
  * @since v15.1.0, v14.17.0
23
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/diagnostics_channel.js)
23
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/diagnostics_channel.js)
24
24
  */
25
25
  declare module "diagnostics_channel" {
26
26
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -189,7 +189,6 @@ declare module "diagnostics_channel" {
189
189
  * });
190
190
  * ```
191
191
  * @since v15.1.0, v14.17.0
192
- * @deprecated Since v18.7.0,v16.17.0 - Use {@link subscribe(name, onMessage)}
193
192
  * @param onMessage The handler to receive channel messages
194
193
  */
195
194
  subscribe(onMessage: ChannelListener): void;
@@ -210,7 +209,6 @@ declare module "diagnostics_channel" {
210
209
  * channel.unsubscribe(onMessage);
211
210
  * ```
212
211
  * @since v15.1.0, v14.17.0
213
- * @deprecated Since v18.7.0,v16.17.0 - Use {@link unsubscribe(name, onMessage)}
214
212
  * @param onMessage The previous subscribed handler to remove
215
213
  * @return `true` if the handler was found, `false` otherwise.
216
214
  */
@@ -315,7 +315,7 @@ declare module "dns/promises" {
315
315
  * data: [ArrayBuffer]
316
316
  * }
317
317
  * ```
318
- * @since v22.15.0
318
+ * @since v23.9.0, v22.15.0
319
319
  */
320
320
  function resolveTlsa(hostname: string): Promise<TlsaRecord[]>;
321
321
  /**
@@ -41,8 +41,8 @@
41
41
  * });
42
42
  * ```
43
43
  *
44
- * See the [Implementation considerations section](https://nodejs.org/docs/latest-v22.x/api/dns.html#implementation-considerations) for more information.
45
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/dns.js)
44
+ * See the [Implementation considerations section](https://nodejs.org/docs/latest-v24.x/api/dns.html#implementation-considerations) for more information.
45
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/dns.js)
46
46
  */
47
47
  declare module "dns" {
48
48
  import * as dnsPromises from "node:dns/promises";
@@ -71,7 +71,7 @@ declare module "dns" {
71
71
  */
72
72
  family?: number | "IPv4" | "IPv6" | undefined;
73
73
  /**
74
- * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v22.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be
74
+ * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v24.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be
75
75
  * passed by bitwise `OR`ing their values.
76
76
  */
77
77
  hints?: number | undefined;
@@ -84,7 +84,7 @@ declare module "dns" {
84
84
  * When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted
85
85
  * by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6
86
86
  * addresses before IPv4 addresses. Default value is configurable using
87
- * {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder).
87
+ * {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--dns-result-orderorder).
88
88
  * @default `verbatim` (addresses are not reordered)
89
89
  * @since v22.1.0
90
90
  */
@@ -133,7 +133,7 @@ declare module "dns" {
133
133
  * The implementation uses an operating system facility that can associate names
134
134
  * with addresses and vice versa. This implementation can have subtle but
135
135
  * important consequences on the behavior of any Node.js program. Please take some
136
- * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v22.x/api/dns.html#implementation-considerations)
136
+ * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v24.x/api/dns.html#implementation-considerations)
137
137
  * before using `dns.lookup()`.
138
138
  *
139
139
  * Example usage:
@@ -155,7 +155,7 @@ declare module "dns" {
155
155
  * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
156
156
  * ```
157
157
  *
158
- * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v22.x/api/util.html#utilpromisifyoriginal) ed
158
+ * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v24.x/api/util.html#utilpromisifyoriginal) ed
159
159
  * version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties.
160
160
  * @since v0.1.90
161
161
  */
@@ -195,7 +195,7 @@ declare module "dns" {
195
195
  * If `address` is not a valid IP address, a `TypeError` will be thrown.
196
196
  * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown.
197
197
  *
198
- * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) object,
198
+ * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object,
199
199
  * where `err.code` is the error code.
200
200
  *
201
201
  * ```js
@@ -206,7 +206,7 @@ declare module "dns" {
206
206
  * });
207
207
  * ```
208
208
  *
209
- * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v22.x/api/util.html#utilpromisifyoriginal) ed
209
+ * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v24.x/api/util.html#utilpromisifyoriginal) ed
210
210
  * version, it returns a `Promise` for an `Object` with `hostname` and `service` properties.
211
211
  * @since v0.11.14
212
212
  */
@@ -337,7 +337,7 @@ declare module "dns" {
337
337
  *
338
338
  * <omitted>
339
339
  *
340
- * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) object,
340
+ * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object,
341
341
  * where `err.code` is one of the `DNS error codes`.
342
342
  * @since v0.1.27
343
343
  * @param hostname Host name to resolve.
@@ -652,7 +652,7 @@ declare module "dns" {
652
652
  * data: [ArrayBuffer]
653
653
  * }
654
654
  * ```
655
- * @since v22.15.0
655
+ * @since v23.9.0, v22.15.0
656
656
  */
657
657
  export function resolveTlsa(
658
658
  hostname: string,
@@ -716,8 +716,8 @@ declare module "dns" {
716
716
  * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
717
717
  * array of host names.
718
718
  *
719
- * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) object, where `err.code` is
720
- * one of the [DNS error codes](https://nodejs.org/docs/latest-v22.x/api/dns.html#error-codes).
719
+ * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object, where `err.code` is
720
+ * one of the [DNS error codes](https://nodejs.org/docs/latest-v24.x/api/dns.html#error-codes).
721
721
  * @since v0.1.16
722
722
  */
723
723
  export function reverse(
@@ -725,7 +725,7 @@ declare module "dns" {
725
725
  callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
726
726
  ): void;
727
727
  /**
728
- * Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options).
728
+ * Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnspromiseslookuphostname-options).
729
729
  * The value could be:
730
730
  *
731
731
  * * `ipv4first`: for `order` defaulting to `ipv4first`.
@@ -780,7 +780,7 @@ declare module "dns" {
780
780
  */
781
781
  export function getServers(): string[];
782
782
  /**
783
- * Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options).
783
+ * Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnspromiseslookuphostname-options).
784
784
  * The value could be:
785
785
  *
786
786
  * * `ipv4first`: sets default `order` to `ipv4first`.
@@ -788,8 +788,8 @@ declare module "dns" {
788
788
  * * `verbatim`: sets default `order` to `verbatim`.
789
789
  *
790
790
  * The default is `verbatim` and {@link setDefaultResultOrder} have higher
791
- * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). When using
792
- * [worker threads](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
791
+ * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--dns-result-orderorder). When using
792
+ * [worker threads](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
793
793
  * thread won't affect the default dns orders in workers.
794
794
  * @since v16.4.0, v14.18.0
795
795
  * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
@@ -829,13 +829,18 @@ declare module "dns" {
829
829
  * The number of tries the resolver will try contacting each name server before giving up.
830
830
  * @default 4
831
831
  */
832
- tries?: number;
832
+ tries?: number | undefined;
833
+ /**
834
+ * The max retry timeout, in milliseconds.
835
+ * @default 0
836
+ */
837
+ maxTimeout?: number | undefined;
833
838
  }
834
839
  /**
835
840
  * An independent resolver for DNS requests.
836
841
  *
837
842
  * Creating a new resolver uses the default server settings. Setting
838
- * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnssetserversservers) does not affect
843
+ * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnssetserversservers) does not affect
839
844
  * other resolvers:
840
845
  *
841
846
  * ```js
@@ -12,7 +12,7 @@
12
12
  * will be notified, rather than losing the context of the error in the `process.on('uncaughtException')` handler, or causing the program to
13
13
  * exit immediately with an error code.
14
14
  * @deprecated Since v1.4.2 - Deprecated
15
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/domain.js)
15
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/domain.js)
16
16
  */
17
17
  declare module "domain" {
18
18
  import EventEmitter = require("node:events");
@@ -32,43 +32,10 @@
32
32
  * });
33
33
  * myEmitter.emit('event');
34
34
  * ```
35
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/events.js)
35
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/events.js)
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.
@@ -517,7 +484,7 @@ declare module "events" {
517
484
  * directly rather than as a child class.
518
485
  * @default new.target.name if instantiated as a child class.
519
486
  */
520
- name?: string;
487
+ name?: string | undefined;
521
488
  }
522
489
 
523
490
  /**
@@ -584,6 +551,85 @@ declare module "events" {
584
551
  */
585
552
  readonly asyncResource: EventEmitterReferencingAsyncResource;
586
553
  }
554
+ /**
555
+ * The `NodeEventTarget` is a Node.js-specific extension to `EventTarget`
556
+ * that emulates a subset of the `EventEmitter` API.
557
+ * @since v14.5.0
558
+ */
559
+ export interface NodeEventTarget extends EventTarget {
560
+ /**
561
+ * Node.js-specific extension to the `EventTarget` class that emulates the
562
+ * equivalent `EventEmitter` API. The only difference between `addListener()` and
563
+ * `addEventListener()` is that `addListener()` will return a reference to the
564
+ * `EventTarget`.
565
+ * @since v14.5.0
566
+ */
567
+ addListener(type: string, listener: (arg: any) => void): this;
568
+ /**
569
+ * Node.js-specific extension to the `EventTarget` class that dispatches the
570
+ * `arg` to the list of handlers for `type`.
571
+ * @since v15.2.0
572
+ * @returns `true` if event listeners registered for the `type` exist,
573
+ * otherwise `false`.
574
+ */
575
+ emit(type: string, arg: any): boolean;
576
+ /**
577
+ * Node.js-specific extension to the `EventTarget` class that returns an array
578
+ * of event `type` names for which event listeners are registered.
579
+ * @since 14.5.0
580
+ */
581
+ eventNames(): string[];
582
+ /**
583
+ * Node.js-specific extension to the `EventTarget` class that returns the number
584
+ * of event listeners registered for the `type`.
585
+ * @since v14.5.0
586
+ */
587
+ listenerCount(type: string): number;
588
+ /**
589
+ * Node.js-specific extension to the `EventTarget` class that sets the number
590
+ * of max event listeners as `n`.
591
+ * @since v14.5.0
592
+ */
593
+ setMaxListeners(n: number): void;
594
+ /**
595
+ * Node.js-specific extension to the `EventTarget` class that returns the number
596
+ * of max event listeners.
597
+ * @since v14.5.0
598
+ */
599
+ getMaxListeners(): number;
600
+ /**
601
+ * Node.js-specific alias for `eventTarget.removeEventListener()`.
602
+ * @since v14.5.0
603
+ */
604
+ off(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this;
605
+ /**
606
+ * Node.js-specific alias for `eventTarget.addEventListener()`.
607
+ * @since v14.5.0
608
+ */
609
+ on(type: string, listener: (arg: any) => void): this;
610
+ /**
611
+ * Node.js-specific extension to the `EventTarget` class that adds a `once`
612
+ * listener for the given event `type`. This is equivalent to calling `on`
613
+ * with the `once` option set to `true`.
614
+ * @since v14.5.0
615
+ */
616
+ once(type: string, listener: (arg: any) => void): this;
617
+ /**
618
+ * Node.js-specific extension to the `EventTarget` class. If `type` is specified,
619
+ * removes all registered listeners for `type`, otherwise removes all registered
620
+ * listeners.
621
+ * @since v14.5.0
622
+ */
623
+ removeAllListeners(type?: string): this;
624
+ /**
625
+ * Node.js-specific extension to the `EventTarget` class that removes the
626
+ * `listener` for the given `type`. The only difference between `removeListener()`
627
+ * and `removeEventListener()` is that `removeListener()` will return a reference
628
+ * to the `EventTarget`.
629
+ * @since v14.5.0
630
+ */
631
+ removeListener(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this;
632
+ }
587
633
  }
588
634
  global {
589
635
  namespace NodeJS {
@@ -9,6 +9,7 @@
9
9
  * @since v10.0.0
10
10
  */
11
11
  declare module "fs/promises" {
12
+ import { NonSharedBuffer } from "node:buffer";
12
13
  import { Abortable } from "node:events";
13
14
  import { Stream } from "node:stream";
14
15
  import { ReadableStream } from "node:stream/web";
@@ -20,6 +21,8 @@ declare module "fs/promises" {
20
21
  CopyOptions,
21
22
  Dir,
22
23
  Dirent,
24
+ DisposableTempDir,
25
+ EncodingOption,
23
26
  GlobOptions,
24
27
  GlobOptionsWithFileTypes,
25
28
  GlobOptionsWithoutFileTypes,
@@ -29,6 +32,8 @@ declare module "fs/promises" {
29
32
  OpenDirOptions,
30
33
  OpenMode,
31
34
  PathLike,
35
+ ReadOptions,
36
+ ReadOptionsWithBuffer,
32
37
  ReadPosition,
33
38
  ReadStream,
34
39
  ReadVResult,
@@ -57,6 +62,7 @@ declare module "fs/promises" {
57
62
  bytesRead: number;
58
63
  buffer: T;
59
64
  }
65
+ /** @deprecated This interface will be removed in a future version. Use `import { ReadOptionsWithBuffer } from "node:fs"` instead. */
60
66
  interface FileReadOptions<T extends NodeJS.ArrayBufferView = Buffer> {
61
67
  /**
62
68
  * @default `Buffer.alloc(0xffff)`
@@ -235,11 +241,13 @@ declare module "fs/promises" {
235
241
  length?: number | null,
236
242
  position?: ReadPosition | null,
237
243
  ): Promise<FileReadResult<T>>;
238
- read<T extends NodeJS.ArrayBufferView = Buffer>(
244
+ read<T extends NodeJS.ArrayBufferView>(
239
245
  buffer: T,
240
- options?: FileReadOptions<T>,
246
+ options?: ReadOptions,
247
+ ): Promise<FileReadResult<T>>;
248
+ read<T extends NodeJS.ArrayBufferView = NonSharedBuffer>(
249
+ options?: ReadOptionsWithBuffer<T>,
241
250
  ): Promise<FileReadResult<T>>;
242
- read<T extends NodeJS.ArrayBufferView = Buffer>(options?: FileReadOptions<T>): Promise<FileReadResult<T>>;
243
251
  /**
244
252
  * Returns a byte-oriented `ReadableStream` that may be used to read the file's
245
253
  * contents.
@@ -283,7 +291,7 @@ declare module "fs/promises" {
283
291
  options?:
284
292
  | ({ encoding?: null | undefined } & Abortable)
285
293
  | null,
286
- ): Promise<Buffer>;
294
+ ): Promise<NonSharedBuffer>;
287
295
  /**
288
296
  * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
289
297
  * The `FileHandle` must have been opened for reading.
@@ -302,7 +310,7 @@ declare module "fs/promises" {
302
310
  | (ObjectEncodingOptions & Abortable)
303
311
  | BufferEncoding
304
312
  | null,
305
- ): Promise<string | Buffer>;
313
+ ): Promise<string | NonSharedBuffer>;
306
314
  /**
307
315
  * Convenience method to create a `readline` interface and stream over the file.
308
316
  * See `filehandle.createReadStream()` for the options.
@@ -411,7 +419,7 @@ declare module "fs/promises" {
411
419
  * @param [position='null'] The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current
412
420
  * position. See the POSIX pwrite(2) documentation for more detail.
413
421
  */
414
- write<TBuffer extends Uint8Array>(
422
+ write<TBuffer extends NodeJS.ArrayBufferView>(
415
423
  buffer: TBuffer,
416
424
  offset?: number | null,
417
425
  length?: number | null,
@@ -450,14 +458,20 @@ declare module "fs/promises" {
450
458
  * @param [position='null'] The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current
451
459
  * position.
452
460
  */
453
- writev(buffers: readonly NodeJS.ArrayBufferView[], position?: number): Promise<WriteVResult>;
461
+ writev<TBuffers extends readonly NodeJS.ArrayBufferView[]>(
462
+ buffers: TBuffers,
463
+ position?: number,
464
+ ): Promise<WriteVResult<TBuffers>>;
454
465
  /**
455
466
  * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s
456
467
  * @since v13.13.0, v12.17.0
457
468
  * @param [position='null'] The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position.
458
469
  * @return Fulfills upon success an object containing two properties:
459
470
  */
460
- readv(buffers: readonly NodeJS.ArrayBufferView[], position?: number): Promise<ReadVResult>;
471
+ readv<TBuffers extends readonly NodeJS.ArrayBufferView[]>(
472
+ buffers: TBuffers,
473
+ position?: number,
474
+ ): Promise<ReadVResult<TBuffers>>;
461
475
  /**
462
476
  * Closes the file handle after waiting for any pending operation on the handle to
463
477
  * complete.
@@ -479,7 +493,7 @@ declare module "fs/promises" {
479
493
  /**
480
494
  * Calls `filehandle.close()` and returns a promise that fulfills when the
481
495
  * filehandle is closed.
482
- * @since v20.4.0
496
+ * @since v20.4.0, v18.8.0
483
497
  */
484
498
  [Symbol.asyncDispose](): Promise<void>;
485
499
  }
@@ -694,7 +708,7 @@ declare module "fs/promises" {
694
708
  recursive?: boolean | undefined;
695
709
  }
696
710
  | "buffer",
697
- ): Promise<Buffer[]>;
711
+ ): Promise<NonSharedBuffer[]>;
698
712
  /**
699
713
  * Asynchronous readdir(3) - read a directory.
700
714
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
@@ -709,7 +723,7 @@ declare module "fs/promises" {
709
723
  })
710
724
  | BufferEncoding
711
725
  | null,
712
- ): Promise<string[] | Buffer[]>;
726
+ ): Promise<string[] | NonSharedBuffer[]>;
713
727
  /**
714
728
  * Asynchronous readdir(3) - read a directory.
715
729
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
@@ -734,7 +748,7 @@ declare module "fs/promises" {
734
748
  withFileTypes: true;
735
749
  recursive?: boolean | undefined;
736
750
  },
737
- ): Promise<Dirent<Buffer>[]>;
751
+ ): Promise<Dirent<NonSharedBuffer>[]>;
738
752
  /**
739
753
  * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is
740
754
  * fulfilled with the`linkString` upon success.
@@ -752,13 +766,16 @@ declare module "fs/promises" {
752
766
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
753
767
  * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
754
768
  */
755
- function readlink(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
769
+ function readlink(path: PathLike, options: BufferEncodingOption): Promise<NonSharedBuffer>;
756
770
  /**
757
771
  * Asynchronous readlink(2) - read value of a symbolic link.
758
772
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
759
773
  * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
760
774
  */
761
- function readlink(path: PathLike, options?: ObjectEncodingOptions | string | null): Promise<string | Buffer>;
775
+ function readlink(
776
+ path: PathLike,
777
+ options?: ObjectEncodingOptions | string | null,
778
+ ): Promise<string | NonSharedBuffer>;
762
779
  /**
763
780
  * Creates a symbolic link.
764
781
  *
@@ -909,7 +926,7 @@ declare module "fs/promises" {
909
926
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
910
927
  * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
911
928
  */
912
- function realpath(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
929
+ function realpath(path: PathLike, options: BufferEncodingOption): Promise<NonSharedBuffer>;
913
930
  /**
914
931
  * Asynchronous realpath(3) - return the canonicalized absolute pathname.
915
932
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
@@ -918,7 +935,7 @@ declare module "fs/promises" {
918
935
  function realpath(
919
936
  path: PathLike,
920
937
  options?: ObjectEncodingOptions | BufferEncoding | null,
921
- ): Promise<string | Buffer>;
938
+ ): Promise<string | NonSharedBuffer>;
922
939
  /**
923
940
  * Creates a unique temporary directory. A unique directory name is generated by
924
941
  * appending six random characters to the end of the provided `prefix`. Due to
@@ -954,13 +971,36 @@ declare module "fs/promises" {
954
971
  * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
955
972
  * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
956
973
  */
957
- function mkdtemp(prefix: string, options: BufferEncodingOption): Promise<Buffer>;
974
+ function mkdtemp(prefix: string, options: BufferEncodingOption): Promise<NonSharedBuffer>;
958
975
  /**
959
976
  * Asynchronously creates a unique temporary directory.
960
977
  * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
961
978
  * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
962
979
  */
963
- function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
980
+ function mkdtemp(
981
+ prefix: string,
982
+ options?: ObjectEncodingOptions | BufferEncoding | null,
983
+ ): Promise<string | NonSharedBuffer>;
984
+ /**
985
+ * The resulting Promise holds an async-disposable object whose `path` property
986
+ * holds the created directory path. When the object is disposed, the directory
987
+ * and its contents will be removed asynchronously if it still exists. If the
988
+ * directory cannot be deleted, disposal will throw an error. The object has an
989
+ * async `remove()` method which will perform the same task.
990
+ *
991
+ * Both this function and the disposal function on the resulting object are
992
+ * async, so it should be used with `await` + `await using` as in
993
+ * `await using dir = await fsPromises.mkdtempDisposable('prefix')`.
994
+ *
995
+ * <!-- TODO: link MDN docs for disposables once https://github.com/mdn/content/pull/38027 lands -->
996
+ *
997
+ * For detailed information, see the documentation of `fsPromises.mkdtemp()`.
998
+ *
999
+ * The optional `options` argument can be a string specifying an encoding, or an
1000
+ * object with an `encoding` property specifying the character encoding to use.
1001
+ * @since v24.4.0
1002
+ */
1003
+ function mkdtempDisposable(prefix: PathLike, options?: EncodingOption): Promise<DisposableTempDir>;
964
1004
  /**
965
1005
  * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an
966
1006
  * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an
@@ -1116,7 +1156,7 @@ declare module "fs/promises" {
1116
1156
  flag?: OpenMode | undefined;
1117
1157
  } & Abortable)
1118
1158
  | null,
1119
- ): Promise<Buffer>;
1159
+ ): Promise<NonSharedBuffer>;
1120
1160
  /**
1121
1161
  * Asynchronously reads the entire contents of a file.
1122
1162
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
@@ -1152,7 +1192,7 @@ declare module "fs/promises" {
1152
1192
  )
1153
1193
  | BufferEncoding
1154
1194
  | null,
1155
- ): Promise<string | Buffer>;
1195
+ ): Promise<string | NonSharedBuffer>;
1156
1196
  /**
1157
1197
  * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail.
1158
1198
  *
@@ -1229,11 +1269,11 @@ declare module "fs/promises" {
1229
1269
  function watch(
1230
1270
  filename: PathLike,
1231
1271
  options: WatchOptionsWithBufferEncoding | "buffer",
1232
- ): NodeJS.AsyncIterator<FileChangeInfo<Buffer>>;
1272
+ ): NodeJS.AsyncIterator<FileChangeInfo<NonSharedBuffer>>;
1233
1273
  function watch(
1234
1274
  filename: PathLike,
1235
1275
  options: WatchOptions | BufferEncoding | "buffer",
1236
- ): NodeJS.AsyncIterator<FileChangeInfo<string | Buffer>>;
1276
+ ): NodeJS.AsyncIterator<FileChangeInfo<string | NonSharedBuffer>>;
1237
1277
  /**
1238
1278
  * Asynchronously copies the entire directory structure from `src` to `dest`,
1239
1279
  * including subdirectories and files.