@runlith/tagma 0.0.0-stage → 0.1.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 (342) hide show
  1. package/adapter/claudeHooks.d.ts +10 -0
  2. package/adapter/claudeHooks.js +4 -0
  3. package/adapter/declaration.d.ts +14 -0
  4. package/adapter/declaration.js +2 -0
  5. package/adapter/harness.d.ts +454 -0
  6. package/adapter/harness.js +2 -0
  7. package/adapter/hook.d.ts +43 -0
  8. package/adapter/hook.js +2 -0
  9. package/adapter/hostModules.d.ts +19 -0
  10. package/adapter/hostModules.js +2 -0
  11. package/adapter/loader.d.ts +10 -0
  12. package/adapter/loader.js +2 -0
  13. package/adapter/metadata.d.ts +179 -0
  14. package/adapter/metadata.js +4 -0
  15. package/adapter/payload.d.ts +19 -0
  16. package/adapter/payload.js +3 -0
  17. package/adapter/provider.d.ts +209 -0
  18. package/adapter/provider.js +2 -0
  19. package/adapter/settings.d.ts +182 -0
  20. package/adapter/settings.js +2 -0
  21. package/adapter/speech.d.ts +4 -0
  22. package/adapter/speech.js +2 -0
  23. package/host.d.ts +61223 -0
  24. package/package.json +129 -3
  25. package/plugin/Held-6krt6ncs.js +6 -0
  26. package/plugin/accountKey-tdjj67f5.js +2 -0
  27. package/plugin/adapter-qdnpxs6n.js +1 -0
  28. package/plugin/anthropic-a4pdzrv2.js +2 -0
  29. package/plugin/anthropic-messages-7gtja121.js +2 -0
  30. package/plugin/anthropic-z9xqmm3q.js +2 -0
  31. package/plugin/auth-0w6kk39v.js +2 -0
  32. package/plugin/authStatus-a1g3eb9p.js +2 -0
  33. package/plugin/bundling.d.ts +30 -0
  34. package/plugin/bundling.js +2 -0
  35. package/plugin/cacheLifetime-c5mpw676.js +2 -0
  36. package/plugin/callback-server-0wrzmjfx.js +16 -0
  37. package/plugin/capabilities-n3vfpy41.js +2 -0
  38. package/plugin/claudeHooks-edpg1e46.js +3 -0
  39. package/plugin/cli.js +21 -0
  40. package/plugin/cliStore-9rhjxtht.js +2 -0
  41. package/plugin/clientSession-tmmxm39z.js +2 -0
  42. package/plugin/codec-aa8mxqyr.js +1 -0
  43. package/plugin/connect-vrdsw05j.js +2 -0
  44. package/plugin/contract-qn0z7r9c.js +1 -0
  45. package/plugin/credential-5sgapkh0.js +2 -0
  46. package/plugin/deepseek-fvdrmjr9.js +2 -0
  47. package/plugin/deepseek-v388d1wv.js +2 -0
  48. package/plugin/definition-s3xx207f.js +2 -0
  49. package/plugin/description-8xhxryaq.js +2 -0
  50. package/plugin/deviceGrant-vgbscpr4.js +2 -0
  51. package/plugin/devin-hy98d305.js +2 -0
  52. package/plugin/duplex-kpmftvf7.js +2 -0
  53. package/plugin/endpoint-kvf97tz7.js +2 -0
  54. package/plugin/errors-5t42p4q1.js +2 -0
  55. package/plugin/events-e8vv9hda.js +2 -0
  56. package/plugin/events-s95ybm4g.js +2 -0
  57. package/plugin/executor-q8kp5q8h.js +2 -0
  58. package/plugin/failure-vr32debc.js +2 -0
  59. package/plugin/framing-nktw5sts.js +2 -0
  60. package/plugin/grant-67b10nhx.js +2 -0
  61. package/plugin/harness-nrh78w4d.js +2 -0
  62. package/plugin/headers-ss3dzznj.js +2 -0
  63. package/plugin/hook-hjrk83m8.js +2 -0
  64. package/plugin/icon-044pa3y8.js +6 -0
  65. package/plugin/icon-j22svmgp.js +4 -0
  66. package/plugin/icon-ny6qbjvc.js +4 -0
  67. package/plugin/icon-pz54e8n3.js +4 -0
  68. package/plugin/icon-qy92jx2b.js +4 -0
  69. package/plugin/ids-n269hc5k.js +2 -0
  70. package/plugin/images-q80x3bt1.js +2 -0
  71. package/plugin/index-cyd7v366.js +2 -0
  72. package/plugin/index-jpmjpmkn.js +2 -0
  73. package/plugin/lifecycle-qf4fh5m8.js +2 -0
  74. package/plugin/manual-2mdscj84.js +2 -0
  75. package/plugin/messages-1szh3p3k.js +2 -0
  76. package/plugin/metadata-zm1v3ptf.js +4 -0
  77. package/plugin/muse-r16jp51z.js +2 -0
  78. package/plugin/muse-tfe6sph7.js +2 -0
  79. package/plugin/museToolSchema-tbe0f3wa.js +2 -0
  80. package/plugin/notes-6amdhm6h.js +2 -0
  81. package/plugin/object-9pjtdam7.js +2 -0
  82. package/plugin/open-browser-vqb7ckt1.js +2 -0
  83. package/plugin/openai-0z6fy497.js +2 -0
  84. package/plugin/openai-37dne8v0.js +2 -0
  85. package/plugin/openai-compatible-chat-tq9w69h4.js +2 -0
  86. package/plugin/openai-images-x1sj79qh.js +2 -0
  87. package/plugin/openai-responses-dka6k753.js +2 -0
  88. package/plugin/opencodeGo-173fz5c5.js +3 -0
  89. package/plugin/opencodeGo-qgw3pfg6.js +2 -0
  90. package/plugin/options-pxwjpfdk.js +2 -0
  91. package/plugin/payload-2gr4q9g8.js +2 -0
  92. package/plugin/pkce-nrpept7w.js +2 -0
  93. package/plugin/plugin-1n46me5n.js +6 -0
  94. package/plugin/plugin-1vpp5mqk.js +4 -0
  95. package/plugin/plugin-1x94cj6e.js +3 -0
  96. package/plugin/plugin-1xze8f5y.js +3 -0
  97. package/plugin/plugin-285exjxd.js +3 -0
  98. package/plugin/plugin-3b8x73y6.js +3 -0
  99. package/plugin/plugin-3pfrkxg1.js +3 -0
  100. package/plugin/plugin-3whwpedj.js +3 -0
  101. package/plugin/plugin-521srf94.js +3 -0
  102. package/plugin/plugin-55fbx586.js +3 -0
  103. package/plugin/plugin-5zq084fb.js +3 -0
  104. package/plugin/plugin-60bdzk1r.js +4 -0
  105. package/plugin/plugin-6a56xsx3.js +3 -0
  106. package/plugin/plugin-6xpcmvm3.js +36 -0
  107. package/plugin/plugin-72xxqm1t.js +3 -0
  108. package/plugin/plugin-7y7ndrk9.js +3 -0
  109. package/plugin/plugin-80gqwmjy.js +3 -0
  110. package/plugin/plugin-8230g28p.js +3 -0
  111. package/plugin/plugin-8jf7f360.js +3 -0
  112. package/plugin/plugin-92redty0.js +3 -0
  113. package/plugin/plugin-9gha9fx3.js +3 -0
  114. package/plugin/plugin-a4ng6krf.js +3 -0
  115. package/plugin/plugin-ak62rhwz.js +3 -0
  116. package/plugin/plugin-ay29ch70.js +3 -0
  117. package/plugin/plugin-ba1sv0th.js +3 -0
  118. package/plugin/plugin-ca4vf4j5.js +3 -0
  119. package/plugin/plugin-cydz2zhy.js +3 -0
  120. package/plugin/plugin-d6hbav22.js +3 -0
  121. package/plugin/plugin-e2y95zm5.js +3 -0
  122. package/plugin/plugin-ff38dxy1.js +3 -0
  123. package/plugin/plugin-ff9hx5a4.js +3 -0
  124. package/plugin/plugin-fhc5q7r3.js +3 -0
  125. package/plugin/plugin-frrvs5yc.js +3 -0
  126. package/plugin/plugin-g65b14k1.js +3 -0
  127. package/plugin/plugin-gh857xdd.js +3 -0
  128. package/plugin/plugin-gkgs7vfv.js +3 -0
  129. package/plugin/plugin-h66k1zhn.js +14 -0
  130. package/plugin/plugin-je5cfnqn.js +3 -0
  131. package/plugin/plugin-jjm52353.js +3 -0
  132. package/plugin/plugin-jxvmq18y.js +3 -0
  133. package/plugin/plugin-kc4z9msd.js +3 -0
  134. package/plugin/plugin-kjtzm2q6.js +3 -0
  135. package/plugin/plugin-krbbb4ts.js +3 -0
  136. package/plugin/plugin-me00x60n.js +3 -0
  137. package/plugin/plugin-mqr325kz.js +3 -0
  138. package/plugin/plugin-njh1f7b2.js +5 -0
  139. package/plugin/plugin-nkb5bb2q.js +3 -0
  140. package/plugin/plugin-nqmb78ez.js +4 -0
  141. package/plugin/plugin-nzacjxf9.js +3 -0
  142. package/plugin/plugin-p59gy5xd.js +3 -0
  143. package/plugin/plugin-pfj9nc2e.js +3 -0
  144. package/plugin/plugin-pkxw1pfs.js +3 -0
  145. package/plugin/plugin-q1n5kwx0.js +3 -0
  146. package/plugin/plugin-q1sqj2tc.js +3 -0
  147. package/plugin/plugin-q7rk75bs.js +3 -0
  148. package/plugin/plugin-qpda63gv.js +3 -0
  149. package/plugin/plugin-rrgyjesv.js +3 -0
  150. package/plugin/plugin-sfdxgkds.js +3 -0
  151. package/plugin/plugin-v7k9fx92.js +3 -0
  152. package/plugin/plugin-vfjhxng8.js +3 -0
  153. package/plugin/plugin-vv72e4ah.js +3 -0
  154. package/plugin/plugin-w8f977my.js +3 -0
  155. package/plugin/plugin-xbnw80pk.js +3 -0
  156. package/plugin/plugin-yxgg03s0.js +5 -0
  157. package/plugin/plugin-z6hkd9rw.js +3 -0
  158. package/plugin/plugin-zew2m18x.js +3 -0
  159. package/plugin/plugin-zphe2a5v.js +9 -0
  160. package/plugin/plugin-zvyk8bnr.js +3 -0
  161. package/plugin/plugin-zw3ywa4b.js +3 -0
  162. package/plugin/plugin-zxe49p72.js +3 -0
  163. package/plugin/plugin-zz7yc97m.js +3 -0
  164. package/plugin/plugin.d.ts +175 -0
  165. package/plugin/plugin.js +2 -0
  166. package/plugin/points.generated.d.ts +341 -0
  167. package/plugin/points.generated.js +2 -0
  168. package/plugin/process.d.ts +4 -0
  169. package/plugin/process.js +85 -0
  170. package/plugin/protocol-hwnfh4h1.js +2 -0
  171. package/plugin/protocol.d.ts +115 -0
  172. package/plugin/protocol.js +2 -0
  173. package/plugin/provider-0b7xxyhn.js +2 -0
  174. package/plugin/quota-vrrmfag6.js +2 -0
  175. package/plugin/quotaRead-vj6e90xc.js +2 -0
  176. package/plugin/reasoning-5nanktp2.js +2 -0
  177. package/plugin/record-1m3vvy60.js +2 -0
  178. package/plugin/requests-2zyr1g8e.js +1 -0
  179. package/plugin/responseFold-w4526gvb.js +2 -0
  180. package/plugin/settings-vdypzert.js +2 -0
  181. package/plugin/shared-a2yyy8ry.js +2 -0
  182. package/plugin/speech-067caz1a.js +2 -0
  183. package/plugin/stepfun-3en5g41d.js +2 -0
  184. package/plugin/stepfun-bwsz4nrd.js +2 -0
  185. package/plugin/stream-bt8etfpc.js +2 -0
  186. package/plugin/svelteProgram-73v9yajk.js +2 -0
  187. package/plugin/synthesisDuplex-m2j6pmyv.js +2 -0
  188. package/plugin/template.d.ts +14 -0
  189. package/plugin/template.js +2 -0
  190. package/plugin/testing.d.ts +85 -0
  191. package/plugin/testing.js +4 -0
  192. package/plugin/tool-content-b9jtprr7.js +2 -0
  193. package/plugin/tool-stream-gdajdxn0.js +2 -0
  194. package/plugin/transport-7hfp9sn4.js +2 -0
  195. package/plugin/ui.generated.d.ts +1044 -0
  196. package/plugin/value.d.ts +8 -0
  197. package/plugin/value.js +2 -0
  198. package/plugin/vendor-pn6b5a8f.js +2 -0
  199. package/plugin/vendorCall-6n5chrn0.js +2 -0
  200. package/plugin/vendorCall-hv01nwsp.js +2 -0
  201. package/plugin/vendorPayload-awxqr7t8.js +2 -0
  202. package/plugin/vendorWeb-vnf344r1.js +2 -0
  203. package/plugin/verbatim-mqt9x4aa.js +2 -0
  204. package/plugin/xai-e8sbtk6a.js +2 -0
  205. package/plugin/xai-z1ysta23.js +2 -0
  206. package/rules/effect.d.ts +55 -0
  207. package/rules/effect.js +11 -0
  208. package/rules/rules.d.ts +342 -0
  209. package/rules/rules.js +50 -0
  210. package/types/node/assert/strict.d.ts +12 -0
  211. package/types/node/assert.d.ts +76 -0
  212. package/types/node/async_hooks.d.ts +113 -0
  213. package/types/node/buffer.buffer.d.ts +29 -0
  214. package/types/node/buffer.d.ts +162 -0
  215. package/types/node/child_process.d.ts +337 -0
  216. package/types/node/cluster.d.ts +118 -0
  217. package/types/node/compatibility/iterators.d.ts +11 -0
  218. package/types/node/console.d.ts +48 -0
  219. package/types/node/constants.d.ts +8 -0
  220. package/types/node/crypto.d.ts +847 -0
  221. package/types/node/dgram.d.ts +88 -0
  222. package/types/node/diagnostics_channel.d.ts +61 -0
  223. package/types/node/dns/promises.d.ts +94 -0
  224. package/types/node/dns.d.ts +276 -0
  225. package/types/node/domain.d.ts +17 -0
  226. package/types/node/events.d.ts +138 -0
  227. package/types/node/fs/promises.d.ts +253 -0
  228. package/types/node/fs.d.ts +1038 -0
  229. package/types/node/globals.d.ts +73 -0
  230. package/types/node/globals.typedarray.d.ts +22 -0
  231. package/types/node/http.d.ts +530 -0
  232. package/types/node/http2.d.ts +794 -0
  233. package/types/node/https.d.ts +66 -0
  234. package/types/node/index.d.ts +84 -0
  235. package/types/node/inspector/promises.d.ts +13 -0
  236. package/types/node/inspector.d.ts +61 -0
  237. package/types/node/inspector.generated.d.ts +1624 -0
  238. package/types/node/module.d.ts +187 -0
  239. package/types/node/net.d.ts +266 -0
  240. package/types/node/os.d.ts +236 -0
  241. package/types/node/path/posix.d.ts +8 -0
  242. package/types/node/path/win32.d.ts +8 -0
  243. package/types/node/path.d.ts +40 -0
  244. package/types/node/perf_hooks.d.ts +236 -0
  245. package/types/node/process.d.ts +436 -0
  246. package/types/node/punycode.d.ts +15 -0
  247. package/types/node/querystring.d.ts +22 -0
  248. package/types/node/quic.d.ts +203 -0
  249. package/types/node/readline/promises.d.ts +28 -0
  250. package/types/node/readline.d.ts +94 -0
  251. package/types/node/repl.d.ts +104 -0
  252. package/types/node/sea.d.ts +11 -0
  253. package/types/node/sqlite.d.ts +183 -0
  254. package/types/node/stream/consumers.d.ts +13 -0
  255. package/types/node/stream/iter.d.ts +240 -0
  256. package/types/node/stream/promises.d.ts +37 -0
  257. package/types/node/stream/web.d.ts +297 -0
  258. package/types/node/stream.d.ts +378 -0
  259. package/types/node/string_decoder.d.ts +10 -0
  260. package/types/node/test/reporters.d.ts +66 -0
  261. package/types/node/test.d.ts +462 -0
  262. package/types/node/timers/promises.d.ts +16 -0
  263. package/types/node/timers.d.ts +43 -0
  264. package/types/node/tls.d.ts +279 -0
  265. package/types/node/trace_events.d.ts +16 -0
  266. package/types/node/ts5.6/buffer.buffer.d.ts +26 -0
  267. package/types/node/ts5.6/compatibility/float16array.d.ts +43 -0
  268. package/types/node/ts5.6/globals.typedarray.d.ts +22 -0
  269. package/types/node/ts5.6/index.d.ts +84 -0
  270. package/types/node/ts5.7/compatibility/float16array.d.ts +50 -0
  271. package/types/node/ts5.7/index.d.ts +84 -0
  272. package/types/node/tty.d.ts +61 -0
  273. package/types/node/url.d.ts +165 -0
  274. package/types/node/util/types.d.ts +49 -0
  275. package/types/node/util.d.ts +320 -0
  276. package/types/node/v8.d.ts +178 -0
  277. package/types/node/vm.d.ts +130 -0
  278. package/types/node/wasi.d.ts +26 -0
  279. package/types/node/web-globals/abortcontroller.d.ts +47 -0
  280. package/types/node/web-globals/blob.d.ts +34 -0
  281. package/types/node/web-globals/console.d.ts +7 -0
  282. package/types/node/web-globals/crypto.d.ts +46 -0
  283. package/types/node/web-globals/domexception.d.ts +74 -0
  284. package/types/node/web-globals/encoding.d.ts +16 -0
  285. package/types/node/web-globals/events.d.ts +111 -0
  286. package/types/node/web-globals/fetch.d.ts +121 -0
  287. package/types/node/web-globals/importmeta.d.ts +11 -0
  288. package/types/node/web-globals/messaging.d.ts +32 -0
  289. package/types/node/web-globals/navigator.d.ts +28 -0
  290. package/types/node/web-globals/performance.d.ts +71 -0
  291. package/types/node/web-globals/storage.d.ts +26 -0
  292. package/types/node/web-globals/streams.d.ts +162 -0
  293. package/types/node/web-globals/timers.d.ts +22 -0
  294. package/types/node/web-globals/url.d.ts +27 -0
  295. package/types/node/worker_threads.d.ts +199 -0
  296. package/types/node/zlib/iter.d.ts +49 -0
  297. package/types/node/zlib.d.ts +360 -0
  298. package/types/undici/agent.d.ts +24 -0
  299. package/types/undici/api.d.ts +19 -0
  300. package/types/undici/balanced-pool.d.ts +16 -0
  301. package/types/undici/cache-interceptor.d.ts +98 -0
  302. package/types/undici/cache.d.ts +30 -0
  303. package/types/undici/client-stats.d.ts +9 -0
  304. package/types/undici/client.d.ts +61 -0
  305. package/types/undici/connector.d.ts +37 -0
  306. package/types/undici/content-type.d.ts +9 -0
  307. package/types/undici/cookies.d.ts +22 -0
  308. package/types/undici/diagnostics-channel.d.ts +72 -0
  309. package/types/undici/dispatcher.d.ts +207 -0
  310. package/types/undici/env-http-proxy-agent.d.ts +15 -0
  311. package/types/undici/errors.d.ts +117 -0
  312. package/types/undici/eventsource.d.ts +39 -0
  313. package/types/undici/fetch.d.ts +122 -0
  314. package/types/undici/formdata.d.ts +24 -0
  315. package/types/undici/global-dispatcher.d.ts +4 -0
  316. package/types/undici/global-origin.d.ts +3 -0
  317. package/types/undici/h2c-client.d.ts +35 -0
  318. package/types/undici/handlers.d.ts +7 -0
  319. package/types/undici/header.d.ts +10 -0
  320. package/types/undici/index.d.ts +85 -0
  321. package/types/undici/interceptors.d.ts +70 -0
  322. package/types/undici/mock-agent.d.ts +43 -0
  323. package/types/undici/mock-call-history.d.ts +57 -0
  324. package/types/undici/mock-client.d.ts +17 -0
  325. package/types/undici/mock-errors.d.ts +9 -0
  326. package/types/undici/mock-interceptor.d.ts +60 -0
  327. package/types/undici/mock-pool.d.ts +17 -0
  328. package/types/undici/patch.d.ts +21 -0
  329. package/types/undici/pool-stats.d.ts +11 -0
  330. package/types/undici/pool.d.ts +25 -0
  331. package/types/undici/proxy-agent.d.ts +22 -0
  332. package/types/undici/readable.d.ts +24 -0
  333. package/types/undici/retry-agent.d.ts +6 -0
  334. package/types/undici/retry-handler.d.ts +41 -0
  335. package/types/undici/round-robin-pool.d.ts +25 -0
  336. package/types/undici/snapshot-agent.d.ts +98 -0
  337. package/types/undici/socks5-proxy-agent.d.ts +17 -0
  338. package/types/undici/util.d.ts +4 -0
  339. package/types/undici/utility.d.ts +2 -0
  340. package/types/undici/webidl.d.ts +121 -0
  341. package/types/undici/websocket.d.ts +130 -0
  342. package/README.md +0 -3
