effect 4.0.0-beta.102 → 4.0.0-beta.103

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 (1451) hide show
  1. package/dist/Array.d.ts +971 -1037
  2. package/dist/Array.d.ts.map +1 -1
  3. package/dist/Array.js +381 -407
  4. package/dist/Array.js.map +1 -1
  5. package/dist/BigDecimal.d.ts +433 -756
  6. package/dist/BigDecimal.d.ts.map +1 -1
  7. package/dist/BigDecimal.js +200 -325
  8. package/dist/BigDecimal.js.map +1 -1
  9. package/dist/BigInt.d.ts +207 -267
  10. package/dist/BigInt.d.ts.map +1 -1
  11. package/dist/BigInt.js +107 -135
  12. package/dist/BigInt.js.map +1 -1
  13. package/dist/Boolean.d.ts +146 -188
  14. package/dist/Boolean.d.ts.map +1 -1
  15. package/dist/Boolean.js +64 -84
  16. package/dist/Boolean.js.map +1 -1
  17. package/dist/Brand.js.map +1 -1
  18. package/dist/Cache.d.ts +405 -254
  19. package/dist/Cache.d.ts.map +1 -1
  20. package/dist/Cache.js +166 -101
  21. package/dist/Cache.js.map +1 -1
  22. package/dist/Cause.d.ts +167 -277
  23. package/dist/Cause.d.ts.map +1 -1
  24. package/dist/Cause.js +122 -176
  25. package/dist/Cause.js.map +1 -1
  26. package/dist/Channel.d.ts +729 -768
  27. package/dist/Channel.d.ts.map +1 -1
  28. package/dist/Channel.js +514 -440
  29. package/dist/Channel.js.map +1 -1
  30. package/dist/ChannelSchema.d.ts +1 -1
  31. package/dist/ChannelSchema.d.ts.map +1 -1
  32. package/dist/ChannelSchema.js.map +1 -1
  33. package/dist/Chunk.d.ts +834 -1173
  34. package/dist/Chunk.d.ts.map +1 -1
  35. package/dist/Chunk.js +326 -439
  36. package/dist/Chunk.js.map +1 -1
  37. package/dist/Clock.d.ts +180 -49
  38. package/dist/Clock.d.ts.map +1 -1
  39. package/dist/Clock.js +96 -31
  40. package/dist/Clock.js.map +1 -1
  41. package/dist/Combiner.d.ts +20 -33
  42. package/dist/Combiner.d.ts.map +1 -1
  43. package/dist/Combiner.js +18 -30
  44. package/dist/Combiner.js.map +1 -1
  45. package/dist/Config.d.ts +225 -173
  46. package/dist/Config.d.ts.map +1 -1
  47. package/dist/Config.js +336 -265
  48. package/dist/Config.js.map +1 -1
  49. package/dist/ConfigProvider.d.ts +194 -68
  50. package/dist/ConfigProvider.d.ts.map +1 -1
  51. package/dist/ConfigProvider.js +115 -80
  52. package/dist/ConfigProvider.js.map +1 -1
  53. package/dist/Console.d.ts +233 -33
  54. package/dist/Console.d.ts.map +1 -1
  55. package/dist/Console.js +232 -32
  56. package/dist/Console.js.map +1 -1
  57. package/dist/Context.d.ts +151 -274
  58. package/dist/Context.d.ts.map +1 -1
  59. package/dist/Context.js +171 -214
  60. package/dist/Context.js.map +1 -1
  61. package/dist/Cron.d.ts +68 -77
  62. package/dist/Cron.d.ts.map +1 -1
  63. package/dist/Cron.js +57 -66
  64. package/dist/Cron.js.map +1 -1
  65. package/dist/Crypto.d.ts +13 -15
  66. package/dist/Crypto.d.ts.map +1 -1
  67. package/dist/Crypto.js +9 -10
  68. package/dist/Crypto.js.map +1 -1
  69. package/dist/Data.d.ts +60 -80
  70. package/dist/Data.d.ts.map +1 -1
  71. package/dist/Data.js +16 -23
  72. package/dist/Data.js.map +1 -1
  73. package/dist/DateTime.d.ts +562 -660
  74. package/dist/DateTime.d.ts.map +1 -1
  75. package/dist/DateTime.js +307 -362
  76. package/dist/DateTime.js.map +1 -1
  77. package/dist/Deferred.d.ts +253 -256
  78. package/dist/Deferred.d.ts.map +1 -1
  79. package/dist/Deferred.js +104 -96
  80. package/dist/Deferred.js.map +1 -1
  81. package/dist/Duration.d.ts +216 -308
  82. package/dist/Duration.d.ts.map +1 -1
  83. package/dist/Duration.js +132 -186
  84. package/dist/Duration.js.map +1 -1
  85. package/dist/Effect.d.ts +2841 -3247
  86. package/dist/Effect.d.ts.map +1 -1
  87. package/dist/Effect.js +1322 -1546
  88. package/dist/Effect.js.map +1 -1
  89. package/dist/Effectable.js.map +1 -1
  90. package/dist/Encoding.d.ts +22 -40
  91. package/dist/Encoding.d.ts.map +1 -1
  92. package/dist/Encoding.js +22 -40
  93. package/dist/Encoding.js.map +1 -1
  94. package/dist/Equal.d.ts +33 -37
  95. package/dist/Equal.d.ts.map +1 -1
  96. package/dist/Equal.js +29 -21
  97. package/dist/Equal.js.map +1 -1
  98. package/dist/Equivalence.d.ts +103 -105
  99. package/dist/Equivalence.d.ts.map +1 -1
  100. package/dist/Equivalence.js +77 -79
  101. package/dist/Equivalence.js.map +1 -1
  102. package/dist/ErrorReporter.d.ts +51 -27
  103. package/dist/ErrorReporter.d.ts.map +1 -1
  104. package/dist/ErrorReporter.js +50 -26
  105. package/dist/ErrorReporter.js.map +1 -1
  106. package/dist/ExecutionPlan.d.ts +13 -55
  107. package/dist/ExecutionPlan.d.ts.map +1 -1
  108. package/dist/ExecutionPlan.js +7 -28
  109. package/dist/ExecutionPlan.js.map +1 -1
  110. package/dist/Exit.d.ts +116 -192
  111. package/dist/Exit.d.ts.map +1 -1
  112. package/dist/Exit.js +82 -130
  113. package/dist/Exit.js.map +1 -1
  114. package/dist/Fiber.d.ts +82 -146
  115. package/dist/Fiber.d.ts.map +1 -1
  116. package/dist/Fiber.js +48 -87
  117. package/dist/Fiber.js.map +1 -1
  118. package/dist/FiberHandle.d.ts +152 -105
  119. package/dist/FiberHandle.d.ts.map +1 -1
  120. package/dist/FiberHandle.js +106 -73
  121. package/dist/FiberHandle.js.map +1 -1
  122. package/dist/FiberMap.d.ts +213 -168
  123. package/dist/FiberMap.d.ts.map +1 -1
  124. package/dist/FiberMap.js +114 -89
  125. package/dist/FiberMap.js.map +1 -1
  126. package/dist/FiberSet.d.ts +123 -81
  127. package/dist/FiberSet.d.ts.map +1 -1
  128. package/dist/FiberSet.js +85 -59
  129. package/dist/FiberSet.js.map +1 -1
  130. package/dist/FileSystem.d.ts +153 -264
  131. package/dist/FileSystem.d.ts.map +1 -1
  132. package/dist/FileSystem.js +42 -147
  133. package/dist/FileSystem.js.map +1 -1
  134. package/dist/Filter.d.ts +61 -33
  135. package/dist/Filter.d.ts.map +1 -1
  136. package/dist/Filter.js +26 -15
  137. package/dist/Filter.js.map +1 -1
  138. package/dist/Formatter.d.ts +25 -33
  139. package/dist/Formatter.d.ts.map +1 -1
  140. package/dist/Formatter.js +48 -49
  141. package/dist/Formatter.js.map +1 -1
  142. package/dist/Function.d.ts +76 -145
  143. package/dist/Function.d.ts.map +1 -1
  144. package/dist/Function.js +40 -57
  145. package/dist/Function.js.map +1 -1
  146. package/dist/Graph.d.ts +360 -714
  147. package/dist/Graph.d.ts.map +1 -1
  148. package/dist/Graph.js +168 -297
  149. package/dist/Graph.js.map +1 -1
  150. package/dist/HKT.d.ts +12 -6
  151. package/dist/HKT.d.ts.map +1 -1
  152. package/dist/Hash.d.ts +47 -83
  153. package/dist/Hash.d.ts.map +1 -1
  154. package/dist/Hash.js +46 -68
  155. package/dist/Hash.js.map +1 -1
  156. package/dist/HashMap.d.ts +319 -411
  157. package/dist/HashMap.d.ts.map +1 -1
  158. package/dist/HashMap.js +122 -166
  159. package/dist/HashMap.js.map +1 -1
  160. package/dist/HashRing.d.ts.map +1 -1
  161. package/dist/HashRing.js +1 -0
  162. package/dist/HashRing.js.map +1 -1
  163. package/dist/HashSet.d.ts +177 -284
  164. package/dist/HashSet.d.ts.map +1 -1
  165. package/dist/HashSet.js +68 -109
  166. package/dist/HashSet.js.map +1 -1
  167. package/dist/Inspectable.d.ts +12 -12
  168. package/dist/Inspectable.js +8 -8
  169. package/dist/Inspectable.js.map +1 -1
  170. package/dist/Iterable.d.ts +620 -786
  171. package/dist/Iterable.d.ts.map +1 -1
  172. package/dist/Iterable.js +228 -306
  173. package/dist/Iterable.js.map +1 -1
  174. package/dist/JsonPatch.d.ts +11 -13
  175. package/dist/JsonPatch.d.ts.map +1 -1
  176. package/dist/JsonPatch.js +44 -102
  177. package/dist/JsonPatch.js.map +1 -1
  178. package/dist/JsonPointer.d.ts +8 -8
  179. package/dist/JsonPointer.js +8 -8
  180. package/dist/JsonPointer.js.map +1 -1
  181. package/dist/JsonSchema.d.ts +98 -44
  182. package/dist/JsonSchema.d.ts.map +1 -1
  183. package/dist/JsonSchema.js +297 -234
  184. package/dist/JsonSchema.js.map +1 -1
  185. package/dist/Latch.d.ts +23 -35
  186. package/dist/Latch.d.ts.map +1 -1
  187. package/dist/Latch.js +16 -28
  188. package/dist/Latch.js.map +1 -1
  189. package/dist/Layer.d.ts +359 -260
  190. package/dist/Layer.d.ts.map +1 -1
  191. package/dist/Layer.js +195 -175
  192. package/dist/Layer.js.map +1 -1
  193. package/dist/LayerMap.d.ts +42 -29
  194. package/dist/LayerMap.d.ts.map +1 -1
  195. package/dist/LayerMap.js +31 -21
  196. package/dist/LayerMap.js.map +1 -1
  197. package/dist/LayerRef.d.ts +6 -2
  198. package/dist/LayerRef.d.ts.map +1 -1
  199. package/dist/LayerRef.js +6 -2
  200. package/dist/LayerRef.js.map +1 -1
  201. package/dist/LogLevel.d.ts +114 -214
  202. package/dist/LogLevel.d.ts.map +1 -1
  203. package/dist/LogLevel.js +41 -76
  204. package/dist/LogLevel.js.map +1 -1
  205. package/dist/Logger.d.ts +218 -467
  206. package/dist/Logger.d.ts.map +1 -1
  207. package/dist/Logger.js +204 -450
  208. package/dist/Logger.js.map +1 -1
  209. package/dist/ManagedRuntime.d.ts +7 -5
  210. package/dist/ManagedRuntime.d.ts.map +1 -1
  211. package/dist/ManagedRuntime.js +7 -5
  212. package/dist/ManagedRuntime.js.map +1 -1
  213. package/dist/Match.d.ts +217 -252
  214. package/dist/Match.d.ts.map +1 -1
  215. package/dist/Match.js +150 -183
  216. package/dist/Match.js.map +1 -1
  217. package/dist/Metric.d.ts +442 -993
  218. package/dist/Metric.d.ts.map +1 -1
  219. package/dist/Metric.js +198 -642
  220. package/dist/Metric.js.map +1 -1
  221. package/dist/MutableHashMap.d.ts +144 -173
  222. package/dist/MutableHashMap.d.ts.map +1 -1
  223. package/dist/MutableHashMap.js +68 -79
  224. package/dist/MutableHashMap.js.map +1 -1
  225. package/dist/MutableHashSet.d.ts +84 -89
  226. package/dist/MutableHashSet.d.ts.map +1 -1
  227. package/dist/MutableHashSet.js +44 -47
  228. package/dist/MutableHashSet.js.map +1 -1
  229. package/dist/MutableList.d.ts +71 -370
  230. package/dist/MutableList.d.ts.map +1 -1
  231. package/dist/MutableList.js +59 -284
  232. package/dist/MutableList.js.map +1 -1
  233. package/dist/MutableRef.d.ts +420 -243
  234. package/dist/MutableRef.d.ts.map +1 -1
  235. package/dist/MutableRef.js +209 -120
  236. package/dist/MutableRef.js.map +1 -1
  237. package/dist/Newtype.d.ts +21 -14
  238. package/dist/Newtype.d.ts.map +1 -1
  239. package/dist/Newtype.js +15 -13
  240. package/dist/Newtype.js.map +1 -1
  241. package/dist/NonEmptyIterable.d.ts +7 -137
  242. package/dist/NonEmptyIterable.d.ts.map +1 -1
  243. package/dist/NonEmptyIterable.js +5 -93
  244. package/dist/NonEmptyIterable.js.map +1 -1
  245. package/dist/Number.d.ts +196 -233
  246. package/dist/Number.d.ts.map +1 -1
  247. package/dist/Number.js +90 -109
  248. package/dist/Number.js.map +1 -1
  249. package/dist/Optic.d.ts +97 -189
  250. package/dist/Optic.d.ts.map +1 -1
  251. package/dist/Optic.js +187 -290
  252. package/dist/Optic.js.map +1 -1
  253. package/dist/Option.d.ts +447 -812
  254. package/dist/Option.d.ts.map +1 -1
  255. package/dist/Option.js +211 -392
  256. package/dist/Option.js.map +1 -1
  257. package/dist/Order.d.ts +109 -109
  258. package/dist/Order.js +91 -91
  259. package/dist/Order.js.map +1 -1
  260. package/dist/Ordering.d.ts +20 -23
  261. package/dist/Ordering.d.ts.map +1 -1
  262. package/dist/Ordering.js +8 -9
  263. package/dist/Ordering.js.map +1 -1
  264. package/dist/PartitionedSemaphore.js.map +1 -1
  265. package/dist/Path.d.ts +38 -41
  266. package/dist/Path.d.ts.map +1 -1
  267. package/dist/Path.js +3 -4
  268. package/dist/Path.js.map +1 -1
  269. package/dist/Pipeable.d.ts +6 -5
  270. package/dist/Pipeable.d.ts.map +1 -1
  271. package/dist/Pipeable.js +2 -2
  272. package/dist/Pipeable.js.map +1 -1
  273. package/dist/PlatformError.d.ts +4 -4
  274. package/dist/PlatformError.js +3 -3
  275. package/dist/PlatformError.js.map +1 -1
  276. package/dist/Pool.d.ts +4 -2
  277. package/dist/Pool.d.ts.map +1 -1
  278. package/dist/Pool.js +4 -2
  279. package/dist/Pool.js.map +1 -1
  280. package/dist/Predicate.d.ts +200 -181
  281. package/dist/Predicate.d.ts.map +1 -1
  282. package/dist/Predicate.js +100 -108
  283. package/dist/Predicate.js.map +1 -1
  284. package/dist/PrimaryKey.d.ts +7 -7
  285. package/dist/PrimaryKey.js +5 -5
  286. package/dist/PrimaryKey.js.map +1 -1
  287. package/dist/PubSub.d.ts +425 -494
  288. package/dist/PubSub.d.ts.map +1 -1
  289. package/dist/PubSub.js +373 -362
  290. package/dist/PubSub.js.map +1 -1
  291. package/dist/Pull.d.ts +24 -18
  292. package/dist/Pull.d.ts.map +1 -1
  293. package/dist/Pull.js +11 -9
  294. package/dist/Pull.js.map +1 -1
  295. package/dist/Queue.d.ts +200 -159
  296. package/dist/Queue.d.ts.map +1 -1
  297. package/dist/Queue.js +162 -132
  298. package/dist/Queue.js.map +1 -1
  299. package/dist/Random.d.ts +49 -74
  300. package/dist/Random.d.ts.map +1 -1
  301. package/dist/Random.js +35 -54
  302. package/dist/Random.js.map +1 -1
  303. package/dist/RcMap.d.ts +121 -63
  304. package/dist/RcMap.d.ts.map +1 -1
  305. package/dist/RcMap.js +42 -21
  306. package/dist/RcMap.js.map +1 -1
  307. package/dist/RcRef.d.ts +24 -13
  308. package/dist/RcRef.d.ts.map +1 -1
  309. package/dist/RcRef.js +15 -9
  310. package/dist/RcRef.js.map +1 -1
  311. package/dist/Record.d.ts +291 -488
  312. package/dist/Record.d.ts.map +1 -1
  313. package/dist/Record.js +111 -202
  314. package/dist/Record.js.map +1 -1
  315. package/dist/Redactable.d.ts +6 -2
  316. package/dist/Redactable.d.ts.map +1 -1
  317. package/dist/Redactable.js +7 -2
  318. package/dist/Redactable.js.map +1 -1
  319. package/dist/Redacted.d.ts +25 -25
  320. package/dist/Redacted.d.ts.map +1 -1
  321. package/dist/Redacted.js +19 -20
  322. package/dist/Redacted.js.map +1 -1
  323. package/dist/Reducer.d.ts +8 -15
  324. package/dist/Reducer.d.ts.map +1 -1
  325. package/dist/Reducer.js +6 -12
  326. package/dist/Reducer.js.map +1 -1
  327. package/dist/Ref.d.ts +95 -165
  328. package/dist/Ref.d.ts.map +1 -1
  329. package/dist/Ref.js +75 -122
  330. package/dist/Ref.js.map +1 -1
  331. package/dist/References.d.ts +102 -168
  332. package/dist/References.d.ts.map +1 -1
  333. package/dist/References.js +102 -168
  334. package/dist/References.js.map +1 -1
  335. package/dist/RegExp.d.ts +10 -14
  336. package/dist/RegExp.d.ts.map +1 -1
  337. package/dist/RegExp.js +10 -14
  338. package/dist/RegExp.js.map +1 -1
  339. package/dist/Request.d.ts +31 -21
  340. package/dist/Request.d.ts.map +1 -1
  341. package/dist/Request.js +16 -13
  342. package/dist/Request.js.map +1 -1
  343. package/dist/RequestResolver.d.ts +201 -90
  344. package/dist/RequestResolver.d.ts.map +1 -1
  345. package/dist/RequestResolver.js +87 -41
  346. package/dist/RequestResolver.js.map +1 -1
  347. package/dist/Resource.js.map +1 -1
  348. package/dist/Result.d.ts +302 -470
  349. package/dist/Result.d.ts.map +1 -1
  350. package/dist/Result.js +133 -217
  351. package/dist/Result.js.map +1 -1
  352. package/dist/Runtime.d.ts +50 -75
  353. package/dist/Runtime.d.ts.map +1 -1
  354. package/dist/Runtime.js +39 -60
  355. package/dist/Runtime.js.map +1 -1
  356. package/dist/Schedule.d.ts +290 -1636
  357. package/dist/Schedule.d.ts.map +1 -1
  358. package/dist/Schedule.js +162 -803
  359. package/dist/Schedule.js.map +1 -1
  360. package/dist/Scheduler.d.ts +5 -5
  361. package/dist/Scheduler.d.ts.map +1 -1
  362. package/dist/Scheduler.js +18 -6
  363. package/dist/Scheduler.js.map +1 -1
  364. package/dist/Schema.d.ts +644 -642
  365. package/dist/Schema.d.ts.map +1 -1
  366. package/dist/Schema.js +491 -527
  367. package/dist/Schema.js.map +1 -1
  368. package/dist/SchemaAST.d.ts +27 -50
  369. package/dist/SchemaAST.d.ts.map +1 -1
  370. package/dist/SchemaAST.js +366 -279
  371. package/dist/SchemaAST.js.map +1 -1
  372. package/dist/SchemaError.d.ts +7 -6
  373. package/dist/SchemaError.d.ts.map +1 -1
  374. package/dist/SchemaError.js +7 -6
  375. package/dist/SchemaError.js.map +1 -1
  376. package/dist/SchemaGetter.d.ts +217 -174
  377. package/dist/SchemaGetter.d.ts.map +1 -1
  378. package/dist/SchemaGetter.js +218 -185
  379. package/dist/SchemaGetter.js.map +1 -1
  380. package/dist/SchemaIssue.d.ts +62 -190
  381. package/dist/SchemaIssue.d.ts.map +1 -1
  382. package/dist/SchemaIssue.js +73 -265
  383. package/dist/SchemaIssue.js.map +1 -1
  384. package/dist/SchemaParser.d.ts +2 -2
  385. package/dist/SchemaParser.d.ts.map +1 -1
  386. package/dist/SchemaParser.js +123 -75
  387. package/dist/SchemaParser.js.map +1 -1
  388. package/dist/SchemaRepresentation.d.ts +22 -36
  389. package/dist/SchemaRepresentation.d.ts.map +1 -1
  390. package/dist/SchemaRepresentation.js +20 -26
  391. package/dist/SchemaRepresentation.js.map +1 -1
  392. package/dist/SchemaTransformation.d.ts +114 -74
  393. package/dist/SchemaTransformation.d.ts.map +1 -1
  394. package/dist/SchemaTransformation.js +120 -85
  395. package/dist/SchemaTransformation.js.map +1 -1
  396. package/dist/Scope.d.ts +123 -151
  397. package/dist/Scope.d.ts.map +1 -1
  398. package/dist/Scope.js +72 -92
  399. package/dist/Scope.js.map +1 -1
  400. package/dist/ScopedCache.js.map +1 -1
  401. package/dist/ScopedRef.d.ts +3 -3
  402. package/dist/ScopedRef.js +2 -2
  403. package/dist/ScopedRef.js.map +1 -1
  404. package/dist/Semaphore.d.ts +96 -10
  405. package/dist/Semaphore.d.ts.map +1 -1
  406. package/dist/Semaphore.js +78 -39
  407. package/dist/Semaphore.js.map +1 -1
  408. package/dist/Sink.d.ts +117 -107
  409. package/dist/Sink.d.ts.map +1 -1
  410. package/dist/Sink.js +107 -100
  411. package/dist/Sink.js.map +1 -1
  412. package/dist/Stdio.d.ts +1 -1
  413. package/dist/Stdio.js.map +1 -1
  414. package/dist/Stream.d.ts +2415 -2949
  415. package/dist/Stream.d.ts.map +1 -1
  416. package/dist/Stream.js +1078 -1381
  417. package/dist/Stream.js.map +1 -1
  418. package/dist/String.d.ts +262 -308
  419. package/dist/String.d.ts.map +1 -1
  420. package/dist/String.js +184 -215
  421. package/dist/String.js.map +1 -1
  422. package/dist/Struct.d.ts +109 -114
  423. package/dist/Struct.d.ts.map +1 -1
  424. package/dist/Struct.js +41 -50
  425. package/dist/Struct.js.map +1 -1
  426. package/dist/SubscriptionRef.d.ts +282 -250
  427. package/dist/SubscriptionRef.d.ts.map +1 -1
  428. package/dist/SubscriptionRef.js +104 -92
  429. package/dist/SubscriptionRef.js.map +1 -1
  430. package/dist/Symbol.d.ts +3 -3
  431. package/dist/Symbol.js +3 -3
  432. package/dist/Symbol.js.map +1 -1
  433. package/dist/SynchronizedRef.js.map +1 -1
  434. package/dist/Take.js.map +1 -1
  435. package/dist/Terminal.d.ts +2 -2
  436. package/dist/Terminal.js +1 -1
  437. package/dist/Terminal.js.map +1 -1
  438. package/dist/Tracer.d.ts +100 -54
  439. package/dist/Tracer.d.ts.map +1 -1
  440. package/dist/Tracer.js +41 -24
  441. package/dist/Tracer.js.map +1 -1
  442. package/dist/Trie.d.ts +287 -679
  443. package/dist/Trie.d.ts.map +1 -1
  444. package/dist/Trie.js +109 -251
  445. package/dist/Trie.js.map +1 -1
  446. package/dist/Tuple.d.ts +92 -127
  447. package/dist/Tuple.d.ts.map +1 -1
  448. package/dist/Tuple.js +42 -57
  449. package/dist/Tuple.js.map +1 -1
  450. package/dist/TxChunk.d.ts +201 -121
  451. package/dist/TxChunk.d.ts.map +1 -1
  452. package/dist/TxChunk.js +85 -56
  453. package/dist/TxChunk.js.map +1 -1
  454. package/dist/TxDeferred.d.ts +62 -46
  455. package/dist/TxDeferred.d.ts.map +1 -1
  456. package/dist/TxDeferred.js +30 -22
  457. package/dist/TxDeferred.js.map +1 -1
  458. package/dist/TxHashMap.d.ts +631 -779
  459. package/dist/TxHashMap.d.ts.map +1 -1
  460. package/dist/TxHashMap.js +268 -330
  461. package/dist/TxHashMap.js.map +1 -1
  462. package/dist/TxHashSet.d.ts +297 -236
  463. package/dist/TxHashSet.d.ts.map +1 -1
  464. package/dist/TxHashSet.js +130 -100
  465. package/dist/TxHashSet.js.map +1 -1
  466. package/dist/TxPriorityQueue.d.ts +126 -95
  467. package/dist/TxPriorityQueue.d.ts.map +1 -1
  468. package/dist/TxPriorityQueue.js +74 -56
  469. package/dist/TxPriorityQueue.js.map +1 -1
  470. package/dist/TxPubSub.d.ts +101 -88
  471. package/dist/TxPubSub.d.ts.map +1 -1
  472. package/dist/TxPubSub.js +87 -66
  473. package/dist/TxPubSub.js.map +1 -1
  474. package/dist/TxQueue.d.ts +200 -180
  475. package/dist/TxQueue.d.ts.map +1 -1
  476. package/dist/TxQueue.js +160 -136
  477. package/dist/TxQueue.js.map +1 -1
  478. package/dist/TxReentrantLock.d.ts +97 -66
  479. package/dist/TxReentrantLock.d.ts.map +1 -1
  480. package/dist/TxReentrantLock.js +67 -45
  481. package/dist/TxReentrantLock.js.map +1 -1
  482. package/dist/TxRef.d.ts +51 -32
  483. package/dist/TxRef.d.ts.map +1 -1
  484. package/dist/TxRef.js +23 -15
  485. package/dist/TxRef.js.map +1 -1
  486. package/dist/TxSemaphore.d.ts +129 -95
  487. package/dist/TxSemaphore.d.ts.map +1 -1
  488. package/dist/TxSemaphore.js +85 -70
  489. package/dist/TxSemaphore.js.map +1 -1
  490. package/dist/TxSubscriptionRef.d.ts +97 -70
  491. package/dist/TxSubscriptionRef.d.ts.map +1 -1
  492. package/dist/TxSubscriptionRef.js +44 -34
  493. package/dist/TxSubscriptionRef.js.map +1 -1
  494. package/dist/Types.d.ts +126 -67
  495. package/dist/Types.d.ts.map +1 -1
  496. package/dist/UndefinedOr.js.map +1 -1
  497. package/dist/Unify.d.ts +45 -65
  498. package/dist/Unify.d.ts.map +1 -1
  499. package/dist/Unify.js +6 -9
  500. package/dist/Unify.js.map +1 -1
  501. package/dist/Utils.d.ts +23 -16
  502. package/dist/Utils.d.ts.map +1 -1
  503. package/dist/Utils.js +3 -7
  504. package/dist/Utils.js.map +1 -1
  505. package/dist/index.js.map +1 -1
  506. package/dist/internal/array.js.map +1 -1
  507. package/dist/internal/core.js +1 -1
  508. package/dist/internal/core.js.map +1 -1
  509. package/dist/internal/dateTime.js +4 -0
  510. package/dist/internal/dateTime.js.map +1 -1
  511. package/dist/internal/doNotation.js.map +1 -1
  512. package/dist/internal/effect.js +77 -40
  513. package/dist/internal/effect.js.map +1 -1
  514. package/dist/internal/equal.js.map +1 -1
  515. package/dist/internal/errors.js.map +1 -1
  516. package/dist/internal/executionPlan.js.map +1 -1
  517. package/dist/internal/hashMap.js.map +1 -1
  518. package/dist/internal/hashSet.js.map +1 -1
  519. package/dist/internal/layer.js.map +1 -1
  520. package/dist/internal/matcher.js.map +1 -1
  521. package/dist/internal/metric.js.map +1 -1
  522. package/dist/internal/option.js.map +1 -1
  523. package/dist/internal/persistence.d.ts +2 -0
  524. package/dist/internal/persistence.d.ts.map +1 -0
  525. package/dist/internal/persistence.js +3 -0
  526. package/dist/internal/persistence.js.map +1 -0
  527. package/dist/internal/random.js.map +1 -1
  528. package/dist/internal/rcRef.js.map +1 -1
  529. package/dist/internal/record.js.map +1 -1
  530. package/dist/internal/redacted.js.map +1 -1
  531. package/dist/internal/references.js +3 -0
  532. package/dist/internal/references.js.map +1 -1
  533. package/dist/internal/request.js.map +1 -1
  534. package/dist/internal/result.js.map +1 -1
  535. package/dist/internal/schedule.js.map +1 -1
  536. package/dist/internal/schema/annotations.js.map +1 -1
  537. package/dist/internal/schema/cause.js.map +1 -1
  538. package/dist/internal/schema/fromJsonSchemaDocument.js +13 -11
  539. package/dist/internal/schema/fromJsonSchemaDocument.js.map +1 -1
  540. package/dist/internal/schema/fromRepresentation.js +8 -15
  541. package/dist/internal/schema/fromRepresentation.js.map +1 -1
  542. package/dist/internal/schema/parser.d.ts +14 -0
  543. package/dist/internal/schema/parser.d.ts.map +1 -0
  544. package/dist/internal/schema/parser.js +13 -0
  545. package/dist/internal/schema/parser.js.map +1 -0
  546. package/dist/internal/schema/schema.js.map +1 -1
  547. package/dist/internal/schema/toArbitrary.js.map +1 -1
  548. package/dist/internal/schema/toCodeDocument.js.map +1 -1
  549. package/dist/internal/schema/toEquivalence.js.map +1 -1
  550. package/dist/internal/schema/toJsonSchemaDocument.js +48 -6
  551. package/dist/internal/schema/toJsonSchemaDocument.js.map +1 -1
  552. package/dist/internal/schema/toRepresentation.js +87 -107
  553. package/dist/internal/schema/toRepresentation.js.map +1 -1
  554. package/dist/internal/stackTraceLimit.js.map +1 -1
  555. package/dist/internal/stream.js.map +1 -1
  556. package/dist/internal/tracer.js.map +1 -1
  557. package/dist/internal/trie.js +13 -9
  558. package/dist/internal/trie.js.map +1 -1
  559. package/dist/testing/FastCheck.d.ts +8 -7
  560. package/dist/testing/FastCheck.d.ts.map +1 -1
  561. package/dist/testing/FastCheck.js +8 -7
  562. package/dist/testing/FastCheck.js.map +1 -1
  563. package/dist/testing/TestClock.d.ts +57 -28
  564. package/dist/testing/TestClock.d.ts.map +1 -1
  565. package/dist/testing/TestClock.js +50 -18
  566. package/dist/testing/TestClock.js.map +1 -1
  567. package/dist/testing/TestConsole.d.ts +32 -31
  568. package/dist/testing/TestConsole.d.ts.map +1 -1
  569. package/dist/testing/TestConsole.js +24 -22
  570. package/dist/testing/TestConsole.js.map +1 -1
  571. package/dist/testing/TestSchema.d.ts +29 -29
  572. package/dist/testing/TestSchema.js +25 -25
  573. package/dist/testing/TestSchema.js.map +1 -1
  574. package/dist/testing/index.js.map +1 -1
  575. package/dist/unstable/ai/AiError.d.ts +95 -118
  576. package/dist/unstable/ai/AiError.d.ts.map +1 -1
  577. package/dist/unstable/ai/AiError.js +94 -117
  578. package/dist/unstable/ai/AiError.js.map +1 -1
  579. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
  580. package/dist/unstable/ai/AnthropicStructuredOutput.js +1 -1
  581. package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
  582. package/dist/unstable/ai/Chat.d.ts +132 -97
  583. package/dist/unstable/ai/Chat.d.ts.map +1 -1
  584. package/dist/unstable/ai/Chat.js +55 -51
  585. package/dist/unstable/ai/Chat.js.map +1 -1
  586. package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
  587. package/dist/unstable/ai/IdGenerator.d.ts +32 -28
  588. package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
  589. package/dist/unstable/ai/IdGenerator.js +26 -21
  590. package/dist/unstable/ai/IdGenerator.js.map +1 -1
  591. package/dist/unstable/ai/LanguageModel.d.ts +107 -67
  592. package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
  593. package/dist/unstable/ai/LanguageModel.js +104 -64
  594. package/dist/unstable/ai/LanguageModel.js.map +1 -1
  595. package/dist/unstable/ai/McpProtocol.d.ts +30 -0
  596. package/dist/unstable/ai/McpProtocol.d.ts.map +1 -0
  597. package/dist/unstable/ai/McpProtocol.js +20 -0
  598. package/dist/unstable/ai/McpProtocol.js.map +1 -0
  599. package/dist/unstable/ai/McpSchema.d.ts +141 -75
  600. package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
  601. package/dist/unstable/ai/McpSchema.js +58 -50
  602. package/dist/unstable/ai/McpSchema.js.map +1 -1
  603. package/dist/unstable/ai/McpServer.d.ts +68 -59
  604. package/dist/unstable/ai/McpServer.d.ts.map +1 -1
  605. package/dist/unstable/ai/McpServer.js +694 -241
  606. package/dist/unstable/ai/McpServer.js.map +1 -1
  607. package/dist/unstable/ai/Model.d.ts +8 -19
  608. package/dist/unstable/ai/Model.d.ts.map +1 -1
  609. package/dist/unstable/ai/Model.js +9 -20
  610. package/dist/unstable/ai/Model.js.map +1 -1
  611. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +1 -1
  612. package/dist/unstable/ai/OpenAiStructuredOutput.js +1 -1
  613. package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
  614. package/dist/unstable/ai/Prompt.d.ts +112 -38
  615. package/dist/unstable/ai/Prompt.d.ts.map +1 -1
  616. package/dist/unstable/ai/Prompt.js +53 -17
  617. package/dist/unstable/ai/Prompt.js.map +1 -1
  618. package/dist/unstable/ai/Response.d.ts +28 -14
  619. package/dist/unstable/ai/Response.d.ts.map +1 -1
  620. package/dist/unstable/ai/Response.js +9 -4
  621. package/dist/unstable/ai/Response.js.map +1 -1
  622. package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
  623. package/dist/unstable/ai/Telemetry.d.ts +46 -13
  624. package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
  625. package/dist/unstable/ai/Telemetry.js +18 -7
  626. package/dist/unstable/ai/Telemetry.js.map +1 -1
  627. package/dist/unstable/ai/Tokenizer.d.ts +14 -3
  628. package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
  629. package/dist/unstable/ai/Tokenizer.js +10 -2
  630. package/dist/unstable/ai/Tokenizer.js.map +1 -1
  631. package/dist/unstable/ai/Tool.d.ts +59 -44
  632. package/dist/unstable/ai/Tool.d.ts.map +1 -1
  633. package/dist/unstable/ai/Tool.js +48 -39
  634. package/dist/unstable/ai/Tool.js.map +1 -1
  635. package/dist/unstable/ai/Toolkit.d.ts +26 -8
  636. package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
  637. package/dist/unstable/ai/Toolkit.js +18 -4
  638. package/dist/unstable/ai/Toolkit.js.map +1 -1
  639. package/dist/unstable/ai/index.d.ts +4 -0
  640. package/dist/unstable/ai/index.d.ts.map +1 -1
  641. package/dist/unstable/ai/index.js +4 -0
  642. package/dist/unstable/ai/index.js.map +1 -1
  643. package/dist/unstable/ai/internal/codec-transformer.js.map +1 -1
  644. package/dist/unstable/ai/internal/mcpProtocol.d.ts +21 -0
  645. package/dist/unstable/ai/internal/mcpProtocol.d.ts.map +1 -0
  646. package/dist/unstable/ai/internal/mcpProtocol.js +22 -0
  647. package/dist/unstable/ai/internal/mcpProtocol.js.map +1 -0
  648. package/dist/unstable/ai/internal/mcpProtocolRegistry.d.ts +2 -0
  649. package/dist/unstable/ai/internal/mcpProtocolRegistry.d.ts.map +1 -0
  650. package/dist/unstable/ai/internal/mcpProtocolRegistry.js +32 -0
  651. package/dist/unstable/ai/internal/mcpProtocolRegistry.js.map +1 -0
  652. package/dist/unstable/ai/internal/structured-output.js +14 -15
  653. package/dist/unstable/ai/internal/structured-output.js.map +1 -1
  654. package/dist/unstable/cli/Argument.d.ts +273 -69
  655. package/dist/unstable/cli/Argument.d.ts.map +1 -1
  656. package/dist/unstable/cli/Argument.js +111 -33
  657. package/dist/unstable/cli/Argument.js.map +1 -1
  658. package/dist/unstable/cli/CliConfig.js.map +1 -1
  659. package/dist/unstable/cli/CliError.d.ts +69 -76
  660. package/dist/unstable/cli/CliError.d.ts.map +1 -1
  661. package/dist/unstable/cli/CliError.js +57 -61
  662. package/dist/unstable/cli/CliError.js.map +1 -1
  663. package/dist/unstable/cli/CliOutput.d.ts +35 -54
  664. package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
  665. package/dist/unstable/cli/CliOutput.js +26 -42
  666. package/dist/unstable/cli/CliOutput.js.map +1 -1
  667. package/dist/unstable/cli/Command.d.ts +705 -107
  668. package/dist/unstable/cli/Command.d.ts.map +1 -1
  669. package/dist/unstable/cli/Command.js +238 -42
  670. package/dist/unstable/cli/Command.js.map +1 -1
  671. package/dist/unstable/cli/Completions.js.map +1 -1
  672. package/dist/unstable/cli/Flag.d.ts +418 -138
  673. package/dist/unstable/cli/Flag.d.ts.map +1 -1
  674. package/dist/unstable/cli/Flag.js +197 -71
  675. package/dist/unstable/cli/Flag.js.map +1 -1
  676. package/dist/unstable/cli/GlobalFlag.d.ts +1 -1
  677. package/dist/unstable/cli/GlobalFlag.js.map +1 -1
  678. package/dist/unstable/cli/HelpDoc.d.ts +12 -4
  679. package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
  680. package/dist/unstable/cli/Param.d.ts +292 -78
  681. package/dist/unstable/cli/Param.d.ts.map +1 -1
  682. package/dist/unstable/cli/Param.js +128 -46
  683. package/dist/unstable/cli/Param.js.map +1 -1
  684. package/dist/unstable/cli/Primitive.d.ts +370 -149
  685. package/dist/unstable/cli/Primitive.d.ts.map +1 -1
  686. package/dist/unstable/cli/Primitive.js +344 -136
  687. package/dist/unstable/cli/Primitive.js.map +1 -1
  688. package/dist/unstable/cli/Prompt.d.ts +23 -14
  689. package/dist/unstable/cli/Prompt.d.ts.map +1 -1
  690. package/dist/unstable/cli/Prompt.js +23 -14
  691. package/dist/unstable/cli/Prompt.js.map +1 -1
  692. package/dist/unstable/cli/index.js.map +1 -1
  693. package/dist/unstable/cli/internal/ansi.js.map +1 -1
  694. package/dist/unstable/cli/internal/auto-suggest.js.map +1 -1
  695. package/dist/unstable/cli/internal/command.js.map +1 -1
  696. package/dist/unstable/cli/internal/completions/bash.js.map +1 -1
  697. package/dist/unstable/cli/internal/completions/descriptor.js.map +1 -1
  698. package/dist/unstable/cli/internal/completions/fish.js.map +1 -1
  699. package/dist/unstable/cli/internal/completions/zsh.js.map +1 -1
  700. package/dist/unstable/cli/internal/config.js.map +1 -1
  701. package/dist/unstable/cli/internal/help.js.map +1 -1
  702. package/dist/unstable/cli/internal/lexer.js +17 -7
  703. package/dist/unstable/cli/internal/lexer.js.map +1 -1
  704. package/dist/unstable/cli/internal/parser.js +2 -2
  705. package/dist/unstable/cli/internal/parser.js.map +1 -1
  706. package/dist/unstable/cli/internal/wizard.js.map +1 -1
  707. package/dist/unstable/cluster/ClusterCron.js.map +1 -1
  708. package/dist/unstable/cluster/ClusterError.js.map +1 -1
  709. package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
  710. package/dist/unstable/cluster/ClusterSchema.d.ts +8 -8
  711. package/dist/unstable/cluster/ClusterSchema.js +8 -8
  712. package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
  713. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
  714. package/dist/unstable/cluster/ClusterWorkflowEngine.js +5 -1
  715. package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
  716. package/dist/unstable/cluster/DeliverAt.js.map +1 -1
  717. package/dist/unstable/cluster/Entity.d.ts +10 -10
  718. package/dist/unstable/cluster/Entity.d.ts.map +1 -1
  719. package/dist/unstable/cluster/Entity.js +8 -8
  720. package/dist/unstable/cluster/Entity.js.map +1 -1
  721. package/dist/unstable/cluster/EntityAddress.js.map +1 -1
  722. package/dist/unstable/cluster/EntityId.js.map +1 -1
  723. package/dist/unstable/cluster/EntityProxy.d.ts +4 -2
  724. package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
  725. package/dist/unstable/cluster/EntityProxy.js +4 -2
  726. package/dist/unstable/cluster/EntityProxy.js.map +1 -1
  727. package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
  728. package/dist/unstable/cluster/EntityResource.d.ts +2 -2
  729. package/dist/unstable/cluster/EntityResource.js +2 -2
  730. package/dist/unstable/cluster/EntityResource.js.map +1 -1
  731. package/dist/unstable/cluster/EntityType.js.map +1 -1
  732. package/dist/unstable/cluster/Envelope.d.ts +3 -3
  733. package/dist/unstable/cluster/Envelope.js +3 -3
  734. package/dist/unstable/cluster/Envelope.js.map +1 -1
  735. package/dist/unstable/cluster/HttpRunner.d.ts +2 -2
  736. package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
  737. package/dist/unstable/cluster/HttpRunner.js +6 -4
  738. package/dist/unstable/cluster/HttpRunner.js.map +1 -1
  739. package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
  740. package/dist/unstable/cluster/MachineId.js.map +1 -1
  741. package/dist/unstable/cluster/Message.d.ts +9 -9
  742. package/dist/unstable/cluster/Message.js +6 -6
  743. package/dist/unstable/cluster/Message.js.map +1 -1
  744. package/dist/unstable/cluster/MessageStorage.d.ts +15 -15
  745. package/dist/unstable/cluster/MessageStorage.js +5 -5
  746. package/dist/unstable/cluster/MessageStorage.js.map +1 -1
  747. package/dist/unstable/cluster/Reply.d.ts.map +1 -1
  748. package/dist/unstable/cluster/Reply.js +4 -4
  749. package/dist/unstable/cluster/Reply.js.map +1 -1
  750. package/dist/unstable/cluster/Runner.js.map +1 -1
  751. package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
  752. package/dist/unstable/cluster/RunnerHealth.d.ts +1 -1
  753. package/dist/unstable/cluster/RunnerHealth.js +1 -1
  754. package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
  755. package/dist/unstable/cluster/RunnerServer.d.ts +2 -1
  756. package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
  757. package/dist/unstable/cluster/RunnerServer.js +16 -16
  758. package/dist/unstable/cluster/RunnerServer.js.map +1 -1
  759. package/dist/unstable/cluster/RunnerStorage.d.ts +2 -2
  760. package/dist/unstable/cluster/RunnerStorage.js +1 -1
  761. package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
  762. package/dist/unstable/cluster/Runners.d.ts +6 -6
  763. package/dist/unstable/cluster/Runners.d.ts.map +1 -1
  764. package/dist/unstable/cluster/Runners.js +19 -10
  765. package/dist/unstable/cluster/Runners.js.map +1 -1
  766. package/dist/unstable/cluster/ShardId.js.map +1 -1
  767. package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
  768. package/dist/unstable/cluster/Sharding.js +3 -2
  769. package/dist/unstable/cluster/Sharding.js.map +1 -1
  770. package/dist/unstable/cluster/ShardingConfig.d.ts +3 -3
  771. package/dist/unstable/cluster/ShardingConfig.js +3 -3
  772. package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
  773. package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
  774. package/dist/unstable/cluster/SingleRunner.js.map +1 -1
  775. package/dist/unstable/cluster/Singleton.js.map +1 -1
  776. package/dist/unstable/cluster/SingletonAddress.d.ts +1 -1
  777. package/dist/unstable/cluster/SingletonAddress.js +1 -1
  778. package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
  779. package/dist/unstable/cluster/Snowflake.d.ts +8 -8
  780. package/dist/unstable/cluster/Snowflake.js +8 -8
  781. package/dist/unstable/cluster/Snowflake.js.map +1 -1
  782. package/dist/unstable/cluster/SocketRunner.js.map +1 -1
  783. package/dist/unstable/cluster/SqlMessageStorage.js +1 -1
  784. package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
  785. package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
  786. package/dist/unstable/cluster/SqlRunnerStorage.js +20 -5
  787. package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
  788. package/dist/unstable/cluster/TestRunner.js.map +1 -1
  789. package/dist/unstable/cluster/index.js.map +1 -1
  790. package/dist/unstable/cluster/internal/entityManager.js +5 -5
  791. package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
  792. package/dist/unstable/cluster/internal/entityReaper.js.map +1 -1
  793. package/dist/unstable/cluster/internal/hash.js.map +1 -1
  794. package/dist/unstable/cluster/internal/interruptors.js.map +1 -1
  795. package/dist/unstable/cluster/internal/resourceMap.js.map +1 -1
  796. package/dist/unstable/cluster/internal/resourceRef.js.map +1 -1
  797. package/dist/unstable/cluster/internal/shardLock.js.map +1 -1
  798. package/dist/unstable/devtools/DevTools.js.map +1 -1
  799. package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
  800. package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
  801. package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
  802. package/dist/unstable/devtools/index.js.map +1 -1
  803. package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
  804. package/dist/unstable/encoding/Msgpack.js +6 -8
  805. package/dist/unstable/encoding/Msgpack.js.map +1 -1
  806. package/dist/unstable/encoding/Ndjson.js.map +1 -1
  807. package/dist/unstable/encoding/Sse.d.ts +72 -8
  808. package/dist/unstable/encoding/Sse.d.ts.map +1 -1
  809. package/dist/unstable/encoding/Sse.js +58 -8
  810. package/dist/unstable/encoding/Sse.js.map +1 -1
  811. package/dist/unstable/encoding/index.js.map +1 -1
  812. package/dist/unstable/eventlog/Event.d.ts +20 -20
  813. package/dist/unstable/eventlog/Event.js.map +1 -1
  814. package/dist/unstable/eventlog/EventGroup.d.ts +4 -4
  815. package/dist/unstable/eventlog/EventGroup.js.map +1 -1
  816. package/dist/unstable/eventlog/EventJournal.d.ts +15 -15
  817. package/dist/unstable/eventlog/EventJournal.js +13 -13
  818. package/dist/unstable/eventlog/EventJournal.js.map +1 -1
  819. package/dist/unstable/eventlog/EventLog.d.ts +3 -3
  820. package/dist/unstable/eventlog/EventLog.js +3 -3
  821. package/dist/unstable/eventlog/EventLog.js.map +1 -1
  822. package/dist/unstable/eventlog/EventLogEncryption.d.ts +1 -1
  823. package/dist/unstable/eventlog/EventLogEncryption.js +1 -1
  824. package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
  825. package/dist/unstable/eventlog/EventLogMessage.d.ts +2 -2
  826. package/dist/unstable/eventlog/EventLogMessage.js +1 -1
  827. package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
  828. package/dist/unstable/eventlog/EventLogRemote.d.ts +15 -15
  829. package/dist/unstable/eventlog/EventLogRemote.js +1 -1
  830. package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
  831. package/dist/unstable/eventlog/EventLogServer.d.ts +11 -2
  832. package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
  833. package/dist/unstable/eventlog/EventLogServer.js +45 -21
  834. package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
  835. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +4 -4
  836. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
  837. package/dist/unstable/eventlog/EventLogServerEncrypted.js +13 -5
  838. package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
  839. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +5 -5
  840. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
  841. package/dist/unstable/eventlog/EventLogServerUnencrypted.js +14 -6
  842. package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
  843. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +1 -1
  844. package/dist/unstable/eventlog/EventLogSessionAuth.js +1 -1
  845. package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
  846. package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
  847. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
  848. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
  849. package/dist/unstable/eventlog/index.js.map +1 -1
  850. package/dist/unstable/eventlog/internal/identityRootSecretDerivation.js.map +1 -1
  851. package/dist/unstable/http/Cookies.d.ts +2 -2
  852. package/dist/unstable/http/Cookies.d.ts.map +1 -1
  853. package/dist/unstable/http/Cookies.js +30 -18
  854. package/dist/unstable/http/Cookies.js.map +1 -1
  855. package/dist/unstable/http/Etag.d.ts +1 -1
  856. package/dist/unstable/http/Etag.js +1 -1
  857. package/dist/unstable/http/Etag.js.map +1 -1
  858. package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
  859. package/dist/unstable/http/FetchHttpClient.js.map +1 -1
  860. package/dist/unstable/http/Headers.d.ts +2 -2
  861. package/dist/unstable/http/Headers.js +2 -2
  862. package/dist/unstable/http/Headers.js.map +1 -1
  863. package/dist/unstable/http/HttpBody.d.ts +5 -3
  864. package/dist/unstable/http/HttpBody.d.ts.map +1 -1
  865. package/dist/unstable/http/HttpBody.js +11 -5
  866. package/dist/unstable/http/HttpBody.js.map +1 -1
  867. package/dist/unstable/http/HttpClient.d.ts +51 -44
  868. package/dist/unstable/http/HttpClient.d.ts.map +1 -1
  869. package/dist/unstable/http/HttpClient.js +46 -17
  870. package/dist/unstable/http/HttpClient.js.map +1 -1
  871. package/dist/unstable/http/HttpClientError.js.map +1 -1
  872. package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
  873. package/dist/unstable/http/HttpClientRequest.js +2 -0
  874. package/dist/unstable/http/HttpClientRequest.js.map +1 -1
  875. package/dist/unstable/http/HttpClientResponse.d.ts +4 -4
  876. package/dist/unstable/http/HttpClientResponse.js +2 -2
  877. package/dist/unstable/http/HttpClientResponse.js.map +1 -1
  878. package/dist/unstable/http/HttpEffect.d.ts +6 -6
  879. package/dist/unstable/http/HttpEffect.js +3 -3
  880. package/dist/unstable/http/HttpEffect.js.map +1 -1
  881. package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
  882. package/dist/unstable/http/HttpMethod.d.ts +6 -9
  883. package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
  884. package/dist/unstable/http/HttpMethod.js +6 -9
  885. package/dist/unstable/http/HttpMethod.js.map +1 -1
  886. package/dist/unstable/http/HttpMiddleware.d.ts +75 -9
  887. package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
  888. package/dist/unstable/http/HttpMiddleware.js +164 -39
  889. package/dist/unstable/http/HttpMiddleware.js.map +1 -1
  890. package/dist/unstable/http/HttpPlatform.d.ts +76 -0
  891. package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
  892. package/dist/unstable/http/HttpPlatform.js +32 -0
  893. package/dist/unstable/http/HttpPlatform.js.map +1 -1
  894. package/dist/unstable/http/HttpRouter.d.ts +88 -89
  895. package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
  896. package/dist/unstable/http/HttpRouter.js +78 -79
  897. package/dist/unstable/http/HttpRouter.js.map +1 -1
  898. package/dist/unstable/http/HttpServer.d.ts +13 -13
  899. package/dist/unstable/http/HttpServer.js +6 -6
  900. package/dist/unstable/http/HttpServer.js.map +1 -1
  901. package/dist/unstable/http/HttpServerError.d.ts +2 -2
  902. package/dist/unstable/http/HttpServerError.js +2 -2
  903. package/dist/unstable/http/HttpServerError.js.map +1 -1
  904. package/dist/unstable/http/HttpServerRequest.d.ts +4 -4
  905. package/dist/unstable/http/HttpServerRequest.js +4 -4
  906. package/dist/unstable/http/HttpServerRequest.js.map +1 -1
  907. package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
  908. package/dist/unstable/http/HttpServerResponse.d.ts +22 -0
  909. package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
  910. package/dist/unstable/http/HttpServerResponse.js +10 -0
  911. package/dist/unstable/http/HttpServerResponse.js.map +1 -1
  912. package/dist/unstable/http/HttpStaticServer.d.ts +35 -7
  913. package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
  914. package/dist/unstable/http/HttpStaticServer.js +35 -7
  915. package/dist/unstable/http/HttpStaticServer.js.map +1 -1
  916. package/dist/unstable/http/HttpTraceContext.js.map +1 -1
  917. package/dist/unstable/http/Multipart.d.ts +6 -6
  918. package/dist/unstable/http/Multipart.js +5 -5
  919. package/dist/unstable/http/Multipart.js.map +1 -1
  920. package/dist/unstable/http/Template.js.map +1 -1
  921. package/dist/unstable/http/Url.d.ts +33 -63
  922. package/dist/unstable/http/Url.d.ts.map +1 -1
  923. package/dist/unstable/http/Url.js +14 -28
  924. package/dist/unstable/http/Url.js.map +1 -1
  925. package/dist/unstable/http/UrlParams.d.ts +10 -18
  926. package/dist/unstable/http/UrlParams.d.ts.map +1 -1
  927. package/dist/unstable/http/UrlParams.js +9 -17
  928. package/dist/unstable/http/UrlParams.js.map +1 -1
  929. package/dist/unstable/http/index.js.map +1 -1
  930. package/dist/unstable/http/internal/compression.d.ts +2 -0
  931. package/dist/unstable/http/internal/compression.d.ts.map +1 -0
  932. package/dist/unstable/http/internal/compression.js +155 -0
  933. package/dist/unstable/http/internal/compression.js.map +1 -0
  934. package/dist/unstable/http/internal/preResponseHandler.js.map +1 -1
  935. package/dist/unstable/httpapi/HttpApi.js.map +1 -1
  936. package/dist/unstable/httpapi/HttpApiBuilder.d.ts +1 -1
  937. package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
  938. package/dist/unstable/httpapi/HttpApiBuilder.js +10 -11
  939. package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
  940. package/dist/unstable/httpapi/HttpApiClient.d.ts +4 -5
  941. package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
  942. package/dist/unstable/httpapi/HttpApiClient.js +11 -13
  943. package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
  944. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +42 -42
  945. package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
  946. package/dist/unstable/httpapi/HttpApiError.d.ts +13 -13
  947. package/dist/unstable/httpapi/HttpApiError.js +13 -13
  948. package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
  949. package/dist/unstable/httpapi/HttpApiGroup.d.ts +15 -15
  950. package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
  951. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +71 -24
  952. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
  953. package/dist/unstable/httpapi/HttpApiMiddleware.js +57 -10
  954. package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
  955. package/dist/unstable/httpapi/HttpApiScalar.d.ts +0 -12
  956. package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
  957. package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
  958. package/dist/unstable/httpapi/HttpApiSchema.d.ts +6 -6
  959. package/dist/unstable/httpapi/HttpApiSchema.js +4 -4
  960. package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
  961. package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
  962. package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
  963. package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
  964. package/dist/unstable/httpapi/OpenApi.d.ts +13 -13
  965. package/dist/unstable/httpapi/OpenApi.js +13 -13
  966. package/dist/unstable/httpapi/OpenApi.js.map +1 -1
  967. package/dist/unstable/httpapi/index.js.map +1 -1
  968. package/dist/unstable/httpapi/internal/html.js.map +1 -1
  969. package/dist/unstable/httpapi/internal/httpApiScalar.js.map +1 -1
  970. package/dist/unstable/httpapi/internal/httpApiSwagger.js.map +1 -1
  971. package/dist/unstable/httpapi/internal/mediaType.js.map +1 -1
  972. package/dist/unstable/observability/Otlp.js.map +1 -1
  973. package/dist/unstable/observability/OtlpExporter.d.ts +12 -14
  974. package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
  975. package/dist/unstable/observability/OtlpExporter.js +17 -4
  976. package/dist/unstable/observability/OtlpExporter.js.map +1 -1
  977. package/dist/unstable/observability/OtlpLogger.js.map +1 -1
  978. package/dist/unstable/observability/OtlpMetrics.d.ts +4 -1
  979. package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
  980. package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
  981. package/dist/unstable/observability/OtlpResource.d.ts +16 -7
  982. package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
  983. package/dist/unstable/observability/OtlpResource.js +21 -12
  984. package/dist/unstable/observability/OtlpResource.js.map +1 -1
  985. package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
  986. package/dist/unstable/observability/OtlpTracer.js.map +1 -1
  987. package/dist/unstable/observability/PrometheusMetrics.d.ts +13 -4
  988. package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
  989. package/dist/unstable/observability/PrometheusMetrics.js +10 -3
  990. package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
  991. package/dist/unstable/observability/index.js.map +1 -1
  992. package/dist/unstable/observability/internal/otlpEnv.js +1 -1
  993. package/dist/unstable/observability/internal/otlpEnv.js.map +1 -1
  994. package/dist/unstable/observability/internal/otlpProtobuf.js.map +1 -1
  995. package/dist/unstable/observability/internal/protobuf.js +3 -0
  996. package/dist/unstable/observability/internal/protobuf.js.map +1 -1
  997. package/dist/unstable/persistence/KeyValueStore.d.ts +8 -3
  998. package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
  999. package/dist/unstable/persistence/KeyValueStore.js +22 -13
  1000. package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
  1001. package/dist/unstable/persistence/Persistable.d.ts +8 -8
  1002. package/dist/unstable/persistence/Persistable.js.map +1 -1
  1003. package/dist/unstable/persistence/PersistedCache.js.map +1 -1
  1004. package/dist/unstable/persistence/PersistedQueue.d.ts +6 -6
  1005. package/dist/unstable/persistence/PersistedQueue.js +6 -6
  1006. package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
  1007. package/dist/unstable/persistence/Persistence.d.ts +3 -3
  1008. package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
  1009. package/dist/unstable/persistence/Persistence.js +91 -15
  1010. package/dist/unstable/persistence/Persistence.js.map +1 -1
  1011. package/dist/unstable/persistence/RateLimiter.d.ts +26 -15
  1012. package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
  1013. package/dist/unstable/persistence/RateLimiter.js +24 -13
  1014. package/dist/unstable/persistence/RateLimiter.js.map +1 -1
  1015. package/dist/unstable/persistence/Redis.d.ts +2 -2
  1016. package/dist/unstable/persistence/Redis.js +1 -1
  1017. package/dist/unstable/persistence/Redis.js.map +1 -1
  1018. package/dist/unstable/persistence/index.js.map +1 -1
  1019. package/dist/unstable/process/ChildProcess.d.ts +64 -21
  1020. package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
  1021. package/dist/unstable/process/ChildProcess.js +14 -5
  1022. package/dist/unstable/process/ChildProcess.js.map +1 -1
  1023. package/dist/unstable/process/ChildProcessSpawner.d.ts +21 -10
  1024. package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
  1025. package/dist/unstable/process/ChildProcessSpawner.js +1 -1
  1026. package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
  1027. package/dist/unstable/process/index.js.map +1 -1
  1028. package/dist/unstable/reactivity/AsyncResult.d.ts +8 -8
  1029. package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
  1030. package/dist/unstable/reactivity/AsyncResult.js +10 -10
  1031. package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
  1032. package/dist/unstable/reactivity/Atom.d.ts +25 -22
  1033. package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
  1034. package/dist/unstable/reactivity/Atom.js +14 -13
  1035. package/dist/unstable/reactivity/Atom.js.map +1 -1
  1036. package/dist/unstable/reactivity/AtomHttpApi.d.ts +1 -1
  1037. package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
  1038. package/dist/unstable/reactivity/AtomHttpApi.js +4 -1
  1039. package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
  1040. package/dist/unstable/reactivity/AtomRef.js.map +1 -1
  1041. package/dist/unstable/reactivity/AtomRegistry.js +24 -3
  1042. package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
  1043. package/dist/unstable/reactivity/AtomRpc.d.ts +1 -1
  1044. package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
  1045. package/dist/unstable/reactivity/AtomRpc.js +4 -1
  1046. package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
  1047. package/dist/unstable/reactivity/Hydration.d.ts +1 -1
  1048. package/dist/unstable/reactivity/Hydration.js +1 -1
  1049. package/dist/unstable/reactivity/Hydration.js.map +1 -1
  1050. package/dist/unstable/reactivity/Reactivity.js.map +1 -1
  1051. package/dist/unstable/reactivity/index.js.map +1 -1
  1052. package/dist/unstable/rpc/Rpc.d.ts +35 -33
  1053. package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
  1054. package/dist/unstable/rpc/Rpc.js +4 -2
  1055. package/dist/unstable/rpc/Rpc.js.map +1 -1
  1056. package/dist/unstable/rpc/RpcClient.d.ts +12 -12
  1057. package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
  1058. package/dist/unstable/rpc/RpcClient.js +12 -11
  1059. package/dist/unstable/rpc/RpcClient.js.map +1 -1
  1060. package/dist/unstable/rpc/RpcClientError.js.map +1 -1
  1061. package/dist/unstable/rpc/RpcGroup.d.ts +8 -8
  1062. package/dist/unstable/rpc/RpcGroup.js +1 -1
  1063. package/dist/unstable/rpc/RpcGroup.js.map +1 -1
  1064. package/dist/unstable/rpc/RpcMessage.d.ts +31 -30
  1065. package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
  1066. package/dist/unstable/rpc/RpcMessage.js +6 -6
  1067. package/dist/unstable/rpc/RpcMessage.js.map +1 -1
  1068. package/dist/unstable/rpc/RpcMiddleware.d.ts +10 -10
  1069. package/dist/unstable/rpc/RpcMiddleware.js +1 -1
  1070. package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
  1071. package/dist/unstable/rpc/RpcSchema.d.ts +4 -4
  1072. package/dist/unstable/rpc/RpcSchema.js +3 -3
  1073. package/dist/unstable/rpc/RpcSchema.js.map +1 -1
  1074. package/dist/unstable/rpc/RpcSerialization.d.ts +58 -7
  1075. package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
  1076. package/dist/unstable/rpc/RpcSerialization.js +175 -96
  1077. package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
  1078. package/dist/unstable/rpc/RpcServer.d.ts +13 -13
  1079. package/dist/unstable/rpc/RpcServer.js +17 -13
  1080. package/dist/unstable/rpc/RpcServer.js.map +1 -1
  1081. package/dist/unstable/rpc/RpcTest.js.map +1 -1
  1082. package/dist/unstable/rpc/RpcWorker.d.ts +5 -5
  1083. package/dist/unstable/rpc/RpcWorker.js +4 -4
  1084. package/dist/unstable/rpc/RpcWorker.js.map +1 -1
  1085. package/dist/unstable/rpc/Utils.js.map +1 -1
  1086. package/dist/unstable/rpc/index.js.map +1 -1
  1087. package/dist/unstable/schema/Model.d.ts +52 -50
  1088. package/dist/unstable/schema/Model.d.ts.map +1 -1
  1089. package/dist/unstable/schema/Model.js +35 -33
  1090. package/dist/unstable/schema/Model.js.map +1 -1
  1091. package/dist/unstable/schema/VariantSchema.d.ts +5 -5
  1092. package/dist/unstable/schema/VariantSchema.js +2 -2
  1093. package/dist/unstable/schema/VariantSchema.js.map +1 -1
  1094. package/dist/unstable/schema/index.js.map +1 -1
  1095. package/dist/unstable/socket/Socket.d.ts +11 -3
  1096. package/dist/unstable/socket/Socket.d.ts.map +1 -1
  1097. package/dist/unstable/socket/Socket.js +9 -4
  1098. package/dist/unstable/socket/Socket.js.map +1 -1
  1099. package/dist/unstable/socket/SocketServer.js.map +1 -1
  1100. package/dist/unstable/socket/index.js.map +1 -1
  1101. package/dist/unstable/sql/Migrator.js.map +1 -1
  1102. package/dist/unstable/sql/SqlClient.d.ts +1 -1
  1103. package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
  1104. package/dist/unstable/sql/SqlClient.js +2 -2
  1105. package/dist/unstable/sql/SqlClient.js.map +1 -1
  1106. package/dist/unstable/sql/SqlConnection.js.map +1 -1
  1107. package/dist/unstable/sql/SqlError.js.map +1 -1
  1108. package/dist/unstable/sql/SqlModel.d.ts +2 -2
  1109. package/dist/unstable/sql/SqlModel.js +2 -2
  1110. package/dist/unstable/sql/SqlModel.js.map +1 -1
  1111. package/dist/unstable/sql/SqlResolver.d.ts +5 -5
  1112. package/dist/unstable/sql/SqlResolver.js +2 -2
  1113. package/dist/unstable/sql/SqlResolver.js.map +1 -1
  1114. package/dist/unstable/sql/SqlSchema.js.map +1 -1
  1115. package/dist/unstable/sql/SqlStream.js.map +1 -1
  1116. package/dist/unstable/sql/Statement.d.ts +6 -6
  1117. package/dist/unstable/sql/Statement.js +15 -15
  1118. package/dist/unstable/sql/Statement.js.map +1 -1
  1119. package/dist/unstable/sql/index.js.map +1 -1
  1120. package/dist/unstable/workers/Transferable.d.ts +1 -1
  1121. package/dist/unstable/workers/Transferable.js +1 -1
  1122. package/dist/unstable/workers/Transferable.js.map +1 -1
  1123. package/dist/unstable/workers/Worker.d.ts +2 -2
  1124. package/dist/unstable/workers/Worker.js +2 -2
  1125. package/dist/unstable/workers/Worker.js.map +1 -1
  1126. package/dist/unstable/workers/WorkerError.d.ts +7 -7
  1127. package/dist/unstable/workers/WorkerError.js +6 -6
  1128. package/dist/unstable/workers/WorkerError.js.map +1 -1
  1129. package/dist/unstable/workers/WorkerRunner.d.ts +1 -1
  1130. package/dist/unstable/workers/WorkerRunner.js +1 -1
  1131. package/dist/unstable/workers/WorkerRunner.js.map +1 -1
  1132. package/dist/unstable/workers/index.js.map +1 -1
  1133. package/dist/unstable/workflow/Activity.d.ts +2 -2
  1134. package/dist/unstable/workflow/Activity.js +2 -2
  1135. package/dist/unstable/workflow/Activity.js.map +1 -1
  1136. package/dist/unstable/workflow/DurableClock.d.ts +1 -1
  1137. package/dist/unstable/workflow/DurableClock.js +1 -1
  1138. package/dist/unstable/workflow/DurableClock.js.map +1 -1
  1139. package/dist/unstable/workflow/DurableDeferred.d.ts +10 -10
  1140. package/dist/unstable/workflow/DurableDeferred.js +5 -5
  1141. package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
  1142. package/dist/unstable/workflow/DurableQueue.d.ts +22 -20
  1143. package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
  1144. package/dist/unstable/workflow/DurableQueue.js +22 -20
  1145. package/dist/unstable/workflow/DurableQueue.js.map +1 -1
  1146. package/dist/unstable/workflow/Workflow.d.ts +21 -21
  1147. package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
  1148. package/dist/unstable/workflow/Workflow.js +13 -14
  1149. package/dist/unstable/workflow/Workflow.js.map +1 -1
  1150. package/dist/unstable/workflow/WorkflowEngine.d.ts +1 -1
  1151. package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
  1152. package/dist/unstable/workflow/WorkflowProxy.d.ts +4 -2
  1153. package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
  1154. package/dist/unstable/workflow/WorkflowProxy.js +4 -2
  1155. package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
  1156. package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
  1157. package/dist/unstable/workflow/index.js.map +1 -1
  1158. package/dist/unstable/workflow/internal/crypto.js.map +1 -1
  1159. package/package.json +5 -6
  1160. package/src/Array.ts +982 -1045
  1161. package/src/BigDecimal.ts +433 -756
  1162. package/src/BigInt.ts +213 -269
  1163. package/src/Boolean.ts +146 -188
  1164. package/src/Cache.ts +409 -255
  1165. package/src/Cause.ts +167 -277
  1166. package/src/Channel.ts +891 -816
  1167. package/src/ChannelSchema.ts +1 -1
  1168. package/src/Chunk.ts +841 -1181
  1169. package/src/Clock.ts +181 -49
  1170. package/src/Combiner.ts +20 -33
  1171. package/src/Config.ts +615 -332
  1172. package/src/ConfigProvider.ts +214 -120
  1173. package/src/Console.ts +289 -39
  1174. package/src/Context.ts +319 -378
  1175. package/src/Cron.ts +68 -77
  1176. package/src/Crypto.ts +13 -15
  1177. package/src/Data.ts +60 -80
  1178. package/src/DateTime.ts +564 -660
  1179. package/src/Deferred.ts +253 -256
  1180. package/src/Duration.ts +216 -308
  1181. package/src/Effect.ts +2893 -3279
  1182. package/src/Encoding.ts +22 -40
  1183. package/src/Equal.ts +49 -39
  1184. package/src/Equivalence.ts +103 -105
  1185. package/src/ErrorReporter.ts +51 -27
  1186. package/src/ExecutionPlan.ts +13 -55
  1187. package/src/Exit.ts +116 -192
  1188. package/src/Fiber.ts +81 -148
  1189. package/src/FiberHandle.ts +152 -105
  1190. package/src/FiberMap.ts +225 -174
  1191. package/src/FiberSet.ts +124 -82
  1192. package/src/FileSystem.ts +155 -263
  1193. package/src/Filter.ts +61 -33
  1194. package/src/Formatter.ts +54 -56
  1195. package/src/Function.ts +76 -145
  1196. package/src/Graph.ts +416 -770
  1197. package/src/HKT.ts +12 -6
  1198. package/src/Hash.ts +52 -83
  1199. package/src/HashMap.ts +319 -411
  1200. package/src/HashRing.ts +1 -0
  1201. package/src/HashSet.ts +177 -284
  1202. package/src/Inspectable.ts +12 -12
  1203. package/src/Iterable.ts +620 -786
  1204. package/src/JsonPatch.ts +58 -112
  1205. package/src/JsonPointer.ts +8 -8
  1206. package/src/JsonSchema.ts +402 -244
  1207. package/src/Latch.ts +23 -35
  1208. package/src/Layer.ts +359 -260
  1209. package/src/LayerMap.ts +49 -29
  1210. package/src/LayerRef.ts +6 -2
  1211. package/src/LogLevel.ts +114 -214
  1212. package/src/Logger.ts +344 -697
  1213. package/src/ManagedRuntime.ts +7 -5
  1214. package/src/Match.ts +217 -252
  1215. package/src/Metric.ts +516 -1089
  1216. package/src/MutableHashMap.ts +218 -255
  1217. package/src/MutableHashSet.ts +84 -89
  1218. package/src/MutableList.ts +73 -370
  1219. package/src/MutableRef.ts +420 -243
  1220. package/src/Newtype.ts +21 -14
  1221. package/src/NonEmptyIterable.ts +7 -137
  1222. package/src/Number.ts +196 -233
  1223. package/src/Optic.ts +243 -383
  1224. package/src/Option.ts +447 -812
  1225. package/src/Order.ts +109 -109
  1226. package/src/Ordering.ts +20 -23
  1227. package/src/Path.ts +38 -41
  1228. package/src/Pipeable.ts +6 -5
  1229. package/src/PlatformError.ts +4 -4
  1230. package/src/Pool.ts +4 -2
  1231. package/src/Predicate.ts +200 -181
  1232. package/src/PrimaryKey.ts +7 -7
  1233. package/src/PubSub.ts +526 -552
  1234. package/src/Pull.ts +24 -18
  1235. package/src/Queue.ts +200 -159
  1236. package/src/Random.ts +49 -74
  1237. package/src/RcMap.ts +121 -63
  1238. package/src/RcRef.ts +24 -13
  1239. package/src/Record.ts +291 -488
  1240. package/src/Redactable.ts +10 -3
  1241. package/src/Redacted.ts +25 -25
  1242. package/src/Reducer.ts +8 -15
  1243. package/src/Ref.ts +221 -361
  1244. package/src/References.ts +102 -168
  1245. package/src/RegExp.ts +10 -14
  1246. package/src/Request.ts +31 -21
  1247. package/src/RequestResolver.ts +202 -91
  1248. package/src/Result.ts +312 -484
  1249. package/src/Runtime.ts +50 -75
  1250. package/src/Schedule.ts +308 -1734
  1251. package/src/Scheduler.ts +20 -7
  1252. package/src/Schema.ts +716 -745
  1253. package/src/SchemaAST.ts +466 -358
  1254. package/src/SchemaError.ts +7 -6
  1255. package/src/SchemaGetter.ts +242 -190
  1256. package/src/SchemaIssue.ts +89 -275
  1257. package/src/SchemaParser.ts +180 -93
  1258. package/src/SchemaRepresentation.ts +22 -40
  1259. package/src/SchemaTransformation.ts +129 -88
  1260. package/src/Scope.ts +123 -151
  1261. package/src/ScopedRef.ts +4 -4
  1262. package/src/Semaphore.ts +152 -51
  1263. package/src/Sink.ts +128 -113
  1264. package/src/Stdio.ts +1 -1
  1265. package/src/Stream.ts +2602 -3123
  1266. package/src/String.ts +275 -312
  1267. package/src/Struct.ts +109 -114
  1268. package/src/SubscriptionRef.ts +284 -252
  1269. package/src/Symbol.ts +3 -3
  1270. package/src/Terminal.ts +2 -2
  1271. package/src/Tracer.ts +102 -55
  1272. package/src/Trie.ts +287 -679
  1273. package/src/Tuple.ts +92 -127
  1274. package/src/TxChunk.ts +201 -121
  1275. package/src/TxDeferred.ts +62 -46
  1276. package/src/TxHashMap.ts +645 -799
  1277. package/src/TxHashSet.ts +443 -356
  1278. package/src/TxPriorityQueue.ts +130 -98
  1279. package/src/TxPubSub.ts +107 -80
  1280. package/src/TxQueue.ts +214 -183
  1281. package/src/TxReentrantLock.ts +97 -66
  1282. package/src/TxRef.ts +51 -32
  1283. package/src/TxSemaphore.ts +129 -95
  1284. package/src/TxSubscriptionRef.ts +97 -70
  1285. package/src/Types.ts +126 -67
  1286. package/src/Unify.ts +45 -65
  1287. package/src/Utils.ts +23 -16
  1288. package/src/internal/core.ts +2 -2
  1289. package/src/internal/dateTime.ts +6 -0
  1290. package/src/internal/effect.ts +93 -48
  1291. package/src/internal/persistence.ts +2 -0
  1292. package/src/internal/references.ts +3 -2
  1293. package/src/internal/schema/fromJsonSchemaDocument.ts +15 -13
  1294. package/src/internal/schema/fromRepresentation.ts +10 -16
  1295. package/src/internal/schema/parser.ts +22 -0
  1296. package/src/internal/schema/toJsonSchemaDocument.ts +60 -6
  1297. package/src/internal/schema/toRepresentation.ts +104 -119
  1298. package/src/internal/trie.ts +10 -11
  1299. package/src/testing/FastCheck.ts +8 -7
  1300. package/src/testing/TestClock.ts +72 -30
  1301. package/src/testing/TestConsole.ts +32 -31
  1302. package/src/testing/TestSchema.ts +29 -29
  1303. package/src/unstable/ai/AiError.ts +95 -118
  1304. package/src/unstable/ai/AnthropicStructuredOutput.ts +1 -1
  1305. package/src/unstable/ai/Chat.ts +132 -97
  1306. package/src/unstable/ai/IdGenerator.ts +32 -28
  1307. package/src/unstable/ai/LanguageModel.ts +107 -67
  1308. package/src/unstable/ai/McpProtocol.ts +48 -0
  1309. package/src/unstable/ai/McpSchema.ts +60 -50
  1310. package/src/unstable/ai/McpServer.ts +930 -304
  1311. package/src/unstable/ai/Model.ts +9 -20
  1312. package/src/unstable/ai/OpenAiStructuredOutput.ts +1 -1
  1313. package/src/unstable/ai/Prompt.ts +145 -43
  1314. package/src/unstable/ai/Response.ts +28 -14
  1315. package/src/unstable/ai/Telemetry.ts +46 -13
  1316. package/src/unstable/ai/Tokenizer.ts +14 -3
  1317. package/src/unstable/ai/Tool.ts +59 -44
  1318. package/src/unstable/ai/Toolkit.ts +26 -8
  1319. package/src/unstable/ai/index.ts +5 -0
  1320. package/src/unstable/ai/internal/mcpProtocol.ts +85 -0
  1321. package/src/unstable/ai/internal/mcpProtocolRegistry.ts +70 -0
  1322. package/src/unstable/ai/internal/structured-output.ts +13 -18
  1323. package/src/unstable/cli/Argument.ts +273 -69
  1324. package/src/unstable/cli/CliError.ts +69 -76
  1325. package/src/unstable/cli/CliOutput.ts +44 -58
  1326. package/src/unstable/cli/Command.ts +705 -107
  1327. package/src/unstable/cli/Flag.ts +418 -138
  1328. package/src/unstable/cli/GlobalFlag.ts +1 -1
  1329. package/src/unstable/cli/HelpDoc.ts +12 -4
  1330. package/src/unstable/cli/Param.ts +292 -78
  1331. package/src/unstable/cli/Primitive.ts +370 -149
  1332. package/src/unstable/cli/Prompt.ts +28 -14
  1333. package/src/unstable/cli/internal/lexer.ts +8 -2
  1334. package/src/unstable/cli/internal/parser.ts +2 -2
  1335. package/src/unstable/cluster/ClusterSchema.ts +8 -8
  1336. package/src/unstable/cluster/ClusterWorkflowEngine.ts +5 -1
  1337. package/src/unstable/cluster/Entity.ts +15 -16
  1338. package/src/unstable/cluster/EntityProxy.ts +4 -2
  1339. package/src/unstable/cluster/EntityResource.ts +2 -2
  1340. package/src/unstable/cluster/Envelope.ts +3 -3
  1341. package/src/unstable/cluster/HttpRunner.ts +6 -4
  1342. package/src/unstable/cluster/Message.ts +9 -9
  1343. package/src/unstable/cluster/MessageStorage.ts +15 -15
  1344. package/src/unstable/cluster/Reply.ts +4 -6
  1345. package/src/unstable/cluster/RunnerHealth.ts +1 -1
  1346. package/src/unstable/cluster/RunnerServer.ts +41 -8
  1347. package/src/unstable/cluster/RunnerStorage.ts +2 -2
  1348. package/src/unstable/cluster/Runners.ts +23 -12
  1349. package/src/unstable/cluster/Sharding.ts +7 -8
  1350. package/src/unstable/cluster/ShardingConfig.ts +3 -3
  1351. package/src/unstable/cluster/SingletonAddress.ts +1 -1
  1352. package/src/unstable/cluster/Snowflake.ts +8 -8
  1353. package/src/unstable/cluster/SqlMessageStorage.ts +1 -1
  1354. package/src/unstable/cluster/SqlRunnerStorage.ts +21 -5
  1355. package/src/unstable/cluster/internal/entityManager.ts +11 -15
  1356. package/src/unstable/encoding/Msgpack.ts +6 -8
  1357. package/src/unstable/encoding/Sse.ts +98 -16
  1358. package/src/unstable/eventlog/Event.ts +20 -20
  1359. package/src/unstable/eventlog/EventGroup.ts +4 -4
  1360. package/src/unstable/eventlog/EventJournal.ts +15 -15
  1361. package/src/unstable/eventlog/EventLog.ts +3 -3
  1362. package/src/unstable/eventlog/EventLogEncryption.ts +1 -1
  1363. package/src/unstable/eventlog/EventLogMessage.ts +2 -2
  1364. package/src/unstable/eventlog/EventLogRemote.ts +1 -1
  1365. package/src/unstable/eventlog/EventLogServer.ts +41 -7
  1366. package/src/unstable/eventlog/EventLogServerEncrypted.ts +13 -5
  1367. package/src/unstable/eventlog/EventLogServerUnencrypted.ts +14 -6
  1368. package/src/unstable/eventlog/EventLogSessionAuth.ts +1 -1
  1369. package/src/unstable/http/Cookies.ts +35 -21
  1370. package/src/unstable/http/Etag.ts +1 -1
  1371. package/src/unstable/http/FetchHttpClient.ts +3 -1
  1372. package/src/unstable/http/Headers.ts +2 -2
  1373. package/src/unstable/http/HttpBody.ts +20 -5
  1374. package/src/unstable/http/HttpClient.ts +83 -55
  1375. package/src/unstable/http/HttpClientRequest.ts +2 -0
  1376. package/src/unstable/http/HttpClientResponse.ts +4 -4
  1377. package/src/unstable/http/HttpEffect.ts +8 -8
  1378. package/src/unstable/http/HttpMethod.ts +6 -9
  1379. package/src/unstable/http/HttpMiddleware.ts +202 -39
  1380. package/src/unstable/http/HttpPlatform.ts +95 -0
  1381. package/src/unstable/http/HttpRouter.ts +102 -98
  1382. package/src/unstable/http/HttpServer.ts +13 -13
  1383. package/src/unstable/http/HttpServerError.ts +2 -2
  1384. package/src/unstable/http/HttpServerRequest.ts +4 -4
  1385. package/src/unstable/http/HttpServerResponse.ts +30 -0
  1386. package/src/unstable/http/HttpStaticServer.ts +35 -7
  1387. package/src/unstable/http/Multipart.ts +6 -6
  1388. package/src/unstable/http/Url.ts +33 -63
  1389. package/src/unstable/http/UrlParams.ts +10 -18
  1390. package/src/unstable/http/internal/compression.ts +196 -0
  1391. package/src/unstable/httpapi/HttpApiBuilder.ts +10 -9
  1392. package/src/unstable/httpapi/HttpApiClient.ts +14 -14
  1393. package/src/unstable/httpapi/HttpApiEndpoint.ts +42 -42
  1394. package/src/unstable/httpapi/HttpApiError.ts +13 -13
  1395. package/src/unstable/httpapi/HttpApiGroup.ts +15 -15
  1396. package/src/unstable/httpapi/HttpApiMiddleware.ts +71 -24
  1397. package/src/unstable/httpapi/HttpApiScalar.ts +0 -12
  1398. package/src/unstable/httpapi/HttpApiSchema.ts +6 -6
  1399. package/src/unstable/httpapi/OpenApi.ts +13 -13
  1400. package/src/unstable/observability/OtlpExporter.ts +31 -19
  1401. package/src/unstable/observability/OtlpMetrics.ts +4 -1
  1402. package/src/unstable/observability/OtlpResource.ts +26 -17
  1403. package/src/unstable/observability/PrometheusMetrics.ts +13 -4
  1404. package/src/unstable/observability/internal/otlpEnv.ts +1 -1
  1405. package/src/unstable/observability/internal/protobuf.ts +3 -0
  1406. package/src/unstable/persistence/KeyValueStore.ts +72 -49
  1407. package/src/unstable/persistence/Persistable.ts +8 -8
  1408. package/src/unstable/persistence/PersistedQueue.ts +6 -6
  1409. package/src/unstable/persistence/Persistence.ts +126 -19
  1410. package/src/unstable/persistence/RateLimiter.ts +26 -15
  1411. package/src/unstable/persistence/Redis.ts +2 -2
  1412. package/src/unstable/process/ChildProcess.ts +64 -21
  1413. package/src/unstable/process/ChildProcessSpawner.ts +21 -10
  1414. package/src/unstable/reactivity/AsyncResult.ts +12 -13
  1415. package/src/unstable/reactivity/Atom.ts +28 -25
  1416. package/src/unstable/reactivity/AtomHttpApi.ts +5 -4
  1417. package/src/unstable/reactivity/AtomRegistry.ts +24 -3
  1418. package/src/unstable/reactivity/AtomRpc.ts +5 -4
  1419. package/src/unstable/reactivity/Hydration.ts +1 -1
  1420. package/src/unstable/rpc/Rpc.ts +35 -33
  1421. package/src/unstable/rpc/RpcClient.ts +16 -15
  1422. package/src/unstable/rpc/RpcGroup.ts +8 -8
  1423. package/src/unstable/rpc/RpcMessage.ts +31 -30
  1424. package/src/unstable/rpc/RpcMiddleware.ts +10 -10
  1425. package/src/unstable/rpc/RpcSchema.ts +4 -4
  1426. package/src/unstable/rpc/RpcSerialization.ts +167 -68
  1427. package/src/unstable/rpc/RpcServer.ts +18 -15
  1428. package/src/unstable/rpc/RpcWorker.ts +5 -5
  1429. package/src/unstable/schema/Model.ts +52 -50
  1430. package/src/unstable/schema/VariantSchema.ts +5 -5
  1431. package/src/unstable/socket/Socket.ts +17 -4
  1432. package/src/unstable/sql/SqlClient.ts +5 -6
  1433. package/src/unstable/sql/SqlModel.ts +2 -2
  1434. package/src/unstable/sql/SqlResolver.ts +5 -5
  1435. package/src/unstable/sql/Statement.ts +24 -23
  1436. package/src/unstable/workers/Transferable.ts +1 -1
  1437. package/src/unstable/workers/Worker.ts +2 -2
  1438. package/src/unstable/workers/WorkerError.ts +7 -7
  1439. package/src/unstable/workers/WorkerRunner.ts +1 -1
  1440. package/src/unstable/workflow/Activity.ts +2 -2
  1441. package/src/unstable/workflow/DurableClock.ts +1 -1
  1442. package/src/unstable/workflow/DurableDeferred.ts +10 -10
  1443. package/src/unstable/workflow/DurableQueue.ts +22 -20
  1444. package/src/unstable/workflow/Workflow.ts +23 -23
  1445. package/src/unstable/workflow/WorkflowEngine.ts +1 -1
  1446. package/src/unstable/workflow/WorkflowProxy.ts +4 -2
  1447. package/dist/internal/version.d.ts +0 -3
  1448. package/dist/internal/version.d.ts.map +0 -1
  1449. package/dist/internal/version.js +0 -2
  1450. package/dist/internal/version.js.map +0 -1
  1451. package/src/internal/version.ts +0 -2
