@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
@@ -63,13 +63,14 @@
63
63
  * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
64
64
  * the synchronous methods can have significant impact on performance due to
65
65
  * stalling the event loop while spawned processes complete.
66
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/child_process.js)
66
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/child_process.js)
67
67
  */
68
68
  declare module "child_process" {
69
+ import { NonSharedBuffer } from "node:buffer";
69
70
  import { Abortable, EventEmitter } from "node:events";
70
71
  import * as dgram from "node:dgram";
71
72
  import * as net from "node:net";
72
- import { Pipe, Readable, Stream, Writable } from "node:stream";
73
+ import { Readable, Stream, Writable } from "node:stream";
73
74
  import { URL } from "node:url";
74
75
  type Serializable = string | object | number | boolean | bigint;
75
76
  type SendHandle = net.Socket | net.Server | dgram.Socket | undefined;
@@ -139,7 +140,7 @@ declare module "child_process" {
139
140
  * no IPC channel exists, this property is `undefined`.
140
141
  * @since v7.1.0
141
142
  */
142
- readonly channel?: Pipe | null | undefined;
143
+ readonly channel?: Control | null;
143
144
  /**
144
145
  * A sparse array of pipes to the child process, corresponding with positions in
145
146
  * the `stdio` option passed to {@link spawn} that have been set
@@ -457,7 +458,7 @@ declare module "child_process" {
457
458
  * as the connection may have been closed during the time it takes to send the
458
459
  * connection to the child.
459
460
  * @since v0.5.9
460
- * @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v22.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v22.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v22.x/api/dgram.html#class-dgramsocket) object.
461
+ * @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v24.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v24.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v24.x/api/dgram.html#class-dgramsocket) object.
461
462
  * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
462
463
  */
463
464
  send(message: Serializable, callback?: (error: Error | null) => void): boolean;
@@ -612,6 +613,10 @@ declare module "child_process" {
612
613
  Readable | Writable | null | undefined, // extra, no modification
613
614
  ];
614
615
  }
616
+ interface Control extends EventEmitter {
617
+ ref(): void;
618
+ unref(): void;
619
+ }
615
620
  interface MessageOptions {
616
621
  keepOpen?: boolean | undefined;
617
622
  }
@@ -894,11 +899,12 @@ declare module "child_process" {
894
899
  interface ExecOptionsWithBufferEncoding extends ExecOptions {
895
900
  encoding: "buffer" | null; // specify `null`.
896
901
  }
902
+ // TODO: Just Plain Wrong™ (see also nodejs/node#57392)
897
903
  interface ExecException extends Error {
898
- cmd?: string | undefined;
899
- killed?: boolean | undefined;
900
- code?: number | undefined;
901
- signal?: NodeJS.Signals | undefined;
904
+ cmd?: string;
905
+ killed?: boolean;
906
+ code?: number;
907
+ signal?: NodeJS.Signals;
902
908
  stdout?: string;
903
909
  stderr?: string;
904
910
  }
@@ -996,7 +1002,7 @@ declare module "child_process" {
996
1002
  function exec(
997
1003
  command: string,
998
1004
  options: ExecOptionsWithBufferEncoding,
999
- callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void,
1005
+ callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
1000
1006
  ): ChildProcess;
1001
1007
  // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`.
1002
1008
  function exec(
@@ -1008,7 +1014,11 @@ declare module "child_process" {
1008
1014
  function exec(
1009
1015
  command: string,
1010
1016
  options: ExecOptions | undefined | null,
1011
- callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
1017
+ callback?: (
1018
+ error: ExecException | null,
1019
+ stdout: string | NonSharedBuffer,
1020
+ stderr: string | NonSharedBuffer,
1021
+ ) => void,
1012
1022
  ): ChildProcess;
1013
1023
  interface PromiseWithChild<T> extends Promise<T> {
1014
1024
  child: ChildProcess;
@@ -1022,8 +1032,8 @@ declare module "child_process" {
1022
1032
  command: string,
1023
1033
  options: ExecOptionsWithBufferEncoding,
1024
1034
  ): PromiseWithChild<{
1025
- stdout: Buffer;
1026
- stderr: Buffer;
1035
+ stdout: NonSharedBuffer;
1036
+ stderr: NonSharedBuffer;
1027
1037
  }>;
1028
1038
  function __promisify__(
1029
1039
  command: string,
@@ -1036,8 +1046,8 @@ declare module "child_process" {
1036
1046
  command: string,
1037
1047
  options: ExecOptions | undefined | null,
1038
1048
  ): PromiseWithChild<{
1039
- stdout: string | Buffer;
1040
- stderr: string | Buffer;
1049
+ stdout: string | NonSharedBuffer;
1050
+ stderr: string | NonSharedBuffer;
1041
1051
  }>;
1042
1052
  }
1043
1053
  interface ExecFileOptions extends CommonOptions, Abortable {
@@ -1056,10 +1066,11 @@ declare module "child_process" {
1056
1066
  }
1057
1067
  /** @deprecated Use `ExecFileOptions` instead. */
1058
1068
  interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {}
1069
+ // TODO: execFile exceptions can take many forms... this accurately describes none of them
1059
1070
  type ExecFileException =
1060
1071
  & Omit<ExecException, "code">
1061
1072
  & Omit<NodeJS.ErrnoException, "code">
1062
- & { code?: string | number | undefined | null };
1073
+ & { code?: string | number | null };
1063
1074
  /**
1064
1075
  * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified
1065
1076
  * executable `file` is spawned directly as a new process making it slightly more
@@ -1138,13 +1149,13 @@ declare module "child_process" {
1138
1149
  function execFile(
1139
1150
  file: string,
1140
1151
  options: ExecFileOptionsWithBufferEncoding,
1141
- callback?: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void,
1152
+ callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
1142
1153
  ): ChildProcess;
1143
1154
  function execFile(
1144
1155
  file: string,
1145
1156
  args: readonly string[] | undefined | null,
1146
1157
  options: ExecFileOptionsWithBufferEncoding,
1147
- callback?: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void,
1158
+ callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
1148
1159
  ): ChildProcess;
1149
1160
  // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`.
1150
1161
  function execFile(
@@ -1163,7 +1174,11 @@ declare module "child_process" {
1163
1174
  file: string,
1164
1175
  options: ExecFileOptions | undefined | null,
1165
1176
  callback:
1166
- | ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void)
1177
+ | ((
1178
+ error: ExecFileException | null,
1179
+ stdout: string | NonSharedBuffer,
1180
+ stderr: string | NonSharedBuffer,
1181
+ ) => void)
1167
1182
  | undefined
1168
1183
  | null,
1169
1184
  ): ChildProcess;
@@ -1172,7 +1187,11 @@ declare module "child_process" {
1172
1187
  args: readonly string[] | undefined | null,
1173
1188
  options: ExecFileOptions | undefined | null,
1174
1189
  callback:
1175
- | ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void)
1190
+ | ((
1191
+ error: ExecFileException | null,
1192
+ stdout: string | NonSharedBuffer,
1193
+ stderr: string | NonSharedBuffer,
1194
+ ) => void)
1176
1195
  | undefined
1177
1196
  | null,
1178
1197
  ): ChildProcess;
@@ -1192,16 +1211,16 @@ declare module "child_process" {
1192
1211
  file: string,
1193
1212
  options: ExecFileOptionsWithBufferEncoding,
1194
1213
  ): PromiseWithChild<{
1195
- stdout: Buffer;
1196
- stderr: Buffer;
1214
+ stdout: NonSharedBuffer;
1215
+ stderr: NonSharedBuffer;
1197
1216
  }>;
1198
1217
  function __promisify__(
1199
1218
  file: string,
1200
1219
  args: readonly string[] | undefined | null,
1201
1220
  options: ExecFileOptionsWithBufferEncoding,
1202
1221
  ): PromiseWithChild<{
1203
- stdout: Buffer;
1204
- stderr: Buffer;
1222
+ stdout: NonSharedBuffer;
1223
+ stderr: NonSharedBuffer;
1205
1224
  }>;
1206
1225
  function __promisify__(
1207
1226
  file: string,
@@ -1222,16 +1241,16 @@ declare module "child_process" {
1222
1241
  file: string,
1223
1242
  options: ExecFileOptions | undefined | null,
1224
1243
  ): PromiseWithChild<{
1225
- stdout: string | Buffer;
1226
- stderr: string | Buffer;
1244
+ stdout: string | NonSharedBuffer;
1245
+ stderr: string | NonSharedBuffer;
1227
1246
  }>;
1228
1247
  function __promisify__(
1229
1248
  file: string,
1230
1249
  args: readonly string[] | undefined | null,
1231
1250
  options: ExecFileOptions | undefined | null,
1232
1251
  ): PromiseWithChild<{
1233
- stdout: string | Buffer;
1234
- stderr: string | Buffer;
1252
+ stdout: string | NonSharedBuffer;
1253
+ stderr: string | NonSharedBuffer;
1235
1254
  }>;
1236
1255
  }
1237
1256
  interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable {
@@ -1320,7 +1339,7 @@ declare module "child_process" {
1320
1339
  stderr: T;
1321
1340
  status: number | null;
1322
1341
  signal: NodeJS.Signals | null;
1323
- error?: Error | undefined;
1342
+ error?: Error;
1324
1343
  }
1325
1344
  /**
1326
1345
  * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return
@@ -1337,11 +1356,11 @@ declare module "child_process" {
1337
1356
  * @param command The command to run.
1338
1357
  * @param args List of string arguments.
1339
1358
  */
1340
- function spawnSync(command: string): SpawnSyncReturns<Buffer>;
1359
+ function spawnSync(command: string): SpawnSyncReturns<NonSharedBuffer>;
1341
1360
  function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
1342
- function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
1343
- function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
1344
- function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns<Buffer>;
1361
+ function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<NonSharedBuffer>;
1362
+ function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string | NonSharedBuffer>;
1363
+ function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns<NonSharedBuffer>;
1345
1364
  function spawnSync(
1346
1365
  command: string,
1347
1366
  args: readonly string[],
@@ -1351,12 +1370,12 @@ declare module "child_process" {
1351
1370
  command: string,
1352
1371
  args: readonly string[],
1353
1372
  options: SpawnSyncOptionsWithBufferEncoding,
1354
- ): SpawnSyncReturns<Buffer>;
1373
+ ): SpawnSyncReturns<NonSharedBuffer>;
1355
1374
  function spawnSync(
1356
1375
  command: string,
1357
1376
  args?: readonly string[],
1358
1377
  options?: SpawnSyncOptions,
1359
- ): SpawnSyncReturns<string | Buffer>;
1378
+ ): SpawnSyncReturns<string | NonSharedBuffer>;
1360
1379
  interface CommonExecOptions extends CommonOptions {
1361
1380
  input?: string | NodeJS.ArrayBufferView | undefined;
1362
1381
  /**
@@ -1398,10 +1417,10 @@ declare module "child_process" {
1398
1417
  * @param command The command to run.
1399
1418
  * @return The stdout from the command.
1400
1419
  */
1401
- function execSync(command: string): Buffer;
1420
+ function execSync(command: string): NonSharedBuffer;
1402
1421
  function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string;
1403
- function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): Buffer;
1404
- function execSync(command: string, options?: ExecSyncOptions): string | Buffer;
1422
+ function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): NonSharedBuffer;
1423
+ function execSync(command: string, options?: ExecSyncOptions): string | NonSharedBuffer;
1405
1424
  interface ExecFileSyncOptions extends CommonExecOptions {
1406
1425
  shell?: boolean | string | undefined;
1407
1426
  }
@@ -1409,7 +1428,7 @@ declare module "child_process" {
1409
1428
  encoding: BufferEncoding;
1410
1429
  }
1411
1430
  interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
1412
- encoding?: "buffer" | null; // specify `null`.
1431
+ encoding?: "buffer" | null | undefined; // specify `null`.
1413
1432
  }
1414
1433
  /**
1415
1434
  * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not
@@ -1431,11 +1450,11 @@ declare module "child_process" {
1431
1450
  * @param args List of string arguments.
1432
1451
  * @return The stdout from the command.
1433
1452
  */
1434
- function execFileSync(file: string): Buffer;
1453
+ function execFileSync(file: string): NonSharedBuffer;
1435
1454
  function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string;
1436
- function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
1437
- function execFileSync(file: string, options?: ExecFileSyncOptions): string | Buffer;
1438
- function execFileSync(file: string, args: readonly string[]): Buffer;
1455
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): NonSharedBuffer;
1456
+ function execFileSync(file: string, options?: ExecFileSyncOptions): string | NonSharedBuffer;
1457
+ function execFileSync(file: string, args: readonly string[]): NonSharedBuffer;
1439
1458
  function execFileSync(
1440
1459
  file: string,
1441
1460
  args: readonly string[],
@@ -1445,8 +1464,12 @@ declare module "child_process" {
1445
1464
  file: string,
1446
1465
  args: readonly string[],
1447
1466
  options: ExecFileSyncOptionsWithBufferEncoding,
1448
- ): Buffer;
1449
- function execFileSync(file: string, args?: readonly string[], options?: ExecFileSyncOptions): string | Buffer;
1467
+ ): NonSharedBuffer;
1468
+ function execFileSync(
1469
+ file: string,
1470
+ args?: readonly string[],
1471
+ options?: ExecFileSyncOptions,
1472
+ ): string | NonSharedBuffer;
1450
1473
  }
1451
1474
  declare module "node:child_process" {
1452
1475
  export * from "child_process";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Clusters of Node.js processes can be used to run multiple instances of Node.js
3
3
  * that can distribute workloads among their application threads. When process isolation
4
- * is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html)
4
+ * is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html)
5
5
  * module instead, which allows running multiple application threads within a single Node.js instance.
6
6
  *
7
7
  * The cluster module allows easy creation of child processes that all share
@@ -50,7 +50,7 @@
50
50
  * ```
51
51
  *
52
52
  * On Windows, it is not yet possible to set up a named pipe server in a worker.
53
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/cluster.js)
53
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/cluster.js)
54
54
  */
55
55
  declare module "cluster" {
56
56
  import * as child from "node:child_process";
@@ -72,7 +72,7 @@ declare module "cluster" {
72
72
  * String arguments passed to worker.
73
73
  * @default process.argv.slice(2)
74
74
  */
75
- args?: string[] | undefined;
75
+ args?: readonly string[] | undefined;
76
76
  /**
77
77
  * Whether or not to send output to parent's stdio.
78
78
  * @default false
@@ -80,8 +80,8 @@ declare module "cluster" {
80
80
  silent?: boolean | undefined;
81
81
  /**
82
82
  * Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must
83
- * contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#child_processspawncommand-args-options)'s
84
- * [`stdio`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#optionsstdio).
83
+ * contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processspawncommand-args-options)'s
84
+ * [`stdio`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#optionsstdio).
85
85
  */
86
86
  stdio?: any[] | undefined;
87
87
  /**
@@ -99,7 +99,7 @@ declare module "cluster" {
99
99
  inspectPort?: number | (() => number) | undefined;
100
100
  /**
101
101
  * Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`.
102
- * See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#advanced-serialization) for more details.
102
+ * See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#advanced-serialization) for more details.
103
103
  * @default false
104
104
  */
105
105
  serialization?: SerializationType | undefined;
@@ -142,10 +142,10 @@ declare module "cluster" {
142
142
  */
143
143
  id: number;
144
144
  /**
145
- * All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object
145
+ * All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object
146
146
  * from this function is stored as `.process`. In a worker, the global `process` is stored.
147
147
  *
148
- * See: [Child Process module](https://nodejs.org/docs/latest-v22.x/api/child_process.html#child_processforkmodulepath-args-options).
148
+ * See: [Child Process module](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processforkmodulepath-args-options).
149
149
  *
150
150
  * Workers will call `process.exit(0)` if the `'disconnect'` event occurs
151
151
  * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
@@ -156,7 +156,7 @@ declare module "cluster" {
156
156
  /**
157
157
  * Send a message to a worker or primary, optionally with a handle.
158
158
  *
159
- * In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback).
159
+ * In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback).
160
160
  *
161
161
  * In a worker, this sends a message to the primary. It is identical to `process.send()`.
162
162
  *
@@ -198,7 +198,7 @@ declare module "cluster" {
198
198
  * This method is aliased as `worker.destroy()` for backwards compatibility.
199
199
  *
200
200
  * In a worker, `process.kill()` exists, but it is not this function;
201
- * it is [`kill()`](https://nodejs.org/docs/latest-v22.x/api/process.html#processkillpid-signal).
201
+ * it is [`kill()`](https://nodejs.org/docs/latest-v24.x/api/process.html#processkillpid-signal).
202
202
  * @since v0.9.12
203
203
  * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process.
204
204
  */
@@ -412,7 +412,7 @@ declare module "cluster" {
412
412
  readonly isWorker: boolean;
413
413
  /**
414
414
  * The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a
415
- * global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clustersetupprimarysettings)
415
+ * global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clustersetupprimarysettings)
416
416
  * is called, whichever comes first.
417
417
  *
418
418
  * `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute
@@ -423,24 +423,24 @@ declare module "cluster" {
423
423
  */
424
424
  schedulingPolicy: number;
425
425
  /**
426
- * After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clustersetupprimarysettings)
427
- * (or [`.fork()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clusterforkenv)) this settings object will contain
426
+ * After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clustersetupprimarysettings)
427
+ * (or [`.fork()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clusterforkenv)) this settings object will contain
428
428
  * the settings, including the default values.
429
429
  *
430
430
  * This object is not intended to be changed or set manually.
431
431
  * @since v0.7.1
432
432
  */
433
433
  readonly settings: ClusterSettings;
434
- /** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clustersetupprimarysettings) instead. */
434
+ /** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clustersetupprimarysettings) instead. */
435
435
  setupMaster(settings?: ClusterSettings): void;
436
436
  /**
437
437
  * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`.
438
438
  *
439
- * Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clusterforkenv)
439
+ * Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clusterforkenv)
440
440
  * and have no effect on workers that are already running.
441
441
  *
442
442
  * The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to
443
- * [`.fork()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clusterforkenv).
443
+ * [`.fork()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clusterforkenv).
444
444
  *
445
445
  * The defaults above apply to the first call only; the defaults for later calls are the current values at the time of
446
446
  * `cluster.setupPrimary()` is called.
@@ -481,7 +481,7 @@ declare module "cluster" {
481
481
  * ```
482
482
  * @since v0.7.0
483
483
  */
484
- readonly worker?: Worker | undefined;
484
+ readonly worker?: Worker;
485
485
  /**
486
486
  * A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process.
487
487
  *
@@ -497,7 +497,7 @@ declare module "cluster" {
497
497
  * ```
498
498
  * @since v0.7.0
499
499
  */
500
- readonly workers?: NodeJS.Dict<Worker> | undefined;
500
+ readonly workers?: NodeJS.Dict<Worker>;
501
501
  readonly SCHED_NONE: number;
502
502
  readonly SCHED_RR: number;
503
503
  /**
@@ -550,10 +550,9 @@ declare module "cluster" {
550
550
  prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
551
551
  prependListener(event: "fork", listener: (worker: Worker) => void): this;
552
552
  prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
553
- // the handle is a net.Socket or net.Server object, or undefined.
554
553
  prependListener(
555
554
  event: "message",
556
- listener: (worker: Worker, message: any, handle?: net.Socket | net.Server) => void,
555
+ listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
557
556
  ): this;
558
557
  prependListener(event: "online", listener: (worker: Worker) => void): this;
559
558
  prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
@@ -3,6 +3,7 @@
3
3
  // are expected (eg. DOM-compatible APIs) if lib.esnext.iterator is loaded.
4
4
  // Also ensures that iterators returned by the Node API, which inherit from Iterator.prototype, correctly expose the iterator helper methods
5
5
  // if lib.esnext.iterator is loaded.
6
+ // TODO: remove once this package no longer supports TS 5.5, and replace NodeJS.BuiltinIteratorReturn with BuiltinIteratorReturn.
6
7
 
7
8
  // Placeholders for TS <5.6
8
9
  interface IteratorObject<T, TReturn, TNext> {}
@@ -5,12 +5,12 @@
5
5
  * The module exports two specific components:
6
6
  *
7
7
  * * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream.
8
- * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstdout) and
9
- * [`process.stderr`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
8
+ * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and
9
+ * [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
10
10
  *
11
11
  * _**Warning**_: The global console object's methods are neither consistently
12
12
  * synchronous like the browser APIs they resemble, nor are they consistently
13
- * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v22.x/api/process.html#a-note-on-process-io) for
13
+ * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for
14
14
  * more information.
15
15
  *
16
16
  * Example using the global `console`:
@@ -54,7 +54,7 @@
54
54
  * myConsole.warn(`Danger ${name}! Danger!`);
55
55
  * // Prints: Danger Will Robinson! Danger!, to err
56
56
  * ```
57
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/console.js)
57
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
58
58
  */
59
59
  declare module "console" {
60
60
  import console = require("node:console");
@@ -70,7 +70,7 @@ declare module "node:console" {
70
70
  * `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only
71
71
  * writes a message and does not otherwise affect execution. The output always
72
72
  * starts with `"Assertion failed"`. If provided, `message` is formatted using
73
- * [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args).
73
+ * [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args).
74
74
  *
75
75
  * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens.
76
76
  *
@@ -152,7 +152,7 @@ declare module "node:console" {
152
152
  */
153
153
  debug(message?: any, ...optionalParams: any[]): void;
154
154
  /**
155
- * Uses [`util.inspect()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilinspectobject-options) on `obj` and prints the resulting string to `stdout`.
155
+ * Uses [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options) on `obj` and prints the resulting string to `stdout`.
156
156
  * This function bypasses any custom `inspect()` function defined on `obj`.
157
157
  * @since v0.1.101
158
158
  */
@@ -167,7 +167,7 @@ declare module "node:console" {
167
167
  * Prints to `stderr` with newline. Multiple arguments can be passed, with the
168
168
  * first used as the primary message and all additional used as substitution
169
169
  * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
170
- * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args)).
170
+ * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)).
171
171
  *
172
172
  * ```js
173
173
  * const code = 5;
@@ -178,8 +178,8 @@ declare module "node:console" {
178
178
  * ```
179
179
  *
180
180
  * If formatting elements (e.g. `%d`) are not found in the first string then
181
- * [`util.inspect()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilinspectobject-options) is called on each argument and the
182
- * resulting string values are concatenated. See [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args)
181
+ * [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options) is called on each argument and the
182
+ * resulting string values are concatenated. See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)
183
183
  * for more information.
184
184
  * @since v0.1.100
185
185
  */
@@ -211,7 +211,7 @@ declare module "node:console" {
211
211
  * Prints to `stdout` with newline. Multiple arguments can be passed, with the
212
212
  * first used as the primary message and all additional used as substitution
213
213
  * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
214
- * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args)).
214
+ * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)).
215
215
  *
216
216
  * ```js
217
217
  * const count = 5;
@@ -221,7 +221,7 @@ declare module "node:console" {
221
221
  * // Prints: count: 5, to stdout
222
222
  * ```
223
223
  *
224
- * See [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args) for more information.
224
+ * See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
225
225
  * @since v0.1.100
226
226
  */
227
227
  log(message?: any, ...optionalParams: any[]): void;
@@ -297,7 +297,7 @@ declare module "node:console" {
297
297
  */
298
298
  timeLog(label?: string, ...data: any[]): void;
299
299
  /**
300
- * Prints to `stderr` the string `'Trace: '`, followed by the [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args)
300
+ * Prints to `stderr` the string `'Trace: '`, followed by the [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)
301
301
  * formatted message and stack trace to the current position in the code.
302
302
  *
303
303
  * ```js
@@ -361,12 +361,12 @@ declare module "node:console" {
361
361
  * The module exports two specific components:
362
362
  *
363
363
  * * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream.
364
- * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstdout) and
365
- * [`process.stderr`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
364
+ * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and
365
+ * [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
366
366
  *
367
367
  * _**Warning**_: The global console object's methods are neither consistently
368
368
  * synchronous like the browser APIs they resemble, nor are they consistently
369
- * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v22.x/api/process.html#a-note-on-process-io) for
369
+ * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for
370
370
  * more information.
371
371
  *
372
372
  * Example using the global `console`:
@@ -410,7 +410,7 @@ declare module "node:console" {
410
410
  * myConsole.warn(`Danger ${name}! Danger!`);
411
411
  * // Prints: Danger Will Robinson! Danger!, to err
412
412
  * ```
413
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/console.js)
413
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
414
414
  */
415
415
  namespace console {
416
416
  interface ConsoleConstructorOptions {
@@ -431,9 +431,10 @@ declare module "node:console" {
431
431
  colorMode?: boolean | "auto" | undefined;
432
432
  /**
433
433
  * Specifies options that are passed along to
434
- * [`util.inspect()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilinspectobject-options).
434
+ * `util.inspect()`. Can be an options object or, if different options
435
+ * for stdout and stderr are desired, a `Map` from stream objects to options.
435
436
  */
436
- inspectOptions?: InspectOptions | undefined;
437
+ inspectOptions?: InspectOptions | ReadonlyMap<NodeJS.WritableStream, InspectOptions> | undefined;
437
438
  /**
438
439
  * Set group indentation.
439
440
  * @default 2