@@ -0,0 +1,178 @@
1
+ declare module "node:v8" {
2
+ import { NonSharedBuffer } from "node:buffer";
3
+ import { Readable } from "node:stream";
4
+ interface HeapSpaceInfo {
5
+ space_name: string;
6
+ space_size: number;
7
+ space_used_size: number;
8
+ space_available_size: number;
9
+ physical_space_size: number;
10
+ }
11
+ type DoesZapCodeSpaceFlag = 0 | 1;
12
+ interface HeapInfo {
13
+ total_heap_size: number;
14
+ total_heap_size_executable: number;
15
+ total_physical_size: number;
16
+ total_available_size: number;
17
+ used_heap_size: number;
18
+ heap_size_limit: number;
19
+ malloced_memory: number;
20
+ peak_malloced_memory: number;
21
+ does_zap_garbage: DoesZapCodeSpaceFlag;
22
+ number_of_native_contexts: number;
23
+ number_of_detached_contexts: number;
24
+ total_global_handles_size: number;
25
+ used_global_handles_size: number;
26
+ external_memory: number;
27
+ total_allocated_bytes: number;
28
+ }
29
+ interface HeapCodeStatistics {
30
+ code_and_metadata_size: number;
31
+ bytecode_and_metadata_size: number;
32
+ external_script_source_size: number;
33
+ }
34
+ interface HeapSnapshotOptions {
35
+ exposeInternals?: boolean | undefined;
36
+ exposeNumericValues?: boolean | undefined;
37
+ }
38
+ function cachedDataVersionTag(): number;
39
+ function getHeapStatistics(): HeapInfo;
40
+ function getCppHeapStatistics(detailLevel?: "brief" | "detailed"): object;
41
+ function getHeapSpaceStatistics(): HeapSpaceInfo[];
42
+ function setFlagsFromString(flags: string): void;
43
+ function queryObjects(ctor: Function): number | string[];
44
+ function queryObjects(ctor: Function, options: {
45
+ format: "count";
46
+ }): number;
47
+ function queryObjects(ctor: Function, options: {
48
+ format: "summary";
49
+ }): string[];
50
+ function getHeapSnapshot(options?: HeapSnapshotOptions): Readable;
51
+ function writeHeapSnapshot(filename?: string, options?: HeapSnapshotOptions): string;
52
+ function getHeapCodeStatistics(): HeapCodeStatistics;
53
+ interface SyncCPUProfileHandle {
54
+ stop(): string;
55
+ [Symbol.dispose](): void;
56
+ }
57
+ interface CPUProfileHandle {
58
+ stop(): Promise<string>;
59
+ [Symbol.asyncDispose](): Promise<void>;
60
+ }
61
+ interface HeapProfileHandle {
62
+ stop(): Promise<string>;
63
+ [Symbol.asyncDispose](): Promise<void>;
64
+ }
65
+ function startCpuProfile(): SyncCPUProfileHandle;
66
+ function isStringOneByteRepresentation(content: string): boolean;
67
+ class Serializer {
68
+ writeHeader(): void;
69
+ writeValue(val: any): boolean;
70
+ releaseBuffer(): NonSharedBuffer;
71
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
72
+ writeUint32(value: number): void;
73
+ writeUint64(hi: number, lo: number): void;
74
+ writeDouble(value: number): void;
75
+ writeRawBytes(buffer: NodeJS.ArrayBufferView): void;
76
+ }
77
+ class DefaultSerializer extends Serializer {
78
+ }
79
+ class Deserializer {
80
+ constructor(data: NodeJS.TypedArray);
81
+ readHeader(): boolean;
82
+ readValue(): any;
83
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
84
+ getWireFormatVersion(): number;
85
+ readUint32(): number;
86
+ readUint64(): [
87
+ number,
88
+ number
89
+ ];
90
+ readDouble(): number;
91
+ readRawBytes(length: number): Buffer;
92
+ }
93
+ class DefaultDeserializer extends Deserializer {
94
+ }
95
+ function serialize(value: any): NonSharedBuffer;
96
+ function deserialize(buffer: NodeJS.ArrayBufferView): any;
97
+ function takeCoverage(): void;
98
+ function stopCoverage(): void;
99
+ function setHeapSnapshotNearHeapLimit(limit: number): void;
100
+ class GCProfiler {
101
+ start(): void;
102
+ stop(): GCProfilerResult;
103
+ [Symbol.dispose](): void;
104
+ }
105
+ interface GCProfilerResult {
106
+ version: number;
107
+ startTime: number;
108
+ endTime: number;
109
+ statistics: Array<{
110
+ gcType: string;
111
+ cost: number;
112
+ beforeGC: {
113
+ heapStatistics: HeapStatistics;
114
+ heapSpaceStatistics: HeapSpaceStatistics[];
115
+ };
116
+ afterGC: {
117
+ heapStatistics: HeapStatistics;
118
+ heapSpaceStatistics: HeapSpaceStatistics[];
119
+ };
120
+ }>;
121
+ }
122
+ interface HeapStatistics {
123
+ totalHeapSize: number;
124
+ totalHeapSizeExecutable: number;
125
+ totalPhysicalSize: number;
126
+ totalAvailableSize: number;
127
+ totalGlobalHandlesSize: number;
128
+ usedGlobalHandlesSize: number;
129
+ usedHeapSize: number;
130
+ heapSizeLimit: number;
131
+ mallocedMemory: number;
132
+ externalMemory: number;
133
+ peakMallocedMemory: number;
134
+ }
135
+ interface HeapSpaceStatistics {
136
+ spaceName: string;
137
+ spaceSize: number;
138
+ spaceUsedSize: number;
139
+ spaceAvailableSize: number;
140
+ physicalSpaceSize: number;
141
+ }
142
+ interface Init {
143
+ (promise: Promise<unknown>, parent: Promise<unknown>): void;
144
+ }
145
+ interface Before {
146
+ (promise: Promise<unknown>): void;
147
+ }
148
+ interface After {
149
+ (promise: Promise<unknown>): void;
150
+ }
151
+ interface Settled {
152
+ (promise: Promise<unknown>): void;
153
+ }
154
+ interface HookCallbacks {
155
+ init?: Init;
156
+ before?: Before;
157
+ after?: After;
158
+ settled?: Settled;
159
+ }
160
+ interface PromiseHooks {
161
+ onInit: (init: Init) => Function;
162
+ onSettled: (settled: Settled) => Function;
163
+ onBefore: (before: Before) => Function;
164
+ onAfter: (after: After) => Function;
165
+ createHook: (callbacks: HookCallbacks) => Function;
166
+ }
167
+ const promiseHooks: PromiseHooks;
168
+ type StartupSnapshotCallbackFn = (args: any) => any;
169
+ namespace startupSnapshot {
170
+ function addSerializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void;
171
+ function addDeserializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void;
172
+ function setDeserializeMainFunction(callback: StartupSnapshotCallbackFn, data?: any): void;
173
+ function isBuildingSnapshot(): boolean;
174
+ }
175
+ }
176
+ declare module "v8" {
177
+ export * from "node:v8";
178
+ }
@@ -0,0 +1,130 @@
1
+ declare module "node:vm" {
2
+ import { NonSharedBuffer } from "node:buffer";
3
+ import { ImportAttributes, ImportPhase } from "node:module";
4
+ interface Context extends NodeJS.Dict<any> {
5
+ }
6
+ interface BaseOptions {
7
+ filename?: string | undefined;
8
+ lineOffset?: number | undefined;
9
+ columnOffset?: number | undefined;
10
+ }
11
+ type DynamicModuleLoader<T> = (specifier: string, referrer: T, importAttributes: ImportAttributes, phase: ImportPhase) => Module | Promise<Module>;
12
+ interface ScriptOptions extends BaseOptions {
13
+ cachedData?: NodeJS.ArrayBufferView | undefined;
14
+ produceCachedData?: boolean | undefined;
15
+ importModuleDynamically?: DynamicModuleLoader<Script> | typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER | undefined;
16
+ }
17
+ interface RunningScriptOptions extends BaseOptions {
18
+ displayErrors?: boolean | undefined;
19
+ timeout?: number | undefined;
20
+ breakOnSigint?: boolean | undefined;
21
+ }
22
+ interface RunningScriptInNewContextOptions extends RunningScriptOptions, Pick<CreateContextOptions, "microtaskMode"> {
23
+ contextName?: CreateContextOptions["name"] | undefined;
24
+ contextOrigin?: CreateContextOptions["origin"] | undefined;
25
+ contextCodeGeneration?: CreateContextOptions["codeGeneration"] | undefined;
26
+ }
27
+ interface RunningCodeOptions extends RunningScriptOptions, Pick<ScriptOptions, "cachedData"> {
28
+ importModuleDynamically?: DynamicModuleLoader<Script> | typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER | undefined;
29
+ }
30
+ interface RunningCodeInNewContextOptions extends RunningScriptInNewContextOptions, Pick<ScriptOptions, "cachedData"> {
31
+ importModuleDynamically?: DynamicModuleLoader<Script> | typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER | undefined;
32
+ }
33
+ interface CompileFunctionOptions extends BaseOptions, Pick<ScriptOptions, "cachedData" | "produceCachedData"> {
34
+ parsingContext?: Context | undefined;
35
+ contextExtensions?: Object[] | undefined;
36
+ importModuleDynamically?: DynamicModuleLoader<ReturnType<typeof compileFunction>> | typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER | undefined;
37
+ }
38
+ interface CreateContextOptions {
39
+ name?: string | undefined;
40
+ origin?: string | undefined;
41
+ codeGeneration?: {
42
+ strings?: boolean | undefined;
43
+ wasm?: boolean | undefined;
44
+ } | undefined;
45
+ microtaskMode?: "afterEvaluate" | undefined;
46
+ importModuleDynamically?: DynamicModuleLoader<Context> | typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER | undefined;
47
+ }
48
+ type MeasureMemoryMode = "summary" | "detailed";
49
+ interface MeasureMemoryOptions {
50
+ mode?: MeasureMemoryMode | undefined;
51
+ execution?: "default" | "eager" | undefined;
52
+ }
53
+ interface MemoryMeasurement {
54
+ total: {
55
+ jsMemoryEstimate: number;
56
+ jsMemoryRange: [
57
+ number,
58
+ number
59
+ ];
60
+ };
61
+ }
62
+ class Script {
63
+ constructor(code: string, options?: ScriptOptions | string);
64
+ runInContext(contextifiedObject: Context, options?: RunningScriptOptions): any;
65
+ runInNewContext(contextObject?: Context | typeof constants.DONT_CONTEXTIFY, options?: RunningScriptInNewContextOptions): any;
66
+ runInThisContext(options?: RunningScriptOptions): any;
67
+ createCachedData(): NonSharedBuffer;
68
+ cachedDataProduced?: boolean;
69
+ cachedDataRejected?: boolean;
70
+ cachedData?: NonSharedBuffer;
71
+ sourceMapURL: string | undefined;
72
+ }
73
+ function createContext(contextObject?: Context | typeof constants.DONT_CONTEXTIFY, options?: CreateContextOptions): Context;
74
+ function isContext(sandbox: Context): boolean;
75
+ function runInContext(code: string, contextifiedObject: Context, options?: RunningCodeOptions | string): any;
76
+ function runInNewContext(code: string, contextObject?: Context | typeof constants.DONT_CONTEXTIFY, options?: RunningCodeInNewContextOptions | string): any;
77
+ function runInThisContext(code: string, options?: RunningCodeOptions | string): any;
78
+ function compileFunction(code: string, params?: readonly string[], options?: CompileFunctionOptions): Function & Pick<Script, "cachedData" | "cachedDataProduced" | "cachedDataRejected">;
79
+ function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
80
+ interface ModuleEvaluateOptions extends Pick<RunningScriptOptions, "breakOnSigint" | "timeout"> {
81
+ }
82
+ type ModuleLinker = (specifier: string, referencingModule: Module, extra: {
83
+ attributes: ImportAttributes;
84
+ }) => Module | Promise<Module>;
85
+ type ModuleStatus = "unlinked" | "linking" | "linked" | "evaluating" | "evaluated" | "errored";
86
+ class Module {
87
+ error: any;
88
+ identifier: string;
89
+ context: Context;
90
+ namespace: Object;
91
+ status: ModuleStatus;
92
+ evaluate(options?: ModuleEvaluateOptions): Promise<void>;
93
+ link(linker: ModuleLinker): Promise<void>;
94
+ }
95
+ interface SourceTextModuleOptions extends Pick<ScriptOptions, "cachedData" | "columnOffset" | "lineOffset"> {
96
+ identifier?: string | undefined;
97
+ context?: Context | undefined;
98
+ initializeImportMeta?: ((meta: ImportMeta, module: SourceTextModule) => void) | undefined;
99
+ importModuleDynamically?: DynamicModuleLoader<SourceTextModule> | undefined;
100
+ }
101
+ interface ModuleRequest {
102
+ specifier: string;
103
+ attributes: ImportAttributes;
104
+ phase: ImportPhase;
105
+ }
106
+ class SourceTextModule extends Module {
107
+ constructor(code: string, options?: SourceTextModuleOptions);
108
+ readonly dependencySpecifiers: readonly string[];
109
+ hasAsyncGraph(): boolean;
110
+ hasTopLevelAwait(): boolean;
111
+ instantiate(): void;
112
+ linkRequests(modules: readonly Module[]): void;
113
+ readonly moduleRequests: readonly ModuleRequest[];
114
+ }
115
+ interface SyntheticModuleOptions {
116
+ identifier?: string | undefined;
117
+ context?: Context | undefined;
118
+ }
119
+ class SyntheticModule extends Module {
120
+ constructor(exportNames: string[], evaluateCallback: (this: SyntheticModule) => void, options?: SyntheticModuleOptions);
121
+ setExport(name: string, value: any): void;
122
+ }
123
+ namespace constants {
124
+ const USE_MAIN_CONTEXT_DEFAULT_LOADER: number;
125
+ const DONT_CONTEXTIFY: number;
126
+ }
127
+ }
128
+ declare module "vm" {
129
+ export * from "node:vm";
130
+ }
@@ -0,0 +1,26 @@
1
+ declare module "node:wasi" {
2
+ interface WASIOptions {
3
+ args?: readonly string[] | undefined;
4
+ env?: object | undefined;
5
+ preopens?: NodeJS.Dict<string> | undefined;
6
+ returnOnExit?: boolean | undefined;
7
+ stdin?: number | undefined;
8
+ stdout?: number | undefined;
9
+ stderr?: number | undefined;
10
+ version: "unstable" | "preview1";
11
+ }
12
+ interface FinalizeBindingsOptions {
13
+ memory?: object | undefined;
14
+ }
15
+ class WASI {
16
+ constructor(options?: WASIOptions);
17
+ getImportObject(): object;
18
+ start(instance: object): number;
19
+ initialize(instance: object): void;
20
+ finalizeBindings(instance: object, options?: FinalizeBindingsOptions): void;
21
+ readonly wasiImport: NodeJS.Dict<any>;
22
+ }
23
+ }
24
+ declare module "wasi" {
25
+ export * from "node:wasi";
26
+ }
@@ -0,0 +1,47 @@
1
+ export {};
2
+ import { InternalEventTargetEventProperties } from "node:events";
3
+ type _AbortController = typeof globalThis extends {
4
+ onmessage: any;
5
+ } ? {} : AbortController;
6
+ interface AbortController {
7
+ readonly signal: AbortSignal;
8
+ abort(reason?: any): void;
9
+ }
10
+ interface AbortSignalEventMap {
11
+ "abort": Event;
12
+ }
13
+ type _AbortSignal = typeof globalThis extends {
14
+ onmessage: any;
15
+ } ? {} : AbortSignal;
16
+ interface AbortSignal extends EventTarget, InternalEventTargetEventProperties<AbortSignalEventMap> {
17
+ readonly aborted: boolean;
18
+ readonly reason: any;
19
+ throwIfAborted(): void;
20
+ addEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (ev: AbortSignalEventMap[K]) => void, options?: AddEventListenerOptions | boolean): void;
21
+ addEventListener(type: string, listener: EventListener | EventListenerObject, options?: AddEventListenerOptions | boolean): void;
22
+ removeEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (ev: AbortSignalEventMap[K]) => void, options?: EventListenerOptions | boolean): void;
23
+ removeEventListener(type: string, listener: EventListener | EventListenerObject, options?: EventListenerOptions | boolean): void;
24
+ }
25
+ declare global {
26
+ interface AbortController extends _AbortController {
27
+ }
28
+ var AbortController: typeof globalThis extends {
29
+ onmessage: any;
30
+ AbortController: infer T;
31
+ } ? T : {
32
+ prototype: AbortController;
33
+ new (): AbortController;
34
+ };
35
+ interface AbortSignal extends _AbortSignal {
36
+ }
37
+ var AbortSignal: typeof globalThis extends {
38
+ onmessage: any;
39
+ AbortSignal: infer T;
40
+ } ? T : {
41
+ prototype: AbortSignal;
42
+ new (): AbortSignal;
43
+ abort(reason?: any): AbortSignal;
44
+ any(signals: AbortSignal[]): AbortSignal;
45
+ timeout(milliseconds: number): AbortSignal;
46
+ };
47
+ }
@@ -0,0 +1,34 @@
1
+ export {};
2
+ import * as buffer from "node:buffer";
3
+ type _Blob = typeof globalThis extends {
4
+ onmessage: any;
5
+ } ? {} : buffer.Blob;
6
+ type _BlobPropertyBag = typeof globalThis extends {
7
+ onmessage: any;
8
+ } ? {} : buffer.BlobPropertyBag;
9
+ type _File = typeof globalThis extends {
10
+ onmessage: any;
11
+ } ? {} : buffer.File;
12
+ type _FilePropertyBag = typeof globalThis extends {
13
+ onmessage: any;
14
+ } ? {} : buffer.FilePropertyBag;
15
+ declare global {
16
+ interface Blob extends _Blob {
17
+ }
18
+ var Blob: typeof globalThis extends {
19
+ onmessage: any;
20
+ Blob: infer T;
21
+ } ? T : typeof buffer.Blob;
22
+ interface BlobPropertyBag extends _BlobPropertyBag {
23
+ }
24
+ interface File extends _File {
25
+ }
26
+ var File: typeof globalThis extends {
27
+ onmessage: any;
28
+ File: infer T;
29
+ } ? T : typeof buffer.File;
30
+ interface FilePropertyBag extends _FilePropertyBag {
31
+ }
32
+ function atob(data: string): string;
33
+ function btoa(data: string): string;
34
+ }
@@ -0,0 +1,7 @@
1
+ export {};
2
+ import * as console from "node:console";
3
+ declare global {
4
+ interface Console extends console.Console {
5
+ }
6
+ var console: Console;
7
+ }
@@ -0,0 +1,46 @@
1
+ export {};
2
+ import { webcrypto } from "crypto";
3
+ type _Crypto = typeof globalThis extends {
4
+ onmessage: any;
5
+ } ? {} : webcrypto.Crypto;
6
+ type _CryptoKey = typeof globalThis extends {
7
+ onmessage: any;
8
+ } ? {} : webcrypto.CryptoKey;
9
+ type _SubtleCrypto = typeof globalThis extends {
10
+ onmessage: any;
11
+ } ? {} : webcrypto.SubtleCrypto;
12
+ declare global {
13
+ interface Crypto extends _Crypto {
14
+ }
15
+ var Crypto: typeof globalThis extends {
16
+ onmessage: any;
17
+ Crypto: infer T;
18
+ } ? T : {
19
+ prototype: webcrypto.Crypto;
20
+ new (): webcrypto.Crypto;
21
+ };
22
+ interface CryptoKey extends _CryptoKey {
23
+ }
24
+ var CryptoKey: typeof globalThis extends {
25
+ onmessage: any;
26
+ CryptoKey: infer T;
27
+ } ? T : {
28
+ prototype: webcrypto.CryptoKey;
29
+ new (): webcrypto.CryptoKey;
30
+ };
31
+ interface SubtleCrypto extends _SubtleCrypto {
32
+ }
33
+ var SubtleCrypto: typeof globalThis extends {
34
+ onmessage: any;
35
+ SubtleCrypto: infer T;
36
+ } ? T : {
37
+ prototype: webcrypto.SubtleCrypto;
38
+ new (): webcrypto.SubtleCrypto;
39
+ supports(operation: string, algorithm: webcrypto.AlgorithmIdentifier, length?: number): boolean;
40
+ supports(operation: string, algorithm: webcrypto.AlgorithmIdentifier, additionalAlgorithm: webcrypto.AlgorithmIdentifier): boolean;
41
+ };
42
+ var crypto: typeof globalThis extends {
43
+ onmessage: any;
44
+ crypto: infer T;
45
+ } ? T : webcrypto.Crypto;
46
+ }
@@ -0,0 +1,74 @@
1
+ export {};
2
+ type _DOMException = typeof globalThis extends {
3
+ onmessage: any;
4
+ } ? {} : DOMException;
5
+ interface DOMException extends Error {
6
+ readonly code: number;
7
+ readonly message: string;
8
+ readonly name: string;
9
+ readonly INDEX_SIZE_ERR: 1;
10
+ readonly DOMSTRING_SIZE_ERR: 2;
11
+ readonly HIERARCHY_REQUEST_ERR: 3;
12
+ readonly WRONG_DOCUMENT_ERR: 4;
13
+ readonly INVALID_CHARACTER_ERR: 5;
14
+ readonly NO_DATA_ALLOWED_ERR: 6;
15
+ readonly NO_MODIFICATION_ALLOWED_ERR: 7;
16
+ readonly NOT_FOUND_ERR: 8;
17
+ readonly NOT_SUPPORTED_ERR: 9;
18
+ readonly INUSE_ATTRIBUTE_ERR: 10;
19
+ readonly INVALID_STATE_ERR: 11;
20
+ readonly SYNTAX_ERR: 12;
21
+ readonly INVALID_MODIFICATION_ERR: 13;
22
+ readonly NAMESPACE_ERR: 14;
23
+ readonly INVALID_ACCESS_ERR: 15;
24
+ readonly VALIDATION_ERR: 16;
25
+ readonly TYPE_MISMATCH_ERR: 17;
26
+ readonly SECURITY_ERR: 18;
27
+ readonly NETWORK_ERR: 19;
28
+ readonly ABORT_ERR: 20;
29
+ readonly URL_MISMATCH_ERR: 21;
30
+ readonly QUOTA_EXCEEDED_ERR: 22;
31
+ readonly TIMEOUT_ERR: 23;
32
+ readonly INVALID_NODE_TYPE_ERR: 24;
33
+ readonly DATA_CLONE_ERR: 25;
34
+ }
35
+ declare global {
36
+ interface DOMException extends _DOMException {
37
+ }
38
+ var DOMException: typeof globalThis extends {
39
+ onmessage: any;
40
+ DOMException: infer T;
41
+ } ? T : {
42
+ prototype: DOMException;
43
+ new (message?: string, name?: string): DOMException;
44
+ new (message?: string, options?: {
45
+ name?: string;
46
+ cause?: unknown;
47
+ }): DOMException;
48
+ readonly INDEX_SIZE_ERR: 1;
49
+ readonly DOMSTRING_SIZE_ERR: 2;
50
+ readonly HIERARCHY_REQUEST_ERR: 3;
51
+ readonly WRONG_DOCUMENT_ERR: 4;
52
+ readonly INVALID_CHARACTER_ERR: 5;
53
+ readonly NO_DATA_ALLOWED_ERR: 6;
54
+ readonly NO_MODIFICATION_ALLOWED_ERR: 7;
55
+ readonly NOT_FOUND_ERR: 8;
56
+ readonly NOT_SUPPORTED_ERR: 9;
57
+ readonly INUSE_ATTRIBUTE_ERR: 10;
58
+ readonly INVALID_STATE_ERR: 11;
59
+ readonly SYNTAX_ERR: 12;
60
+ readonly INVALID_MODIFICATION_ERR: 13;
61
+ readonly NAMESPACE_ERR: 14;
62
+ readonly INVALID_ACCESS_ERR: 15;
63
+ readonly VALIDATION_ERR: 16;
64
+ readonly TYPE_MISMATCH_ERR: 17;
65
+ readonly SECURITY_ERR: 18;
66
+ readonly NETWORK_ERR: 19;
67
+ readonly ABORT_ERR: 20;
68
+ readonly URL_MISMATCH_ERR: 21;
69
+ readonly QUOTA_EXCEEDED_ERR: 22;
70
+ readonly TIMEOUT_ERR: 23;
71
+ readonly INVALID_NODE_TYPE_ERR: 24;
72
+ readonly DATA_CLONE_ERR: 25;
73
+ };
74
+ }
@@ -0,0 +1,16 @@
1
+ export {};
2
+ import * as util from "node:util";
3
+ declare global {
4
+ interface TextDecoder extends util.TextDecoder {
5
+ }
6
+ var TextDecoder: typeof globalThis extends {
7
+ onmessage: any;
8
+ TextDecoder: infer T;
9
+ } ? T : typeof util.TextDecoder;
10
+ interface TextEncoder extends util.TextEncoder {
11
+ }
12
+ var TextEncoder: typeof globalThis extends {
13
+ onmessage: any;
14
+ TextEncoder: infer T;
15
+ } ? T : typeof util.TextEncoder;
16
+ }
@@ -0,0 +1,111 @@
1
+ export {};
2
+ type _AddEventListenerOptions = typeof globalThis extends {
3
+ onmessage: any;
4
+ } ? {} : AddEventListenerOptions;
5
+ interface AddEventListenerOptions extends EventListenerOptions {
6
+ once?: boolean;
7
+ passive?: boolean;
8
+ signal?: AbortSignal;
9
+ }
10
+ type _CustomEvent<T = any> = typeof globalThis extends {
11
+ onmessage: any;
12
+ } ? {} : CustomEvent<T>;
13
+ interface CustomEvent<T = any> extends Event {
14
+ readonly detail: T;
15
+ }
16
+ interface CustomEventInit<T = any> extends EventInit {
17
+ detail?: T;
18
+ }
19
+ type _Event = typeof globalThis extends {
20
+ onmessage: any;
21
+ } ? {} : Event;
22
+ interface Event {
23
+ readonly bubbles: boolean;
24
+ cancelBubble: boolean;
25
+ readonly cancelable: boolean;
26
+ readonly composed: boolean;
27
+ readonly currentTarget: EventTarget | null;
28
+ readonly defaultPrevented: boolean;
29
+ readonly eventPhase: 0 | 2;
30
+ readonly isTrusted: boolean;
31
+ returnValue: boolean;
32
+ readonly srcElement: EventTarget | null;
33
+ readonly target: EventTarget | null;
34
+ readonly timeStamp: number;
35
+ readonly type: string;
36
+ composedPath(): [
37
+ EventTarget?
38
+ ];
39
+ initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
40
+ preventDefault(): void;
41
+ stopImmediatePropagation(): void;
42
+ stopPropagation(): void;
43
+ }
44
+ interface EventInit {
45
+ bubbles?: boolean;
46
+ cancelable?: boolean;
47
+ composed?: boolean;
48
+ }
49
+ type _EventListener = typeof globalThis extends {
50
+ onmessage: any;
51
+ } ? {} : EventListener;
52
+ interface EventListener {
53
+ (evt: Event): void;
54
+ }
55
+ type _EventListenerObject = typeof globalThis extends {
56
+ onmessage: any;
57
+ } ? {} : EventListenerObject;
58
+ interface EventListenerObject {
59
+ handleEvent(object: Event): void;
60
+ }
61
+ type _EventListenerOptions = typeof globalThis extends {
62
+ onmessage: any;
63
+ } ? {} : EventListenerOptions;
64
+ interface EventListenerOptions {
65
+ capture?: boolean;
66
+ }
67
+ type _EventTarget = typeof globalThis extends {
68
+ onmessage: any;
69
+ } ? {} : EventTarget;
70
+ interface EventTarget {
71
+ addEventListener(type: string, listener: EventListener | EventListenerObject, options?: AddEventListenerOptions | boolean): void;
72
+ dispatchEvent(event: Event): boolean;
73
+ removeEventListener(type: string, listener: EventListener | EventListenerObject, options?: EventListenerOptions | boolean): void;
74
+ }
75
+ declare global {
76
+ interface AddEventListenerOptions extends _AddEventListenerOptions {
77
+ }
78
+ interface CustomEvent<T = any> extends _CustomEvent<T> {
79
+ }
80
+ var CustomEvent: typeof globalThis extends {
81
+ onmessage: any;
82
+ CustomEvent: infer T;
83
+ } ? T : {
84
+ prototype: CustomEvent;
85
+ new <T>(type: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
86
+ };
87
+ interface Event extends _Event {
88
+ }
89
+ var Event: typeof globalThis extends {
90
+ onmessage: any;
91
+ Event: infer T;
92
+ } ? T : {
93
+ prototype: Event;
94
+ new (type: string, eventInitDict?: EventInit): Event;
95
+ };
96
+ interface EventListener extends _EventListener {
97
+ }
98
+ interface EventListenerObject extends _EventListenerObject {
99
+ }
100
+ interface EventListenerOptions extends _EventListenerOptions {
101
+ }
102
+ interface EventTarget extends _EventTarget {
103
+ }
104
+ var EventTarget: typeof globalThis extends {
105
+ onmessage: any;
106
+ EventTarget: infer T;
107
+ } ? T : {
108
+ prototype: EventTarget;
109
+ new (): EventTarget;
110
+ };
111
+ }