package/dist/Graph.d.ts CHANGED
@@ -310,7 +310,7 @@ export declare const isGraph: <N = unknown, E = unknown, T extends Kind = Kind,
310
310
  *
311
311
  * **Example** (Constructing by kind)
312
312
  *
313
- * ```ts
313
+ * ```ts import.meta.vitest
314
314
  * import { Graph } from "effect"
315
315
  *
316
316
  * const makeGraph = Graph.make("directed")
@@ -318,7 +318,7 @@ export declare const isGraph: <N = unknown, E = unknown, T extends Kind = Kind,
318
318
  * Graph.addNode(mutable, "A")
319
319
  * })
320
320
  *
321
- * console.log(graph.type) // "directed"
321
+ * graph.type // => "directed"
322
322
  * ```
323
323
  *
324
324
  * @see {@link directed} for constructing a directed graph directly
@@ -332,7 +332,7 @@ export declare const make: <T extends Kind>(type: T) => <N, E>(mutate?: (mutable
332
332
  *
333
333
  * **Example** (Creating a directed graph)
334
334
  *
335
- * ```ts
335
+ * ```ts import.meta.vitest
336
336
  * import { Graph } from "effect"
337
337
  *
338
338
  * // Directed graph with initial nodes and edges
@@ -343,6 +343,7 @@ export declare const make: <T extends Kind>(type: T) => <N, E>(mutate?: (mutable
343
343
  * Graph.addEdge(mutable, a, b, "A->B")
344
344
  * Graph.addEdge(mutable, b, c, "B->C")
345
345
  * })
346
+ * Array.of(Graph.nodeCount(graph), Graph.edgeCount(graph)) // => [3, 2]
346
347
  * ```
347
348
  *
348
349
  * @category constructors
@@ -354,7 +355,7 @@ export declare const directed: <N, E>(mutate?: (mutable: MutableDirectedGraph<N,
354
355
  *
355
356
  * **Example** (Creating an undirected graph)
356
357
  *
357
- * ```ts
358
+ * ```ts import.meta.vitest
358
359
  * import { Graph } from "effect"
359
360
  *
360
361
  * // Undirected graph with initial nodes and edges
@@ -365,6 +366,7 @@ export declare const directed: <N, E>(mutate?: (mutable: MutableDirectedGraph<N,
365
366
  * Graph.addEdge(mutable, a, b, "A-B")
366
367
  * Graph.addEdge(mutable, b, c, "B-C")
367
368
  * })
369
+ * Array.of(Graph.nodeCount(graph), Graph.edgeCount(graph)) // => [3, 2]
368
370
  * ```
369
371
  *
370
372
  * @category constructors
@@ -376,12 +378,13 @@ export declare const undirected: <N, E>(mutate?: (mutable: MutableUndirectedGrap
376
378
  *
377
379
  * **Example** (Beginning a mutation scope)
378
380
  *
379
- * ```ts
381
+ * ```ts import.meta.vitest
380
382
  * import { Graph } from "effect"
381
383
  *
382
384
  * const graph = Graph.directed<string, number>()
383
385
  * const mutable = Graph.beginMutation(graph)
384
386
  * // Now mutable can be safely modified without affecting original graph
387
+ * Array.of(Graph.nodeCount(mutable), Graph.nodeCount(graph)) // => [0, 0]
385
388
  * ```
386
389
  *
387
390
  * @category mutations
@@ -398,13 +401,13 @@ export declare const beginMutation: <N, E, T extends Kind = "directed">(graph: G
398
401
  *
399
402
  * **Example** (Ending a mutation scope)
400
403
  *
401
- * ```ts
404
+ * ```ts import.meta.vitest
402
405
  * import { Graph } from "effect"
403
406
  *
404
407
  * const graph = Graph.directed<string, number>()
405
408
  * const mutable = Graph.beginMutation(graph)
406
409
  * // ... perform mutations on mutable ...
407
- * const newGraph = Graph.endMutation(mutable)
410
+ * Graph.nodeCount(Graph.endMutation(mutable)) // => 0
408
411
  * ```
409
412
  *
410
413
  * @category mutations
@@ -416,7 +419,7 @@ export declare const endMutation: <N, E, T extends Kind = "directed">(mutable: M
416
419
  *
417
420
  * **Example** (Applying scoped mutations)
418
421
  *
419
- * ```ts
422
+ * ```ts import.meta.vitest
420
423
  * import { Graph } from "effect"
421
424
  *
422
425
  * const graph = Graph.directed<string, number>()
@@ -426,8 +429,8 @@ export declare const endMutation: <N, E, T extends Kind = "directed">(mutable: M
426
429
  * Graph.addEdge(mutable, nodeA, nodeB, 1)
427
430
  * })
428
431
  *
429
- * console.log(Graph.nodeCount(newGraph)) // 2
430
- * console.log(Graph.edgeCount(newGraph)) // 1
432
+ * Graph.nodeCount(newGraph) // => 2
433
+ * Graph.edgeCount(newGraph) // => 1
431
434
  * ```
432
435
  *
433
436
  * @category mutations
@@ -439,7 +442,7 @@ export declare const mutate: {
439
442
  *
440
443
  * **Example** (Applying scoped mutations)
441
444
  *
442
- * ```ts
445
+ * ```ts import.meta.vitest
443
446
  * import { Graph } from "effect"
444
447
  *
445
448
  * const graph = Graph.directed<string, number>()
@@ -449,8 +452,8 @@ export declare const mutate: {
449
452
  * Graph.addEdge(mutable, nodeA, nodeB, 1)
450
453
  * })
451
454
  *
452
- * console.log(Graph.nodeCount(newGraph)) // 2
453
- * console.log(Graph.edgeCount(newGraph)) // 1
455
+ * Graph.nodeCount(newGraph) // => 2
456
+ * Graph.edgeCount(newGraph) // => 1
454
457
  * ```
455
458
  *
456
459
  * @category mutations
@@ -462,7 +465,7 @@ export declare const mutate: {
462
465
  *
463
466
  * **Example** (Applying scoped mutations)
464
467
  *
465
- * ```ts
468
+ * ```ts import.meta.vitest
466
469
  * import { Graph } from "effect"
467
470
  *
468
471
  * const graph = Graph.directed<string, number>()
@@ -472,8 +475,8 @@ export declare const mutate: {
472
475
  * Graph.addEdge(mutable, nodeA, nodeB, 1)
473
476
  * })
474
477
  *
475
- * console.log(Graph.nodeCount(newGraph)) // 2
476
- * console.log(Graph.edgeCount(newGraph)) // 1
478
+ * Graph.nodeCount(newGraph) // => 2
479
+ * Graph.edgeCount(newGraph) // => 1
477
480
  * ```
478
481
  *
479
482
  * @category mutations
@@ -523,7 +526,7 @@ export interface IdentityOptions<N, E, NI = N, EI = E> {
523
526
  *
524
527
  * **Example** (Combining graphs)
525
528
  *
526
- * ```ts
529
+ * ```ts import.meta.vitest
527
530
  * import { Graph } from "effect"
528
531
  *
529
532
  * const left = Graph.directed<{ id: string }, string>((mutable) => {
@@ -542,8 +545,8 @@ export interface IdentityOptions<N, E, NI = N, EI = E> {
542
545
  * nodeIdentity: (node) => node.id
543
546
  * })
544
547
  *
545
- * console.log(Graph.nodeCount(result)) // 3
546
- * console.log(Graph.edgeCount(result)) // 2
548
+ * Graph.nodeCount(result) // => 3
549
+ * Graph.edgeCount(result) // => 2
547
550
  * ```
548
551
  *
549
552
  * @category set operations
@@ -571,7 +574,7 @@ export declare const compose: {
571
574
  *
572
575
  * **Example** (Combining graphs)
573
576
  *
574
- * ```ts
577
+ * ```ts import.meta.vitest
575
578
  * import { Graph } from "effect"
576
579
  *
577
580
  * const left = Graph.directed<{ id: string }, string>((mutable) => {
@@ -590,8 +593,8 @@ export declare const compose: {
590
593
  * nodeIdentity: (node) => node.id
591
594
  * })
592
595
  *
593
- * console.log(Graph.nodeCount(result)) // 3
594
- * console.log(Graph.edgeCount(result)) // 2
596
+ * Graph.nodeCount(result) // => 3
597
+ * Graph.edgeCount(result) // => 2
595
598
  * ```
596
599
  *
597
600
  * @category set operations
@@ -619,7 +622,7 @@ export declare const compose: {
619
622
  *
620
623
  * **Example** (Combining graphs)
621
624
  *
622
- * ```ts
625
+ * ```ts import.meta.vitest
623
626
  * import { Graph } from "effect"
624
627
  *
625
628
  * const left = Graph.directed<{ id: string }, string>((mutable) => {
@@ -638,8 +641,8 @@ export declare const compose: {
638
641
  * nodeIdentity: (node) => node.id
639
642
  * })
640
643
  *
641
- * console.log(Graph.nodeCount(result)) // 3
642
- * console.log(Graph.edgeCount(result)) // 2
644
+ * Graph.nodeCount(result) // => 3
645
+ * Graph.edgeCount(result) // => 2
643
646
  * ```
644
647
  *
645
648
  * @category set operations
@@ -667,7 +670,7 @@ export declare const compose: {
667
670
  *
668
671
  * **Example** (Finding shared structure)
669
672
  *
670
- * ```ts
673
+ * ```ts import.meta.vitest
671
674
  * import { Graph } from "effect"
672
675
  *
673
676
  * const left = Graph.directed<string, string>((mutable) => {
@@ -684,8 +687,8 @@ export declare const compose: {
684
687
  *
685
688
  * const result = Graph.intersection(left, right)
686
689
  *
687
- * console.log(Graph.nodeCount(result)) // 2
688
- * console.log(Graph.edgeCount(result)) // 1
690
+ * Graph.nodeCount(result) // => 2
691
+ * Graph.edgeCount(result) // => 1
689
692
  * ```
690
693
  *
691
694
  * @category set operations
@@ -712,7 +715,7 @@ export declare const intersection: {
712
715
  *
713
716
  * **Example** (Finding shared structure)
714
717
  *
715
- * ```ts
718
+ * ```ts import.meta.vitest
716
719
  * import { Graph } from "effect"
717
720
  *
718
721
  * const left = Graph.directed<string, string>((mutable) => {
@@ -729,8 +732,8 @@ export declare const intersection: {
729
732
  *
730
733
  * const result = Graph.intersection(left, right)
731
734
  *
732
- * console.log(Graph.nodeCount(result)) // 2
733
- * console.log(Graph.edgeCount(result)) // 1
735
+ * Graph.nodeCount(result) // => 2
736
+ * Graph.edgeCount(result) // => 1
734
737
  * ```
735
738
  *
736
739
  * @category set operations
@@ -757,7 +760,7 @@ export declare const intersection: {
757
760
  *
758
761
  * **Example** (Finding shared structure)
759
762
  *
760
- * ```ts
763
+ * ```ts import.meta.vitest
761
764
  * import { Graph } from "effect"
762
765
  *
763
766
  * const left = Graph.directed<string, string>((mutable) => {
@@ -774,8 +777,8 @@ export declare const intersection: {
774
777
  *
775
778
  * const result = Graph.intersection(left, right)
776
779
  *
777
- * console.log(Graph.nodeCount(result)) // 2
778
- * console.log(Graph.edgeCount(result)) // 1
780
+ * Graph.nodeCount(result) // => 2
781
+ * Graph.edgeCount(result) // => 1
779
782
  * ```
780
783
  *
781
784
  * @category set operations
@@ -804,7 +807,7 @@ export declare const intersection: {
804
807
  *
805
808
  * **Example** (Removing shared edges)
806
809
  *
807
- * ```ts
810
+ * ```ts import.meta.vitest
808
811
  * import { Graph } from "effect"
809
812
  *
810
813
  * const left = Graph.directed<string, string>((mutable) => {
@@ -823,8 +826,8 @@ export declare const intersection: {
823
826
  *
824
827
  * const result = Graph.difference(left, right)
825
828
  *
826
- * console.log(Graph.nodeCount(result)) // 3
827
- * console.log(Graph.edgeCount(result)) // 1
829
+ * Graph.nodeCount(result) // => 3
830
+ * Graph.edgeCount(result) // => 1
828
831
  * ```
829
832
  *
830
833
  * @category set operations
@@ -852,7 +855,7 @@ export declare const difference: {
852
855
  *
853
856
  * **Example** (Removing shared edges)
854
857
  *
855
- * ```ts
858
+ * ```ts import.meta.vitest
856
859
  * import { Graph } from "effect"
857
860
  *
858
861
  * const left = Graph.directed<string, string>((mutable) => {
@@ -871,8 +874,8 @@ export declare const difference: {
871
874
  *
872
875
  * const result = Graph.difference(left, right)
873
876
  *
874
- * console.log(Graph.nodeCount(result)) // 3
875
- * console.log(Graph.edgeCount(result)) // 1
877
+ * Graph.nodeCount(result) // => 3
878
+ * Graph.edgeCount(result) // => 1
876
879
  * ```
877
880
  *
878
881
  * @category set operations
@@ -900,7 +903,7 @@ export declare const difference: {
900
903
  *
901
904
  * **Example** (Removing shared edges)
902
905
  *
903
- * ```ts
906
+ * ```ts import.meta.vitest
904
907
  * import { Graph } from "effect"
905
908
  *
906
909
  * const left = Graph.directed<string, string>((mutable) => {
@@ -919,8 +922,8 @@ export declare const difference: {
919
922
  *
920
923
  * const result = Graph.difference(left, right)
921
924
  *
922
- * console.log(Graph.nodeCount(result)) // 3
923
- * console.log(Graph.edgeCount(result)) // 1
925
+ * Graph.nodeCount(result) // => 3
926
+ * Graph.edgeCount(result) // => 1
924
927
  * ```
925
928
  *
926
929
  * @category set operations
@@ -951,7 +954,7 @@ export declare const difference: {
951
954
  *
952
955
  * **Example** (Finding differing edges)
953
956
  *
954
- * ```ts
957
+ * ```ts import.meta.vitest
955
958
  * import { Graph } from "effect"
956
959
  *
957
960
  * const left = Graph.directed<string, string>((mutable) => {
@@ -972,8 +975,8 @@ export declare const difference: {
972
975
  *
973
976
  * const result = Graph.symmetricDifference(left, right)
974
977
  *
975
- * console.log(Graph.nodeCount(result)) // 4
976
- * console.log(Graph.edgeCount(result)) // 2
978
+ * Graph.nodeCount(result) // => 4
979
+ * Graph.edgeCount(result) // => 2
977
980
  * ```
978
981
  *
979
982
  * @category set operations
@@ -1003,7 +1006,7 @@ export declare const symmetricDifference: {
1003
1006
  *
1004
1007
  * **Example** (Finding differing edges)
1005
1008
  *
1006
- * ```ts
1009
+ * ```ts import.meta.vitest
1007
1010
  * import { Graph } from "effect"
1008
1011
  *
1009
1012
  * const left = Graph.directed<string, string>((mutable) => {
@@ -1024,8 +1027,8 @@ export declare const symmetricDifference: {
1024
1027
  *
1025
1028
  * const result = Graph.symmetricDifference(left, right)
1026
1029
  *
1027
- * console.log(Graph.nodeCount(result)) // 4
1028
- * console.log(Graph.edgeCount(result)) // 2
1030
+ * Graph.nodeCount(result) // => 4
1031
+ * Graph.edgeCount(result) // => 2
1029
1032
  * ```
1030
1033
  *
1031
1034
  * @category set operations
@@ -1055,7 +1058,7 @@ export declare const symmetricDifference: {
1055
1058
  *
1056
1059
  * **Example** (Finding differing edges)
1057
1060
  *
1058
- * ```ts
1061
+ * ```ts import.meta.vitest
1059
1062
  * import { Graph } from "effect"
1060
1063
  *
1061
1064
  * const left = Graph.directed<string, string>((mutable) => {
@@ -1076,8 +1079,8 @@ export declare const symmetricDifference: {
1076
1079
  *
1077
1080
  * const result = Graph.symmetricDifference(left, right)
1078
1081
  *
1079
- * console.log(Graph.nodeCount(result)) // 4
1080
- * console.log(Graph.edgeCount(result)) // 2
1082
+ * Graph.nodeCount(result) // => 4
1083
+ * Graph.edgeCount(result) // => 2
1081
1084
  * ```
1082
1085
  *
1083
1086
  * @category set operations
@@ -1098,7 +1101,7 @@ export declare const symmetricDifference: {
1098
1101
  *
1099
1102
  * **Example** (Finding missing relationships)
1100
1103
  *
1101
- * ```ts
1104
+ * ```ts import.meta.vitest
1102
1105
  * import { Graph } from "effect"
1103
1106
  *
1104
1107
  * const graph = Graph.directed<string, string>((mutable) => {
@@ -1109,7 +1112,7 @@ export declare const symmetricDifference: {
1109
1112
  *
1110
1113
  * const result = Graph.complement(graph, (source, target) => `${source}-${target}`)
1111
1114
  *
1112
- * console.log(Graph.edgeCount(result)) // 1
1115
+ * Graph.edgeCount(result) // => 1
1113
1116
  * ```
1114
1117
  *
1115
1118
  * @category set operations
@@ -1129,7 +1132,7 @@ export declare const complement: {
1129
1132
  *
1130
1133
  * **Example** (Finding missing relationships)
1131
1134
  *
1132
- * ```ts
1135
+ * ```ts import.meta.vitest
1133
1136
  * import { Graph } from "effect"
1134
1137
  *
1135
1138
  * const graph = Graph.directed<string, string>((mutable) => {
@@ -1140,7 +1143,7 @@ export declare const complement: {
1140
1143
  *
1141
1144
  * const result = Graph.complement(graph, (source, target) => `${source}-${target}`)
1142
1145
  *
1143
- * console.log(Graph.edgeCount(result)) // 1
1146
+ * Graph.edgeCount(result) // => 1
1144
1147
  * ```
1145
1148
  *
1146
1149
  * @category set operations
@@ -1160,7 +1163,7 @@ export declare const complement: {
1160
1163
  *
1161
1164
  * **Example** (Finding missing relationships)
1162
1165
  *
1163
- * ```ts
1166
+ * ```ts import.meta.vitest
1164
1167
  * import { Graph } from "effect"
1165
1168
  *
1166
1169
  * const graph = Graph.directed<string, string>((mutable) => {
@@ -1171,7 +1174,7 @@ export declare const complement: {
1171
1174
  *
1172
1175
  * const result = Graph.complement(graph, (source, target) => `${source}-${target}`)
1173
1176
  *
1174
- * console.log(Graph.edgeCount(result)) // 1
1177
+ * Graph.edgeCount(result) // => 1
1175
1178
  * ```
1176
1179
  *
1177
1180
  * @category set operations
@@ -1208,7 +1211,7 @@ export interface NeighborhoodConfig {
1208
1211
  *
1209
1212
  * **Example** (Getting a local neighborhood)
1210
1213
  *
1211
- * ```ts
1214
+ * ```ts import.meta.vitest
1212
1215
  * import { Graph } from "effect"
1213
1216
  *
1214
1217
  * const graph = Graph.directed<string, string>((mutable) => {
@@ -1221,7 +1224,7 @@ export interface NeighborhoodConfig {
1221
1224
  *
1222
1225
  * const result = Graph.neighborhood(graph, 1, { radius: 1 })
1223
1226
  *
1224
- * console.log(Graph.nodeCount(result)) // 2
1227
+ * Graph.nodeCount(result) // => 2
1225
1228
  * ```
1226
1229
  *
1227
1230
  * @category set operations
@@ -1241,7 +1244,7 @@ export declare const neighborhood: {
1241
1244
  *
1242
1245
  * **Example** (Getting a local neighborhood)
1243
1246
  *
1244
- * ```ts
1247
+ * ```ts import.meta.vitest
1245
1248
  * import { Graph } from "effect"
1246
1249
  *
1247
1250
  * const graph = Graph.directed<string, string>((mutable) => {
@@ -1254,7 +1257,7 @@ export declare const neighborhood: {
1254
1257
  *
1255
1258
  * const result = Graph.neighborhood(graph, 1, { radius: 1 })
1256
1259
  *
1257
- * console.log(Graph.nodeCount(result)) // 2
1260
+ * Graph.nodeCount(result) // => 2
1258
1261
  * ```
1259
1262
  *
1260
1263
  * @category set operations
@@ -1274,7 +1277,7 @@ export declare const neighborhood: {
1274
1277
  *
1275
1278
  * **Example** (Getting a local neighborhood)
1276
1279
  *
1277
- * ```ts
1280
+ * ```ts import.meta.vitest
1278
1281
  * import { Graph } from "effect"
1279
1282
  *
1280
1283
  * const graph = Graph.directed<string, string>((mutable) => {
@@ -1287,7 +1290,7 @@ export declare const neighborhood: {
1287
1290
  *
1288
1291
  * const result = Graph.neighborhood(graph, 1, { radius: 1 })
1289
1292
  *
1290
- * console.log(Graph.nodeCount(result)) // 2
1293
+ * Graph.nodeCount(result) // => 2
1291
1294
  * ```
1292
1295
  *
1293
1296
  * @category set operations
@@ -1361,14 +1364,12 @@ export declare const sum: {
1361
1364
  *
1362
1365
  * **Example** (Adding nodes)
1363
1366
  *
1364
- * ```ts
1367
+ * ```ts import.meta.vitest
1365
1368
  * import { Graph } from "effect"
1366
1369
  *
1367
- * const result = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
1368
- * const nodeA = Graph.addNode(mutable, "Node A")
1369
- * const nodeB = Graph.addNode(mutable, "Node B")
1370
- * console.log(nodeA) // NodeIndex with value 0
1371
- * console.log(nodeB) // NodeIndex with value 1
1370
+ * Graph.mutate(Graph.directed<string, number>(), (mutable) => {
1371
+ * Graph.addNode(mutable, "Node A") // => 0
1372
+ * Graph.addNode(mutable, "Node B") // => 1
1372
1373
  * })
1373
1374
  * ```
1374
1375
  *
@@ -1385,19 +1386,14 @@ export declare const addNode: <N, E, T extends Kind = "directed">(mutable: Mutab
1385
1386
  *
1386
1387
  * **Example** (Getting node data)
1387
1388
  *
1388
- * ```ts
1389
+ * ```ts import.meta.vitest
1389
1390
  * import { Graph, Option } from "effect"
1390
1391
  *
1391
1392
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
1392
1393
  * Graph.addNode(mutable, "Node A")
1393
1394
  * })
1394
1395
  *
1395
- * const nodeIndex = 0
1396
- * const nodeData = Graph.getNode(graph, nodeIndex)
1397
- *
1398
- * if (Option.isSome(nodeData)) {
1399
- * console.log(nodeData.value) // "Node A"
1400
- * }
1396
+ * Graph.getNode(graph, 0) // => Option.some("Node A")
1401
1397
  * ```
1402
1398
  *
1403
1399
  * @category getters
@@ -1409,19 +1405,14 @@ export declare const getNode: {
1409
1405
  *
1410
1406
  * **Example** (Getting node data)
1411
1407
  *
1412
- * ```ts
1408
+ * ```ts import.meta.vitest
1413
1409
  * import { Graph, Option } from "effect"
1414
1410
  *
1415
1411
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
1416
1412
  * Graph.addNode(mutable, "Node A")
1417
1413
  * })
1418
1414
  *
1419
- * const nodeIndex = 0
1420
- * const nodeData = Graph.getNode(graph, nodeIndex)
1421
- *
1422
- * if (Option.isSome(nodeData)) {
1423
- * console.log(nodeData.value) // "Node A"
1424
- * }
1415
+ * Graph.getNode(graph, 0) // => Option.some("Node A")
1425
1416
  * ```
1426
1417
  *
1427
1418
  * @category getters
@@ -1433,19 +1424,14 @@ export declare const getNode: {
1433
1424
  *
1434
1425
  * **Example** (Getting node data)
1435
1426
  *
1436
- * ```ts
1427
+ * ```ts import.meta.vitest
1437
1428
  * import { Graph, Option } from "effect"
1438
1429
  *
1439
1430
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
1440
1431
  * Graph.addNode(mutable, "Node A")
1441
1432
  * })
1442
1433
  *
1443
- * const nodeIndex = 0
1444
- * const nodeData = Graph.getNode(graph, nodeIndex)
1445
- *
1446
- * if (Option.isSome(nodeData)) {
1447
- * console.log(nodeData.value) // "Node A"
1448
- * }
1434
+ * Graph.getNode(graph, 0) // => Option.some("Node A")
1449
1435
  * ```
1450
1436
  *
1451
1437
  * @category getters
@@ -1458,20 +1444,15 @@ export declare const getNode: {
1458
1444
  *
1459
1445
  * **Example** (Checking node existence)
1460
1446
  *
1461
- * ```ts
1447
+ * ```ts import.meta.vitest
1462
1448
  * import { Graph } from "effect"
1463
1449
  *
1464
1450
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
1465
1451
  * Graph.addNode(mutable, "Node A")
1466
1452
  * })
1467
1453
  *
1468
- * const nodeIndex = 0
1469
- * const exists = Graph.hasNode(graph, nodeIndex)
1470
- * console.log(exists) // true
1471
- *
1472
- * const nonExistentIndex = 999
1473
- * const notExists = Graph.hasNode(graph, nonExistentIndex)
1474
- * console.log(notExists) // false
1454
+ * Graph.hasNode(graph, 0) // => true
1455
+ * Graph.hasNode(graph, 999) // => false
1475
1456
  * ```
1476
1457
  *
1477
1458
  * @category getters
@@ -1483,20 +1464,15 @@ export declare const hasNode: {
1483
1464
  *
1484
1465
  * **Example** (Checking node existence)
1485
1466
  *
1486
- * ```ts
1467
+ * ```ts import.meta.vitest
1487
1468
  * import { Graph } from "effect"
1488
1469
  *
1489
1470
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
1490
1471
  * Graph.addNode(mutable, "Node A")
1491
1472
  * })
1492
1473
  *
1493
- * const nodeIndex = 0
1494
- * const exists = Graph.hasNode(graph, nodeIndex)
1495
- * console.log(exists) // true
1496
- *
1497
- * const nonExistentIndex = 999
1498
- * const notExists = Graph.hasNode(graph, nonExistentIndex)
1499
- * console.log(notExists) // false
1474
+ * Graph.hasNode(graph, 0) // => true
1475
+ * Graph.hasNode(graph, 999) // => false
1500
1476
  * ```
1501
1477
  *
1502
1478
  * @category getters
@@ -1508,20 +1484,15 @@ export declare const hasNode: {
1508
1484
  *
1509
1485
  * **Example** (Checking node existence)
1510
1486
  *
1511
- * ```ts
1487
+ * ```ts import.meta.vitest
1512
1488
  * import { Graph } from "effect"
1513
1489
  *
1514
1490
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
1515
1491
  * Graph.addNode(mutable, "Node A")
1516
1492
  * })
1517
1493
  *
1518
- * const nodeIndex = 0
1519
- * const exists = Graph.hasNode(graph, nodeIndex)
1520
- * console.log(exists) // true
1521
- *
1522
- * const nonExistentIndex = 999
1523
- * const notExists = Graph.hasNode(graph, nonExistentIndex)
1524
- * console.log(notExists) // false
1494
+ * Graph.hasNode(graph, 0) // => true
1495
+ * Graph.hasNode(graph, 999) // => false
1525
1496
  * ```
1526
1497
  *
1527
1498
  * @category getters
@@ -1534,11 +1505,11 @@ export declare const hasNode: {
1534
1505
  *
1535
1506
  * **Example** (Counting nodes)
1536
1507
  *
1537
- * ```ts
1508
+ * ```ts import.meta.vitest
1538
1509
  * import { Graph } from "effect"
1539
1510
  *
1540
1511
  * const emptyGraph = Graph.directed<string, number>()
1541
- * console.log(Graph.nodeCount(emptyGraph)) // 0
1512
+ * Graph.nodeCount(emptyGraph) // => 0
1542
1513
  *
1543
1514
  * const graphWithNodes = Graph.mutate(emptyGraph, (mutable) => {
1544
1515
  * Graph.addNode(mutable, "Node A")
@@ -1546,7 +1517,7 @@ export declare const hasNode: {
1546
1517
  * Graph.addNode(mutable, "Node C")
1547
1518
  * })
1548
1519
  *
1549
- * console.log(Graph.nodeCount(graphWithNodes)) // 3
1520
+ * Graph.nodeCount(graphWithNodes) // => 3
1550
1521
  * ```
1551
1522
  *
1552
1523
  * @category getters
@@ -1558,8 +1529,8 @@ export declare const nodeCount: <N, E, T extends Kind = "directed">(graph: Graph
1558
1529
  *
1559
1530
  * **Example** (Finding the first matching node)
1560
1531
  *
1561
- * ```ts
1562
- * import { Graph } from "effect"
1532
+ * ```ts import.meta.vitest
1533
+ * import { Graph, Option } from "effect"
1563
1534
  *
1564
1535
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
1565
1536
  * Graph.addNode(mutable, "Node A")
@@ -1567,11 +1538,8 @@ export declare const nodeCount: <N, E, T extends Kind = "directed">(graph: Graph
1567
1538
  * Graph.addNode(mutable, "Node C")
1568
1539
  * })
1569
1540
  *
1570
- * const result = Graph.findNode(graph, (data) => data.startsWith("Node B"))
1571
- * console.log(result) // Option.some(1)
1572
- *
1573
- * const notFound = Graph.findNode(graph, (data) => data === "Node D")
1574
- * console.log(notFound) // Option.none()
1541
+ * Graph.findNode(graph, (data) => data.startsWith("Node B")) // => Option.some(1)
1542
+ * Graph.findNode(graph, (data) => data === "Node D") // => Option.none()
1575
1543
  * ```
1576
1544
  *
1577
1545
  * @category getters
@@ -1583,8 +1551,8 @@ export declare const findNode: {
1583
1551
  *
1584
1552
  * **Example** (Finding the first matching node)
1585
1553
  *
1586
- * ```ts
1587
- * import { Graph } from "effect"
1554
+ * ```ts import.meta.vitest
1555
+ * import { Graph, Option } from "effect"
1588
1556
  *
1589
1557
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
1590
1558
  * Graph.addNode(mutable, "Node A")
@@ -1592,11 +1560,8 @@ export declare const findNode: {
1592
1560
  * Graph.addNode(mutable, "Node C")
1593
1561
  * })
1594
1562
  *
1595
- * const result = Graph.findNode(graph, (data) => data.startsWith("Node B"))
1596
- * console.log(result) // Option.some(1)
1597
- *
1598
- * const notFound = Graph.findNode(graph, (data) => data === "Node D")
1599
- * console.log(notFound) // Option.none()
1563
+ * Graph.findNode(graph, (data) => data.startsWith("Node B")) // => Option.some(1)
1564
+ * Graph.findNode(graph, (data) => data === "Node D") // => Option.none()
1600
1565
  * ```
1601
1566
  *
1602
1567
  * @category getters
@@ -1608,8 +1573,8 @@ export declare const findNode: {
1608
1573
  *
1609
1574
  * **Example** (Finding the first matching node)
1610
1575
  *
1611
- * ```ts
1612
- * import { Graph } from "effect"
1576
+ * ```ts import.meta.vitest
1577
+ * import { Graph, Option } from "effect"
1613
1578
  *
1614
1579
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
1615
1580
  * Graph.addNode(mutable, "Node A")
@@ -1617,11 +1582,8 @@ export declare const findNode: {
1617
1582
  * Graph.addNode(mutable, "Node C")
1618
1583
  * })
1619
1584
  *
1620
- * const result = Graph.findNode(graph, (data) => data.startsWith("Node B"))
1621
- * console.log(result) // Option.some(1)
1622
- *
1623
- * const notFound = Graph.findNode(graph, (data) => data === "Node D")
1624
- * console.log(notFound) // Option.none()
1585
+ * Graph.findNode(graph, (data) => data.startsWith("Node B")) // => Option.some(1)
1586
+ * Graph.findNode(graph, (data) => data === "Node D") // => Option.none()
1625
1587
  * ```
1626
1588
  *
1627
1589
  * @category getters
@@ -1634,7 +1596,7 @@ export declare const findNode: {
1634
1596
  *
1635
1597
  * **Example** (Finding matching nodes)
1636
1598
  *
1637
- * ```ts
1599
+ * ```ts import.meta.vitest
1638
1600
  * import { Graph } from "effect"
1639
1601
  *
1640
1602
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
@@ -1643,11 +1605,8 @@ export declare const findNode: {
1643
1605
  * Graph.addNode(mutable, "Start C")
1644
1606
  * })
1645
1607
  *
1646
- * const result = Graph.findNodes(graph, (data) => data.startsWith("Start"))
1647
- * console.log(result) // [0, 2]
1648
- *
1649
- * const empty = Graph.findNodes(graph, (data) => data === "Not Found")
1650
- * console.log(empty) // []
1608
+ * Graph.findNodes(graph, (data) => data.startsWith("Start")) // => [0, 2]
1609
+ * Graph.findNodes(graph, (data) => data === "Not Found") // => []
1651
1610
  * ```
1652
1611
  *
1653
1612
  * @category getters
@@ -1659,7 +1618,7 @@ export declare const findNodes: {
1659
1618
  *
1660
1619
  * **Example** (Finding matching nodes)
1661
1620
  *
1662
- * ```ts
1621
+ * ```ts import.meta.vitest
1663
1622
  * import { Graph } from "effect"
1664
1623
  *
1665
1624
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
@@ -1668,11 +1627,8 @@ export declare const findNodes: {
1668
1627
  * Graph.addNode(mutable, "Start C")
1669
1628
  * })
1670
1629
  *
1671
- * const result = Graph.findNodes(graph, (data) => data.startsWith("Start"))
1672
- * console.log(result) // [0, 2]
1673
- *
1674
- * const empty = Graph.findNodes(graph, (data) => data === "Not Found")
1675
- * console.log(empty) // []
1630
+ * Graph.findNodes(graph, (data) => data.startsWith("Start")) // => [0, 2]
1631
+ * Graph.findNodes(graph, (data) => data === "Not Found") // => []
1676
1632
  * ```
1677
1633
  *
1678
1634
  * @category getters
@@ -1684,7 +1640,7 @@ export declare const findNodes: {
1684
1640
  *
1685
1641
  * **Example** (Finding matching nodes)
1686
1642
  *
1687
- * ```ts
1643
+ * ```ts import.meta.vitest
1688
1644
  * import { Graph } from "effect"
1689
1645
  *
1690
1646
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
@@ -1693,11 +1649,8 @@ export declare const findNodes: {
1693
1649
  * Graph.addNode(mutable, "Start C")
1694
1650
  * })
1695
1651
  *
1696
- * const result = Graph.findNodes(graph, (data) => data.startsWith("Start"))
1697
- * console.log(result) // [0, 2]
1698
- *
1699
- * const empty = Graph.findNodes(graph, (data) => data === "Not Found")
1700
- * console.log(empty) // []
1652
+ * Graph.findNodes(graph, (data) => data.startsWith("Start")) // => [0, 2]
1653
+ * Graph.findNodes(graph, (data) => data === "Not Found") // => []
1701
1654
  * ```
1702
1655
  *
1703
1656
  * @category getters
@@ -1710,8 +1663,8 @@ export declare const findNodes: {
1710
1663
  *
1711
1664
  * **Example** (Finding the first matching edge)
1712
1665
  *
1713
- * ```ts
1714
- * import { Graph } from "effect"
1666
+ * ```ts import.meta.vitest
1667
+ * import { Graph, Option } from "effect"
1715
1668
  *
1716
1669
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
1717
1670
  * const nodeA = Graph.addNode(mutable, "Node A")
@@ -1721,11 +1674,8 @@ export declare const findNodes: {
1721
1674
  * Graph.addEdge(mutable, nodeB, nodeC, 20)
1722
1675
  * })
1723
1676
  *
1724
- * const result = Graph.findEdge(graph, (data) => data > 15)
1725
- * console.log(result) // Option.some(1)
1726
- *
1727
- * const notFound = Graph.findEdge(graph, (data) => data > 100)
1728
- * console.log(notFound) // Option.none()
1677
+ * Graph.findEdge(graph, (data) => data > 15) // => Option.some(1)
1678
+ * Graph.findEdge(graph, (data) => data > 100) // => Option.none()
1729
1679
  * ```
1730
1680
  *
1731
1681
  * @category getters
@@ -1737,8 +1687,8 @@ export declare const findEdge: {
1737
1687
  *
1738
1688
  * **Example** (Finding the first matching edge)
1739
1689
  *
1740
- * ```ts
1741
- * import { Graph } from "effect"
1690
+ * ```ts import.meta.vitest
1691
+ * import { Graph, Option } from "effect"
1742
1692
  *
1743
1693
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
1744
1694
  * const nodeA = Graph.addNode(mutable, "Node A")
@@ -1748,11 +1698,8 @@ export declare const findEdge: {
1748
1698
  * Graph.addEdge(mutable, nodeB, nodeC, 20)
1749
1699
  * })
1750
1700
  *
1751
- * const result = Graph.findEdge(graph, (data) => data > 15)
1752
- * console.log(result) // Option.some(1)
1753
- *
1754
- * const notFound = Graph.findEdge(graph, (data) => data > 100)
1755
- * console.log(notFound) // Option.none()
1701
+ * Graph.findEdge(graph, (data) => data > 15) // => Option.some(1)
1702
+ * Graph.findEdge(graph, (data) => data > 100) // => Option.none()
1756
1703
  * ```
1757
1704
  *
1758
1705
  * @category getters
@@ -1764,8 +1711,8 @@ export declare const findEdge: {
1764
1711
  *
1765
1712
  * **Example** (Finding the first matching edge)
1766
1713
  *
1767
- * ```ts
1768
- * import { Graph } from "effect"
1714
+ * ```ts import.meta.vitest
1715
+ * import { Graph, Option } from "effect"
1769
1716
  *
1770
1717
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
1771
1718
  * const nodeA = Graph.addNode(mutable, "Node A")
@@ -1775,11 +1722,8 @@ export declare const findEdge: {
1775
1722
  * Graph.addEdge(mutable, nodeB, nodeC, 20)
1776
1723
  * })
1777
1724
  *
1778
- * const result = Graph.findEdge(graph, (data) => data > 15)
1779
- * console.log(result) // Option.some(1)
1780
- *
1781
- * const notFound = Graph.findEdge(graph, (data) => data > 100)
1782
- * console.log(notFound) // Option.none()
1725
+ * Graph.findEdge(graph, (data) => data > 15) // => Option.some(1)
1726
+ * Graph.findEdge(graph, (data) => data > 100) // => Option.none()
1783
1727
  * ```
1784
1728
  *
1785
1729
  * @category getters
@@ -1792,7 +1736,7 @@ export declare const findEdge: {
1792
1736
  *
1793
1737
  * **Example** (Finding matching edges)
1794
1738
  *
1795
- * ```ts
1739
+ * ```ts import.meta.vitest
1796
1740
  * import { Graph } from "effect"
1797
1741
  *
1798
1742
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
@@ -1804,11 +1748,8 @@ export declare const findEdge: {
1804
1748
  * Graph.addEdge(mutable, nodeC, nodeA, 30)
1805
1749
  * })
1806
1750
  *
1807
- * const result = Graph.findEdges(graph, (data) => data >= 20)
1808
- * console.log(result) // [1, 2]
1809
- *
1810
- * const empty = Graph.findEdges(graph, (data) => data > 100)
1811
- * console.log(empty) // []
1751
+ * Graph.findEdges(graph, (data) => data >= 20) // => [1, 2]
1752
+ * Graph.findEdges(graph, (data) => data > 100) // => []
1812
1753
  * ```
1813
1754
  *
1814
1755
  * @category getters
@@ -1820,7 +1761,7 @@ export declare const findEdges: {
1820
1761
  *
1821
1762
  * **Example** (Finding matching edges)
1822
1763
  *
1823
- * ```ts
1764
+ * ```ts import.meta.vitest
1824
1765
  * import { Graph } from "effect"
1825
1766
  *
1826
1767
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
@@ -1832,11 +1773,8 @@ export declare const findEdges: {
1832
1773
  * Graph.addEdge(mutable, nodeC, nodeA, 30)
1833
1774
  * })
1834
1775
  *
1835
- * const result = Graph.findEdges(graph, (data) => data >= 20)
1836
- * console.log(result) // [1, 2]
1837
- *
1838
- * const empty = Graph.findEdges(graph, (data) => data > 100)
1839
- * console.log(empty) // []
1776
+ * Graph.findEdges(graph, (data) => data >= 20) // => [1, 2]
1777
+ * Graph.findEdges(graph, (data) => data > 100) // => []
1840
1778
  * ```
1841
1779
  *
1842
1780
  * @category getters
@@ -1848,7 +1786,7 @@ export declare const findEdges: {
1848
1786
  *
1849
1787
  * **Example** (Finding matching edges)
1850
1788
  *
1851
- * ```ts
1789
+ * ```ts import.meta.vitest
1852
1790
  * import { Graph } from "effect"
1853
1791
  *
1854
1792
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
@@ -1860,11 +1798,8 @@ export declare const findEdges: {
1860
1798
  * Graph.addEdge(mutable, nodeC, nodeA, 30)
1861
1799
  * })
1862
1800
  *
1863
- * const result = Graph.findEdges(graph, (data) => data >= 20)
1864
- * console.log(result) // [1, 2]
1865
- *
1866
- * const empty = Graph.findEdges(graph, (data) => data > 100)
1867
- * console.log(empty) // []
1801
+ * Graph.findEdges(graph, (data) => data >= 20) // => [1, 2]
1802
+ * Graph.findEdges(graph, (data) => data > 100) // => []
1868
1803
  * ```
1869
1804
  *
1870
1805
  * @category getters
@@ -1877,8 +1812,8 @@ export declare const findEdges: {
1877
1812
  *
1878
1813
  * **Example** (Updating node data)
1879
1814
  *
1880
- * ```ts
1881
- * import { Graph } from "effect"
1815
+ * ```ts import.meta.vitest
1816
+ * import { Graph, Option } from "effect"
1882
1817
  *
1883
1818
  * const graph = Graph.directed<string, number>((mutable) => {
1884
1819
  * Graph.addNode(mutable, "Node A")
@@ -1886,8 +1821,7 @@ export declare const findEdges: {
1886
1821
  * Graph.updateNode(mutable, 0, (data) => data.toUpperCase())
1887
1822
  * })
1888
1823
  *
1889
- * const nodeData = Graph.getNode(graph, 0)
1890
- * console.log(nodeData) // Option.some("NODE A")
1824
+ * Graph.getNode(graph, 0) // => Option.some("NODE A")
1891
1825
  * ```
1892
1826
  *
1893
1827
  * @category transforming
@@ -1899,8 +1833,8 @@ export declare const updateNode: <N, E, T extends Kind = "directed">(mutable: Mu
1899
1833
  *
1900
1834
  * **Example** (Updating edge data)
1901
1835
  *
1902
- * ```ts
1903
- * import { Graph } from "effect"
1836
+ * ```ts import.meta.vitest
1837
+ * import { Graph, Option } from "effect"
1904
1838
  *
1905
1839
  * const result = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
1906
1840
  * const nodeA = Graph.addNode(mutable, "Node A")
@@ -1909,8 +1843,7 @@ export declare const updateNode: <N, E, T extends Kind = "directed">(mutable: Mu
1909
1843
  * Graph.updateEdge(mutable, edgeIndex, (data) => data * 2)
1910
1844
  * })
1911
1845
  *
1912
- * const edgeData = Graph.getEdge(result, 0)
1913
- * console.log(edgeData) // Option.some(new Graph.Edge({ source: 0, target: 1, data: 20 }))
1846
+ * Option.map(Graph.getEdge(result, 0), (edge) => edge.data) // => Option.some(20)
1914
1847
  * ```
1915
1848
  *
1916
1849
  * @category mutations
@@ -1927,8 +1860,8 @@ export declare const updateEdge: <N, E, T extends Kind = "directed">(mutable: Mu
1927
1860
  *
1928
1861
  * **Example** (Mapping node data)
1929
1862
  *
1930
- * ```ts
1931
- * import { Graph } from "effect"
1863
+ * ```ts import.meta.vitest
1864
+ * import { Graph, Option } from "effect"
1932
1865
  *
1933
1866
  * const graph = Graph.directed<string, number>((mutable) => {
1934
1867
  * Graph.addNode(mutable, "node a")
@@ -1937,8 +1870,7 @@ export declare const updateEdge: <N, E, T extends Kind = "directed">(mutable: Mu
1937
1870
  * Graph.mapNodes(mutable, (data) => data.toUpperCase())
1938
1871
  * })
1939
1872
  *
1940
- * const nodeData = Graph.getNode(graph, 0)
1941
- * console.log(nodeData) // Option.some("NODE A")
1873
+ * Graph.getNode(graph, 0) // => Option.some("NODE A")
1942
1874
  * ```
1943
1875
  *
1944
1876
  * @category transforming
@@ -1950,8 +1882,8 @@ export declare const mapNodes: <N, E, T extends Kind = "directed">(mutable: Muta
1950
1882
  *
1951
1883
  * **Example** (Mapping edge data)
1952
1884
  *
1953
- * ```ts
1954
- * import { Graph } from "effect"
1885
+ * ```ts import.meta.vitest
1886
+ * import { Graph, Option } from "effect"
1955
1887
  *
1956
1888
  * const graph = Graph.directed<string, number>((mutable) => {
1957
1889
  * const a = Graph.addNode(mutable, "A")
@@ -1962,8 +1894,7 @@ export declare const mapNodes: <N, E, T extends Kind = "directed">(mutable: Muta
1962
1894
  * Graph.mapEdges(mutable, (data) => data * 2)
1963
1895
  * })
1964
1896
  *
1965
- * const edgeData = Graph.getEdge(graph, 0)
1966
- * console.log(edgeData) // Option.some(new Graph.Edge({ source: 0, target: 1, data: 20 }))
1897
+ * Option.map(Graph.getEdge(graph, 0), (edge) => edge.data) // => Option.some(20)
1967
1898
  * ```
1968
1899
  *
1969
1900
  * @category transforming
@@ -1975,8 +1906,8 @@ export declare const mapEdges: <N, E, T extends Kind = "directed">(mutable: Muta
1975
1906
  *
1976
1907
  * **Example** (Reversing edge directions)
1977
1908
  *
1978
- * ```ts
1979
- * import { Graph } from "effect"
1909
+ * ```ts import.meta.vitest
1910
+ * import { Graph, Option } from "effect"
1980
1911
  *
1981
1912
  * const graph = Graph.directed<string, number>((mutable) => {
1982
1913
  * const a = Graph.addNode(mutable, "A")
@@ -1987,8 +1918,7 @@ export declare const mapEdges: <N, E, T extends Kind = "directed">(mutable: Muta
1987
1918
  * Graph.reverse(mutable) // Now B -> A, C -> B
1988
1919
  * })
1989
1920
  *
1990
- * const edge0 = Graph.getEdge(graph, 0)
1991
- * console.log(edge0) // Option.some(new Graph.Edge({ source: 1, target: 0, data: 1 }))
1921
+ * Option.map(Graph.getEdge(graph, 0), (edge) => edge.source) // => Option.some(1)
1992
1922
  * ```
1993
1923
  *
1994
1924
  * @category transforming
@@ -2001,7 +1931,7 @@ export declare const reverse: <N, E, T extends Kind = "directed">(mutable: Mutab
2001
1931
  *
2002
1932
  * **Example** (Filtering and mapping nodes)
2003
1933
  *
2004
- * ```ts
1934
+ * ```ts import.meta.vitest
2005
1935
  * import { Graph, Option } from "effect"
2006
1936
  *
2007
1937
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -2019,7 +1949,7 @@ export declare const reverse: <N, E, T extends Kind = "directed">(mutable: Mutab
2019
1949
  * )
2020
1950
  * })
2021
1951
  *
2022
- * console.log(Graph.nodeCount(graph)) // 2 (only "active" nodes remain)
1952
+ * Graph.nodeCount(graph) // => 2
2023
1953
  * ```
2024
1954
  *
2025
1955
  * @category transforming
@@ -2032,7 +1962,7 @@ export declare const filterMapNodes: <N, E, T extends Kind = "directed">(mutable
2032
1962
  *
2033
1963
  * **Example** (Filtering and mapping edges)
2034
1964
  *
2035
- * ```ts
1965
+ * ```ts import.meta.vitest
2036
1966
  * import { Graph, Option } from "effect"
2037
1967
  *
2038
1968
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -2050,7 +1980,7 @@ export declare const filterMapNodes: <N, E, T extends Kind = "directed">(mutable
2050
1980
  * )
2051
1981
  * })
2052
1982
  *
2053
- * console.log(Graph.edgeCount(graph)) // 2 (edges with weight 5 removed)
1983
+ * Graph.edgeCount(graph) // => 2
2054
1984
  * ```
2055
1985
  *
2056
1986
  * @category transforming
@@ -2063,7 +1993,7 @@ export declare const filterMapEdges: <N, E, T extends Kind = "directed">(mutable
2063
1993
  *
2064
1994
  * **Example** (Filtering nodes)
2065
1995
  *
2066
- * ```ts
1996
+ * ```ts import.meta.vitest
2067
1997
  * import { Graph } from "effect"
2068
1998
  *
2069
1999
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -2076,7 +2006,7 @@ export declare const filterMapEdges: <N, E, T extends Kind = "directed">(mutable
2076
2006
  * Graph.filterNodes(mutable, (data) => data === "active")
2077
2007
  * })
2078
2008
  *
2079
- * console.log(Graph.nodeCount(graph)) // 2 (only "active" nodes remain)
2009
+ * Graph.nodeCount(graph) // => 2
2080
2010
  * ```
2081
2011
  *
2082
2012
  * @category transforming
@@ -2089,7 +2019,7 @@ export declare const filterNodes: <N, E, T extends Kind = "directed">(mutable: M
2089
2019
  *
2090
2020
  * **Example** (Filtering edges)
2091
2021
  *
2092
- * ```ts
2022
+ * ```ts import.meta.vitest
2093
2023
  * import { Graph } from "effect"
2094
2024
  *
2095
2025
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -2105,7 +2035,7 @@ export declare const filterNodes: <N, E, T extends Kind = "directed">(mutable: M
2105
2035
  * Graph.filterEdges(mutable, (data) => data >= 10)
2106
2036
  * })
2107
2037
  *
2108
- * console.log(Graph.edgeCount(graph)) // 2 (edge with weight 5 removed)
2038
+ * Graph.edgeCount(graph) // => 2
2109
2039
  * ```
2110
2040
  *
2111
2041
  * @category transforming
@@ -2133,14 +2063,13 @@ export declare const filterEdges: <N, E, T extends Kind = "directed">(mutable: M
2133
2063
  *
2134
2064
  * **Example** (Adding edges)
2135
2065
  *
2136
- * ```ts
2066
+ * ```ts import.meta.vitest
2137
2067
  * import { Graph } from "effect"
2138
2068
  *
2139
- * const result = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
2069
+ * Graph.mutate(Graph.directed<string, number>(), (mutable) => {
2140
2070
  * const nodeA = Graph.addNode(mutable, "Node A")
2141
2071
  * const nodeB = Graph.addNode(mutable, "Node B")
2142
- * const edge = Graph.addEdge(mutable, nodeA, nodeB, 42)
2143
- * console.log(edge) // EdgeIndex with value 0
2072
+ * Graph.addEdge(mutable, nodeA, nodeB, 42) // => 0
2144
2073
  * })
2145
2074
  * ```
2146
2075
  *
@@ -2158,7 +2087,7 @@ export declare const addEdge: <N, E, T extends Kind = "directed">(mutable: Mutab
2158
2087
  *
2159
2088
  * **Example** (Removing a node)
2160
2089
  *
2161
- * ```ts
2090
+ * ```ts import.meta.vitest
2162
2091
  * import { Graph } from "effect"
2163
2092
  *
2164
2093
  * const result = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
@@ -2169,6 +2098,7 @@ export declare const addEdge: <N, E, T extends Kind = "directed">(mutable: Mutab
2169
2098
  * // Remove nodeA and all edges connected to it
2170
2099
  * Graph.removeNode(mutable, nodeA)
2171
2100
  * })
2101
+ * Array.of(Graph.nodeCount(result), Graph.edgeCount(result)) // => [1, 0]
2172
2102
  * ```
2173
2103
  *
2174
2104
  * @category mutations
@@ -2180,7 +2110,7 @@ export declare const removeNode: <N, E, T extends Kind = "directed">(mutable: Mu
2180
2110
  *
2181
2111
  * **Example** (Removing an edge)
2182
2112
  *
2183
- * ```ts
2113
+ * ```ts import.meta.vitest
2184
2114
  * import { Graph } from "effect"
2185
2115
  *
2186
2116
  * const result = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
@@ -2191,6 +2121,7 @@ export declare const removeNode: <N, E, T extends Kind = "directed">(mutable: Mu
2191
2121
  * // Remove the edge
2192
2122
  * Graph.removeEdge(mutable, edge)
2193
2123
  * })
2124
+ * Array.of(Graph.nodeCount(result), Graph.edgeCount(result)) // => [2, 0]
2194
2125
  * ```
2195
2126
  *
2196
2127
  * @category mutations
@@ -2202,8 +2133,8 @@ export declare const removeEdge: <N, E, T extends Kind = "directed">(mutable: Mu
2202
2133
  *
2203
2134
  * **Example** (Getting edge data)
2204
2135
  *
2205
- * ```ts
2206
- * import { Graph } from "effect"
2136
+ * ```ts import.meta.vitest
2137
+ * import { Graph, Option } from "effect"
2207
2138
  *
2208
2139
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
2209
2140
  * const nodeA = Graph.addNode(mutable, "Node A")
@@ -2211,14 +2142,7 @@ export declare const removeEdge: <N, E, T extends Kind = "directed">(mutable: Mu
2211
2142
  * Graph.addEdge(mutable, nodeA, nodeB, 42)
2212
2143
  * })
2213
2144
  *
2214
- * const edgeIndex = 0
2215
- * const edgeData = Graph.getEdge(graph, edgeIndex)
2216
- *
2217
- * if (edgeData._tag === "Some") {
2218
- * console.log(edgeData.value.data) // 42
2219
- * console.log(edgeData.value.source) // 0
2220
- * console.log(edgeData.value.target) // 1
2221
- * }
2145
+ * Graph.getEdge(graph, 0) // => Option.some(new Graph.Edge({ source: 0, target: 1, data: 42 }))
2222
2146
  * ```
2223
2147
  *
2224
2148
  * @category getters
@@ -2230,8 +2154,8 @@ export declare const getEdge: {
2230
2154
  *
2231
2155
  * **Example** (Getting edge data)
2232
2156
  *
2233
- * ```ts
2234
- * import { Graph } from "effect"
2157
+ * ```ts import.meta.vitest
2158
+ * import { Graph, Option } from "effect"
2235
2159
  *
2236
2160
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
2237
2161
  * const nodeA = Graph.addNode(mutable, "Node A")
@@ -2239,14 +2163,7 @@ export declare const getEdge: {
2239
2163
  * Graph.addEdge(mutable, nodeA, nodeB, 42)
2240
2164
  * })
2241
2165
  *
2242
- * const edgeIndex = 0
2243
- * const edgeData = Graph.getEdge(graph, edgeIndex)
2244
- *
2245
- * if (edgeData._tag === "Some") {
2246
- * console.log(edgeData.value.data) // 42
2247
- * console.log(edgeData.value.source) // 0
2248
- * console.log(edgeData.value.target) // 1
2249
- * }
2166
+ * Graph.getEdge(graph, 0) // => Option.some(new Graph.Edge({ source: 0, target: 1, data: 42 }))
2250
2167
  * ```
2251
2168
  *
2252
2169
  * @category getters
@@ -2258,8 +2175,8 @@ export declare const getEdge: {
2258
2175
  *
2259
2176
  * **Example** (Getting edge data)
2260
2177
  *
2261
- * ```ts
2262
- * import { Graph } from "effect"
2178
+ * ```ts import.meta.vitest
2179
+ * import { Graph, Option } from "effect"
2263
2180
  *
2264
2181
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
2265
2182
  * const nodeA = Graph.addNode(mutable, "Node A")
@@ -2267,14 +2184,7 @@ export declare const getEdge: {
2267
2184
  * Graph.addEdge(mutable, nodeA, nodeB, 42)
2268
2185
  * })
2269
2186
  *
2270
- * const edgeIndex = 0
2271
- * const edgeData = Graph.getEdge(graph, edgeIndex)
2272
- *
2273
- * if (edgeData._tag === "Some") {
2274
- * console.log(edgeData.value.data) // 42
2275
- * console.log(edgeData.value.source) // 0
2276
- * console.log(edgeData.value.target) // 1
2277
- * }
2187
+ * Graph.getEdge(graph, 0) // => Option.some(new Graph.Edge({ source: 0, target: 1, data: 42 }))
2278
2188
  * ```
2279
2189
  *
2280
2190
  * @category getters
@@ -2287,7 +2197,7 @@ export declare const getEdge: {
2287
2197
  *
2288
2198
  * **Example** (Checking edge existence)
2289
2199
  *
2290
- * ```ts
2200
+ * ```ts import.meta.vitest
2291
2201
  * import { Graph } from "effect"
2292
2202
  *
2293
2203
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
@@ -2297,15 +2207,8 @@ export declare const getEdge: {
2297
2207
  * Graph.addEdge(mutable, nodeA, nodeB, 42)
2298
2208
  * })
2299
2209
  *
2300
- * const nodeA = 0
2301
- * const nodeB = 1
2302
- * const nodeC = 2
2303
- *
2304
- * const hasAB = Graph.hasEdge(graph, nodeA, nodeB)
2305
- * console.log(hasAB) // true
2306
- *
2307
- * const hasAC = Graph.hasEdge(graph, nodeA, nodeC)
2308
- * console.log(hasAC) // false
2210
+ * Graph.hasEdge(graph, 0, 1) // => true
2211
+ * Graph.hasEdge(graph, 0, 2) // => false
2309
2212
  * ```
2310
2213
  *
2311
2214
  * @category getters
@@ -2317,7 +2220,7 @@ export declare const hasEdge: {
2317
2220
  *
2318
2221
  * **Example** (Checking edge existence)
2319
2222
  *
2320
- * ```ts
2223
+ * ```ts import.meta.vitest
2321
2224
  * import { Graph } from "effect"
2322
2225
  *
2323
2226
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
@@ -2327,15 +2230,8 @@ export declare const hasEdge: {
2327
2230
  * Graph.addEdge(mutable, nodeA, nodeB, 42)
2328
2231
  * })
2329
2232
  *
2330
- * const nodeA = 0
2331
- * const nodeB = 1
2332
- * const nodeC = 2
2333
- *
2334
- * const hasAB = Graph.hasEdge(graph, nodeA, nodeB)
2335
- * console.log(hasAB) // true
2336
- *
2337
- * const hasAC = Graph.hasEdge(graph, nodeA, nodeC)
2338
- * console.log(hasAC) // false
2233
+ * Graph.hasEdge(graph, 0, 1) // => true
2234
+ * Graph.hasEdge(graph, 0, 2) // => false
2339
2235
  * ```
2340
2236
  *
2341
2237
  * @category getters
@@ -2347,7 +2243,7 @@ export declare const hasEdge: {
2347
2243
  *
2348
2244
  * **Example** (Checking edge existence)
2349
2245
  *
2350
- * ```ts
2246
+ * ```ts import.meta.vitest
2351
2247
  * import { Graph } from "effect"
2352
2248
  *
2353
2249
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
@@ -2357,15 +2253,8 @@ export declare const hasEdge: {
2357
2253
  * Graph.addEdge(mutable, nodeA, nodeB, 42)
2358
2254
  * })
2359
2255
  *
2360
- * const nodeA = 0
2361
- * const nodeB = 1
2362
- * const nodeC = 2
2363
- *
2364
- * const hasAB = Graph.hasEdge(graph, nodeA, nodeB)
2365
- * console.log(hasAB) // true
2366
- *
2367
- * const hasAC = Graph.hasEdge(graph, nodeA, nodeC)
2368
- * console.log(hasAC) // false
2256
+ * Graph.hasEdge(graph, 0, 1) // => true
2257
+ * Graph.hasEdge(graph, 0, 2) // => false
2369
2258
  * ```
2370
2259
  *
2371
2260
  * @category getters
@@ -2378,11 +2267,11 @@ export declare const hasEdge: {
2378
2267
  *
2379
2268
  * **Example** (Counting edges)
2380
2269
  *
2381
- * ```ts
2270
+ * ```ts import.meta.vitest
2382
2271
  * import { Graph } from "effect"
2383
2272
  *
2384
2273
  * const emptyGraph = Graph.directed<string, number>()
2385
- * console.log(Graph.edgeCount(emptyGraph)) // 0
2274
+ * Graph.edgeCount(emptyGraph) // => 0
2386
2275
  *
2387
2276
  * const graphWithEdges = Graph.mutate(emptyGraph, (mutable) => {
2388
2277
  * const nodeA = Graph.addNode(mutable, "Node A")
@@ -2393,7 +2282,7 @@ export declare const hasEdge: {
2393
2282
  * Graph.addEdge(mutable, nodeC, nodeA, 3)
2394
2283
  * })
2395
2284
  *
2396
- * console.log(Graph.edgeCount(graphWithEdges)) // 3
2285
+ * Graph.edgeCount(graphWithEdges) // => 3
2397
2286
  * ```
2398
2287
  *
2399
2288
  * @category getters
@@ -2410,7 +2299,7 @@ export declare const edgeCount: <N, E, T extends Kind = "directed">(graph: Graph
2410
2299
  *
2411
2300
  * **Example** (Getting outgoing neighbors)
2412
2301
  *
2413
- * ```ts
2302
+ * ```ts import.meta.vitest
2414
2303
  * import { Graph } from "effect"
2415
2304
  *
2416
2305
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
@@ -2421,15 +2310,8 @@ export declare const edgeCount: <N, E, T extends Kind = "directed">(graph: Graph
2421
2310
  * Graph.addEdge(mutable, nodeA, nodeC, 2)
2422
2311
  * })
2423
2312
  *
2424
- * const nodeA = 0
2425
- * const nodeB = 1
2426
- * const nodeC = 2
2427
- *
2428
- * const neighborsA = Graph.neighbors(graph, nodeA)
2429
- * console.log(neighborsA) // [1, 2]
2430
- *
2431
- * const neighborsB = Graph.neighbors(graph, nodeB)
2432
- * console.log(neighborsB) // []
2313
+ * Graph.neighbors(graph, 0) // => [1, 2]
2314
+ * Graph.neighbors(graph, 1) // => []
2433
2315
  * ```
2434
2316
  *
2435
2317
  * @category getters
@@ -2446,7 +2328,7 @@ export declare const neighbors: {
2446
2328
  *
2447
2329
  * **Example** (Getting outgoing neighbors)
2448
2330
  *
2449
- * ```ts
2331
+ * ```ts import.meta.vitest
2450
2332
  * import { Graph } from "effect"
2451
2333
  *
2452
2334
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
@@ -2457,15 +2339,8 @@ export declare const neighbors: {
2457
2339
  * Graph.addEdge(mutable, nodeA, nodeC, 2)
2458
2340
  * })
2459
2341
  *
2460
- * const nodeA = 0
2461
- * const nodeB = 1
2462
- * const nodeC = 2
2463
- *
2464
- * const neighborsA = Graph.neighbors(graph, nodeA)
2465
- * console.log(neighborsA) // [1, 2]
2466
- *
2467
- * const neighborsB = Graph.neighbors(graph, nodeB)
2468
- * console.log(neighborsB) // []
2342
+ * Graph.neighbors(graph, 0) // => [1, 2]
2343
+ * Graph.neighbors(graph, 1) // => []
2469
2344
  * ```
2470
2345
  *
2471
2346
  * @category getters
@@ -2482,7 +2357,7 @@ export declare const neighbors: {
2482
2357
  *
2483
2358
  * **Example** (Getting outgoing neighbors)
2484
2359
  *
2485
- * ```ts
2360
+ * ```ts import.meta.vitest
2486
2361
  * import { Graph } from "effect"
2487
2362
  *
2488
2363
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
@@ -2493,15 +2368,8 @@ export declare const neighbors: {
2493
2368
  * Graph.addEdge(mutable, nodeA, nodeC, 2)
2494
2369
  * })
2495
2370
  *
2496
- * const nodeA = 0
2497
- * const nodeB = 1
2498
- * const nodeC = 2
2499
- *
2500
- * const neighborsA = Graph.neighbors(graph, nodeA)
2501
- * console.log(neighborsA) // [1, 2]
2502
- *
2503
- * const neighborsB = Graph.neighbors(graph, nodeB)
2504
- * console.log(neighborsB) // []
2371
+ * Graph.neighbors(graph, 0) // => [1, 2]
2372
+ * Graph.neighbors(graph, 1) // => []
2505
2373
  * ```
2506
2374
  *
2507
2375
  * @category getters
@@ -2524,7 +2392,7 @@ export declare const neighbors: {
2524
2392
  * @see {@link predecessors} for incoming neighbors in a directed graph
2525
2393
  * @see {@link neighbors} for generic neighbor lookup across graph kinds
2526
2394
  *
2527
- * @category queries
2395
+ * @category getters
2528
2396
  * @since 4.0.0
2529
2397
  */
2530
2398
  export declare const successors: {
@@ -2543,7 +2411,7 @@ export declare const successors: {
2543
2411
  * @see {@link predecessors} for incoming neighbors in a directed graph
2544
2412
  * @see {@link neighbors} for generic neighbor lookup across graph kinds
2545
2413
  *
2546
- * @category queries
2414
+ * @category getters
2547
2415
  * @since 4.0.0
2548
2416
  */
2549
2417
  (nodeIndex: NodeIndex): <N, E>(graph: Graph<N, E, "directed"> | MutableGraph<N, E, "directed">) => Array<NodeIndex>;
@@ -2562,7 +2430,7 @@ export declare const successors: {
2562
2430
  * @see {@link predecessors} for incoming neighbors in a directed graph
2563
2431
  * @see {@link neighbors} for generic neighbor lookup across graph kinds
2564
2432
  *
2565
- * @category queries
2433
+ * @category getters
2566
2434
  * @since 4.0.0
2567
2435
  */
2568
2436
  <N, E>(graph: Graph<N, E, "directed"> | MutableGraph<N, E, "directed">, nodeIndex: NodeIndex): Array<NodeIndex>;
@@ -2582,7 +2450,7 @@ export declare const successors: {
2582
2450
  * @see {@link successors} for outgoing neighbors in a directed graph
2583
2451
  * @see {@link neighbors} for generic neighbor lookup across graph kinds
2584
2452
  *
2585
- * @category queries
2453
+ * @category getters
2586
2454
  * @since 4.0.0
2587
2455
  */
2588
2456
  export declare const predecessors: {
@@ -2601,7 +2469,7 @@ export declare const predecessors: {
2601
2469
  * @see {@link successors} for outgoing neighbors in a directed graph
2602
2470
  * @see {@link neighbors} for generic neighbor lookup across graph kinds
2603
2471
  *
2604
- * @category queries
2472
+ * @category getters
2605
2473
  * @since 4.0.0
2606
2474
  */
2607
2475
  (nodeIndex: NodeIndex): <N, E>(graph: Graph<N, E, "directed"> | MutableGraph<N, E, "directed">) => Array<NodeIndex>;
@@ -2620,7 +2488,7 @@ export declare const predecessors: {
2620
2488
  * @see {@link successors} for outgoing neighbors in a directed graph
2621
2489
  * @see {@link neighbors} for generic neighbor lookup across graph kinds
2622
2490
  *
2623
- * @category queries
2491
+ * @category getters
2624
2492
  * @since 4.0.0
2625
2493
  */
2626
2494
  <N, E>(graph: Graph<N, E, "directed"> | MutableGraph<N, E, "directed">, nodeIndex: NodeIndex): Array<NodeIndex>;
@@ -2639,7 +2507,7 @@ export declare const predecessors: {
2639
2507
  *
2640
2508
  * **Example** (Traversing directed neighbors)
2641
2509
  *
2642
- * ```ts
2510
+ * ```ts import.meta.vitest
2643
2511
  * import { Graph } from "effect"
2644
2512
  *
2645
2513
  * const graph = Graph.directed<string, string>((mutable) => {
@@ -2656,12 +2524,13 @@ export declare const predecessors: {
2656
2524
  *
2657
2525
  * // Get incoming neighbors (nodes that point to nodeB)
2658
2526
  * const incoming = Graph.neighborsDirected(graph, nodeB, "incoming")
2527
+ * Array.of(outgoing, incoming) // => [[1], [0]]
2659
2528
  * ```
2660
2529
  *
2661
2530
  * @deprecated Use {@link successors} for outgoing neighbors or {@link predecessors} for incoming neighbors.
2662
2531
  * @see {@link successors} for outgoing neighbors in a directed graph
2663
2532
  * @see {@link predecessors} for incoming neighbors in a directed graph
2664
- * @category queries
2533
+ * @category getters
2665
2534
  * @since 3.18.0
2666
2535
  */
2667
2536
  export declare const neighborsDirected: {
@@ -2679,7 +2548,7 @@ export declare const neighborsDirected: {
2679
2548
  *
2680
2549
  * **Example** (Traversing directed neighbors)
2681
2550
  *
2682
- * ```ts
2551
+ * ```ts import.meta.vitest
2683
2552
  * import { Graph } from "effect"
2684
2553
  *
2685
2554
  * const graph = Graph.directed<string, string>((mutable) => {
@@ -2696,12 +2565,13 @@ export declare const neighborsDirected: {
2696
2565
  *
2697
2566
  * // Get incoming neighbors (nodes that point to nodeB)
2698
2567
  * const incoming = Graph.neighborsDirected(graph, nodeB, "incoming")
2568
+ * Array.of(outgoing, incoming) // => [[1], [0]]
2699
2569
  * ```
2700
2570
  *
2701
2571
  * @deprecated Use {@link successors} for outgoing neighbors or {@link predecessors} for incoming neighbors.
2702
2572
  * @see {@link successors} for outgoing neighbors in a directed graph
2703
2573
  * @see {@link predecessors} for incoming neighbors in a directed graph
2704
- * @category queries
2574
+ * @category getters
2705
2575
  * @since 3.18.0
2706
2576
  */
2707
2577
  (nodeIndex: NodeIndex, direction: Direction): <N, E>(graph: Graph<N, E, "directed"> | MutableGraph<N, E, "directed">) => Array<NodeIndex>;
@@ -2719,7 +2589,7 @@ export declare const neighborsDirected: {
2719
2589
  *
2720
2590
  * **Example** (Traversing directed neighbors)
2721
2591
  *
2722
- * ```ts
2592
+ * ```ts import.meta.vitest
2723
2593
  * import { Graph } from "effect"
2724
2594
  *
2725
2595
  * const graph = Graph.directed<string, string>((mutable) => {
@@ -2736,12 +2606,13 @@ export declare const neighborsDirected: {
2736
2606
  *
2737
2607
  * // Get incoming neighbors (nodes that point to nodeB)
2738
2608
  * const incoming = Graph.neighborsDirected(graph, nodeB, "incoming")
2609
+ * Array.of(outgoing, incoming) // => [[1], [0]]
2739
2610
  * ```
2740
2611
  *
2741
2612
  * @deprecated Use {@link successors} for outgoing neighbors or {@link predecessors} for incoming neighbors.
2742
2613
  * @see {@link successors} for outgoing neighbors in a directed graph
2743
2614
  * @see {@link predecessors} for incoming neighbors in a directed graph
2744
- * @category queries
2615
+ * @category getters
2745
2616
  * @since 3.18.0
2746
2617
  */
2747
2618
  <N, E>(graph: Graph<N, E, "directed"> | MutableGraph<N, E, "directed">, nodeIndex: NodeIndex, direction: Direction): Array<NodeIndex>;
@@ -2756,7 +2627,7 @@ export declare const neighborsDirected: {
2756
2627
  *
2757
2628
  * **Example** (Configuring GraphViz labels)
2758
2629
  *
2759
- * ```ts
2630
+ * ```ts import.meta.vitest
2760
2631
  * import type { Graph } from "effect"
2761
2632
  *
2762
2633
  * // Basic options with custom labels
@@ -2771,6 +2642,7 @@ export declare const neighborsDirected: {
2771
2642
  * edgeLabel: (data) => data,
2772
2643
  * graphName: "MyDependencyGraph"
2773
2644
  * }
2645
+ * Array.of(basicOptions.nodeLabel?.("A"), namedOptions.graphName) // => ["Node: A", "MyDependencyGraph"]
2774
2646
  * ```
2775
2647
  *
2776
2648
  * @category options
@@ -2798,7 +2670,7 @@ export interface GraphVizOptions<N, E> {
2798
2670
  *
2799
2671
  * **Example** (Exporting GraphViz DOT)
2800
2672
  *
2801
- * ```ts
2673
+ * ```ts import.meta.vitest
2802
2674
  * import { Graph } from "effect"
2803
2675
  *
2804
2676
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
@@ -2810,16 +2682,7 @@ export interface GraphVizOptions<N, E> {
2810
2682
  * Graph.addEdge(mutable, nodeC, nodeA, 3)
2811
2683
  * })
2812
2684
  *
2813
- * const dot = Graph.toGraphViz(graph)
2814
- * console.log(dot)
2815
- * // digraph "G" {
2816
- * // "0" [label="Node A"];
2817
- * // "1" [label="Node B"];
2818
- * // "2" [label="Node C"];
2819
- * // "0" -> "1" [label="1"];
2820
- * // "1" -> "2" [label="2"];
2821
- * // "2" -> "0" [label="3"];
2822
- * // }
2685
+ * Graph.toGraphViz(graph).split("\n") // => ['digraph "G" {', ' "0" [label="Node A"];', ' "1" [label="Node B"];', ' "2" [label="Node C"];', ' "0" -> "1" [label="1"];', ' "1" -> "2" [label="2"];', ' "2" -> "0" [label="3"];', "}"]
2823
2686
  * ```
2824
2687
  *
2825
2688
  * @category converting
@@ -2831,7 +2694,7 @@ export declare const toGraphViz: {
2831
2694
  *
2832
2695
  * **Example** (Exporting GraphViz DOT)
2833
2696
  *
2834
- * ```ts
2697
+ * ```ts import.meta.vitest
2835
2698
  * import { Graph } from "effect"
2836
2699
  *
2837
2700
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
@@ -2843,16 +2706,7 @@ export declare const toGraphViz: {
2843
2706
  * Graph.addEdge(mutable, nodeC, nodeA, 3)
2844
2707
  * })
2845
2708
  *
2846
- * const dot = Graph.toGraphViz(graph)
2847
- * console.log(dot)
2848
- * // digraph "G" {
2849
- * // "0" [label="Node A"];
2850
- * // "1" [label="Node B"];
2851
- * // "2" [label="Node C"];
2852
- * // "0" -> "1" [label="1"];
2853
- * // "1" -> "2" [label="2"];
2854
- * // "2" -> "0" [label="3"];
2855
- * // }
2709
+ * Graph.toGraphViz(graph).split("\n") // => ['digraph "G" {', ' "0" [label="Node A"];', ' "1" [label="Node B"];', ' "2" [label="Node C"];', ' "0" -> "1" [label="1"];', ' "1" -> "2" [label="2"];', ' "2" -> "0" [label="3"];', "}"]
2856
2710
  * ```
2857
2711
  *
2858
2712
  * @category converting
@@ -2864,7 +2718,7 @@ export declare const toGraphViz: {
2864
2718
  *
2865
2719
  * **Example** (Exporting GraphViz DOT)
2866
2720
  *
2867
- * ```ts
2721
+ * ```ts import.meta.vitest
2868
2722
  * import { Graph } from "effect"
2869
2723
  *
2870
2724
  * const graph = Graph.mutate(Graph.directed<string, number>(), (mutable) => {
@@ -2876,16 +2730,7 @@ export declare const toGraphViz: {
2876
2730
  * Graph.addEdge(mutable, nodeC, nodeA, 3)
2877
2731
  * })
2878
2732
  *
2879
- * const dot = Graph.toGraphViz(graph)
2880
- * console.log(dot)
2881
- * // digraph "G" {
2882
- * // "0" [label="Node A"];
2883
- * // "1" [label="Node B"];
2884
- * // "2" [label="Node C"];
2885
- * // "0" -> "1" [label="1"];
2886
- * // "1" -> "2" [label="2"];
2887
- * // "2" -> "0" [label="3"];
2888
- * // }
2733
+ * Graph.toGraphViz(graph).split("\n") // => ['digraph "G" {', ' "0" [label="Node A"];', ' "1" [label="Node B"];', ' "2" [label="Node C"];', ' "0" -> "1" [label="1"];', ' "1" -> "2" [label="2"];', ' "2" -> "0" [label="3"];', "}"]
2889
2734
  * ```
2890
2735
  *
2891
2736
  * @category converting
@@ -2910,7 +2755,7 @@ export declare const toGraphViz: {
2910
2755
  *
2911
2756
  * **Example** (Selecting Mermaid node shapes)
2912
2757
  *
2913
- * ```ts
2758
+ * ```ts import.meta.vitest
2914
2759
  * import type { Graph } from "effect"
2915
2760
  *
2916
2761
  * // Shape selector function for different node types
@@ -2925,6 +2770,7 @@ export declare const toGraphViz: {
2925
2770
  * const options: Graph.MermaidOptions<string, string> = {
2926
2771
  * nodeShape: shapeSelector
2927
2772
  * }
2773
+ * options.nodeShape?.("decision") // => "diamond"
2928
2774
  * ```
2929
2775
  *
2930
2776
  * @category models
@@ -2944,7 +2790,7 @@ export type MermaidNodeShape = "rectangle" | "rounded" | "circle" | "diamond" |
2944
2790
  *
2945
2791
  * **Example** (Configuring Mermaid directions)
2946
2792
  *
2947
- * ```ts
2793
+ * ```ts import.meta.vitest
2948
2794
  * import type { Graph } from "effect"
2949
2795
  *
2950
2796
  * // Horizontal workflow diagram
@@ -2961,6 +2807,7 @@ export type MermaidNodeShape = "rectangle" | "rounded" | "circle" | "diamond" |
2961
2807
  * const bottomUpOptions: Graph.MermaidOptions<string, string> = {
2962
2808
  * direction: "BT"
2963
2809
  * }
2810
+ * Array.of(horizontalOptions.direction, verticalOptions.direction, bottomUpOptions.direction) // => ["LR", "TB", "BT"]
2964
2811
  * ```
2965
2812
  *
2966
2813
  * @category models
@@ -2981,7 +2828,7 @@ export type MermaidDirection = "TB" | "TD" | "BT" | "RL" | "LR";
2981
2828
  *
2982
2829
  * **Example** (Selecting Mermaid diagram types)
2983
2830
  *
2984
- * ```ts
2831
+ * ```ts import.meta.vitest
2985
2832
  * import type { Graph } from "effect"
2986
2833
  *
2987
2834
  * // Force flowchart format (even for undirected graphs)
@@ -2996,6 +2843,7 @@ export type MermaidDirection = "TB" | "TD" | "BT" | "RL" | "LR";
2996
2843
  *
2997
2844
  * // Auto-detection (recommended, default behavior)
2998
2845
  * const autoOptions: Graph.MermaidOptions<string, string> = {}
2846
+ * Array.of(flowchartOptions.diagramType, graphOptions.diagramType, autoOptions.diagramType) // => ["flowchart", "graph", undefined]
2999
2847
  * ```
3000
2848
  *
3001
2849
  * @category models
@@ -3018,7 +2866,7 @@ export type MermaidDiagramType = "flowchart" | "graph";
3018
2866
  *
3019
2867
  * **Example** (Configuring Mermaid output)
3020
2868
  *
3021
- * ```ts
2869
+ * ```ts import.meta.vitest
3022
2870
  * import type { Graph } from "effect"
3023
2871
  *
3024
2872
  * // Basic options with custom labels
@@ -3035,6 +2883,7 @@ export type MermaidDiagramType = "flowchart" | "graph";
3035
2883
  * direction: "LR",
3036
2884
  * nodeShape: (data) => data.includes("start") ? "circle" : "rectangle"
3037
2885
  * }
2886
+ * Array.of(basicOptions.nodeLabel?.("A"), advancedOptions.nodeShape?.("start")) // => ["Node: A", "circle"]
3038
2887
  * ```
3039
2888
  *
3040
2889
  * @category options
@@ -3080,7 +2929,7 @@ export interface MermaidOptions<N, E> {
3080
2929
  *
3081
2930
  * **Example** (Exporting a directed Mermaid diagram)
3082
2931
  *
3083
- * ```ts
2932
+ * ```ts import.meta.vitest
3084
2933
  * import { Graph } from "effect"
3085
2934
  *
3086
2935
  * // Basic directed graph export
@@ -3092,19 +2941,12 @@ export interface MermaidOptions<N, E> {
3092
2941
  * Graph.addEdge(mutable, app, cache, 2)
3093
2942
  * })
3094
2943
  *
3095
- * const mermaid = Graph.toMermaid(graph)
3096
- * console.log(mermaid)
3097
- * // flowchart TD
3098
- * // 0["App"]
3099
- * // 1["Database"]
3100
- * // 2["Cache"]
3101
- * // 0 -->|"1"| 1
3102
- * // 0 -->|"2"| 2
2944
+ * Graph.toMermaid(graph).split("\n") // => ["flowchart TD", ' 0["App"]', ' 1["Database"]', ' 2["Cache"]', ' 0 -->|"1"| 1', ' 0 -->|"2"| 2']
3103
2945
  * ```
3104
2946
  *
3105
2947
  * **Example** (Exporting an undirected Mermaid diagram)
3106
2948
  *
3107
- * ```ts
2949
+ * ```ts import.meta.vitest
3108
2950
  * import { Graph } from "effect"
3109
2951
  *
3110
2952
  * // Undirected graph with custom labels and direction
@@ -3121,18 +2963,12 @@ export interface MermaidOptions<N, E> {
3121
2963
  * edgeLabel: (relationship) => relationship,
3122
2964
  * direction: "LR"
3123
2965
  * })
3124
- * console.log(mermaid)
3125
- * // graph LR
3126
- * // 0["Alice"]
3127
- * // 1["Bob"]
3128
- * // 2["Charlie"]
3129
- * // 0 ---|"friends"| 1
3130
- * // 1 ---|"colleagues"| 2
2966
+ * mermaid.split("\n") // => ["graph LR", ' 0["Alice"]', ' 1["Bob"]', ' 2["Charlie"]', ' 0 ---|"friends"| 1', ' 1 ---|"colleagues"| 2']
3131
2967
  * ```
3132
2968
  *
3133
2969
  * **Example** (Customizing Mermaid node shapes)
3134
2970
  *
3135
- * ```ts
2971
+ * ```ts import.meta.vitest
3136
2972
  * import { Graph } from "effect"
3137
2973
  *
3138
2974
  * // Advanced styling with node shapes for flowchart
@@ -3171,20 +3007,12 @@ export interface MermaidOptions<N, E> {
3171
3007
  * }
3172
3008
  * }
3173
3009
  * })
3174
- * console.log(mermaid)
3175
- * // flowchart TD
3176
- * // 0(["Begin"])
3177
- * // 1["Process Data"]
3178
- * // 2{"Valid?"}
3179
- * // 3(["Complete"])
3180
- * // 0 --> 1
3181
- * // 1 --> 2
3182
- * // 2 --> 3
3010
+ * mermaid.split("\n") // => ["flowchart TD", ' 0(["Begin"])', ' 1["Process Data"]', ' 2{"Valid?"}', ' 3(["Complete"])', " 0 --> 1", " 1 --> 2", ' 2 -->|"yes"| 3']
3183
3011
  * ```
3184
3012
  *
3185
3013
  * **Example** (Visualizing dependency graphs)
3186
3014
  *
3187
- * ```ts
3015
+ * ```ts import.meta.vitest
3188
3016
  * import { Graph } from "effect"
3189
3017
  *
3190
3018
  * // Real-world example: Software dependency graph
@@ -3233,15 +3061,7 @@ export interface MermaidOptions<N, E> {
3233
3061
  * direction: "TB"
3234
3062
  * })
3235
3063
  *
3236
- * console.log(dependencyDiagram)
3237
- * // flowchart TB
3238
- * // 0["MyApp\nv1.0.0"]
3239
- * // 1{{"React\nv18.0.0"}}
3240
- * // 2["Lodash\nv4.17.0"]
3241
- * // 3{"Webpack\nv5.0.0"}
3242
- * // 0 -->|"depends on"| 1
3243
- * // 0 -->|"depends on"| 2
3244
- * // 0 -->|"builds with"| 3
3064
+ * dependencyDiagram.split("\n") // => ["flowchart TB", ' 0["MyApp#92;nv1.0.0"]', ' 1{{"React#92;nv18.0.0"}}', ' 2["Lodash#92;nv4.17.0"]', ' 3{"Webpack#92;nv5.0.0"}', ' 0 -->|"depends on"| 1', ' 0 -->|"depends on"| 2', ' 0 -->|"builds with"| 3']
3245
3065
  * ```
3246
3066
  *
3247
3067
  * @category converting
@@ -3260,7 +3080,7 @@ export declare const toMermaid: {
3260
3080
  *
3261
3081
  * **Example** (Exporting a directed Mermaid diagram)
3262
3082
  *
3263
- * ```ts
3083
+ * ```ts import.meta.vitest
3264
3084
  * import { Graph } from "effect"
3265
3085
  *
3266
3086
  * // Basic directed graph export
@@ -3272,19 +3092,12 @@ export declare const toMermaid: {
3272
3092
  * Graph.addEdge(mutable, app, cache, 2)
3273
3093
  * })
3274
3094
  *
3275
- * const mermaid = Graph.toMermaid(graph)
3276
- * console.log(mermaid)
3277
- * // flowchart TD
3278
- * // 0["App"]
3279
- * // 1["Database"]
3280
- * // 2["Cache"]
3281
- * // 0 -->|"1"| 1
3282
- * // 0 -->|"2"| 2
3095
+ * Graph.toMermaid(graph).split("\n") // => ["flowchart TD", ' 0["App"]', ' 1["Database"]', ' 2["Cache"]', ' 0 -->|"1"| 1', ' 0 -->|"2"| 2']
3283
3096
  * ```
3284
3097
  *
3285
3098
  * **Example** (Exporting an undirected Mermaid diagram)
3286
3099
  *
3287
- * ```ts
3100
+ * ```ts import.meta.vitest
3288
3101
  * import { Graph } from "effect"
3289
3102
  *
3290
3103
  * // Undirected graph with custom labels and direction
@@ -3301,18 +3114,12 @@ export declare const toMermaid: {
3301
3114
  * edgeLabel: (relationship) => relationship,
3302
3115
  * direction: "LR"
3303
3116
  * })
3304
- * console.log(mermaid)
3305
- * // graph LR
3306
- * // 0["Alice"]
3307
- * // 1["Bob"]
3308
- * // 2["Charlie"]
3309
- * // 0 ---|"friends"| 1
3310
- * // 1 ---|"colleagues"| 2
3117
+ * mermaid.split("\n") // => ["graph LR", ' 0["Alice"]', ' 1["Bob"]', ' 2["Charlie"]', ' 0 ---|"friends"| 1', ' 1 ---|"colleagues"| 2']
3311
3118
  * ```
3312
3119
  *
3313
3120
  * **Example** (Customizing Mermaid node shapes)
3314
3121
  *
3315
- * ```ts
3122
+ * ```ts import.meta.vitest
3316
3123
  * import { Graph } from "effect"
3317
3124
  *
3318
3125
  * // Advanced styling with node shapes for flowchart
@@ -3351,20 +3158,12 @@ export declare const toMermaid: {
3351
3158
  * }
3352
3159
  * }
3353
3160
  * })
3354
- * console.log(mermaid)
3355
- * // flowchart TD
3356
- * // 0(["Begin"])
3357
- * // 1["Process Data"]
3358
- * // 2{"Valid?"}
3359
- * // 3(["Complete"])
3360
- * // 0 --> 1
3361
- * // 1 --> 2
3362
- * // 2 --> 3
3161
+ * mermaid.split("\n") // => ["flowchart TD", ' 0(["Begin"])', ' 1["Process Data"]', ' 2{"Valid?"}', ' 3(["Complete"])', " 0 --> 1", " 1 --> 2", ' 2 -->|"yes"| 3']
3363
3162
  * ```
3364
3163
  *
3365
3164
  * **Example** (Visualizing dependency graphs)
3366
3165
  *
3367
- * ```ts
3166
+ * ```ts import.meta.vitest
3368
3167
  * import { Graph } from "effect"
3369
3168
  *
3370
3169
  * // Real-world example: Software dependency graph
@@ -3413,15 +3212,7 @@ export declare const toMermaid: {
3413
3212
  * direction: "TB"
3414
3213
  * })
3415
3214
  *
3416
- * console.log(dependencyDiagram)
3417
- * // flowchart TB
3418
- * // 0["MyApp\nv1.0.0"]
3419
- * // 1{{"React\nv18.0.0"}}
3420
- * // 2["Lodash\nv4.17.0"]
3421
- * // 3{"Webpack\nv5.0.0"}
3422
- * // 0 -->|"depends on"| 1
3423
- * // 0 -->|"depends on"| 2
3424
- * // 0 -->|"builds with"| 3
3215
+ * dependencyDiagram.split("\n") // => ["flowchart TB", ' 0["MyApp#92;nv1.0.0"]', ' 1{{"React#92;nv18.0.0"}}', ' 2["Lodash#92;nv4.17.0"]', ' 3{"Webpack#92;nv5.0.0"}', ' 0 -->|"depends on"| 1', ' 0 -->|"depends on"| 2', ' 0 -->|"builds with"| 3']
3425
3216
  * ```
3426
3217
  *
3427
3218
  * @category converting
@@ -3440,7 +3231,7 @@ export declare const toMermaid: {
3440
3231
  *
3441
3232
  * **Example** (Exporting a directed Mermaid diagram)
3442
3233
  *
3443
- * ```ts
3234
+ * ```ts import.meta.vitest
3444
3235
  * import { Graph } from "effect"
3445
3236
  *
3446
3237
  * // Basic directed graph export
@@ -3452,19 +3243,12 @@ export declare const toMermaid: {
3452
3243
  * Graph.addEdge(mutable, app, cache, 2)
3453
3244
  * })
3454
3245
  *
3455
- * const mermaid = Graph.toMermaid(graph)
3456
- * console.log(mermaid)
3457
- * // flowchart TD
3458
- * // 0["App"]
3459
- * // 1["Database"]
3460
- * // 2["Cache"]
3461
- * // 0 -->|"1"| 1
3462
- * // 0 -->|"2"| 2
3246
+ * Graph.toMermaid(graph).split("\n") // => ["flowchart TD", ' 0["App"]', ' 1["Database"]', ' 2["Cache"]', ' 0 -->|"1"| 1', ' 0 -->|"2"| 2']
3463
3247
  * ```
3464
3248
  *
3465
3249
  * **Example** (Exporting an undirected Mermaid diagram)
3466
3250
  *
3467
- * ```ts
3251
+ * ```ts import.meta.vitest
3468
3252
  * import { Graph } from "effect"
3469
3253
  *
3470
3254
  * // Undirected graph with custom labels and direction
@@ -3481,18 +3265,12 @@ export declare const toMermaid: {
3481
3265
  * edgeLabel: (relationship) => relationship,
3482
3266
  * direction: "LR"
3483
3267
  * })
3484
- * console.log(mermaid)
3485
- * // graph LR
3486
- * // 0["Alice"]
3487
- * // 1["Bob"]
3488
- * // 2["Charlie"]
3489
- * // 0 ---|"friends"| 1
3490
- * // 1 ---|"colleagues"| 2
3268
+ * mermaid.split("\n") // => ["graph LR", ' 0["Alice"]', ' 1["Bob"]', ' 2["Charlie"]', ' 0 ---|"friends"| 1', ' 1 ---|"colleagues"| 2']
3491
3269
  * ```
3492
3270
  *
3493
3271
  * **Example** (Customizing Mermaid node shapes)
3494
3272
  *
3495
- * ```ts
3273
+ * ```ts import.meta.vitest
3496
3274
  * import { Graph } from "effect"
3497
3275
  *
3498
3276
  * // Advanced styling with node shapes for flowchart
@@ -3531,20 +3309,12 @@ export declare const toMermaid: {
3531
3309
  * }
3532
3310
  * }
3533
3311
  * })
3534
- * console.log(mermaid)
3535
- * // flowchart TD
3536
- * // 0(["Begin"])
3537
- * // 1["Process Data"]
3538
- * // 2{"Valid?"}
3539
- * // 3(["Complete"])
3540
- * // 0 --> 1
3541
- * // 1 --> 2
3542
- * // 2 --> 3
3312
+ * mermaid.split("\n") // => ["flowchart TD", ' 0(["Begin"])', ' 1["Process Data"]', ' 2{"Valid?"}', ' 3(["Complete"])', " 0 --> 1", " 1 --> 2", ' 2 -->|"yes"| 3']
3543
3313
  * ```
3544
3314
  *
3545
3315
  * **Example** (Visualizing dependency graphs)
3546
3316
  *
3547
- * ```ts
3317
+ * ```ts import.meta.vitest
3548
3318
  * import { Graph } from "effect"
3549
3319
  *
3550
3320
  * // Real-world example: Software dependency graph
@@ -3593,15 +3363,7 @@ export declare const toMermaid: {
3593
3363
  * direction: "TB"
3594
3364
  * })
3595
3365
  *
3596
- * console.log(dependencyDiagram)
3597
- * // flowchart TB
3598
- * // 0["MyApp\nv1.0.0"]
3599
- * // 1{{"React\nv18.0.0"}}
3600
- * // 2["Lodash\nv4.17.0"]
3601
- * // 3{"Webpack\nv5.0.0"}
3602
- * // 0 -->|"depends on"| 1
3603
- * // 0 -->|"depends on"| 2
3604
- * // 0 -->|"builds with"| 3
3366
+ * dependencyDiagram.split("\n") // => ["flowchart TB", ' 0["MyApp#92;nv1.0.0"]', ' 1{{"React#92;nv18.0.0"}}', ' 2["Lodash#92;nv4.17.0"]', ' 3{"Webpack#92;nv5.0.0"}', ' 0 -->|"depends on"| 1', ' 0 -->|"depends on"| 2', ' 0 -->|"builds with"| 3']
3605
3367
  * ```
3606
3368
  *
3607
3369
  * @category converting
@@ -3632,7 +3394,7 @@ export type Direction = "outgoing" | "incoming";
3632
3394
  *
3633
3395
  * **Example** (Traversing by direction)
3634
3396
  *
3635
- * ```ts
3397
+ * ```ts import.meta.vitest
3636
3398
  * import { Graph } from "effect"
3637
3399
  *
3638
3400
  * const graph = Graph.directed<string, string>((mutable) => {
@@ -3643,17 +3405,9 @@ export type Direction = "outgoing" | "incoming";
3643
3405
  * Graph.addEdge(mutable, a, c, "A-C")
3644
3406
  * })
3645
3407
  *
3646
- * const outgoing = Array.from(
3647
- * Graph.indices(Graph.bfs(graph, { start: [0], direction: "outgoing" }))
3648
- * ) // [0, 1, 2]
3649
- *
3650
- * const incoming = Array.from(
3651
- * Graph.indices(Graph.bfs(graph, { start: [1], direction: "incoming" }))
3652
- * ) // [1, 0]
3653
- *
3654
- * const undirected = Array.from(
3655
- * Graph.indices(Graph.bfs(graph, { start: [1], direction: "undirected" }))
3656
- * ) // [1, 0, 2]
3408
+ * Array.from(Graph.indices(Graph.bfs(graph, { start: [0], direction: "outgoing" }))) // => [0, 1, 2]
3409
+ * Array.from(Graph.indices(Graph.bfs(graph, { start: [1], direction: "incoming" }))) // => [1, 0]
3410
+ * Array.from(Graph.indices(Graph.bfs(graph, { start: [1], direction: "undirected" }))) // => [1, 0, 2]
3657
3411
  * ```
3658
3412
  *
3659
3413
  * @category models
@@ -3672,7 +3426,7 @@ export type TraversalDirection = Direction | "undirected";
3672
3426
  *
3673
3427
  * **Example** (Checking cycles)
3674
3428
  *
3675
- * ```ts
3429
+ * ```ts import.meta.vitest
3676
3430
  * import { Graph } from "effect"
3677
3431
  *
3678
3432
  * // Acyclic directed graph (DAG)
@@ -3683,7 +3437,7 @@ export type TraversalDirection = Direction | "undirected";
3683
3437
  * Graph.addEdge(mutable, a, b, "A->B")
3684
3438
  * Graph.addEdge(mutable, b, c, "B->C")
3685
3439
  * })
3686
- * console.log(Graph.isAcyclic(dag)) // true
3440
+ * Graph.isAcyclic(dag) // => true
3687
3441
  *
3688
3442
  * // Cyclic directed graph
3689
3443
  * const cyclic = Graph.directed<string, string>((mutable) => {
@@ -3692,7 +3446,7 @@ export type TraversalDirection = Direction | "undirected";
3692
3446
  * Graph.addEdge(mutable, a, b, "A->B")
3693
3447
  * Graph.addEdge(mutable, b, a, "B->A") // Creates cycle
3694
3448
  * })
3695
- * console.log(Graph.isAcyclic(cyclic)) // false
3449
+ * Graph.isAcyclic(cyclic) // => false
3696
3450
  * ```
3697
3451
  *
3698
3452
  * @category algorithms
@@ -3710,7 +3464,7 @@ export declare const isAcyclic: <N, E, T extends Kind = "directed">(graph: Graph
3710
3464
  *
3711
3465
  * **Example** (Checking bipartite graphs)
3712
3466
  *
3713
- * ```ts
3467
+ * ```ts import.meta.vitest
3714
3468
  * import { Graph } from "effect"
3715
3469
  *
3716
3470
  * // Bipartite graph (alternating coloring possible)
@@ -3723,7 +3477,7 @@ export declare const isAcyclic: <N, E, T extends Kind = "directed">(graph: Graph
3723
3477
  * Graph.addEdge(mutable, b, c, "edge")
3724
3478
  * Graph.addEdge(mutable, c, d, "edge")
3725
3479
  * })
3726
- * console.log(Graph.isBipartite(bipartite)) // true
3480
+ * Graph.isBipartite(bipartite) // => true
3727
3481
  *
3728
3482
  * // Non-bipartite graph (odd cycle)
3729
3483
  * const triangle = Graph.undirected<string, string>((mutable) => {
@@ -3734,7 +3488,7 @@ export declare const isAcyclic: <N, E, T extends Kind = "directed">(graph: Graph
3734
3488
  * Graph.addEdge(mutable, b, c, "edge")
3735
3489
  * Graph.addEdge(mutable, c, a, "edge") // Triangle (3-cycle)
3736
3490
  * })
3737
- * console.log(Graph.isBipartite(triangle)) // false
3491
+ * Graph.isBipartite(triangle) // => false
3738
3492
  * ```
3739
3493
  *
3740
3494
  * @category algorithms
@@ -3747,7 +3501,7 @@ export declare const isBipartite: <N, E>(graph: Graph<N, E, "undirected"> | Muta
3747
3501
  *
3748
3502
  * **Example** (Finding connected components)
3749
3503
  *
3750
- * ```ts
3504
+ * ```ts import.meta.vitest
3751
3505
  * import { Graph } from "effect"
3752
3506
  *
3753
3507
  * const graph = Graph.undirected<string, string>((mutable) => {
@@ -3759,8 +3513,7 @@ export declare const isBipartite: <N, E>(graph: Graph<N, E, "undirected"> | Muta
3759
3513
  * Graph.addEdge(mutable, c, d, "edge") // Component 2: C-D
3760
3514
  * })
3761
3515
  *
3762
- * const components = Graph.connectedComponents(graph)
3763
- * console.log(components) // [[0, 1], [2, 3]]
3516
+ * Graph.connectedComponents(graph) // => [[0, 1], [2, 3]]
3764
3517
  * ```
3765
3518
  *
3766
3519
  * @category algorithms
@@ -3777,7 +3530,7 @@ export declare const connectedComponents: <N, E>(graph: Graph<N, E, "undirected"
3777
3530
  *
3778
3531
  * **Example** (Finding strongly connected components)
3779
3532
  *
3780
- * ```ts
3533
+ * ```ts import.meta.vitest
3781
3534
  * import { Graph } from "effect"
3782
3535
  *
3783
3536
  * const graph = Graph.directed<string, string>((mutable) => {
@@ -3789,8 +3542,7 @@ export declare const connectedComponents: <N, E>(graph: Graph<N, E, "undirected"
3789
3542
  * Graph.addEdge(mutable, c, a, "C->A") // Creates SCC: A-B-C
3790
3543
  * })
3791
3544
  *
3792
- * const sccs = Graph.stronglyConnectedComponents(graph)
3793
- * console.log(sccs) // [[0, 1, 2]]
3545
+ * Graph.stronglyConnectedComponents(graph) // => [[0, 2, 1]]
3794
3546
  * ```
3795
3547
  *
3796
3548
  * @category algorithms
@@ -3873,8 +3625,8 @@ export interface DijkstraConfig<E> {
3873
3625
  *
3874
3626
  * **Example** (Finding shortest paths with Dijkstra)
3875
3627
  *
3876
- * ```ts
3877
- * import { Graph } from "effect"
3628
+ * ```ts import.meta.vitest
3629
+ * import { Graph, Option } from "effect"
3878
3630
  *
3879
3631
  * const graph = Graph.directed<string, number>((mutable) => {
3880
3632
  * const a = Graph.addNode(mutable, "A")
@@ -3891,10 +3643,7 @@ export interface DijkstraConfig<E> {
3891
3643
  * cost: (edgeData) => edgeData
3892
3644
  * })
3893
3645
  *
3894
- * if (result._tag === "Some") {
3895
- * console.log(result.value.path) // [0, 1, 2] - shortest path A->B->C
3896
- * console.log(result.value.distance) // 7 - total distance
3897
- * }
3646
+ * Option.map(result, ({ distance, path }) => [distance, path] as const) // => Option.some([7, [0, 1, 2]])
3898
3647
  * ```
3899
3648
  *
3900
3649
  * @category algorithms
@@ -3914,8 +3663,8 @@ export declare const dijkstra: {
3914
3663
  *
3915
3664
  * **Example** (Finding shortest paths with Dijkstra)
3916
3665
  *
3917
- * ```ts
3918
- * import { Graph } from "effect"
3666
+ * ```ts import.meta.vitest
3667
+ * import { Graph, Option } from "effect"
3919
3668
  *
3920
3669
  * const graph = Graph.directed<string, number>((mutable) => {
3921
3670
  * const a = Graph.addNode(mutable, "A")
@@ -3932,10 +3681,7 @@ export declare const dijkstra: {
3932
3681
  * cost: (edgeData) => edgeData
3933
3682
  * })
3934
3683
  *
3935
- * if (result._tag === "Some") {
3936
- * console.log(result.value.path) // [0, 1, 2] - shortest path A->B->C
3937
- * console.log(result.value.distance) // 7 - total distance
3938
- * }
3684
+ * Option.map(result, ({ distance, path }) => [distance, path] as const) // => Option.some([7, [0, 1, 2]])
3939
3685
  * ```
3940
3686
  *
3941
3687
  * @category algorithms
@@ -3955,8 +3701,8 @@ export declare const dijkstra: {
3955
3701
  *
3956
3702
  * **Example** (Finding shortest paths with Dijkstra)
3957
3703
  *
3958
- * ```ts
3959
- * import { Graph } from "effect"
3704
+ * ```ts import.meta.vitest
3705
+ * import { Graph, Option } from "effect"
3960
3706
  *
3961
3707
  * const graph = Graph.directed<string, number>((mutable) => {
3962
3708
  * const a = Graph.addNode(mutable, "A")
@@ -3973,10 +3719,7 @@ export declare const dijkstra: {
3973
3719
  * cost: (edgeData) => edgeData
3974
3720
  * })
3975
3721
  *
3976
- * if (result._tag === "Some") {
3977
- * console.log(result.value.path) // [0, 1, 2] - shortest path A->B->C
3978
- * console.log(result.value.distance) // 7 - total distance
3979
- * }
3722
+ * Option.map(result, ({ distance, path }) => [distance, path] as const) // => Option.some([7, [0, 1, 2]])
3980
3723
  * ```
3981
3724
  *
3982
3725
  * @category algorithms
@@ -4022,7 +3765,7 @@ export interface AllPairsResult<E> {
4022
3765
  *
4023
3766
  * **Example** (Finding all-pairs shortest paths)
4024
3767
  *
4025
- * ```ts
3768
+ * ```ts import.meta.vitest
4026
3769
  * import { Graph } from "effect"
4027
3770
  *
4028
3771
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -4035,8 +3778,8 @@ export interface AllPairsResult<E> {
4035
3778
  * })
4036
3779
  *
4037
3780
  * const result = Graph.floydWarshall(graph, (edgeData) => edgeData)
4038
- * const distanceAToC = result.distances.get(0)?.get(2) // 5 (A->B->C)
4039
- * const pathAToC = result.paths.get(0)?.get(2) // [0, 1, 2]
3781
+ * const shortest = { distance: result.distances.get(0)?.get(2), path: result.paths.get(0)?.get(2) }
3782
+ * shortest // => { distance: 5, path: [0, 1, 2] }
4040
3783
  * ```
4041
3784
  *
4042
3785
  * @category algorithms
@@ -4056,7 +3799,7 @@ export declare const floydWarshall: {
4056
3799
  *
4057
3800
  * **Example** (Finding all-pairs shortest paths)
4058
3801
  *
4059
- * ```ts
3802
+ * ```ts import.meta.vitest
4060
3803
  * import { Graph } from "effect"
4061
3804
  *
4062
3805
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -4069,8 +3812,8 @@ export declare const floydWarshall: {
4069
3812
  * })
4070
3813
  *
4071
3814
  * const result = Graph.floydWarshall(graph, (edgeData) => edgeData)
4072
- * const distanceAToC = result.distances.get(0)?.get(2) // 5 (A->B->C)
4073
- * const pathAToC = result.paths.get(0)?.get(2) // [0, 1, 2]
3815
+ * const shortest = { distance: result.distances.get(0)?.get(2), path: result.paths.get(0)?.get(2) }
3816
+ * shortest // => { distance: 5, path: [0, 1, 2] }
4074
3817
  * ```
4075
3818
  *
4076
3819
  * @category algorithms
@@ -4090,7 +3833,7 @@ export declare const floydWarshall: {
4090
3833
  *
4091
3834
  * **Example** (Finding all-pairs shortest paths)
4092
3835
  *
4093
- * ```ts
3836
+ * ```ts import.meta.vitest
4094
3837
  * import { Graph } from "effect"
4095
3838
  *
4096
3839
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -4103,8 +3846,8 @@ export declare const floydWarshall: {
4103
3846
  * })
4104
3847
  *
4105
3848
  * const result = Graph.floydWarshall(graph, (edgeData) => edgeData)
4106
- * const distanceAToC = result.distances.get(0)?.get(2) // 5 (A->B->C)
4107
- * const pathAToC = result.paths.get(0)?.get(2) // [0, 1, 2]
3849
+ * const shortest = { distance: result.distances.get(0)?.get(2), path: result.paths.get(0)?.get(2) }
3850
+ * shortest // => { distance: 5, path: [0, 1, 2] }
4108
3851
  * ```
4109
3852
  *
4110
3853
  * @category algorithms
@@ -4153,8 +3896,8 @@ export interface AstarConfig<E, N> {
4153
3896
  *
4154
3897
  * **Example** (Finding shortest paths with A-star)
4155
3898
  *
4156
- * ```ts
4157
- * import { Graph } from "effect"
3899
+ * ```ts import.meta.vitest
3900
+ * import { Graph, Option } from "effect"
4158
3901
  *
4159
3902
  * const graph = Graph.directed<{ x: number; y: number }, number>((mutable) => {
4160
3903
  * const a = Graph.addNode(mutable, { x: 0, y: 0 })
@@ -4177,10 +3920,7 @@ export interface AstarConfig<E, N> {
4177
3920
  * heuristic
4178
3921
  * })
4179
3922
  *
4180
- * if (result._tag === "Some") {
4181
- * console.log(result.value.path) // [0, 1, 2] - shortest path
4182
- * console.log(result.value.distance) // 2 - total distance
4183
- * }
3923
+ * Option.map(result, ({ distance, path }) => [distance, path] as const) // => Option.some([2, [0, 1, 2]])
4184
3924
  * ```
4185
3925
  *
4186
3926
  * @category algorithms
@@ -4201,8 +3941,8 @@ export declare const astar: {
4201
3941
  *
4202
3942
  * **Example** (Finding shortest paths with A-star)
4203
3943
  *
4204
- * ```ts
4205
- * import { Graph } from "effect"
3944
+ * ```ts import.meta.vitest
3945
+ * import { Graph, Option } from "effect"
4206
3946
  *
4207
3947
  * const graph = Graph.directed<{ x: number; y: number }, number>((mutable) => {
4208
3948
  * const a = Graph.addNode(mutable, { x: 0, y: 0 })
@@ -4225,10 +3965,7 @@ export declare const astar: {
4225
3965
  * heuristic
4226
3966
  * })
4227
3967
  *
4228
- * if (result._tag === "Some") {
4229
- * console.log(result.value.path) // [0, 1, 2] - shortest path
4230
- * console.log(result.value.distance) // 2 - total distance
4231
- * }
3968
+ * Option.map(result, ({ distance, path }) => [distance, path] as const) // => Option.some([2, [0, 1, 2]])
4232
3969
  * ```
4233
3970
  *
4234
3971
  * @category algorithms
@@ -4249,8 +3986,8 @@ export declare const astar: {
4249
3986
  *
4250
3987
  * **Example** (Finding shortest paths with A-star)
4251
3988
  *
4252
- * ```ts
4253
- * import { Graph } from "effect"
3989
+ * ```ts import.meta.vitest
3990
+ * import { Graph, Option } from "effect"
4254
3991
  *
4255
3992
  * const graph = Graph.directed<{ x: number; y: number }, number>((mutable) => {
4256
3993
  * const a = Graph.addNode(mutable, { x: 0, y: 0 })
@@ -4273,10 +4010,7 @@ export declare const astar: {
4273
4010
  * heuristic
4274
4011
  * })
4275
4012
  *
4276
- * if (result._tag === "Some") {
4277
- * console.log(result.value.path) // [0, 1, 2] - shortest path
4278
- * console.log(result.value.distance) // 2 - total distance
4279
- * }
4013
+ * Option.map(result, ({ distance, path }) => [distance, path] as const) // => Option.some([2, [0, 1, 2]])
4280
4014
  * ```
4281
4015
  *
4282
4016
  * @category algorithms
@@ -4322,8 +4056,8 @@ export interface BellmanFordConfig<E> {
4322
4056
  *
4323
4057
  * **Example** (Finding shortest paths with Bellman-Ford)
4324
4058
  *
4325
- * ```ts
4326
- * import { Graph } from "effect"
4059
+ * ```ts import.meta.vitest
4060
+ * import { Graph, Option } from "effect"
4327
4061
  *
4328
4062
  * const graph = Graph.directed<string, number>((mutable) => {
4329
4063
  * const a = Graph.addNode(mutable, "A")
@@ -4340,10 +4074,7 @@ export interface BellmanFordConfig<E> {
4340
4074
  * cost: (edgeData) => edgeData
4341
4075
  * })
4342
4076
  *
4343
- * if (result._tag === "Some") {
4344
- * console.log(result.value.path) // [0, 1, 2] - shortest path A->B->C
4345
- * console.log(result.value.distance) // 2 - total distance
4346
- * }
4077
+ * Option.map(result, ({ distance, path }) => [distance, path] as const) // => Option.some([2, [0, 1, 2]])
4347
4078
  * ```
4348
4079
  *
4349
4080
  * @category algorithms
@@ -4363,8 +4094,8 @@ export declare const bellmanFord: {
4363
4094
  *
4364
4095
  * **Example** (Finding shortest paths with Bellman-Ford)
4365
4096
  *
4366
- * ```ts
4367
- * import { Graph } from "effect"
4097
+ * ```ts import.meta.vitest
4098
+ * import { Graph, Option } from "effect"
4368
4099
  *
4369
4100
  * const graph = Graph.directed<string, number>((mutable) => {
4370
4101
  * const a = Graph.addNode(mutable, "A")
@@ -4381,10 +4112,7 @@ export declare const bellmanFord: {
4381
4112
  * cost: (edgeData) => edgeData
4382
4113
  * })
4383
4114
  *
4384
- * if (result._tag === "Some") {
4385
- * console.log(result.value.path) // [0, 1, 2] - shortest path A->B->C
4386
- * console.log(result.value.distance) // 2 - total distance
4387
- * }
4115
+ * Option.map(result, ({ distance, path }) => [distance, path] as const) // => Option.some([2, [0, 1, 2]])
4388
4116
  * ```
4389
4117
  *
4390
4118
  * @category algorithms
@@ -4404,8 +4132,8 @@ export declare const bellmanFord: {
4404
4132
  *
4405
4133
  * **Example** (Finding shortest paths with Bellman-Ford)
4406
4134
  *
4407
- * ```ts
4408
- * import { Graph } from "effect"
4135
+ * ```ts import.meta.vitest
4136
+ * import { Graph, Option } from "effect"
4409
4137
  *
4410
4138
  * const graph = Graph.directed<string, number>((mutable) => {
4411
4139
  * const a = Graph.addNode(mutable, "A")
@@ -4422,10 +4150,7 @@ export declare const bellmanFord: {
4422
4150
  * cost: (edgeData) => edgeData
4423
4151
  * })
4424
4152
  *
4425
- * if (result._tag === "Some") {
4426
- * console.log(result.value.path) // [0, 1, 2] - shortest path A->B->C
4427
- * console.log(result.value.distance) // 2 - total distance
4428
- * }
4153
+ * Option.map(result, ({ distance, path }) => [distance, path] as const) // => Option.some([2, [0, 1, 2]])
4429
4154
  * ```
4430
4155
  *
4431
4156
  * @category algorithms
@@ -4444,7 +4169,7 @@ export declare const bellmanFord: {
4444
4169
  *
4445
4170
  * **Example** (Working with node walkers)
4446
4171
  *
4447
- * ```ts
4172
+ * ```ts import.meta.vitest
4448
4173
  * import { Graph } from "effect"
4449
4174
  *
4450
4175
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -4463,8 +4188,8 @@ export declare const bellmanFord: {
4463
4188
  * }
4464
4189
  *
4465
4190
  * // Access node data using values() or entries()
4466
- * const nodeData = Array.from(Graph.values(dfsNodes)) // ["A", "B"]
4467
- * const nodeEntries = Array.from(Graph.entries(allNodes)) // [[0, "A"], [1, "B"]]
4191
+ * Array.from(Graph.values(dfsNodes)) // => ["A", "B"]
4192
+ * Array.from(Graph.entries(allNodes)) // => [[0, "A"], [1, "B"]]
4468
4193
  * ```
4469
4194
  *
4470
4195
  * @category models
@@ -4483,7 +4208,7 @@ export declare class Walker<T, N> implements Iterable<[T, N]> {
4483
4208
  *
4484
4209
  * **Example** (Visiting walker elements)
4485
4210
  *
4486
- * ```ts
4211
+ * ```ts import.meta.vitest
4487
4212
  * import { Graph } from "effect"
4488
4213
  *
4489
4214
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -4495,14 +4220,10 @@ export declare class Walker<T, N> implements Iterable<[T, N]> {
4495
4220
  * const dfs = Graph.dfs(graph, { start: [0] })
4496
4221
  *
4497
4222
  * // Map to just the node data
4498
- * const values = Array.from(dfs.visit((index, data) => data))
4499
- * console.log(values) // ["A", "B"]
4223
+ * Array.from(dfs.visit((index, data) => data)) // => ["A", "B"]
4500
4224
  *
4501
4225
  * // Map to custom objects
4502
- * const custom = Array.from(
4503
- * dfs.visit((index, data) => ({ id: index, name: data }))
4504
- * )
4505
- * console.log(custom) // [{ id: 0, name: "A" }, { id: 1, name: "B" }]
4226
+ * Array.from(dfs.visit((index, data) => ({ id: index, name: data }))) // => [{ id: 0, name: "A" }, { id: 1, name: "B" }]
4506
4227
  * ```
4507
4228
  *
4508
4229
  * @since 4.0.0
@@ -4518,7 +4239,7 @@ export declare class Walker<T, N> implements Iterable<[T, N]> {
4518
4239
  *
4519
4240
  * **Example** (Visiting walker elements)
4520
4241
  *
4521
- * ```ts
4242
+ * ```ts import.meta.vitest
4522
4243
  * import { Graph } from "effect"
4523
4244
  *
4524
4245
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -4530,14 +4251,10 @@ export declare class Walker<T, N> implements Iterable<[T, N]> {
4530
4251
  * const dfs = Graph.dfs(graph, { start: [0] })
4531
4252
  *
4532
4253
  * // Map to just the node data
4533
- * const values = Array.from(dfs.visit((index, data) => data))
4534
- * console.log(values) // ["A", "B"]
4254
+ * Array.from(dfs.visit((index, data) => data)) // => ["A", "B"]
4535
4255
  *
4536
4256
  * // Map to custom objects
4537
- * const custom = Array.from(
4538
- * dfs.visit((index, data) => ({ id: index, name: data }))
4539
- * )
4540
- * console.log(custom) // [{ id: 0, name: "A" }, { id: 1, name: "B" }]
4257
+ * Array.from(dfs.visit((index, data) => ({ id: index, name: data }))) // => [{ id: 0, name: "A" }, { id: 1, name: "B" }]
4541
4258
  * ```
4542
4259
  *
4543
4260
  * @category iterators
@@ -4584,7 +4301,7 @@ export type EdgeWalker<E> = Walker<EdgeIndex, Edge<E>>;
4584
4301
  *
4585
4302
  * **Example** (Iterating walker indices)
4586
4303
  *
4587
- * ```ts
4304
+ * ```ts import.meta.vitest
4588
4305
  * import { Graph } from "effect"
4589
4306
  *
4590
4307
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -4594,8 +4311,7 @@ export type EdgeWalker<E> = Walker<EdgeIndex, Edge<E>>;
4594
4311
  * })
4595
4312
  *
4596
4313
  * const dfs = Graph.dfs(graph, { start: [0] })
4597
- * const indices = Array.from(Graph.indices(dfs))
4598
- * console.log(indices) // [0, 1]
4314
+ * Array.from(Graph.indices(dfs)) // => [0, 1]
4599
4315
  * ```
4600
4316
  *
4601
4317
  * @category iterators
@@ -4607,7 +4323,7 @@ export declare const indices: <T, N>(walker: Walker<T, N>) => Iterable<T>;
4607
4323
  *
4608
4324
  * **Example** (Iterating walker values)
4609
4325
  *
4610
- * ```ts
4326
+ * ```ts import.meta.vitest
4611
4327
  * import { Graph } from "effect"
4612
4328
  *
4613
4329
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -4617,8 +4333,7 @@ export declare const indices: <T, N>(walker: Walker<T, N>) => Iterable<T>;
4617
4333
  * })
4618
4334
  *
4619
4335
  * const dfs = Graph.dfs(graph, { start: [0] })
4620
- * const values = Array.from(Graph.values(dfs))
4621
- * console.log(values) // ["A", "B"]
4336
+ * Array.from(Graph.values(dfs)) // => ["A", "B"]
4622
4337
  * ```
4623
4338
  *
4624
4339
  * @category iterators
@@ -4630,7 +4345,7 @@ export declare const values: <T, N>(walker: Walker<T, N>) => Iterable<N>;
4630
4345
  *
4631
4346
  * **Example** (Iterating walker entries)
4632
4347
  *
4633
- * ```ts
4348
+ * ```ts import.meta.vitest
4634
4349
  * import { Graph } from "effect"
4635
4350
  *
4636
4351
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -4640,8 +4355,7 @@ export declare const values: <T, N>(walker: Walker<T, N>) => Iterable<N>;
4640
4355
  * })
4641
4356
  *
4642
4357
  * const dfs = Graph.dfs(graph, { start: [0] })
4643
- * const entries = Array.from(Graph.entries(dfs))
4644
- * console.log(entries) // [[0, "A"], [1, "B"]]
4358
+ * Array.from(Graph.entries(dfs)) // => [[0, "A"], [1, "B"]]
4645
4359
  * ```
4646
4360
  *
4647
4361
  * @category iterators
@@ -4693,7 +4407,7 @@ export interface SearchConfig {
4693
4407
  *
4694
4408
  * **Example** (Traversing depth-first)
4695
4409
  *
4696
- * ```ts
4410
+ * ```ts import.meta.vitest
4697
4411
  * import { Graph } from "effect"
4698
4412
  *
4699
4413
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -4705,14 +4419,10 @@ export interface SearchConfig {
4705
4419
  * })
4706
4420
  *
4707
4421
  * // Start from a specific node
4708
- * const dfs1 = Graph.dfs(graph, { start: [0] })
4709
- * for (const nodeIndex of Graph.indices(dfs1)) {
4710
- * console.log(nodeIndex) // Traverses in DFS order: 0, 1, 2
4711
- * }
4422
+ * Array.from(Graph.indices(Graph.dfs(graph, { start: [0] }))) // => [0, 1, 2]
4712
4423
  *
4713
4424
  * // Empty iterator (no starting nodes)
4714
- * const dfs2 = Graph.dfs(graph)
4715
- * // Can be used programmatically
4425
+ * Graph.dfs(graph)
4716
4426
  * ```
4717
4427
  *
4718
4428
  * @category iterators
@@ -4732,7 +4442,7 @@ export declare const dfs: {
4732
4442
  *
4733
4443
  * **Example** (Traversing depth-first)
4734
4444
  *
4735
- * ```ts
4445
+ * ```ts import.meta.vitest
4736
4446
  * import { Graph } from "effect"
4737
4447
  *
4738
4448
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -4744,14 +4454,10 @@ export declare const dfs: {
4744
4454
  * })
4745
4455
  *
4746
4456
  * // Start from a specific node
4747
- * const dfs1 = Graph.dfs(graph, { start: [0] })
4748
- * for (const nodeIndex of Graph.indices(dfs1)) {
4749
- * console.log(nodeIndex) // Traverses in DFS order: 0, 1, 2
4750
- * }
4457
+ * Array.from(Graph.indices(Graph.dfs(graph, { start: [0] }))) // => [0, 1, 2]
4751
4458
  *
4752
4459
  * // Empty iterator (no starting nodes)
4753
- * const dfs2 = Graph.dfs(graph)
4754
- * // Can be used programmatically
4460
+ * Graph.dfs(graph)
4755
4461
  * ```
4756
4462
  *
4757
4463
  * @category iterators
@@ -4771,7 +4477,7 @@ export declare const dfs: {
4771
4477
  *
4772
4478
  * **Example** (Traversing depth-first)
4773
4479
  *
4774
- * ```ts
4480
+ * ```ts import.meta.vitest
4775
4481
  * import { Graph } from "effect"
4776
4482
  *
4777
4483
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -4783,14 +4489,10 @@ export declare const dfs: {
4783
4489
  * })
4784
4490
  *
4785
4491
  * // Start from a specific node
4786
- * const dfs1 = Graph.dfs(graph, { start: [0] })
4787
- * for (const nodeIndex of Graph.indices(dfs1)) {
4788
- * console.log(nodeIndex) // Traverses in DFS order: 0, 1, 2
4789
- * }
4492
+ * Array.from(Graph.indices(Graph.dfs(graph, { start: [0] }))) // => [0, 1, 2]
4790
4493
  *
4791
4494
  * // Empty iterator (no starting nodes)
4792
- * const dfs2 = Graph.dfs(graph)
4793
- * // Can be used programmatically
4495
+ * Graph.dfs(graph)
4794
4496
  * ```
4795
4497
  *
4796
4498
  * @category iterators
@@ -4811,7 +4513,7 @@ export declare const dfs: {
4811
4513
  *
4812
4514
  * **Example** (Traversing breadth-first)
4813
4515
  *
4814
- * ```ts
4516
+ * ```ts import.meta.vitest
4815
4517
  * import { Graph } from "effect"
4816
4518
  *
4817
4519
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -4823,14 +4525,10 @@ export declare const dfs: {
4823
4525
  * })
4824
4526
  *
4825
4527
  * // Start from a specific node
4826
- * const bfs1 = Graph.bfs(graph, { start: [0] })
4827
- * for (const nodeIndex of Graph.indices(bfs1)) {
4828
- * console.log(nodeIndex) // Traverses in BFS order: 0, 1, 2
4829
- * }
4528
+ * Array.from(Graph.indices(Graph.bfs(graph, { start: [0] }))) // => [0, 1, 2]
4830
4529
  *
4831
4530
  * // Empty iterator (no starting nodes)
4832
- * const bfs2 = Graph.bfs(graph)
4833
- * // Can be used programmatically
4531
+ * Graph.bfs(graph)
4834
4532
  * ```
4835
4533
  *
4836
4534
  * @category iterators
@@ -4850,7 +4548,7 @@ export declare const bfs: {
4850
4548
  *
4851
4549
  * **Example** (Traversing breadth-first)
4852
4550
  *
4853
- * ```ts
4551
+ * ```ts import.meta.vitest
4854
4552
  * import { Graph } from "effect"
4855
4553
  *
4856
4554
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -4862,14 +4560,10 @@ export declare const bfs: {
4862
4560
  * })
4863
4561
  *
4864
4562
  * // Start from a specific node
4865
- * const bfs1 = Graph.bfs(graph, { start: [0] })
4866
- * for (const nodeIndex of Graph.indices(bfs1)) {
4867
- * console.log(nodeIndex) // Traverses in BFS order: 0, 1, 2
4868
- * }
4563
+ * Array.from(Graph.indices(Graph.bfs(graph, { start: [0] }))) // => [0, 1, 2]
4869
4564
  *
4870
4565
  * // Empty iterator (no starting nodes)
4871
- * const bfs2 = Graph.bfs(graph)
4872
- * // Can be used programmatically
4566
+ * Graph.bfs(graph)
4873
4567
  * ```
4874
4568
  *
4875
4569
  * @category iterators
@@ -4889,7 +4583,7 @@ export declare const bfs: {
4889
4583
  *
4890
4584
  * **Example** (Traversing breadth-first)
4891
4585
  *
4892
- * ```ts
4586
+ * ```ts import.meta.vitest
4893
4587
  * import { Graph } from "effect"
4894
4588
  *
4895
4589
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -4901,14 +4595,10 @@ export declare const bfs: {
4901
4595
  * })
4902
4596
  *
4903
4597
  * // Start from a specific node
4904
- * const bfs1 = Graph.bfs(graph, { start: [0] })
4905
- * for (const nodeIndex of Graph.indices(bfs1)) {
4906
- * console.log(nodeIndex) // Traverses in BFS order: 0, 1, 2
4907
- * }
4598
+ * Array.from(Graph.indices(Graph.bfs(graph, { start: [0] }))) // => [0, 1, 2]
4908
4599
  *
4909
4600
  * // Empty iterator (no starting nodes)
4910
- * const bfs2 = Graph.bfs(graph)
4911
- * // Can be used programmatically
4601
+ * Graph.bfs(graph)
4912
4602
  * ```
4913
4603
  *
4914
4604
  * @category iterators
@@ -4951,7 +4641,7 @@ export interface TopoConfig {
4951
4641
  *
4952
4642
  * **Example** (Sorting topologically)
4953
4643
  *
4954
- * ```ts
4644
+ * ```ts import.meta.vitest
4955
4645
  * import { Graph } from "effect"
4956
4646
  *
4957
4647
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -4963,13 +4653,10 @@ export interface TopoConfig {
4963
4653
  * })
4964
4654
  *
4965
4655
  * // Standard topological sort
4966
- * const topo1 = Graph.topo(graph)
4967
- * for (const nodeIndex of Graph.indices(topo1)) {
4968
- * console.log(nodeIndex) // 0, 1, 2 (topological order)
4969
- * }
4656
+ * Array.from(Graph.indices(Graph.topo(graph))) // => [0, 1, 2]
4970
4657
  *
4971
4658
  * // With initial nodes
4972
- * const topo2 = Graph.topo(graph, { initials: [0] })
4659
+ * Graph.topo(graph, { initials: [0] })
4973
4660
  *
4974
4661
  * // Check before sorting a cyclic graph
4975
4662
  * const cyclicGraph = Graph.directed<string, number>((mutable) => {
@@ -4979,9 +4666,7 @@ export interface TopoConfig {
4979
4666
  * Graph.addEdge(mutable, b, a, 2) // Creates cycle
4980
4667
  * })
4981
4668
  *
4982
- * if (!Graph.isAcyclic(cyclicGraph)) {
4983
- * console.log("cyclic graph") // cyclic graph
4984
- * }
4669
+ * Graph.isAcyclic(cyclicGraph) // => false
4985
4670
  * ```
4986
4671
  *
4987
4672
  * @category iterators
@@ -4998,7 +4683,7 @@ export declare const topo: {
4998
4683
  *
4999
4684
  * **Example** (Sorting topologically)
5000
4685
  *
5001
- * ```ts
4686
+ * ```ts import.meta.vitest
5002
4687
  * import { Graph } from "effect"
5003
4688
  *
5004
4689
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -5010,13 +4695,10 @@ export declare const topo: {
5010
4695
  * })
5011
4696
  *
5012
4697
  * // Standard topological sort
5013
- * const topo1 = Graph.topo(graph)
5014
- * for (const nodeIndex of Graph.indices(topo1)) {
5015
- * console.log(nodeIndex) // 0, 1, 2 (topological order)
5016
- * }
4698
+ * Array.from(Graph.indices(Graph.topo(graph))) // => [0, 1, 2]
5017
4699
  *
5018
4700
  * // With initial nodes
5019
- * const topo2 = Graph.topo(graph, { initials: [0] })
4701
+ * Graph.topo(graph, { initials: [0] })
5020
4702
  *
5021
4703
  * // Check before sorting a cyclic graph
5022
4704
  * const cyclicGraph = Graph.directed<string, number>((mutable) => {
@@ -5026,9 +4708,7 @@ export declare const topo: {
5026
4708
  * Graph.addEdge(mutable, b, a, 2) // Creates cycle
5027
4709
  * })
5028
4710
  *
5029
- * if (!Graph.isAcyclic(cyclicGraph)) {
5030
- * console.log("cyclic graph") // cyclic graph
5031
- * }
4711
+ * Graph.isAcyclic(cyclicGraph) // => false
5032
4712
  * ```
5033
4713
  *
5034
4714
  * @category iterators
@@ -5045,7 +4725,7 @@ export declare const topo: {
5045
4725
  *
5046
4726
  * **Example** (Sorting topologically)
5047
4727
  *
5048
- * ```ts
4728
+ * ```ts import.meta.vitest
5049
4729
  * import { Graph } from "effect"
5050
4730
  *
5051
4731
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -5057,13 +4737,10 @@ export declare const topo: {
5057
4737
  * })
5058
4738
  *
5059
4739
  * // Standard topological sort
5060
- * const topo1 = Graph.topo(graph)
5061
- * for (const nodeIndex of Graph.indices(topo1)) {
5062
- * console.log(nodeIndex) // 0, 1, 2 (topological order)
5063
- * }
4740
+ * Array.from(Graph.indices(Graph.topo(graph))) // => [0, 1, 2]
5064
4741
  *
5065
4742
  * // With initial nodes
5066
- * const topo2 = Graph.topo(graph, { initials: [0] })
4743
+ * Graph.topo(graph, { initials: [0] })
5067
4744
  *
5068
4745
  * // Check before sorting a cyclic graph
5069
4746
  * const cyclicGraph = Graph.directed<string, number>((mutable) => {
@@ -5073,9 +4750,7 @@ export declare const topo: {
5073
4750
  * Graph.addEdge(mutable, b, a, 2) // Creates cycle
5074
4751
  * })
5075
4752
  *
5076
- * if (!Graph.isAcyclic(cyclicGraph)) {
5077
- * console.log("cyclic graph") // cyclic graph
5078
- * }
4753
+ * Graph.isAcyclic(cyclicGraph) // => false
5079
4754
  * ```
5080
4755
  *
5081
4756
  * @category iterators
@@ -5102,7 +4777,7 @@ export declare const topo: {
5102
4777
  *
5103
4778
  * **Example** (Traversing in postorder)
5104
4779
  *
5105
- * ```ts
4780
+ * ```ts import.meta.vitest
5106
4781
  * import { Graph } from "effect"
5107
4782
  *
5108
4783
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -5114,10 +4789,7 @@ export declare const topo: {
5114
4789
  * })
5115
4790
  *
5116
4791
  * // Postorder: children before parents
5117
- * const postOrder = Graph.dfsPostOrder(graph, { start: [0] })
5118
- * for (const node of postOrder) {
5119
- * console.log(node) // 1, 2, 0
5120
- * }
4792
+ * Array.from(Graph.indices(Graph.dfsPostOrder(graph, { start: [0] }))) // => [1, 2, 0]
5121
4793
  * ```
5122
4794
  *
5123
4795
  * @category iterators
@@ -5143,7 +4815,7 @@ export declare const dfsPostOrder: {
5143
4815
  *
5144
4816
  * **Example** (Traversing in postorder)
5145
4817
  *
5146
- * ```ts
4818
+ * ```ts import.meta.vitest
5147
4819
  * import { Graph } from "effect"
5148
4820
  *
5149
4821
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -5155,10 +4827,7 @@ export declare const dfsPostOrder: {
5155
4827
  * })
5156
4828
  *
5157
4829
  * // Postorder: children before parents
5158
- * const postOrder = Graph.dfsPostOrder(graph, { start: [0] })
5159
- * for (const node of postOrder) {
5160
- * console.log(node) // 1, 2, 0
5161
- * }
4830
+ * Array.from(Graph.indices(Graph.dfsPostOrder(graph, { start: [0] }))) // => [1, 2, 0]
5162
4831
  * ```
5163
4832
  *
5164
4833
  * @category iterators
@@ -5184,7 +4853,7 @@ export declare const dfsPostOrder: {
5184
4853
  *
5185
4854
  * **Example** (Traversing in postorder)
5186
4855
  *
5187
- * ```ts
4856
+ * ```ts import.meta.vitest
5188
4857
  * import { Graph } from "effect"
5189
4858
  *
5190
4859
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -5196,10 +4865,7 @@ export declare const dfsPostOrder: {
5196
4865
  * })
5197
4866
  *
5198
4867
  * // Postorder: children before parents
5199
- * const postOrder = Graph.dfsPostOrder(graph, { start: [0] })
5200
- * for (const node of postOrder) {
5201
- * console.log(node) // 1, 2, 0
5202
- * }
4868
+ * Array.from(Graph.indices(Graph.dfsPostOrder(graph, { start: [0] }))) // => [1, 2, 0]
5203
4869
  * ```
5204
4870
  *
5205
4871
  * @category iterators
@@ -5217,7 +4883,7 @@ export declare const dfsPostOrder: {
5217
4883
  *
5218
4884
  * **Example** (Iterating all nodes)
5219
4885
  *
5220
- * ```ts
4886
+ * ```ts import.meta.vitest
5221
4887
  * import { Graph } from "effect"
5222
4888
  *
5223
4889
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -5227,8 +4893,7 @@ export declare const dfsPostOrder: {
5227
4893
  * Graph.addEdge(mutable, a, b, 1)
5228
4894
  * })
5229
4895
  *
5230
- * const indices = Array.from(Graph.indices(Graph.nodes(graph)))
5231
- * console.log(indices) // [0, 1, 2]
4896
+ * Array.from(Graph.indices(Graph.nodes(graph))) // => [0, 1, 2]
5232
4897
  * ```
5233
4898
  *
5234
4899
  * @category iterators
@@ -5245,7 +4910,7 @@ export declare const nodes: <N, E, T extends Kind = "directed">(graph: Graph<N,
5245
4910
  *
5246
4911
  * **Example** (Iterating all edges)
5247
4912
  *
5248
- * ```ts
4913
+ * ```ts import.meta.vitest
5249
4914
  * import { Graph } from "effect"
5250
4915
  *
5251
4916
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -5256,8 +4921,7 @@ export declare const nodes: <N, E, T extends Kind = "directed">(graph: Graph<N,
5256
4921
  * Graph.addEdge(mutable, b, c, 2)
5257
4922
  * })
5258
4923
  *
5259
- * const indices = Array.from(Graph.indices(Graph.edges(graph)))
5260
- * console.log(indices) // [0, 1]
4924
+ * Array.from(Graph.indices(Graph.edges(graph))) // => [0, 1]
5261
4925
  * ```
5262
4926
  *
5263
4927
  * @category iterators
@@ -5298,7 +4962,7 @@ export interface ExternalsConfig {
5298
4962
  *
5299
4963
  * **Example** (Iterating external nodes)
5300
4964
  *
5301
- * ```ts
4965
+ * ```ts import.meta.vitest
5302
4966
  * import { Graph } from "effect"
5303
4967
  *
5304
4968
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -5312,16 +4976,10 @@ export interface ExternalsConfig {
5312
4976
  * })
5313
4977
  *
5314
4978
  * // Nodes with no outgoing edges (sinks + isolated)
5315
- * const sinks = Array.from(
5316
- * Graph.indices(Graph.externals(graph, { direction: "outgoing" }))
5317
- * )
5318
- * console.log(sinks) // [2, 3]
4979
+ * Array.from(Graph.indices(Graph.externals(graph, { direction: "outgoing" }))) // => [2, 3]
5319
4980
  *
5320
4981
  * // Nodes with no incoming edges (sources + isolated)
5321
- * const sources = Array.from(
5322
- * Graph.indices(Graph.externals(graph, { direction: "incoming" }))
5323
- * )
5324
- * console.log(sources) // [0, 3]
4982
+ * Array.from(Graph.indices(Graph.externals(graph, { direction: "incoming" }))) // => [0, 3]
5325
4983
  * ```
5326
4984
  *
5327
4985
  * @category iterators
@@ -5339,7 +4997,7 @@ export declare const externals: {
5339
4997
  *
5340
4998
  * **Example** (Iterating external nodes)
5341
4999
  *
5342
- * ```ts
5000
+ * ```ts import.meta.vitest
5343
5001
  * import { Graph } from "effect"
5344
5002
  *
5345
5003
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -5353,16 +5011,10 @@ export declare const externals: {
5353
5011
  * })
5354
5012
  *
5355
5013
  * // Nodes with no outgoing edges (sinks + isolated)
5356
- * const sinks = Array.from(
5357
- * Graph.indices(Graph.externals(graph, { direction: "outgoing" }))
5358
- * )
5359
- * console.log(sinks) // [2, 3]
5014
+ * Array.from(Graph.indices(Graph.externals(graph, { direction: "outgoing" }))) // => [2, 3]
5360
5015
  *
5361
5016
  * // Nodes with no incoming edges (sources + isolated)
5362
- * const sources = Array.from(
5363
- * Graph.indices(Graph.externals(graph, { direction: "incoming" }))
5364
- * )
5365
- * console.log(sources) // [0, 3]
5017
+ * Array.from(Graph.indices(Graph.externals(graph, { direction: "incoming" }))) // => [0, 3]
5366
5018
  * ```
5367
5019
  *
5368
5020
  * @category iterators
@@ -5380,7 +5032,7 @@ export declare const externals: {
5380
5032
  *
5381
5033
  * **Example** (Iterating external nodes)
5382
5034
  *
5383
- * ```ts
5035
+ * ```ts import.meta.vitest
5384
5036
  * import { Graph } from "effect"
5385
5037
  *
5386
5038
  * const graph = Graph.directed<string, number>((mutable) => {
@@ -5394,16 +5046,10 @@ export declare const externals: {
5394
5046
  * })
5395
5047
  *
5396
5048
  * // Nodes with no outgoing edges (sinks + isolated)
5397
- * const sinks = Array.from(
5398
- * Graph.indices(Graph.externals(graph, { direction: "outgoing" }))
5399
- * )
5400
- * console.log(sinks) // [2, 3]
5049
+ * Array.from(Graph.indices(Graph.externals(graph, { direction: "outgoing" }))) // => [2, 3]
5401
5050
  *
5402
5051
  * // Nodes with no incoming edges (sources + isolated)
5403
- * const sources = Array.from(
5404
- * Graph.indices(Graph.externals(graph, { direction: "incoming" }))
5405
- * )
5406
- * console.log(sources) // [0, 3]
5052
+ * Array.from(Graph.indices(Graph.externals(graph, { direction: "incoming" }))) // => [0, 3]
5407
5053
  * ```
5408
5054
  *
5409
5055
  * @category iterators