effect 4.0.0-beta.65 → 4.0.0-beta.67

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 (1657) hide show
  1. package/dist/Array.d.ts +113 -67
  2. package/dist/Array.d.ts.map +1 -1
  3. package/dist/Array.js +28 -18
  4. package/dist/Array.js.map +1 -1
  5. package/dist/BigDecimal.d.ts +404 -337
  6. package/dist/BigDecimal.d.ts.map +1 -1
  7. package/dist/BigDecimal.js +190 -146
  8. package/dist/BigDecimal.js.map +1 -1
  9. package/dist/BigInt.d.ts +167 -97
  10. package/dist/BigInt.d.ts.map +1 -1
  11. package/dist/BigInt.js +87 -47
  12. package/dist/BigInt.js.map +1 -1
  13. package/dist/Boolean.d.ts +62 -31
  14. package/dist/Boolean.d.ts.map +1 -1
  15. package/dist/Boolean.js +30 -15
  16. package/dist/Boolean.js.map +1 -1
  17. package/dist/Brand.d.ts +20 -1
  18. package/dist/Brand.d.ts.map +1 -1
  19. package/dist/Brand.js +16 -0
  20. package/dist/Brand.js.map +1 -1
  21. package/dist/Cache.d.ts +236 -132
  22. package/dist/Cache.d.ts.map +1 -1
  23. package/dist/Cache.js +133 -57
  24. package/dist/Cache.js.map +1 -1
  25. package/dist/Cause.d.ts +77 -65
  26. package/dist/Cause.d.ts.map +1 -1
  27. package/dist/Cause.js +43 -36
  28. package/dist/Cause.js.map +1 -1
  29. package/dist/Channel.d.ts +1518 -575
  30. package/dist/Channel.d.ts.map +1 -1
  31. package/dist/Channel.js +661 -287
  32. package/dist/Channel.js.map +1 -1
  33. package/dist/ChannelSchema.d.ts +119 -10
  34. package/dist/ChannelSchema.d.ts.map +1 -1
  35. package/dist/ChannelSchema.js +45 -6
  36. package/dist/ChannelSchema.js.map +1 -1
  37. package/dist/Chunk.d.ts +548 -379
  38. package/dist/Chunk.d.ts.map +1 -1
  39. package/dist/Chunk.js +238 -170
  40. package/dist/Chunk.js.map +1 -1
  41. package/dist/Clock.d.ts +15 -8
  42. package/dist/Clock.d.ts.map +1 -1
  43. package/dist/Clock.js +8 -4
  44. package/dist/Clock.js.map +1 -1
  45. package/dist/Combiner.d.ts +2 -4
  46. package/dist/Combiner.d.ts.map +1 -1
  47. package/dist/Combiner.js +2 -4
  48. package/dist/Combiner.js.map +1 -1
  49. package/dist/Config.d.ts +5 -4
  50. package/dist/Config.d.ts.map +1 -1
  51. package/dist/Config.js +9 -8
  52. package/dist/Config.js.map +1 -1
  53. package/dist/ConfigProvider.d.ts +1 -1
  54. package/dist/ConfigProvider.js +1 -1
  55. package/dist/Console.d.ts +76 -50
  56. package/dist/Console.d.ts.map +1 -1
  57. package/dist/Console.js +69 -46
  58. package/dist/Console.js.map +1 -1
  59. package/dist/Context.d.ts +386 -138
  60. package/dist/Context.d.ts.map +1 -1
  61. package/dist/Context.js +144 -62
  62. package/dist/Context.js.map +1 -1
  63. package/dist/Cron.d.ts +69 -48
  64. package/dist/Cron.d.ts.map +1 -1
  65. package/dist/Cron.js +96 -36
  66. package/dist/Cron.js.map +1 -1
  67. package/dist/Data.d.ts +3 -2
  68. package/dist/Data.d.ts.map +1 -1
  69. package/dist/Data.js.map +1 -1
  70. package/dist/DateTime.d.ts +875 -444
  71. package/dist/DateTime.d.ts.map +1 -1
  72. package/dist/DateTime.js +376 -217
  73. package/dist/DateTime.js.map +1 -1
  74. package/dist/Deferred.d.ts +367 -174
  75. package/dist/Deferred.d.ts.map +1 -1
  76. package/dist/Deferred.js +145 -71
  77. package/dist/Deferred.js.map +1 -1
  78. package/dist/Differ.d.ts +42 -0
  79. package/dist/Differ.d.ts.map +1 -1
  80. package/dist/Differ.js +36 -0
  81. package/dist/Duration.d.ts +329 -185
  82. package/dist/Duration.d.ts.map +1 -1
  83. package/dist/Duration.js +174 -106
  84. package/dist/Duration.js.map +1 -1
  85. package/dist/Effect.d.ts +2445 -2356
  86. package/dist/Effect.d.ts.map +1 -1
  87. package/dist/Effect.js +906 -758
  88. package/dist/Effect.js.map +1 -1
  89. package/dist/Effectable.d.ts +38 -3
  90. package/dist/Effectable.d.ts.map +1 -1
  91. package/dist/Effectable.js +3 -3
  92. package/dist/Effectable.js.map +1 -1
  93. package/dist/Encoding.d.ts +78 -28
  94. package/dist/Encoding.d.ts.map +1 -1
  95. package/dist/Encoding.js +75 -27
  96. package/dist/Encoding.js.map +1 -1
  97. package/dist/Equivalence.d.ts +14 -19
  98. package/dist/Equivalence.d.ts.map +1 -1
  99. package/dist/Equivalence.js +14 -19
  100. package/dist/Equivalence.js.map +1 -1
  101. package/dist/ErrorReporter.d.ts +66 -82
  102. package/dist/ErrorReporter.d.ts.map +1 -1
  103. package/dist/ErrorReporter.js +38 -29
  104. package/dist/ErrorReporter.js.map +1 -1
  105. package/dist/ExecutionPlan.d.ts +96 -12
  106. package/dist/ExecutionPlan.d.ts.map +1 -1
  107. package/dist/ExecutionPlan.js +21 -6
  108. package/dist/ExecutionPlan.js.map +1 -1
  109. package/dist/Exit.d.ts +7 -5
  110. package/dist/Exit.d.ts.map +1 -1
  111. package/dist/Exit.js.map +1 -1
  112. package/dist/Fiber.d.ts +72 -40
  113. package/dist/Fiber.d.ts.map +1 -1
  114. package/dist/Fiber.js +39 -21
  115. package/dist/Fiber.js.map +1 -1
  116. package/dist/FiberHandle.d.ts +119 -58
  117. package/dist/FiberHandle.d.ts.map +1 -1
  118. package/dist/FiberHandle.js +122 -40
  119. package/dist/FiberHandle.js.map +1 -1
  120. package/dist/FiberMap.d.ts +288 -160
  121. package/dist/FiberMap.d.ts.map +1 -1
  122. package/dist/FiberMap.js +176 -74
  123. package/dist/FiberMap.js.map +1 -1
  124. package/dist/FiberSet.d.ts +93 -52
  125. package/dist/FiberSet.d.ts.map +1 -1
  126. package/dist/FiberSet.js +97 -34
  127. package/dist/FiberSet.js.map +1 -1
  128. package/dist/FileSystem.d.ts +104 -73
  129. package/dist/FileSystem.d.ts.map +1 -1
  130. package/dist/FileSystem.js +53 -39
  131. package/dist/FileSystem.js.map +1 -1
  132. package/dist/Filter.d.ts +166 -88
  133. package/dist/Filter.d.ts.map +1 -1
  134. package/dist/Filter.js +68 -42
  135. package/dist/Filter.js.map +1 -1
  136. package/dist/Function.d.ts +154 -86
  137. package/dist/Function.d.ts.map +1 -1
  138. package/dist/Function.js +53 -37
  139. package/dist/Function.js.map +1 -1
  140. package/dist/Graph.d.ts +682 -365
  141. package/dist/Graph.d.ts.map +1 -1
  142. package/dist/Graph.js +308 -157
  143. package/dist/Graph.js.map +1 -1
  144. package/dist/HKT.d.ts +29 -13
  145. package/dist/HKT.d.ts.map +1 -1
  146. package/dist/Hash.d.ts +31 -18
  147. package/dist/Hash.d.ts.map +1 -1
  148. package/dist/Hash.js +25 -15
  149. package/dist/Hash.js.map +1 -1
  150. package/dist/HashMap.d.ts +444 -256
  151. package/dist/HashMap.d.ts.map +1 -1
  152. package/dist/HashMap.js +223 -105
  153. package/dist/HashMap.js.map +1 -1
  154. package/dist/HashRing.d.ts +36 -17
  155. package/dist/HashRing.d.ts.map +1 -1
  156. package/dist/HashRing.js +75 -8
  157. package/dist/HashRing.js.map +1 -1
  158. package/dist/HashSet.d.ts +194 -104
  159. package/dist/HashSet.d.ts.map +1 -1
  160. package/dist/HashSet.js +93 -38
  161. package/dist/HashSet.js.map +1 -1
  162. package/dist/Inspectable.d.ts +20 -9
  163. package/dist/Inspectable.d.ts.map +1 -1
  164. package/dist/Inspectable.js +16 -6
  165. package/dist/Inspectable.js.map +1 -1
  166. package/dist/Iterable.d.ts +309 -149
  167. package/dist/Iterable.d.ts.map +1 -1
  168. package/dist/Iterable.js +129 -65
  169. package/dist/Iterable.js.map +1 -1
  170. package/dist/JsonPatch.d.ts +4 -3
  171. package/dist/JsonPatch.d.ts.map +1 -1
  172. package/dist/JsonPatch.js +4 -3
  173. package/dist/JsonPatch.js.map +1 -1
  174. package/dist/Latch.d.ts +98 -15
  175. package/dist/Latch.d.ts.map +1 -1
  176. package/dist/Latch.js +41 -10
  177. package/dist/Latch.js.map +1 -1
  178. package/dist/Layer.d.ts +412 -309
  179. package/dist/Layer.d.ts.map +1 -1
  180. package/dist/Layer.js +262 -181
  181. package/dist/Layer.js.map +1 -1
  182. package/dist/LayerMap.d.ts +95 -21
  183. package/dist/LayerMap.d.ts.map +1 -1
  184. package/dist/LayerMap.js +58 -14
  185. package/dist/LayerMap.js.map +1 -1
  186. package/dist/LogLevel.d.ts +92 -131
  187. package/dist/LogLevel.d.ts.map +1 -1
  188. package/dist/LogLevel.js +25 -15
  189. package/dist/LogLevel.js.map +1 -1
  190. package/dist/Logger.d.ts +155 -99
  191. package/dist/Logger.d.ts.map +1 -1
  192. package/dist/Logger.js +211 -184
  193. package/dist/Logger.js.map +1 -1
  194. package/dist/ManagedRuntime.d.ts +75 -17
  195. package/dist/ManagedRuntime.d.ts.map +1 -1
  196. package/dist/ManagedRuntime.js +22 -16
  197. package/dist/ManagedRuntime.js.map +1 -1
  198. package/dist/Match.d.ts +133 -157
  199. package/dist/Match.d.ts.map +1 -1
  200. package/dist/Match.js +85 -76
  201. package/dist/Match.js.map +1 -1
  202. package/dist/Metric.d.ts +325 -284
  203. package/dist/Metric.d.ts.map +1 -1
  204. package/dist/Metric.js +217 -212
  205. package/dist/Metric.js.map +1 -1
  206. package/dist/MutableHashMap.d.ts +117 -58
  207. package/dist/MutableHashMap.d.ts.map +1 -1
  208. package/dist/MutableHashMap.js +52 -29
  209. package/dist/MutableHashMap.js.map +1 -1
  210. package/dist/MutableHashSet.d.ts +52 -30
  211. package/dist/MutableHashSet.d.ts.map +1 -1
  212. package/dist/MutableHashSet.js +94 -38
  213. package/dist/MutableHashSet.js.map +1 -1
  214. package/dist/MutableList.d.ts +92 -49
  215. package/dist/MutableList.d.ts.map +1 -1
  216. package/dist/MutableList.js +123 -71
  217. package/dist/MutableList.js.map +1 -1
  218. package/dist/MutableRef.d.ts +99 -62
  219. package/dist/MutableRef.d.ts.map +1 -1
  220. package/dist/MutableRef.js +79 -60
  221. package/dist/MutableRef.js.map +1 -1
  222. package/dist/Newtype.d.ts +3 -0
  223. package/dist/Newtype.d.ts.map +1 -1
  224. package/dist/Newtype.js.map +1 -1
  225. package/dist/NonEmptyIterable.d.ts +36 -39
  226. package/dist/NonEmptyIterable.d.ts.map +1 -1
  227. package/dist/NonEmptyIterable.js +34 -20
  228. package/dist/NonEmptyIterable.js.map +1 -1
  229. package/dist/Number.d.ts +116 -64
  230. package/dist/Number.d.ts.map +1 -1
  231. package/dist/Number.js +54 -30
  232. package/dist/Number.js.map +1 -1
  233. package/dist/Optic.d.ts +1 -2
  234. package/dist/Optic.d.ts.map +1 -1
  235. package/dist/Optic.js +0 -1
  236. package/dist/Optic.js.map +1 -1
  237. package/dist/Option.d.ts +38 -53
  238. package/dist/Option.d.ts.map +1 -1
  239. package/dist/Option.js +87 -11
  240. package/dist/Option.js.map +1 -1
  241. package/dist/Ordering.d.ts +43 -28
  242. package/dist/Ordering.d.ts.map +1 -1
  243. package/dist/Ordering.js +4 -2
  244. package/dist/Ordering.js.map +1 -1
  245. package/dist/PartitionedSemaphore.d.ts +225 -40
  246. package/dist/PartitionedSemaphore.d.ts.map +1 -1
  247. package/dist/PartitionedSemaphore.js +113 -17
  248. package/dist/PartitionedSemaphore.js.map +1 -1
  249. package/dist/Path.d.ts +77 -13
  250. package/dist/Path.d.ts.map +1 -1
  251. package/dist/Path.js +48 -4
  252. package/dist/Path.js.map +1 -1
  253. package/dist/Pipeable.d.ts +71 -15
  254. package/dist/Pipeable.d.ts.map +1 -1
  255. package/dist/Pipeable.js +59 -12
  256. package/dist/Pipeable.js.map +1 -1
  257. package/dist/PlatformError.d.ts +74 -6
  258. package/dist/PlatformError.d.ts.map +1 -1
  259. package/dist/PlatformError.js +68 -5
  260. package/dist/PlatformError.js.map +1 -1
  261. package/dist/Pool.d.ts +66 -31
  262. package/dist/Pool.d.ts.map +1 -1
  263. package/dist/Pool.js +26 -24
  264. package/dist/Pool.js.map +1 -1
  265. package/dist/Predicate.d.ts +16 -21
  266. package/dist/Predicate.d.ts.map +1 -1
  267. package/dist/Predicate.js +9 -14
  268. package/dist/Predicate.js.map +1 -1
  269. package/dist/PrimaryKey.d.ts +9 -2
  270. package/dist/PrimaryKey.d.ts.map +1 -1
  271. package/dist/PrimaryKey.js +7 -1
  272. package/dist/PrimaryKey.js.map +1 -1
  273. package/dist/PubSub.d.ts +364 -262
  274. package/dist/PubSub.d.ts.map +1 -1
  275. package/dist/PubSub.js +245 -174
  276. package/dist/PubSub.js.map +1 -1
  277. package/dist/Pull.d.ts +94 -25
  278. package/dist/Pull.d.ts.map +1 -1
  279. package/dist/Pull.js +61 -13
  280. package/dist/Pull.js.map +1 -1
  281. package/dist/Queue.d.ts +284 -150
  282. package/dist/Queue.d.ts.map +1 -1
  283. package/dist/Queue.js +216 -113
  284. package/dist/Queue.js.map +1 -1
  285. package/dist/Random.d.ts +54 -35
  286. package/dist/Random.d.ts.map +1 -1
  287. package/dist/Random.js +36 -24
  288. package/dist/Random.js.map +1 -1
  289. package/dist/RcMap.d.ts +151 -141
  290. package/dist/RcMap.d.ts.map +1 -1
  291. package/dist/RcMap.js +66 -20
  292. package/dist/RcMap.js.map +1 -1
  293. package/dist/RcRef.d.ts +69 -32
  294. package/dist/RcRef.d.ts.map +1 -1
  295. package/dist/RcRef.js +33 -16
  296. package/dist/RcRef.js.map +1 -1
  297. package/dist/Record.d.ts +273 -129
  298. package/dist/Record.d.ts.map +1 -1
  299. package/dist/Record.js +117 -57
  300. package/dist/Record.js.map +1 -1
  301. package/dist/Redactable.d.ts +3 -3
  302. package/dist/Redactable.js +2 -2
  303. package/dist/Redacted.d.ts +63 -33
  304. package/dist/Redacted.d.ts.map +1 -1
  305. package/dist/Redacted.js +30 -14
  306. package/dist/Redacted.js.map +1 -1
  307. package/dist/Ref.d.ts +81 -52
  308. package/dist/Ref.d.ts.map +1 -1
  309. package/dist/Ref.js +54 -35
  310. package/dist/Ref.js.map +1 -1
  311. package/dist/References.d.ts +73 -31
  312. package/dist/References.d.ts.map +1 -1
  313. package/dist/References.js +66 -30
  314. package/dist/References.js.map +1 -1
  315. package/dist/RegExp.d.ts +11 -5
  316. package/dist/RegExp.d.ts.map +1 -1
  317. package/dist/RegExp.js +11 -5
  318. package/dist/RegExp.js.map +1 -1
  319. package/dist/Request.d.ts +158 -34
  320. package/dist/Request.d.ts.map +1 -1
  321. package/dist/Request.js +67 -12
  322. package/dist/Request.js.map +1 -1
  323. package/dist/RequestResolver.d.ts +261 -116
  324. package/dist/RequestResolver.d.ts.map +1 -1
  325. package/dist/RequestResolver.js +77 -41
  326. package/dist/RequestResolver.js.map +1 -1
  327. package/dist/Resource.d.ts +13 -7
  328. package/dist/Resource.d.ts.map +1 -1
  329. package/dist/Resource.js +44 -6
  330. package/dist/Resource.js.map +1 -1
  331. package/dist/Result.d.ts +26 -16
  332. package/dist/Result.d.ts.map +1 -1
  333. package/dist/Result.js +6 -6
  334. package/dist/Result.js.map +1 -1
  335. package/dist/Runtime.d.ts +43 -18
  336. package/dist/Runtime.d.ts.map +1 -1
  337. package/dist/Runtime.js +35 -16
  338. package/dist/Runtime.js.map +1 -1
  339. package/dist/Schedule.d.ts +545 -576
  340. package/dist/Schedule.d.ts.map +1 -1
  341. package/dist/Schedule.js +261 -247
  342. package/dist/Schedule.js.map +1 -1
  343. package/dist/Scheduler.d.ts +43 -6
  344. package/dist/Scheduler.d.ts.map +1 -1
  345. package/dist/Scheduler.js +33 -4
  346. package/dist/Scheduler.js.map +1 -1
  347. package/dist/Schema.d.ts +815 -294
  348. package/dist/Schema.d.ts.map +1 -1
  349. package/dist/Schema.js +287 -193
  350. package/dist/Schema.js.map +1 -1
  351. package/dist/SchemaAST.d.ts +24 -15
  352. package/dist/SchemaAST.d.ts.map +1 -1
  353. package/dist/SchemaAST.js +13 -9
  354. package/dist/SchemaAST.js.map +1 -1
  355. package/dist/SchemaGetter.d.ts +26 -13
  356. package/dist/SchemaGetter.d.ts.map +1 -1
  357. package/dist/SchemaGetter.js +24 -11
  358. package/dist/SchemaGetter.js.map +1 -1
  359. package/dist/SchemaIssue.d.ts +1 -8
  360. package/dist/SchemaIssue.d.ts.map +1 -1
  361. package/dist/SchemaIssue.js.map +1 -1
  362. package/dist/SchemaParser.d.ts +194 -25
  363. package/dist/SchemaParser.d.ts.map +1 -1
  364. package/dist/SchemaParser.js +220 -26
  365. package/dist/SchemaParser.js.map +1 -1
  366. package/dist/SchemaRepresentation.d.ts +2 -2
  367. package/dist/SchemaTransformation.d.ts +61 -41
  368. package/dist/SchemaTransformation.d.ts.map +1 -1
  369. package/dist/SchemaTransformation.js +56 -33
  370. package/dist/SchemaTransformation.js.map +1 -1
  371. package/dist/SchemaUtils.d.ts +7 -0
  372. package/dist/SchemaUtils.d.ts.map +1 -1
  373. package/dist/SchemaUtils.js +23 -0
  374. package/dist/SchemaUtils.js.map +1 -1
  375. package/dist/Scope.d.ts +102 -43
  376. package/dist/Scope.d.ts.map +1 -1
  377. package/dist/Scope.js +57 -23
  378. package/dist/Scope.js.map +1 -1
  379. package/dist/ScopedCache.d.ts +138 -46
  380. package/dist/ScopedCache.d.ts.map +1 -1
  381. package/dist/ScopedCache.js +80 -19
  382. package/dist/ScopedCache.js.map +1 -1
  383. package/dist/ScopedRef.d.ts +28 -8
  384. package/dist/ScopedRef.d.ts.map +1 -1
  385. package/dist/ScopedRef.js +25 -5
  386. package/dist/ScopedRef.js.map +1 -1
  387. package/dist/Semaphore.d.ts +64 -28
  388. package/dist/Semaphore.d.ts.map +1 -1
  389. package/dist/Semaphore.js +22 -13
  390. package/dist/Semaphore.js.map +1 -1
  391. package/dist/Sink.d.ts +458 -200
  392. package/dist/Sink.d.ts.map +1 -1
  393. package/dist/Sink.js +240 -89
  394. package/dist/Sink.js.map +1 -1
  395. package/dist/Stdio.d.ts +43 -6
  396. package/dist/Stdio.d.ts.map +1 -1
  397. package/dist/Stdio.js +33 -4
  398. package/dist/Stdio.js.map +1 -1
  399. package/dist/Stream.d.ts +1899 -1186
  400. package/dist/Stream.d.ts.map +1 -1
  401. package/dist/Stream.js +868 -525
  402. package/dist/Stream.js.map +1 -1
  403. package/dist/String.d.ts +171 -95
  404. package/dist/String.d.ts.map +1 -1
  405. package/dist/String.js +125 -67
  406. package/dist/String.js.map +1 -1
  407. package/dist/SubscriptionRef.d.ts +308 -203
  408. package/dist/SubscriptionRef.d.ts.map +1 -1
  409. package/dist/SubscriptionRef.js +125 -76
  410. package/dist/SubscriptionRef.js.map +1 -1
  411. package/dist/Symbol.d.ts +13 -5
  412. package/dist/Symbol.d.ts.map +1 -1
  413. package/dist/Symbol.js +13 -5
  414. package/dist/Symbol.js.map +1 -1
  415. package/dist/SynchronizedRef.d.ts +278 -62
  416. package/dist/SynchronizedRef.d.ts.map +1 -1
  417. package/dist/SynchronizedRef.js +116 -23
  418. package/dist/SynchronizedRef.js.map +1 -1
  419. package/dist/Take.d.ts +26 -2
  420. package/dist/Take.d.ts.map +1 -1
  421. package/dist/Take.js +4 -1
  422. package/dist/Take.js.map +1 -1
  423. package/dist/Terminal.d.ts +39 -7
  424. package/dist/Terminal.d.ts.map +1 -1
  425. package/dist/Terminal.js +10 -4
  426. package/dist/Terminal.js.map +1 -1
  427. package/dist/Tracer.d.ts +229 -55
  428. package/dist/Tracer.d.ts.map +1 -1
  429. package/dist/Tracer.js +94 -18
  430. package/dist/Tracer.js.map +1 -1
  431. package/dist/Trie.d.ts +213 -142
  432. package/dist/Trie.d.ts.map +1 -1
  433. package/dist/Trie.js +88 -60
  434. package/dist/Trie.js.map +1 -1
  435. package/dist/TxChunk.d.ts +182 -146
  436. package/dist/TxChunk.d.ts.map +1 -1
  437. package/dist/TxChunk.js +73 -56
  438. package/dist/TxChunk.js.map +1 -1
  439. package/dist/TxDeferred.d.ts +43 -29
  440. package/dist/TxDeferred.d.ts.map +1 -1
  441. package/dist/TxDeferred.js +22 -15
  442. package/dist/TxDeferred.js.map +1 -1
  443. package/dist/TxHashMap.d.ts +362 -222
  444. package/dist/TxHashMap.d.ts.map +1 -1
  445. package/dist/TxHashMap.js +171 -98
  446. package/dist/TxHashMap.js.map +1 -1
  447. package/dist/TxHashSet.d.ts +178 -104
  448. package/dist/TxHashSet.d.ts.map +1 -1
  449. package/dist/TxHashSet.js +84 -43
  450. package/dist/TxHashSet.js.map +1 -1
  451. package/dist/TxPriorityQueue.d.ts +93 -62
  452. package/dist/TxPriorityQueue.d.ts.map +1 -1
  453. package/dist/TxPriorityQueue.js +54 -36
  454. package/dist/TxPriorityQueue.js.map +1 -1
  455. package/dist/TxPubSub.d.ts +77 -49
  456. package/dist/TxPubSub.d.ts.map +1 -1
  457. package/dist/TxPubSub.js +60 -37
  458. package/dist/TxPubSub.js.map +1 -1
  459. package/dist/TxQueue.d.ts +279 -241
  460. package/dist/TxQueue.d.ts.map +1 -1
  461. package/dist/TxQueue.js +147 -101
  462. package/dist/TxQueue.js.map +1 -1
  463. package/dist/TxReentrantLock.d.ts +69 -46
  464. package/dist/TxReentrantLock.d.ts.map +1 -1
  465. package/dist/TxReentrantLock.js +48 -32
  466. package/dist/TxReentrantLock.js.map +1 -1
  467. package/dist/TxRef.d.ts +69 -40
  468. package/dist/TxRef.d.ts.map +1 -1
  469. package/dist/TxRef.js +35 -20
  470. package/dist/TxRef.js.map +1 -1
  471. package/dist/TxSemaphore.d.ts +101 -54
  472. package/dist/TxSemaphore.d.ts.map +1 -1
  473. package/dist/TxSemaphore.js +76 -34
  474. package/dist/TxSemaphore.js.map +1 -1
  475. package/dist/TxSubscriptionRef.d.ts +72 -48
  476. package/dist/TxSubscriptionRef.d.ts.map +1 -1
  477. package/dist/TxSubscriptionRef.js +33 -22
  478. package/dist/TxSubscriptionRef.js.map +1 -1
  479. package/dist/Types.d.ts +34 -34
  480. package/dist/UndefinedOr.d.ts +48 -25
  481. package/dist/UndefinedOr.d.ts.map +1 -1
  482. package/dist/UndefinedOr.js +28 -25
  483. package/dist/UndefinedOr.js.map +1 -1
  484. package/dist/Unify.d.ts +71 -116
  485. package/dist/Unify.d.ts.map +1 -1
  486. package/dist/Unify.js +20 -6
  487. package/dist/Unify.js.map +1 -1
  488. package/dist/Utils.d.ts +4 -0
  489. package/dist/Utils.d.ts.map +1 -1
  490. package/dist/Utils.js +4 -0
  491. package/dist/Utils.js.map +1 -1
  492. package/dist/index.d.ts +81 -32
  493. package/dist/index.d.ts.map +1 -1
  494. package/dist/index.js +81 -32
  495. package/dist/index.js.map +1 -1
  496. package/dist/internal/concurrency.js +2 -2
  497. package/dist/internal/concurrency.js.map +1 -1
  498. package/dist/internal/core.js +8 -20
  499. package/dist/internal/core.js.map +1 -1
  500. package/dist/internal/effect.js +20 -19
  501. package/dist/internal/effect.js.map +1 -1
  502. package/dist/internal/executionPlan.js +2 -2
  503. package/dist/internal/executionPlan.js.map +1 -1
  504. package/dist/internal/option.js +5 -8
  505. package/dist/internal/option.js.map +1 -1
  506. package/dist/internal/result.js +5 -8
  507. package/dist/internal/result.js.map +1 -1
  508. package/dist/internal/schema/schema.js +1 -1
  509. package/dist/internal/schema/schema.js.map +1 -1
  510. package/dist/testing/FastCheck.d.ts +6 -3
  511. package/dist/testing/FastCheck.d.ts.map +1 -1
  512. package/dist/testing/FastCheck.js +6 -3
  513. package/dist/testing/FastCheck.js.map +1 -1
  514. package/dist/testing/TestClock.d.ts +39 -34
  515. package/dist/testing/TestClock.d.ts.map +1 -1
  516. package/dist/testing/TestClock.js +42 -12
  517. package/dist/testing/TestClock.js.map +1 -1
  518. package/dist/testing/TestConsole.d.ts +39 -30
  519. package/dist/testing/TestConsole.d.ts.map +1 -1
  520. package/dist/testing/TestConsole.js +25 -10
  521. package/dist/testing/TestConsole.js.map +1 -1
  522. package/dist/testing/TestSchema.js +7 -7
  523. package/dist/testing/TestSchema.js.map +1 -1
  524. package/dist/unstable/ai/AiError.d.ts +197 -130
  525. package/dist/unstable/ai/AiError.d.ts.map +1 -1
  526. package/dist/unstable/ai/AiError.js +166 -102
  527. package/dist/unstable/ai/AiError.js.map +1 -1
  528. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
  529. package/dist/unstable/ai/AnthropicStructuredOutput.js +2 -2
  530. package/dist/unstable/ai/Chat.d.ts +65 -41
  531. package/dist/unstable/ai/Chat.d.ts.map +1 -1
  532. package/dist/unstable/ai/Chat.js +51 -33
  533. package/dist/unstable/ai/Chat.js.map +1 -1
  534. package/dist/unstable/ai/EmbeddingModel.d.ts +12 -11
  535. package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
  536. package/dist/unstable/ai/EmbeddingModel.js +9 -8
  537. package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
  538. package/dist/unstable/ai/IdGenerator.d.ts +28 -18
  539. package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
  540. package/dist/unstable/ai/IdGenerator.js +18 -11
  541. package/dist/unstable/ai/IdGenerator.js.map +1 -1
  542. package/dist/unstable/ai/LanguageModel.d.ts +36 -30
  543. package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
  544. package/dist/unstable/ai/LanguageModel.js +21 -15
  545. package/dist/unstable/ai/LanguageModel.js.map +1 -1
  546. package/dist/unstable/ai/McpSchema.d.ts +339 -119
  547. package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
  548. package/dist/unstable/ai/McpSchema.js +264 -98
  549. package/dist/unstable/ai/McpSchema.js.map +1 -1
  550. package/dist/unstable/ai/McpServer.d.ts +53 -19
  551. package/dist/unstable/ai/McpServer.d.ts.map +1 -1
  552. package/dist/unstable/ai/McpServer.js +65 -17
  553. package/dist/unstable/ai/McpServer.js.map +1 -1
  554. package/dist/unstable/ai/Model.d.ts +13 -7
  555. package/dist/unstable/ai/Model.d.ts.map +1 -1
  556. package/dist/unstable/ai/Model.js +11 -9
  557. package/dist/unstable/ai/Model.js.map +1 -1
  558. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +1 -1
  559. package/dist/unstable/ai/OpenAiStructuredOutput.js +2 -2
  560. package/dist/unstable/ai/Prompt.d.ts +194 -168
  561. package/dist/unstable/ai/Prompt.d.ts.map +1 -1
  562. package/dist/unstable/ai/Prompt.js +75 -66
  563. package/dist/unstable/ai/Prompt.js.map +1 -1
  564. package/dist/unstable/ai/Response.d.ts +153 -140
  565. package/dist/unstable/ai/Response.d.ts.map +1 -1
  566. package/dist/unstable/ai/Response.js +43 -48
  567. package/dist/unstable/ai/Response.js.map +1 -1
  568. package/dist/unstable/ai/ResponseIdTracker.d.ts +43 -4
  569. package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
  570. package/dist/unstable/ai/ResponseIdTracker.js +27 -2
  571. package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
  572. package/dist/unstable/ai/Telemetry.d.ts +42 -32
  573. package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
  574. package/dist/unstable/ai/Telemetry.js +14 -10
  575. package/dist/unstable/ai/Telemetry.js.map +1 -1
  576. package/dist/unstable/ai/Tokenizer.d.ts +13 -8
  577. package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
  578. package/dist/unstable/ai/Tokenizer.js +10 -6
  579. package/dist/unstable/ai/Tokenizer.js.map +1 -1
  580. package/dist/unstable/ai/Tool.d.ts +153 -84
  581. package/dist/unstable/ai/Tool.d.ts.map +1 -1
  582. package/dist/unstable/ai/Tool.js +97 -44
  583. package/dist/unstable/ai/Tool.js.map +1 -1
  584. package/dist/unstable/ai/Toolkit.d.ts +33 -42
  585. package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
  586. package/dist/unstable/ai/Toolkit.js +35 -36
  587. package/dist/unstable/ai/Toolkit.js.map +1 -1
  588. package/dist/unstable/ai/index.d.ts +42 -24
  589. package/dist/unstable/ai/index.d.ts.map +1 -1
  590. package/dist/unstable/ai/index.js +42 -24
  591. package/dist/unstable/ai/index.js.map +1 -1
  592. package/dist/unstable/cli/Argument.d.ts +226 -134
  593. package/dist/unstable/cli/Argument.d.ts.map +1 -1
  594. package/dist/unstable/cli/Argument.js +101 -65
  595. package/dist/unstable/cli/Argument.js.map +1 -1
  596. package/dist/unstable/cli/CliError.d.ts +72 -26
  597. package/dist/unstable/cli/CliError.d.ts.map +1 -1
  598. package/dist/unstable/cli/CliError.js +86 -23
  599. package/dist/unstable/cli/CliError.js.map +1 -1
  600. package/dist/unstable/cli/CliOutput.d.ts +43 -13
  601. package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
  602. package/dist/unstable/cli/CliOutput.js +30 -6
  603. package/dist/unstable/cli/CliOutput.js.map +1 -1
  604. package/dist/unstable/cli/Command.d.ts +218 -117
  605. package/dist/unstable/cli/Command.d.ts.map +1 -1
  606. package/dist/unstable/cli/Command.js +45 -31
  607. package/dist/unstable/cli/Command.js.map +1 -1
  608. package/dist/unstable/cli/Completions.d.ts +7 -7
  609. package/dist/unstable/cli/Completions.js +1 -1
  610. package/dist/unstable/cli/Flag.d.ts +235 -142
  611. package/dist/unstable/cli/Flag.d.ts.map +1 -1
  612. package/dist/unstable/cli/Flag.js +111 -71
  613. package/dist/unstable/cli/Flag.js.map +1 -1
  614. package/dist/unstable/cli/GlobalFlag.d.ts +42 -14
  615. package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
  616. package/dist/unstable/cli/GlobalFlag.js +30 -7
  617. package/dist/unstable/cli/GlobalFlag.js.map +1 -1
  618. package/dist/unstable/cli/HelpDoc.d.ts +35 -10
  619. package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
  620. package/dist/unstable/cli/HelpDoc.js +21 -0
  621. package/dist/unstable/cli/Param.d.ts +79 -31
  622. package/dist/unstable/cli/Param.d.ts.map +1 -1
  623. package/dist/unstable/cli/Param.js +161 -99
  624. package/dist/unstable/cli/Param.js.map +1 -1
  625. package/dist/unstable/cli/Primitive.d.ts +79 -42
  626. package/dist/unstable/cli/Primitive.d.ts.map +1 -1
  627. package/dist/unstable/cli/Primitive.js +66 -35
  628. package/dist/unstable/cli/Primitive.js.map +1 -1
  629. package/dist/unstable/cli/Prompt.d.ts +178 -47
  630. package/dist/unstable/cli/Prompt.d.ts.map +1 -1
  631. package/dist/unstable/cli/Prompt.js +111 -31
  632. package/dist/unstable/cli/Prompt.js.map +1 -1
  633. package/dist/unstable/cli/internal/ansi.d.ts.map +1 -1
  634. package/dist/unstable/cli/internal/ansi.js +13 -0
  635. package/dist/unstable/cli/internal/ansi.js.map +1 -1
  636. package/dist/unstable/cli/internal/command.d.ts +7 -7
  637. package/dist/unstable/cli/internal/command.d.ts.map +1 -1
  638. package/dist/unstable/cli/internal/command.js +12 -10
  639. package/dist/unstable/cli/internal/command.js.map +1 -1
  640. package/dist/unstable/cli/internal/config.d.ts +3 -0
  641. package/dist/unstable/cli/internal/config.d.ts.map +1 -1
  642. package/dist/unstable/cli/internal/config.js.map +1 -1
  643. package/dist/unstable/cli/internal/lexer.js.map +1 -1
  644. package/dist/unstable/cluster/ClusterCron.d.ts +35 -1
  645. package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
  646. package/dist/unstable/cluster/ClusterCron.js +35 -1
  647. package/dist/unstable/cluster/ClusterCron.js.map +1 -1
  648. package/dist/unstable/cluster/ClusterError.d.ts +56 -7
  649. package/dist/unstable/cluster/ClusterError.d.ts.map +1 -1
  650. package/dist/unstable/cluster/ClusterError.js +56 -7
  651. package/dist/unstable/cluster/ClusterError.js.map +1 -1
  652. package/dist/unstable/cluster/ClusterMetrics.d.ts +39 -5
  653. package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
  654. package/dist/unstable/cluster/ClusterMetrics.js +39 -5
  655. package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
  656. package/dist/unstable/cluster/ClusterSchema.d.ts +61 -8
  657. package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
  658. package/dist/unstable/cluster/ClusterSchema.js +61 -8
  659. package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
  660. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +14 -2
  661. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
  662. package/dist/unstable/cluster/ClusterWorkflowEngine.js +36 -3
  663. package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
  664. package/dist/unstable/cluster/DeliverAt.d.ts +39 -4
  665. package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
  666. package/dist/unstable/cluster/DeliverAt.js +11 -3
  667. package/dist/unstable/cluster/DeliverAt.js.map +1 -1
  668. package/dist/unstable/cluster/Entity.d.ts +75 -16
  669. package/dist/unstable/cluster/Entity.d.ts.map +1 -1
  670. package/dist/unstable/cluster/Entity.js +78 -13
  671. package/dist/unstable/cluster/Entity.js.map +1 -1
  672. package/dist/unstable/cluster/EntityAddress.d.ts +30 -2
  673. package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
  674. package/dist/unstable/cluster/EntityAddress.js +30 -2
  675. package/dist/unstable/cluster/EntityAddress.js.map +1 -1
  676. package/dist/unstable/cluster/EntityId.d.ts +18 -3
  677. package/dist/unstable/cluster/EntityId.d.ts.map +1 -1
  678. package/dist/unstable/cluster/EntityId.js +15 -2
  679. package/dist/unstable/cluster/EntityId.js.map +1 -1
  680. package/dist/unstable/cluster/EntityProxy.d.ts +34 -2
  681. package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
  682. package/dist/unstable/cluster/EntityProxy.js +24 -2
  683. package/dist/unstable/cluster/EntityProxy.js.map +1 -1
  684. package/dist/unstable/cluster/EntityProxyServer.d.ts +17 -2
  685. package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
  686. package/dist/unstable/cluster/EntityProxyServer.js +40 -8
  687. package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
  688. package/dist/unstable/cluster/EntityResource.d.ts +43 -6
  689. package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
  690. package/dist/unstable/cluster/EntityResource.js +11 -4
  691. package/dist/unstable/cluster/EntityResource.js.map +1 -1
  692. package/dist/unstable/cluster/EntityType.d.ts +27 -3
  693. package/dist/unstable/cluster/EntityType.d.ts.map +1 -1
  694. package/dist/unstable/cluster/EntityType.js +24 -2
  695. package/dist/unstable/cluster/EntityType.js.map +1 -1
  696. package/dist/unstable/cluster/Envelope.d.ts +105 -23
  697. package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
  698. package/dist/unstable/cluster/Envelope.js +88 -14
  699. package/dist/unstable/cluster/Envelope.js.map +1 -1
  700. package/dist/unstable/cluster/HttpRunner.d.ts +88 -13
  701. package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
  702. package/dist/unstable/cluster/HttpRunner.js +88 -13
  703. package/dist/unstable/cluster/HttpRunner.js.map +1 -1
  704. package/dist/unstable/cluster/K8sHttpClient.d.ts +49 -6
  705. package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
  706. package/dist/unstable/cluster/K8sHttpClient.js +31 -6
  707. package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
  708. package/dist/unstable/cluster/MachineId.d.ts +24 -3
  709. package/dist/unstable/cluster/MachineId.d.ts.map +1 -1
  710. package/dist/unstable/cluster/MachineId.js +21 -2
  711. package/dist/unstable/cluster/MachineId.js.map +1 -1
  712. package/dist/unstable/cluster/Message.d.ts +102 -13
  713. package/dist/unstable/cluster/Message.d.ts.map +1 -1
  714. package/dist/unstable/cluster/Message.js +86 -10
  715. package/dist/unstable/cluster/Message.js.map +1 -1
  716. package/dist/unstable/cluster/MessageStorage.d.ts +127 -21
  717. package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
  718. package/dist/unstable/cluster/MessageStorage.js +71 -11
  719. package/dist/unstable/cluster/MessageStorage.js.map +1 -1
  720. package/dist/unstable/cluster/Reply.d.ts +101 -12
  721. package/dist/unstable/cluster/Reply.d.ts.map +1 -1
  722. package/dist/unstable/cluster/Reply.js +64 -8
  723. package/dist/unstable/cluster/Reply.js.map +1 -1
  724. package/dist/unstable/cluster/Runner.d.ts +47 -17
  725. package/dist/unstable/cluster/Runner.d.ts.map +1 -1
  726. package/dist/unstable/cluster/Runner.js +47 -17
  727. package/dist/unstable/cluster/Runner.js.map +1 -1
  728. package/dist/unstable/cluster/RunnerAddress.d.ts +34 -2
  729. package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
  730. package/dist/unstable/cluster/RunnerAddress.js +34 -2
  731. package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
  732. package/dist/unstable/cluster/RunnerHealth.d.ts +40 -12
  733. package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
  734. package/dist/unstable/cluster/RunnerHealth.js +40 -12
  735. package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
  736. package/dist/unstable/cluster/RunnerServer.d.ts +7 -4
  737. package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
  738. package/dist/unstable/cluster/RunnerServer.js +31 -4
  739. package/dist/unstable/cluster/RunnerServer.js.map +1 -1
  740. package/dist/unstable/cluster/RunnerStorage.d.ts +42 -5
  741. package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
  742. package/dist/unstable/cluster/RunnerStorage.js +38 -4
  743. package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
  744. package/dist/unstable/cluster/Runners.d.ts +73 -10
  745. package/dist/unstable/cluster/Runners.d.ts.map +1 -1
  746. package/dist/unstable/cluster/Runners.js +70 -9
  747. package/dist/unstable/cluster/Runners.js.map +1 -1
  748. package/dist/unstable/cluster/ShardId.d.ts +51 -5
  749. package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
  750. package/dist/unstable/cluster/ShardId.js +47 -4
  751. package/dist/unstable/cluster/ShardId.js.map +1 -1
  752. package/dist/unstable/cluster/Sharding.d.ts +10 -2
  753. package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
  754. package/dist/unstable/cluster/Sharding.js +35 -4
  755. package/dist/unstable/cluster/Sharding.js.map +1 -1
  756. package/dist/unstable/cluster/ShardingConfig.d.ts +65 -9
  757. package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
  758. package/dist/unstable/cluster/ShardingConfig.js +67 -10
  759. package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
  760. package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts +27 -6
  761. package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts.map +1 -1
  762. package/dist/unstable/cluster/ShardingRegistrationEvent.js +28 -4
  763. package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
  764. package/dist/unstable/cluster/SingleRunner.d.ts +23 -1
  765. package/dist/unstable/cluster/SingleRunner.d.ts.map +1 -1
  766. package/dist/unstable/cluster/SingleRunner.js +23 -1
  767. package/dist/unstable/cluster/SingleRunner.js.map +1 -1
  768. package/dist/unstable/cluster/Singleton.d.ts +15 -1
  769. package/dist/unstable/cluster/Singleton.d.ts.map +1 -1
  770. package/dist/unstable/cluster/Singleton.js +15 -1
  771. package/dist/unstable/cluster/Singleton.js.map +1 -1
  772. package/dist/unstable/cluster/SingletonAddress.d.ts +21 -1
  773. package/dist/unstable/cluster/SingletonAddress.d.ts.map +1 -1
  774. package/dist/unstable/cluster/SingletonAddress.js +21 -1
  775. package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
  776. package/dist/unstable/cluster/Snowflake.d.ts +89 -19
  777. package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
  778. package/dist/unstable/cluster/Snowflake.js +48 -13
  779. package/dist/unstable/cluster/Snowflake.js.map +1 -1
  780. package/dist/unstable/cluster/SocketRunner.d.ts +8 -2
  781. package/dist/unstable/cluster/SocketRunner.d.ts.map +1 -1
  782. package/dist/unstable/cluster/SocketRunner.js +29 -2
  783. package/dist/unstable/cluster/SocketRunner.js.map +1 -1
  784. package/dist/unstable/cluster/SqlMessageStorage.d.ts +11 -3
  785. package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
  786. package/dist/unstable/cluster/SqlMessageStorage.js +27 -3
  787. package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
  788. package/dist/unstable/cluster/SqlRunnerStorage.d.ts +11 -3
  789. package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
  790. package/dist/unstable/cluster/SqlRunnerStorage.js +46 -7
  791. package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
  792. package/dist/unstable/cluster/TestRunner.d.ts +18 -1
  793. package/dist/unstable/cluster/TestRunner.d.ts.map +1 -1
  794. package/dist/unstable/cluster/TestRunner.js +18 -1
  795. package/dist/unstable/cluster/TestRunner.js.map +1 -1
  796. package/dist/unstable/cluster/internal/hash.js +12 -0
  797. package/dist/unstable/cluster/internal/hash.js.map +1 -1
  798. package/dist/unstable/devtools/DevTools.d.ts +26 -3
  799. package/dist/unstable/devtools/DevTools.d.ts.map +1 -1
  800. package/dist/unstable/devtools/DevTools.js +26 -3
  801. package/dist/unstable/devtools/DevTools.js.map +1 -1
  802. package/dist/unstable/devtools/DevToolsClient.d.ts +20 -5
  803. package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
  804. package/dist/unstable/devtools/DevToolsClient.js +32 -5
  805. package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
  806. package/dist/unstable/devtools/DevToolsSchema.d.ts +184 -44
  807. package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
  808. package/dist/unstable/devtools/DevToolsSchema.js +102 -20
  809. package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
  810. package/dist/unstable/devtools/DevToolsServer.d.ts +27 -2
  811. package/dist/unstable/devtools/DevToolsServer.d.ts.map +1 -1
  812. package/dist/unstable/devtools/DevToolsServer.js +21 -1
  813. package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
  814. package/dist/unstable/encoding/Msgpack.d.ts +81 -12
  815. package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
  816. package/dist/unstable/encoding/Msgpack.js +75 -9
  817. package/dist/unstable/encoding/Msgpack.js.map +1 -1
  818. package/dist/unstable/encoding/Ndjson.d.ts +149 -21
  819. package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
  820. package/dist/unstable/encoding/Ndjson.js +97 -13
  821. package/dist/unstable/encoding/Ndjson.js.map +1 -1
  822. package/dist/unstable/encoding/Sse.d.ts +109 -18
  823. package/dist/unstable/encoding/Sse.d.ts.map +1 -1
  824. package/dist/unstable/encoding/Sse.js +69 -13
  825. package/dist/unstable/encoding/Sse.js.map +1 -1
  826. package/dist/unstable/eventlog/Event.d.ts +115 -30
  827. package/dist/unstable/eventlog/Event.d.ts.map +1 -1
  828. package/dist/unstable/eventlog/Event.js +22 -2
  829. package/dist/unstable/eventlog/Event.js.map +1 -1
  830. package/dist/unstable/eventlog/EventGroup.d.ts +50 -17
  831. package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
  832. package/dist/unstable/eventlog/EventGroup.js +24 -6
  833. package/dist/unstable/eventlog/EventGroup.js.map +1 -1
  834. package/dist/unstable/eventlog/EventJournal.d.ts +104 -20
  835. package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
  836. package/dist/unstable/eventlog/EventJournal.js +108 -16
  837. package/dist/unstable/eventlog/EventJournal.js.map +1 -1
  838. package/dist/unstable/eventlog/EventLog.d.ts +151 -31
  839. package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
  840. package/dist/unstable/eventlog/EventLog.js +111 -20
  841. package/dist/unstable/eventlog/EventLog.js.map +1 -1
  842. package/dist/unstable/eventlog/EventLogEncryption.d.ts +42 -6
  843. package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
  844. package/dist/unstable/eventlog/EventLogEncryption.js +38 -5
  845. package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
  846. package/dist/unstable/eventlog/EventLogMessage.d.ts +96 -22
  847. package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
  848. package/dist/unstable/eventlog/EventLogMessage.js +72 -16
  849. package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
  850. package/dist/unstable/eventlog/EventLogRemote.d.ts +35 -8
  851. package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
  852. package/dist/unstable/eventlog/EventLogRemote.js +54 -8
  853. package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
  854. package/dist/unstable/eventlog/EventLogServer.d.ts +17 -3
  855. package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
  856. package/dist/unstable/eventlog/EventLogServer.js +17 -3
  857. package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
  858. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +32 -6
  859. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
  860. package/dist/unstable/eventlog/EventLogServerEncrypted.js +52 -6
  861. package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
  862. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +74 -16
  863. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
  864. package/dist/unstable/eventlog/EventLogServerUnencrypted.js +90 -16
  865. package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
  866. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +59 -15
  867. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
  868. package/dist/unstable/eventlog/EventLogSessionAuth.js +73 -14
  869. package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
  870. package/dist/unstable/eventlog/SqlEventJournal.d.ts +10 -2
  871. package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
  872. package/dist/unstable/eventlog/SqlEventJournal.js +28 -2
  873. package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
  874. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts +32 -3
  875. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
  876. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +32 -3
  877. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
  878. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts +10 -2
  879. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
  880. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +28 -2
  881. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
  882. package/dist/unstable/http/Cookies.d.ts +156 -77
  883. package/dist/unstable/http/Cookies.d.ts.map +1 -1
  884. package/dist/unstable/http/Cookies.js +93 -39
  885. package/dist/unstable/http/Cookies.js.map +1 -1
  886. package/dist/unstable/http/Etag.d.ts +40 -7
  887. package/dist/unstable/http/Etag.d.ts.map +1 -1
  888. package/dist/unstable/http/Etag.js +27 -4
  889. package/dist/unstable/http/Etag.js.map +1 -1
  890. package/dist/unstable/http/FetchHttpClient.d.ts +29 -3
  891. package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
  892. package/dist/unstable/http/FetchHttpClient.js +33 -4
  893. package/dist/unstable/http/FetchHttpClient.js.map +1 -1
  894. package/dist/unstable/http/FindMyWay.d.ts +1 -1
  895. package/dist/unstable/http/FindMyWay.js +1 -1
  896. package/dist/unstable/http/Headers.d.ts +182 -36
  897. package/dist/unstable/http/Headers.d.ts.map +1 -1
  898. package/dist/unstable/http/Headers.js +86 -16
  899. package/dist/unstable/http/Headers.js.map +1 -1
  900. package/dist/unstable/http/HttpBody.d.ts +114 -26
  901. package/dist/unstable/http/HttpBody.d.ts.map +1 -1
  902. package/dist/unstable/http/HttpBody.js +100 -22
  903. package/dist/unstable/http/HttpBody.js.map +1 -1
  904. package/dist/unstable/http/HttpClient.d.ts +205 -96
  905. package/dist/unstable/http/HttpClient.d.ts.map +1 -1
  906. package/dist/unstable/http/HttpClient.js +85 -39
  907. package/dist/unstable/http/HttpClient.js.map +1 -1
  908. package/dist/unstable/http/HttpClientError.d.ts +68 -12
  909. package/dist/unstable/http/HttpClientError.d.ts.map +1 -1
  910. package/dist/unstable/http/HttpClientError.js +71 -9
  911. package/dist/unstable/http/HttpClientError.js.map +1 -1
  912. package/dist/unstable/http/HttpClientRequest.d.ts +318 -100
  913. package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
  914. package/dist/unstable/http/HttpClientRequest.js +153 -47
  915. package/dist/unstable/http/HttpClientRequest.js.map +1 -1
  916. package/dist/unstable/http/HttpClientResponse.d.ts +59 -16
  917. package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
  918. package/dist/unstable/http/HttpClientResponse.js +44 -11
  919. package/dist/unstable/http/HttpClientResponse.js.map +1 -1
  920. package/dist/unstable/http/HttpEffect.d.ts +42 -16
  921. package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
  922. package/dist/unstable/http/HttpEffect.js +33 -13
  923. package/dist/unstable/http/HttpEffect.js.map +1 -1
  924. package/dist/unstable/http/HttpIncomingMessage.d.ts +47 -7
  925. package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
  926. package/dist/unstable/http/HttpIncomingMessage.js +44 -6
  927. package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
  928. package/dist/unstable/http/HttpMethod.d.ts +35 -5
  929. package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
  930. package/dist/unstable/http/HttpMethod.js +23 -1
  931. package/dist/unstable/http/HttpMethod.js.map +1 -1
  932. package/dist/unstable/http/HttpMiddleware.d.ts +37 -11
  933. package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
  934. package/dist/unstable/http/HttpMiddleware.js +70 -31
  935. package/dist/unstable/http/HttpMiddleware.js.map +1 -1
  936. package/dist/unstable/http/HttpPlatform.d.ts +34 -3
  937. package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
  938. package/dist/unstable/http/HttpPlatform.js +35 -4
  939. package/dist/unstable/http/HttpPlatform.js.map +1 -1
  940. package/dist/unstable/http/HttpRouter.d.ts +194 -45
  941. package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
  942. package/dist/unstable/http/HttpRouter.js +122 -28
  943. package/dist/unstable/http/HttpRouter.js.map +1 -1
  944. package/dist/unstable/http/HttpServer.d.ts +151 -22
  945. package/dist/unstable/http/HttpServer.d.ts.map +1 -1
  946. package/dist/unstable/http/HttpServer.js +77 -12
  947. package/dist/unstable/http/HttpServer.js.map +1 -1
  948. package/dist/unstable/http/HttpServerError.d.ts +90 -10
  949. package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
  950. package/dist/unstable/http/HttpServerError.js +82 -8
  951. package/dist/unstable/http/HttpServerError.js.map +1 -1
  952. package/dist/unstable/http/HttpServerRequest.d.ts +125 -21
  953. package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
  954. package/dist/unstable/http/HttpServerRequest.js +112 -31
  955. package/dist/unstable/http/HttpServerRequest.js.map +1 -1
  956. package/dist/unstable/http/HttpServerRespondable.d.ts +32 -6
  957. package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
  958. package/dist/unstable/http/HttpServerRespondable.js +43 -5
  959. package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
  960. package/dist/unstable/http/HttpServerResponse.d.ts +390 -67
  961. package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
  962. package/dist/unstable/http/HttpServerResponse.js +209 -38
  963. package/dist/unstable/http/HttpServerResponse.js.map +1 -1
  964. package/dist/unstable/http/HttpStaticServer.d.ts +22 -4
  965. package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
  966. package/dist/unstable/http/HttpStaticServer.js +22 -4
  967. package/dist/unstable/http/HttpStaticServer.js.map +1 -1
  968. package/dist/unstable/http/HttpTraceContext.d.ts +53 -6
  969. package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
  970. package/dist/unstable/http/HttpTraceContext.js +47 -5
  971. package/dist/unstable/http/HttpTraceContext.js.map +1 -1
  972. package/dist/unstable/http/Multipart.d.ts +178 -28
  973. package/dist/unstable/http/Multipart.d.ts.map +1 -1
  974. package/dist/unstable/http/Multipart.js +130 -20
  975. package/dist/unstable/http/Multipart.js.map +1 -1
  976. package/dist/unstable/http/Multipasta/HeadersParser.d.ts +1 -1
  977. package/dist/unstable/http/Multipasta/HeadersParser.js +1 -1
  978. package/dist/unstable/http/Multipasta/Node.d.ts +1 -1
  979. package/dist/unstable/http/Multipasta/Node.js +1 -1
  980. package/dist/unstable/http/Multipasta/Search.d.ts +1 -1
  981. package/dist/unstable/http/Multipasta/Search.js +1 -1
  982. package/dist/unstable/http/Multipasta/Web.d.ts +1 -1
  983. package/dist/unstable/http/Multipasta/Web.js +1 -1
  984. package/dist/unstable/http/Multipasta.d.ts +1 -1
  985. package/dist/unstable/http/Multipasta.js +1 -1
  986. package/dist/unstable/http/Template.d.ts +53 -0
  987. package/dist/unstable/http/Template.d.ts.map +1 -1
  988. package/dist/unstable/http/Template.js +26 -0
  989. package/dist/unstable/http/Template.js.map +1 -1
  990. package/dist/unstable/http/Url.d.ts +56 -42
  991. package/dist/unstable/http/Url.d.ts.map +1 -1
  992. package/dist/unstable/http/Url.js +29 -15
  993. package/dist/unstable/http/Url.js.map +1 -1
  994. package/dist/unstable/http/UrlParams.d.ts +233 -49
  995. package/dist/unstable/http/UrlParams.d.ts.map +1 -1
  996. package/dist/unstable/http/UrlParams.js +116 -23
  997. package/dist/unstable/http/UrlParams.js.map +1 -1
  998. package/dist/unstable/httpapi/HttpApi.d.ts +49 -14
  999. package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
  1000. package/dist/unstable/httpapi/HttpApi.js +14 -8
  1001. package/dist/unstable/httpapi/HttpApi.js.map +1 -1
  1002. package/dist/unstable/httpapi/HttpApiBuilder.d.ts +55 -16
  1003. package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
  1004. package/dist/unstable/httpapi/HttpApiBuilder.js +47 -9
  1005. package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
  1006. package/dist/unstable/httpapi/HttpApiClient.d.ts +58 -15
  1007. package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
  1008. package/dist/unstable/httpapi/HttpApiClient.js +43 -7
  1009. package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
  1010. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +214 -59
  1011. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
  1012. package/dist/unstable/httpapi/HttpApiEndpoint.js +53 -9
  1013. package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
  1014. package/dist/unstable/httpapi/HttpApiError.d.ts +81 -1
  1015. package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
  1016. package/dist/unstable/httpapi/HttpApiError.js +98 -1
  1017. package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
  1018. package/dist/unstable/httpapi/HttpApiGroup.d.ts +87 -20
  1019. package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
  1020. package/dist/unstable/httpapi/HttpApiGroup.js +5 -2
  1021. package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
  1022. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +113 -22
  1023. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
  1024. package/dist/unstable/httpapi/HttpApiMiddleware.js +49 -6
  1025. package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
  1026. package/dist/unstable/httpapi/HttpApiScalar.d.ts +19 -4
  1027. package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
  1028. package/dist/unstable/httpapi/HttpApiScalar.js +32 -2
  1029. package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
  1030. package/dist/unstable/httpapi/HttpApiSchema.d.ts +67 -30
  1031. package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
  1032. package/dist/unstable/httpapi/HttpApiSchema.js +48 -27
  1033. package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
  1034. package/dist/unstable/httpapi/HttpApiSecurity.d.ts +74 -17
  1035. package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
  1036. package/dist/unstable/httpapi/HttpApiSecurity.js +38 -5
  1037. package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
  1038. package/dist/unstable/httpapi/HttpApiSwagger.d.ts +5 -2
  1039. package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
  1040. package/dist/unstable/httpapi/HttpApiSwagger.js +24 -2
  1041. package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
  1042. package/dist/unstable/httpapi/HttpApiTest.d.ts +9 -2
  1043. package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
  1044. package/dist/unstable/httpapi/HttpApiTest.js +28 -3
  1045. package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
  1046. package/dist/unstable/httpapi/OpenApi.d.ts +86 -15
  1047. package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
  1048. package/dist/unstable/httpapi/OpenApi.js +73 -15
  1049. package/dist/unstable/httpapi/OpenApi.js.map +1 -1
  1050. package/dist/unstable/observability/Otlp.d.ts +33 -3
  1051. package/dist/unstable/observability/Otlp.d.ts.map +1 -1
  1052. package/dist/unstable/observability/Otlp.js +14 -3
  1053. package/dist/unstable/observability/Otlp.js.map +1 -1
  1054. package/dist/unstable/observability/OtlpExporter.d.ts +8 -1
  1055. package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
  1056. package/dist/unstable/observability/OtlpExporter.js +32 -1
  1057. package/dist/unstable/observability/OtlpExporter.js.map +1 -1
  1058. package/dist/unstable/observability/OtlpLogger.d.ts +14 -2
  1059. package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
  1060. package/dist/unstable/observability/OtlpLogger.js +29 -2
  1061. package/dist/unstable/observability/OtlpLogger.js.map +1 -1
  1062. package/dist/unstable/observability/OtlpMetrics.d.ts +15 -4
  1063. package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
  1064. package/dist/unstable/observability/OtlpMetrics.js +32 -2
  1065. package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
  1066. package/dist/unstable/observability/OtlpResource.d.ts +49 -12
  1067. package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
  1068. package/dist/unstable/observability/OtlpResource.js +47 -5
  1069. package/dist/unstable/observability/OtlpResource.js.map +1 -1
  1070. package/dist/unstable/observability/OtlpSerialization.d.ts +28 -3
  1071. package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
  1072. package/dist/unstable/observability/OtlpSerialization.js +28 -3
  1073. package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
  1074. package/dist/unstable/observability/OtlpTracer.d.ts +16 -2
  1075. package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
  1076. package/dist/unstable/observability/OtlpTracer.js +32 -2
  1077. package/dist/unstable/observability/OtlpTracer.js.map +1 -1
  1078. package/dist/unstable/observability/PrometheusMetrics.d.ts +32 -12
  1079. package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
  1080. package/dist/unstable/observability/PrometheusMetrics.js +7 -5
  1081. package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
  1082. package/dist/unstable/observability/index.d.ts +2 -1
  1083. package/dist/unstable/observability/index.d.ts.map +1 -1
  1084. package/dist/unstable/observability/index.js +2 -1
  1085. package/dist/unstable/observability/index.js.map +1 -1
  1086. package/dist/unstable/persistence/KeyValueStore.d.ts +93 -18
  1087. package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
  1088. package/dist/unstable/persistence/KeyValueStore.js +81 -21
  1089. package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
  1090. package/dist/unstable/persistence/Persistable.d.ts +76 -15
  1091. package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
  1092. package/dist/unstable/persistence/Persistable.js +22 -5
  1093. package/dist/unstable/persistence/Persistable.js.map +1 -1
  1094. package/dist/unstable/persistence/PersistedCache.d.ts +27 -2
  1095. package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
  1096. package/dist/unstable/persistence/PersistedCache.js +24 -1
  1097. package/dist/unstable/persistence/PersistedCache.js.map +1 -1
  1098. package/dist/unstable/persistence/PersistedQueue.d.ts +73 -16
  1099. package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
  1100. package/dist/unstable/persistence/PersistedQueue.js +60 -13
  1101. package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
  1102. package/dist/unstable/persistence/Persistence.d.ts +97 -16
  1103. package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
  1104. package/dist/unstable/persistence/Persistence.js +90 -14
  1105. package/dist/unstable/persistence/Persistence.js.map +1 -1
  1106. package/dist/unstable/persistence/RateLimiter.d.ts +97 -21
  1107. package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
  1108. package/dist/unstable/persistence/RateLimiter.js +82 -17
  1109. package/dist/unstable/persistence/RateLimiter.js.map +1 -1
  1110. package/dist/unstable/persistence/Redis.d.ts +26 -5
  1111. package/dist/unstable/persistence/Redis.d.ts.map +1 -1
  1112. package/dist/unstable/persistence/Redis.js +36 -4
  1113. package/dist/unstable/persistence/Redis.js.map +1 -1
  1114. package/dist/unstable/process/ChildProcess.d.ts +89 -109
  1115. package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
  1116. package/dist/unstable/process/ChildProcess.js +74 -23
  1117. package/dist/unstable/process/ChildProcess.js.map +1 -1
  1118. package/dist/unstable/process/ChildProcessSpawner.d.ts +22 -11
  1119. package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
  1120. package/dist/unstable/process/ChildProcessSpawner.js +11 -6
  1121. package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
  1122. package/dist/unstable/process/index.d.ts +2 -1
  1123. package/dist/unstable/process/index.d.ts.map +1 -1
  1124. package/dist/unstable/process/index.js +2 -1
  1125. package/dist/unstable/process/index.js.map +1 -1
  1126. package/dist/unstable/reactivity/AsyncResult.d.ts +196 -59
  1127. package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
  1128. package/dist/unstable/reactivity/AsyncResult.js +121 -36
  1129. package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
  1130. package/dist/unstable/reactivity/Atom.d.ts +539 -130
  1131. package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
  1132. package/dist/unstable/reactivity/Atom.js +256 -62
  1133. package/dist/unstable/reactivity/Atom.js.map +1 -1
  1134. package/dist/unstable/reactivity/AtomHttpApi.d.ts +41 -2
  1135. package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
  1136. package/dist/unstable/reactivity/AtomHttpApi.js +35 -1
  1137. package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
  1138. package/dist/unstable/reactivity/AtomRef.d.ts +51 -7
  1139. package/dist/unstable/reactivity/AtomRef.d.ts.map +1 -1
  1140. package/dist/unstable/reactivity/AtomRef.js +29 -3
  1141. package/dist/unstable/reactivity/AtomRef.js.map +1 -1
  1142. package/dist/unstable/reactivity/AtomRegistry.d.ts +135 -21
  1143. package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
  1144. package/dist/unstable/reactivity/AtomRegistry.js +69 -10
  1145. package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
  1146. package/dist/unstable/reactivity/AtomRpc.d.ts +36 -2
  1147. package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
  1148. package/dist/unstable/reactivity/AtomRpc.js +29 -1
  1149. package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
  1150. package/dist/unstable/reactivity/Hydration.d.ts +28 -5
  1151. package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
  1152. package/dist/unstable/reactivity/Hydration.js +35 -3
  1153. package/dist/unstable/reactivity/Hydration.js.map +1 -1
  1154. package/dist/unstable/reactivity/Reactivity.d.ts +95 -13
  1155. package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
  1156. package/dist/unstable/reactivity/Reactivity.js +61 -7
  1157. package/dist/unstable/reactivity/Reactivity.js.map +1 -1
  1158. package/dist/unstable/rpc/Rpc.d.ts +255 -56
  1159. package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
  1160. package/dist/unstable/rpc/Rpc.js +44 -11
  1161. package/dist/unstable/rpc/Rpc.js.map +1 -1
  1162. package/dist/unstable/rpc/RpcClient.d.ts +81 -19
  1163. package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
  1164. package/dist/unstable/rpc/RpcClient.js +53 -13
  1165. package/dist/unstable/rpc/RpcClient.js.map +1 -1
  1166. package/dist/unstable/rpc/RpcClientError.d.ts +26 -2
  1167. package/dist/unstable/rpc/RpcClientError.d.ts.map +1 -1
  1168. package/dist/unstable/rpc/RpcClientError.js +26 -2
  1169. package/dist/unstable/rpc/RpcClientError.js.map +1 -1
  1170. package/dist/unstable/rpc/RpcGroup.d.ts +51 -8
  1171. package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
  1172. package/dist/unstable/rpc/RpcGroup.js +3 -1
  1173. package/dist/unstable/rpc/RpcGroup.js.map +1 -1
  1174. package/dist/unstable/rpc/RpcMessage.d.ts +128 -32
  1175. package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
  1176. package/dist/unstable/rpc/RpcMessage.js +23 -7
  1177. package/dist/unstable/rpc/RpcMessage.js.map +1 -1
  1178. package/dist/unstable/rpc/RpcMiddleware.d.ts +100 -20
  1179. package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
  1180. package/dist/unstable/rpc/RpcMiddleware.js +39 -3
  1181. package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
  1182. package/dist/unstable/rpc/RpcSchema.d.ts +38 -4
  1183. package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
  1184. package/dist/unstable/rpc/RpcSchema.js +34 -3
  1185. package/dist/unstable/rpc/RpcSchema.js.map +1 -1
  1186. package/dist/unstable/rpc/RpcSerialization.d.ts +60 -13
  1187. package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
  1188. package/dist/unstable/rpc/RpcSerialization.js +56 -12
  1189. package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
  1190. package/dist/unstable/rpc/RpcServer.d.ts +73 -23
  1191. package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
  1192. package/dist/unstable/rpc/RpcServer.js +70 -23
  1193. package/dist/unstable/rpc/RpcServer.js.map +1 -1
  1194. package/dist/unstable/rpc/RpcTest.d.ts +20 -1
  1195. package/dist/unstable/rpc/RpcTest.d.ts.map +1 -1
  1196. package/dist/unstable/rpc/RpcTest.js +20 -1
  1197. package/dist/unstable/rpc/RpcTest.js.map +1 -1
  1198. package/dist/unstable/rpc/RpcWorker.d.ts +40 -6
  1199. package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
  1200. package/dist/unstable/rpc/RpcWorker.js +17 -5
  1201. package/dist/unstable/rpc/RpcWorker.js.map +1 -1
  1202. package/dist/unstable/rpc/Utils.d.ts +8 -0
  1203. package/dist/unstable/rpc/Utils.d.ts.map +1 -1
  1204. package/dist/unstable/rpc/Utils.js +8 -0
  1205. package/dist/unstable/rpc/Utils.js.map +1 -1
  1206. package/dist/unstable/schema/Model.d.ts +130 -52
  1207. package/dist/unstable/schema/Model.d.ts.map +1 -1
  1208. package/dist/unstable/schema/Model.js +79 -34
  1209. package/dist/unstable/schema/Model.js.map +1 -1
  1210. package/dist/unstable/schema/VariantSchema.d.ts +104 -24
  1211. package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
  1212. package/dist/unstable/schema/VariantSchema.js +22 -6
  1213. package/dist/unstable/schema/VariantSchema.js.map +1 -1
  1214. package/dist/unstable/socket/Socket.d.ts +167 -34
  1215. package/dist/unstable/socket/Socket.d.ts.map +1 -1
  1216. package/dist/unstable/socket/Socket.js +124 -29
  1217. package/dist/unstable/socket/Socket.js.map +1 -1
  1218. package/dist/unstable/socket/SocketServer.d.ts +58 -10
  1219. package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
  1220. package/dist/unstable/socket/SocketServer.js +43 -5
  1221. package/dist/unstable/socket/SocketServer.js.map +1 -1
  1222. package/dist/unstable/sql/Migrator.d.ts +35 -4
  1223. package/dist/unstable/sql/Migrator.d.ts.map +1 -1
  1224. package/dist/unstable/sql/Migrator.js +45 -5
  1225. package/dist/unstable/sql/Migrator.js.map +1 -1
  1226. package/dist/unstable/sql/SqlClient.d.ts +34 -2
  1227. package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
  1228. package/dist/unstable/sql/SqlClient.js +38 -1
  1229. package/dist/unstable/sql/SqlClient.js.map +1 -1
  1230. package/dist/unstable/sql/SqlConnection.d.ts +31 -0
  1231. package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
  1232. package/dist/unstable/sql/SqlConnection.js +22 -0
  1233. package/dist/unstable/sql/SqlConnection.js.map +1 -1
  1234. package/dist/unstable/sql/SqlError.d.ts +99 -0
  1235. package/dist/unstable/sql/SqlError.d.ts.map +1 -1
  1236. package/dist/unstable/sql/SqlError.js +114 -0
  1237. package/dist/unstable/sql/SqlError.js.map +1 -1
  1238. package/dist/unstable/sql/SqlModel.d.ts +26 -5
  1239. package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
  1240. package/dist/unstable/sql/SqlModel.js +8 -4
  1241. package/dist/unstable/sql/SqlModel.js.map +1 -1
  1242. package/dist/unstable/sql/SqlResolver.d.ts +56 -13
  1243. package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
  1244. package/dist/unstable/sql/SqlResolver.js +44 -10
  1245. package/dist/unstable/sql/SqlResolver.js.map +1 -1
  1246. package/dist/unstable/sql/SqlSchema.d.ts +29 -8
  1247. package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
  1248. package/dist/unstable/sql/SqlSchema.js +29 -8
  1249. package/dist/unstable/sql/SqlSchema.js.map +1 -1
  1250. package/dist/unstable/sql/SqlStream.d.ts +3 -0
  1251. package/dist/unstable/sql/SqlStream.d.ts.map +1 -1
  1252. package/dist/unstable/sql/SqlStream.js +23 -0
  1253. package/dist/unstable/sql/SqlStream.js.map +1 -1
  1254. package/dist/unstable/sql/Statement.d.ts +124 -0
  1255. package/dist/unstable/sql/Statement.d.ts.map +1 -1
  1256. package/dist/unstable/sql/Statement.js +82 -0
  1257. package/dist/unstable/sql/Statement.js.map +1 -1
  1258. package/dist/unstable/sql/index.d.ts +1 -1
  1259. package/dist/unstable/sql/index.js +1 -1
  1260. package/dist/unstable/workers/Transferable.d.ts +65 -13
  1261. package/dist/unstable/workers/Transferable.d.ts.map +1 -1
  1262. package/dist/unstable/workers/Transferable.js +53 -10
  1263. package/dist/unstable/workers/Transferable.js.map +1 -1
  1264. package/dist/unstable/workers/Worker.d.ts +60 -8
  1265. package/dist/unstable/workers/Worker.d.ts.map +1 -1
  1266. package/dist/unstable/workers/Worker.js +43 -4
  1267. package/dist/unstable/workers/Worker.js.map +1 -1
  1268. package/dist/unstable/workers/WorkerError.d.ts +31 -9
  1269. package/dist/unstable/workers/WorkerError.d.ts.map +1 -1
  1270. package/dist/unstable/workers/WorkerError.js +44 -7
  1271. package/dist/unstable/workers/WorkerError.js.map +1 -1
  1272. package/dist/unstable/workers/WorkerRunner.d.ts +32 -3
  1273. package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
  1274. package/dist/unstable/workers/WorkerRunner.js +24 -1
  1275. package/dist/unstable/workers/WorkerRunner.js.map +1 -1
  1276. package/dist/unstable/workers/index.d.ts +1 -1
  1277. package/dist/unstable/workers/index.js +1 -1
  1278. package/dist/unstable/workflow/Activity.d.ts +61 -10
  1279. package/dist/unstable/workflow/Activity.d.ts.map +1 -1
  1280. package/dist/unstable/workflow/Activity.js +21 -6
  1281. package/dist/unstable/workflow/Activity.js.map +1 -1
  1282. package/dist/unstable/workflow/DurableClock.d.ts +12 -3
  1283. package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
  1284. package/dist/unstable/workflow/DurableClock.js +22 -2
  1285. package/dist/unstable/workflow/DurableClock.js.map +1 -1
  1286. package/dist/unstable/workflow/DurableDeferred.d.ts +126 -31
  1287. package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
  1288. package/dist/unstable/workflow/DurableDeferred.js +76 -13
  1289. package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
  1290. package/dist/unstable/workflow/DurableQueue.d.ts +145 -0
  1291. package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -0
  1292. package/dist/unstable/workflow/DurableQueue.js +200 -0
  1293. package/dist/unstable/workflow/DurableQueue.js.map +1 -0
  1294. package/dist/unstable/workflow/Workflow.d.ts +100 -31
  1295. package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
  1296. package/dist/unstable/workflow/Workflow.js +76 -20
  1297. package/dist/unstable/workflow/Workflow.js.map +1 -1
  1298. package/dist/unstable/workflow/WorkflowEngine.d.ts +40 -5
  1299. package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
  1300. package/dist/unstable/workflow/WorkflowEngine.js +16 -4
  1301. package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
  1302. package/dist/unstable/workflow/WorkflowProxy.d.ts +32 -2
  1303. package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
  1304. package/dist/unstable/workflow/WorkflowProxy.js +2 -2
  1305. package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
  1306. package/dist/unstable/workflow/WorkflowProxyServer.d.ts +36 -2
  1307. package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
  1308. package/dist/unstable/workflow/WorkflowProxyServer.js +12 -6
  1309. package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
  1310. package/dist/unstable/workflow/index.d.ts +4 -0
  1311. package/dist/unstable/workflow/index.d.ts.map +1 -1
  1312. package/dist/unstable/workflow/index.js +4 -0
  1313. package/dist/unstable/workflow/index.js.map +1 -1
  1314. package/package.json +11 -11
  1315. package/src/Array.ts +113 -67
  1316. package/src/BigDecimal.ts +404 -337
  1317. package/src/BigInt.ts +167 -97
  1318. package/src/Boolean.ts +62 -31
  1319. package/src/Brand.ts +20 -1
  1320. package/src/Cache.ts +331 -164
  1321. package/src/Cause.ts +77 -65
  1322. package/src/Channel.ts +1585 -607
  1323. package/src/ChannelSchema.ts +137 -12
  1324. package/src/Chunk.ts +549 -380
  1325. package/src/Clock.ts +15 -8
  1326. package/src/Combiner.ts +2 -4
  1327. package/src/Config.ts +12 -10
  1328. package/src/ConfigProvider.ts +1 -1
  1329. package/src/Console.ts +88 -58
  1330. package/src/Context.ts +397 -149
  1331. package/src/Cron.ts +111 -48
  1332. package/src/Data.ts +3 -2
  1333. package/src/DateTime.ts +876 -445
  1334. package/src/Deferred.ts +367 -174
  1335. package/src/Differ.ts +42 -0
  1336. package/src/Duration.ts +329 -185
  1337. package/src/Effect.ts +2474 -2395
  1338. package/src/Effectable.ts +39 -4
  1339. package/src/Encoding.ts +78 -28
  1340. package/src/Equivalence.ts +14 -19
  1341. package/src/ErrorReporter.ts +66 -82
  1342. package/src/ExecutionPlan.ts +97 -13
  1343. package/src/Exit.ts +7 -5
  1344. package/src/Fiber.ts +72 -40
  1345. package/src/FiberHandle.ts +158 -58
  1346. package/src/FiberMap.ts +329 -164
  1347. package/src/FiberSet.ts +130 -52
  1348. package/src/FileSystem.ts +106 -74
  1349. package/src/Filter.ts +166 -88
  1350. package/src/Function.ts +154 -86
  1351. package/src/Graph.ts +682 -365
  1352. package/src/HKT.ts +29 -13
  1353. package/src/Hash.ts +31 -18
  1354. package/src/HashMap.ts +444 -256
  1355. package/src/HashRing.ts +94 -17
  1356. package/src/HashSet.ts +194 -104
  1357. package/src/Inspectable.ts +22 -10
  1358. package/src/Iterable.ts +309 -149
  1359. package/src/JsonPatch.ts +4 -3
  1360. package/src/Latch.ts +98 -15
  1361. package/src/Layer.ts +488 -345
  1362. package/src/LayerMap.ts +98 -25
  1363. package/src/LogLevel.ts +92 -131
  1364. package/src/Logger.ts +357 -288
  1365. package/src/ManagedRuntime.ts +75 -17
  1366. package/src/Match.ts +133 -157
  1367. package/src/Metric.ts +355 -304
  1368. package/src/MutableHashMap.ts +161 -84
  1369. package/src/MutableHashSet.ts +122 -52
  1370. package/src/MutableList.ts +141 -81
  1371. package/src/MutableRef.ts +130 -90
  1372. package/src/Newtype.ts +3 -0
  1373. package/src/NonEmptyIterable.ts +36 -39
  1374. package/src/Number.ts +116 -64
  1375. package/src/Optic.ts +1 -2
  1376. package/src/Option.ts +41 -53
  1377. package/src/Ordering.ts +43 -28
  1378. package/src/PartitionedSemaphore.ts +225 -40
  1379. package/src/Path.ts +77 -13
  1380. package/src/Pipeable.ts +76 -21
  1381. package/src/PlatformError.ts +74 -6
  1382. package/src/Pool.ts +94 -31
  1383. package/src/Predicate.ts +16 -21
  1384. package/src/PrimaryKey.ts +9 -2
  1385. package/src/PubSub.ts +364 -262
  1386. package/src/Pull.ts +94 -25
  1387. package/src/Queue.ts +284 -150
  1388. package/src/Random.ts +54 -35
  1389. package/src/RcMap.ts +151 -141
  1390. package/src/RcRef.ts +69 -32
  1391. package/src/Record.ts +273 -129
  1392. package/src/Redactable.ts +3 -3
  1393. package/src/Redacted.ts +63 -33
  1394. package/src/Ref.ts +161 -104
  1395. package/src/References.ts +73 -31
  1396. package/src/RegExp.ts +11 -5
  1397. package/src/Request.ts +158 -34
  1398. package/src/RequestResolver.ts +277 -119
  1399. package/src/Resource.ts +45 -7
  1400. package/src/Result.ts +31 -18
  1401. package/src/Runtime.ts +45 -19
  1402. package/src/Schedule.ts +575 -600
  1403. package/src/Scheduler.ts +43 -6
  1404. package/src/Schema.ts +845 -319
  1405. package/src/SchemaAST.ts +25 -16
  1406. package/src/SchemaGetter.ts +32 -17
  1407. package/src/SchemaIssue.ts +1 -8
  1408. package/src/SchemaParser.ts +262 -38
  1409. package/src/SchemaTransformation.ts +61 -41
  1410. package/src/SchemaUtils.ts +23 -0
  1411. package/src/Scope.ts +102 -43
  1412. package/src/ScopedCache.ts +192 -56
  1413. package/src/ScopedRef.ts +28 -8
  1414. package/src/Semaphore.ts +64 -28
  1415. package/src/Sink.ts +458 -200
  1416. package/src/Stdio.ts +43 -6
  1417. package/src/Stream.ts +2043 -1256
  1418. package/src/String.ts +171 -95
  1419. package/src/SubscriptionRef.ts +308 -203
  1420. package/src/Symbol.ts +13 -5
  1421. package/src/SynchronizedRef.ts +278 -62
  1422. package/src/Take.ts +26 -2
  1423. package/src/Terminal.ts +40 -7
  1424. package/src/Tracer.ts +229 -55
  1425. package/src/Trie.ts +213 -142
  1426. package/src/TxChunk.ts +182 -146
  1427. package/src/TxDeferred.ts +43 -29
  1428. package/src/TxHashMap.ts +370 -230
  1429. package/src/TxHashSet.ts +250 -152
  1430. package/src/TxPriorityQueue.ts +96 -64
  1431. package/src/TxPubSub.ts +77 -49
  1432. package/src/TxQueue.ts +279 -241
  1433. package/src/TxReentrantLock.ts +70 -47
  1434. package/src/TxRef.ts +70 -41
  1435. package/src/TxSemaphore.ts +101 -54
  1436. package/src/TxSubscriptionRef.ts +72 -48
  1437. package/src/Types.ts +34 -34
  1438. package/src/UndefinedOr.ts +48 -25
  1439. package/src/Unify.ts +71 -116
  1440. package/src/Utils.ts +4 -0
  1441. package/src/index.ts +81 -32
  1442. package/src/internal/concurrency.ts +2 -2
  1443. package/src/internal/core.ts +12 -23
  1444. package/src/internal/effect.ts +25 -29
  1445. package/src/internal/executionPlan.ts +2 -2
  1446. package/src/internal/option.ts +5 -8
  1447. package/src/internal/result.ts +5 -8
  1448. package/src/internal/schema/schema.ts +1 -1
  1449. package/src/testing/FastCheck.ts +6 -3
  1450. package/src/testing/TestClock.ts +63 -34
  1451. package/src/testing/TestConsole.ts +49 -30
  1452. package/src/testing/TestSchema.ts +8 -8
  1453. package/src/unstable/ai/AiError.ts +187 -120
  1454. package/src/unstable/ai/AnthropicStructuredOutput.ts +2 -2
  1455. package/src/unstable/ai/Chat.ts +69 -43
  1456. package/src/unstable/ai/EmbeddingModel.ts +12 -11
  1457. package/src/unstable/ai/IdGenerator.ts +28 -18
  1458. package/src/unstable/ai/LanguageModel.ts +47 -46
  1459. package/src/unstable/ai/McpSchema.ts +339 -119
  1460. package/src/unstable/ai/McpServer.ts +78 -21
  1461. package/src/unstable/ai/Model.ts +23 -18
  1462. package/src/unstable/ai/OpenAiStructuredOutput.ts +2 -2
  1463. package/src/unstable/ai/Prompt.ts +210 -184
  1464. package/src/unstable/ai/Response.ts +159 -147
  1465. package/src/unstable/ai/ResponseIdTracker.ts +43 -4
  1466. package/src/unstable/ai/Telemetry.ts +42 -32
  1467. package/src/unstable/ai/Tokenizer.ts +13 -8
  1468. package/src/unstable/ai/Tool.ts +154 -85
  1469. package/src/unstable/ai/Toolkit.ts +81 -84
  1470. package/src/unstable/ai/index.ts +42 -24
  1471. package/src/unstable/cli/Argument.ts +226 -134
  1472. package/src/unstable/cli/CliError.ts +96 -26
  1473. package/src/unstable/cli/CliOutput.ts +43 -13
  1474. package/src/unstable/cli/Command.ts +225 -125
  1475. package/src/unstable/cli/Completions.ts +7 -7
  1476. package/src/unstable/cli/Flag.ts +235 -142
  1477. package/src/unstable/cli/GlobalFlag.ts +42 -14
  1478. package/src/unstable/cli/HelpDoc.ts +35 -10
  1479. package/src/unstable/cli/Param.ts +328 -190
  1480. package/src/unstable/cli/Primitive.ts +79 -42
  1481. package/src/unstable/cli/Prompt.ts +210 -58
  1482. package/src/unstable/cli/internal/ansi.ts +13 -0
  1483. package/src/unstable/cli/internal/command.ts +17 -15
  1484. package/src/unstable/cli/internal/config.ts +3 -0
  1485. package/src/unstable/cli/internal/lexer.ts +11 -0
  1486. package/src/unstable/cluster/ClusterCron.ts +35 -1
  1487. package/src/unstable/cluster/ClusterError.ts +56 -7
  1488. package/src/unstable/cluster/ClusterMetrics.ts +39 -5
  1489. package/src/unstable/cluster/ClusterSchema.ts +61 -8
  1490. package/src/unstable/cluster/ClusterWorkflowEngine.ts +36 -3
  1491. package/src/unstable/cluster/DeliverAt.ts +39 -4
  1492. package/src/unstable/cluster/Entity.ts +110 -19
  1493. package/src/unstable/cluster/EntityAddress.ts +30 -2
  1494. package/src/unstable/cluster/EntityId.ts +18 -3
  1495. package/src/unstable/cluster/EntityProxy.ts +34 -2
  1496. package/src/unstable/cluster/EntityProxyServer.ts +44 -8
  1497. package/src/unstable/cluster/EntityResource.ts +43 -6
  1498. package/src/unstable/cluster/EntityType.ts +27 -3
  1499. package/src/unstable/cluster/Envelope.ts +128 -23
  1500. package/src/unstable/cluster/HttpRunner.ts +88 -13
  1501. package/src/unstable/cluster/K8sHttpClient.ts +49 -6
  1502. package/src/unstable/cluster/MachineId.ts +24 -3
  1503. package/src/unstable/cluster/Message.ts +102 -13
  1504. package/src/unstable/cluster/MessageStorage.ts +128 -22
  1505. package/src/unstable/cluster/Reply.ts +101 -12
  1506. package/src/unstable/cluster/Runner.ts +47 -17
  1507. package/src/unstable/cluster/RunnerAddress.ts +34 -2
  1508. package/src/unstable/cluster/RunnerHealth.ts +40 -12
  1509. package/src/unstable/cluster/RunnerServer.ts +31 -4
  1510. package/src/unstable/cluster/RunnerStorage.ts +42 -5
  1511. package/src/unstable/cluster/Runners.ts +73 -10
  1512. package/src/unstable/cluster/ShardId.ts +51 -5
  1513. package/src/unstable/cluster/Sharding.ts +35 -4
  1514. package/src/unstable/cluster/ShardingConfig.ts +76 -11
  1515. package/src/unstable/cluster/ShardingRegistrationEvent.ts +31 -7
  1516. package/src/unstable/cluster/SingleRunner.ts +23 -1
  1517. package/src/unstable/cluster/Singleton.ts +15 -1
  1518. package/src/unstable/cluster/SingletonAddress.ts +21 -1
  1519. package/src/unstable/cluster/Snowflake.ts +89 -19
  1520. package/src/unstable/cluster/SocketRunner.ts +29 -2
  1521. package/src/unstable/cluster/SqlMessageStorage.ts +27 -3
  1522. package/src/unstable/cluster/SqlRunnerStorage.ts +46 -7
  1523. package/src/unstable/cluster/TestRunner.ts +18 -1
  1524. package/src/unstable/cluster/internal/hash.ts +12 -0
  1525. package/src/unstable/devtools/DevTools.ts +26 -3
  1526. package/src/unstable/devtools/DevToolsClient.ts +32 -5
  1527. package/src/unstable/devtools/DevToolsSchema.ts +201 -44
  1528. package/src/unstable/devtools/DevToolsServer.ts +27 -2
  1529. package/src/unstable/encoding/Msgpack.ts +97 -12
  1530. package/src/unstable/encoding/Ndjson.ts +149 -21
  1531. package/src/unstable/encoding/Sse.ts +109 -18
  1532. package/src/unstable/eventlog/Event.ts +131 -30
  1533. package/src/unstable/eventlog/EventGroup.ts +50 -17
  1534. package/src/unstable/eventlog/EventJournal.ts +120 -20
  1535. package/src/unstable/eventlog/EventLog.ts +151 -31
  1536. package/src/unstable/eventlog/EventLogEncryption.ts +42 -6
  1537. package/src/unstable/eventlog/EventLogMessage.ts +92 -18
  1538. package/src/unstable/eventlog/EventLogRemote.ts +54 -8
  1539. package/src/unstable/eventlog/EventLogServer.ts +33 -3
  1540. package/src/unstable/eventlog/EventLogServerEncrypted.ts +52 -6
  1541. package/src/unstable/eventlog/EventLogServerUnencrypted.ts +90 -16
  1542. package/src/unstable/eventlog/EventLogSessionAuth.ts +77 -15
  1543. package/src/unstable/eventlog/SqlEventJournal.ts +28 -2
  1544. package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +32 -3
  1545. package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +28 -2
  1546. package/src/unstable/http/Cookies.ts +156 -77
  1547. package/src/unstable/http/Etag.ts +40 -7
  1548. package/src/unstable/http/FetchHttpClient.ts +33 -4
  1549. package/src/unstable/http/FindMyWay.ts +1 -1
  1550. package/src/unstable/http/Headers.ts +252 -50
  1551. package/src/unstable/http/HttpBody.ts +130 -28
  1552. package/src/unstable/http/HttpClient.ts +206 -97
  1553. package/src/unstable/http/HttpClientError.ts +80 -12
  1554. package/src/unstable/http/HttpClientRequest.ts +320 -102
  1555. package/src/unstable/http/HttpClientResponse.ts +59 -16
  1556. package/src/unstable/http/HttpEffect.ts +66 -18
  1557. package/src/unstable/http/HttpIncomingMessage.ts +47 -7
  1558. package/src/unstable/http/HttpMethod.ts +35 -5
  1559. package/src/unstable/http/HttpMiddleware.ts +63 -16
  1560. package/src/unstable/http/HttpPlatform.ts +35 -4
  1561. package/src/unstable/http/HttpRouter.ts +221 -57
  1562. package/src/unstable/http/HttpServer.ts +152 -23
  1563. package/src/unstable/http/HttpServerError.ts +90 -10
  1564. package/src/unstable/http/HttpServerRequest.ts +136 -32
  1565. package/src/unstable/http/HttpServerRespondable.ts +49 -6
  1566. package/src/unstable/http/HttpServerResponse.ts +395 -72
  1567. package/src/unstable/http/HttpStaticServer.ts +22 -4
  1568. package/src/unstable/http/HttpTraceContext.ts +53 -6
  1569. package/src/unstable/http/Multipart.ts +179 -29
  1570. package/src/unstable/http/Multipasta/HeadersParser.ts +1 -1
  1571. package/src/unstable/http/Multipasta/Node.ts +1 -1
  1572. package/src/unstable/http/Multipasta/Search.ts +1 -1
  1573. package/src/unstable/http/Multipasta/Web.ts +1 -1
  1574. package/src/unstable/http/Multipasta.ts +1 -1
  1575. package/src/unstable/http/Template.ts +53 -0
  1576. package/src/unstable/http/Url.ts +56 -42
  1577. package/src/unstable/http/UrlParams.ts +233 -49
  1578. package/src/unstable/httpapi/HttpApi.ts +49 -14
  1579. package/src/unstable/httpapi/HttpApiBuilder.ts +86 -20
  1580. package/src/unstable/httpapi/HttpApiClient.ts +80 -16
  1581. package/src/unstable/httpapi/HttpApiEndpoint.ts +238 -59
  1582. package/src/unstable/httpapi/HttpApiError.ts +100 -1
  1583. package/src/unstable/httpapi/HttpApiGroup.ts +87 -20
  1584. package/src/unstable/httpapi/HttpApiMiddleware.ts +113 -23
  1585. package/src/unstable/httpapi/HttpApiScalar.ts +38 -4
  1586. package/src/unstable/httpapi/HttpApiSchema.ts +67 -30
  1587. package/src/unstable/httpapi/HttpApiSecurity.ts +74 -17
  1588. package/src/unstable/httpapi/HttpApiSwagger.ts +24 -2
  1589. package/src/unstable/httpapi/HttpApiTest.ts +31 -3
  1590. package/src/unstable/httpapi/OpenApi.ts +115 -15
  1591. package/src/unstable/observability/Otlp.ts +33 -3
  1592. package/src/unstable/observability/OtlpExporter.ts +32 -1
  1593. package/src/unstable/observability/OtlpLogger.ts +31 -2
  1594. package/src/unstable/observability/OtlpMetrics.ts +37 -4
  1595. package/src/unstable/observability/OtlpResource.ts +68 -12
  1596. package/src/unstable/observability/OtlpSerialization.ts +28 -3
  1597. package/src/unstable/observability/OtlpTracer.ts +38 -2
  1598. package/src/unstable/observability/PrometheusMetrics.ts +32 -12
  1599. package/src/unstable/observability/index.ts +2 -1
  1600. package/src/unstable/persistence/KeyValueStore.ts +108 -28
  1601. package/src/unstable/persistence/Persistable.ts +76 -15
  1602. package/src/unstable/persistence/PersistedCache.ts +27 -2
  1603. package/src/unstable/persistence/PersistedQueue.ts +98 -16
  1604. package/src/unstable/persistence/Persistence.ts +97 -16
  1605. package/src/unstable/persistence/RateLimiter.ts +98 -22
  1606. package/src/unstable/persistence/Redis.ts +42 -5
  1607. package/src/unstable/process/ChildProcess.ts +100 -79
  1608. package/src/unstable/process/ChildProcessSpawner.ts +22 -11
  1609. package/src/unstable/process/index.ts +2 -1
  1610. package/src/unstable/reactivity/AsyncResult.ts +202 -61
  1611. package/src/unstable/reactivity/Atom.ts +597 -143
  1612. package/src/unstable/reactivity/AtomHttpApi.ts +41 -2
  1613. package/src/unstable/reactivity/AtomRef.ts +51 -7
  1614. package/src/unstable/reactivity/AtomRegistry.ts +141 -22
  1615. package/src/unstable/reactivity/AtomRpc.ts +36 -2
  1616. package/src/unstable/reactivity/Hydration.ts +45 -5
  1617. package/src/unstable/reactivity/Reactivity.ts +95 -13
  1618. package/src/unstable/rpc/Rpc.ts +255 -56
  1619. package/src/unstable/rpc/RpcClient.ts +108 -20
  1620. package/src/unstable/rpc/RpcClientError.ts +26 -2
  1621. package/src/unstable/rpc/RpcGroup.ts +51 -8
  1622. package/src/unstable/rpc/RpcMessage.ts +128 -32
  1623. package/src/unstable/rpc/RpcMiddleware.ts +100 -20
  1624. package/src/unstable/rpc/RpcSchema.ts +38 -4
  1625. package/src/unstable/rpc/RpcSerialization.ts +60 -13
  1626. package/src/unstable/rpc/RpcServer.ts +108 -25
  1627. package/src/unstable/rpc/RpcTest.ts +20 -1
  1628. package/src/unstable/rpc/RpcWorker.ts +42 -8
  1629. package/src/unstable/rpc/Utils.ts +31 -0
  1630. package/src/unstable/schema/Model.ts +148 -52
  1631. package/src/unstable/schema/VariantSchema.ts +104 -24
  1632. package/src/unstable/socket/Socket.ts +168 -35
  1633. package/src/unstable/socket/SocketServer.ts +58 -10
  1634. package/src/unstable/sql/Migrator.ts +57 -5
  1635. package/src/unstable/sql/SqlClient.ts +55 -2
  1636. package/src/unstable/sql/SqlConnection.ts +31 -0
  1637. package/src/unstable/sql/SqlError.ts +117 -0
  1638. package/src/unstable/sql/SqlModel.ts +26 -5
  1639. package/src/unstable/sql/SqlResolver.ts +56 -13
  1640. package/src/unstable/sql/SqlSchema.ts +29 -8
  1641. package/src/unstable/sql/SqlStream.ts +23 -0
  1642. package/src/unstable/sql/Statement.ts +141 -0
  1643. package/src/unstable/sql/index.ts +1 -1
  1644. package/src/unstable/workers/Transferable.ts +65 -13
  1645. package/src/unstable/workers/Worker.ts +60 -8
  1646. package/src/unstable/workers/WorkerError.ts +50 -9
  1647. package/src/unstable/workers/WorkerRunner.ts +32 -3
  1648. package/src/unstable/workers/index.ts +1 -1
  1649. package/src/unstable/workflow/Activity.ts +62 -11
  1650. package/src/unstable/workflow/DurableClock.ts +26 -3
  1651. package/src/unstable/workflow/DurableDeferred.ts +146 -31
  1652. package/src/unstable/workflow/DurableQueue.ts +366 -0
  1653. package/src/unstable/workflow/Workflow.ts +122 -32
  1654. package/src/unstable/workflow/WorkflowEngine.ts +40 -5
  1655. package/src/unstable/workflow/WorkflowProxy.ts +32 -2
  1656. package/src/unstable/workflow/WorkflowProxyServer.ts +40 -6
  1657. package/src/unstable/workflow/index.ts +5 -0
package/dist/Chunk.d.ts CHANGED
@@ -28,7 +28,8 @@
28
28
  * - **Iteration**: O(n)
29
29
  * - **Memory**: Structural sharing minimizes allocation
30
30
  *
31
- * @example
31
+ * **Example** (Creating and combining chunks)
32
+ *
32
33
  * ```ts
33
34
  * import { Chunk } from "effect"
34
35
  *
@@ -42,7 +43,8 @@
42
43
  * console.log(Chunk.toReadonlyArray(combined)) // [1, 2, 3, 4, 5, 6]
43
44
  * ```
44
45
  *
45
- * @example
46
+ * **Example** (Transforming chunks)
47
+ *
46
48
  * ```ts
47
49
  * import { Chunk } from "effect"
48
50
  *
@@ -53,17 +55,17 @@
53
55
  * const sum = Chunk.reduce(evens, 0, (acc, n) => acc + n) // 12
54
56
  * ```
55
57
  *
56
- * @example
58
+ * **Example** (Processing chunks with Effect)
59
+ *
57
60
  * ```ts
58
61
  * import { Chunk, Effect } from "effect"
59
62
  *
60
63
  * // Working with Effects
61
- * const processChunk = (chunk: Chunk.Chunk<number>) =>
62
- * Effect.gen(function*() {
63
- * const mapped = Chunk.map(chunk, (n) => n * 2)
64
- * const filtered = Chunk.filter(mapped, (n) => n > 5)
65
- * return Chunk.toReadonlyArray(filtered)
66
- * })
64
+ * const processChunk = Effect.fnUntraced(function*(chunk: Chunk.Chunk<number>) {
65
+ * const mapped = Chunk.map(chunk, (n) => n * 2)
66
+ * const filtered = Chunk.filter(mapped, (n) => n > 5)
67
+ * return Chunk.toReadonlyArray(filtered)
68
+ * })
67
69
  * ```
68
70
  *
69
71
  * @since 2.0.0
@@ -87,7 +89,8 @@ declare const TypeId = "~effect/collections/Chunk";
87
89
  /**
88
90
  * A Chunk is an immutable, ordered collection optimized for efficient concatenation and access patterns.
89
91
  *
90
- * @example
92
+ * **Example** (Inspecting chunk values)
93
+ *
91
94
  * ```ts
92
95
  * import { Chunk } from "effect"
93
96
  *
@@ -112,7 +115,8 @@ export interface Chunk<out A> extends Iterable<A>, Equal.Equal, Pipeable, Inspec
112
115
  /**
113
116
  * A non-empty Chunk guaranteed to contain at least one element.
114
117
  *
115
- * @example
118
+ * **Example** (Working with non-empty chunks)
119
+ *
116
120
  * ```ts
117
121
  * import { Chunk } from "effect"
118
122
  *
@@ -129,7 +133,8 @@ export interface NonEmptyChunk<out A> extends Chunk<A>, NonEmptyIterable<A> {
129
133
  /**
130
134
  * Type lambda for Chunk, used for higher-kinded type operations.
131
135
  *
132
- * @example
136
+ * **Example** (Applying the Chunk type lambda)
137
+ *
133
138
  * ```ts
134
139
  * import type { ChunkTypeLambda } from "effect/Chunk"
135
140
  * import type { Kind } from "effect/HKT"
@@ -169,9 +174,11 @@ interface ISlice<A> {
169
174
  readonly length: number;
170
175
  }
171
176
  /**
172
- * Compares the two chunks of equal length using the specified function
177
+ * Creates an `Equivalence` for chunks that compares chunk lengths and then
178
+ * compares corresponding elements with the provided element equivalence.
179
+ *
180
+ * **Example** (Comparing chunks for equivalence)
173
181
  *
174
- * @example
175
182
  * ```ts
176
183
  * import { Chunk } from "effect"
177
184
  * import * as Equivalence from "effect/Equivalence"
@@ -192,7 +199,8 @@ export declare const makeEquivalence: <A>(isEquivalent: Equivalence.Equivalence<
192
199
  /**
193
200
  * Checks if `u` is a `Chunk<unknown>`
194
201
  *
195
- * @example
202
+ * **Example** (Checking for chunks)
203
+ *
196
204
  * ```ts
197
205
  * import { Chunk } from "effect"
198
206
  *
@@ -211,7 +219,8 @@ export declare const isChunk: {
211
219
  /**
212
220
  * Checks if `u` is a `Chunk<unknown>`
213
221
  *
214
- * @example
222
+ * **Example** (Checking for chunks)
223
+ *
215
224
  * ```ts
216
225
  * import { Chunk } from "effect"
217
226
  *
@@ -230,7 +239,8 @@ export declare const isChunk: {
230
239
  /**
231
240
  * Checks if `u` is a `Chunk<unknown>`
232
241
  *
233
- * @example
242
+ * **Example** (Checking for chunks)
243
+ *
234
244
  * ```ts
235
245
  * import { Chunk } from "effect"
236
246
  *
@@ -250,7 +260,8 @@ export declare const isChunk: {
250
260
  /**
251
261
  * Creates an empty `Chunk`.
252
262
  *
253
- * @example
263
+ * **Example** (Creating an empty chunk)
264
+ *
254
265
  * ```ts
255
266
  * import { Chunk } from "effect"
256
267
  *
@@ -265,13 +276,13 @@ export declare const empty: <A = never>() => Chunk<A>;
265
276
  /**
266
277
  * Builds a `NonEmptyChunk` from an non-empty collection of elements.
267
278
  *
268
- * @example
279
+ * **Example** (Creating a non-empty chunk)
280
+ *
269
281
  * ```ts
270
282
  * import { Chunk } from "effect"
271
283
  *
272
284
  * const chunk = Chunk.make(1, 2, 3, 4)
273
- * console.log(chunk)
274
- * // { _id: 'Chunk', values: [ 1, 2, 3, 4 ] }
285
+ * console.log(Chunk.toArray(chunk)) // [1, 2, 3, 4]
275
286
  * ```
276
287
  *
277
288
  * @category constructors
@@ -281,13 +292,13 @@ export declare const make: <As extends readonly [any, ...Array<any>]>(...as: As)
281
292
  /**
282
293
  * Builds a `NonEmptyChunk` from a single element.
283
294
  *
284
- * @example
295
+ * **Example** (Creating a single-element chunk)
296
+ *
285
297
  * ```ts
286
298
  * import { Chunk } from "effect"
287
299
  *
288
300
  * const chunk = Chunk.of("hello")
289
- * console.log(chunk)
290
- * // { _id: 'Chunk', values: [ "hello" ] }
301
+ * console.log(Chunk.toArray(chunk)) // ["hello"]
291
302
  * ```
292
303
  *
293
304
  * @category constructors
@@ -297,13 +308,13 @@ export declare const of: <A>(a: A) => NonEmptyChunk<A>;
297
308
  /**
298
309
  * Creates a new `Chunk` from an iterable collection of values.
299
310
  *
300
- * @example
311
+ * **Example** (Creating chunks from iterables)
312
+ *
301
313
  * ```ts
302
314
  * import { Chunk } from "effect"
303
315
  *
304
316
  * const chunk = Chunk.fromIterable([1, 2, 3])
305
- * console.log(chunk)
306
- * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
317
+ * console.log(Chunk.toArray(chunk)) // [1, 2, 3]
307
318
  * ```
308
319
  *
309
320
  * @category constructors
@@ -315,7 +326,8 @@ export declare const fromIterable: <A>(self: Iterable<A>) => Chunk<A>;
315
326
  * (`NonEmptyChunk`), the function will return a `NonEmptyArray`, ensuring the
316
327
  * non-empty property is preserved.
317
328
  *
318
- * @example
329
+ * **Example** (Converting chunks to mutable arrays)
330
+ *
319
331
  * ```ts
320
332
  * import { Chunk } from "effect"
321
333
  *
@@ -338,7 +350,8 @@ export declare const toArray: <S extends Chunk<any>>(self: S) => S extends NonEm
338
350
  * non-empty (`NonEmptyChunk`), the function will return a
339
351
  * `NonEmptyReadonlyArray`, ensuring the non-empty property is preserved.
340
352
  *
341
- * @example
353
+ * **Example** (Converting chunks to readonly arrays)
354
+ *
342
355
  * ```ts
343
356
  * import { Chunk } from "effect"
344
357
  *
@@ -362,7 +375,7 @@ export declare const toReadonlyArray: <S extends Chunk<any>>(self: S) => S exten
362
375
  * Reverses the order of elements in a `Chunk`.
363
376
  * Importantly, if the input chunk is a `NonEmptyChunk`, the reversed chunk will also be a `NonEmptyChunk`.
364
377
  *
365
- * @example
378
+ * **Example** (Reversing chunks)
366
379
  *
367
380
  * ```ts
368
381
  * import { Chunk } from "effect"
@@ -370,18 +383,18 @@ export declare const toReadonlyArray: <S extends Chunk<any>>(self: S) => S exten
370
383
  * const chunk = Chunk.make(1, 2, 3)
371
384
  * const result = Chunk.reverse(chunk)
372
385
  *
373
- * console.log(result)
374
- * // { _id: 'Chunk', values: [ 3, 2, 1 ] }
386
+ * console.log(Chunk.toArray(result)) // [3, 2, 1]
375
387
  * ```
376
388
  *
377
- * @since 2.0.0
378
389
  * @category elements
390
+ * @since 2.0.0
379
391
  */
380
392
  export declare const reverse: <S extends Chunk<any>>(self: S) => Chunk.With<S, Chunk.Infer<S>>;
381
393
  /**
382
394
  * This function provides a safe way to read a value at a particular index from a `Chunk`.
383
395
  *
384
- * @example
396
+ * **Example** (Accessing elements safely)
397
+ *
385
398
  * ```ts
386
399
  * import { Chunk } from "effect"
387
400
  *
@@ -403,7 +416,8 @@ export declare const get: {
403
416
  /**
404
417
  * This function provides a safe way to read a value at a particular index from a `Chunk`.
405
418
  *
406
- * @example
419
+ * **Example** (Accessing elements safely)
420
+ *
407
421
  * ```ts
408
422
  * import { Chunk } from "effect"
409
423
  *
@@ -425,7 +439,8 @@ export declare const get: {
425
439
  /**
426
440
  * This function provides a safe way to read a value at a particular index from a `Chunk`.
427
441
  *
428
- * @example
442
+ * **Example** (Accessing elements safely)
443
+ *
429
444
  * ```ts
430
445
  * import { Chunk } from "effect"
431
446
  *
@@ -448,7 +463,8 @@ export declare const get: {
448
463
  /**
449
464
  * Wraps an array into a chunk without copying, unsafe on mutable arrays
450
465
  *
451
- * @example
466
+ * **Example** (Creating chunks without copying arrays)
467
+ *
452
468
  * ```ts
453
469
  * import { Chunk } from "effect"
454
470
  *
@@ -461,14 +477,15 @@ export declare const get: {
461
477
  * console.log(Chunk.toArray(chunk)) // [999, 2, 3, 4, 5]
462
478
  * ```
463
479
  *
464
- * @since 2.0.0
465
480
  * @category unsafe
481
+ * @since 2.0.0
466
482
  */
467
483
  export declare const fromArrayUnsafe: <A>(self: ReadonlyArray<A>) => Chunk<A>;
468
484
  /**
469
485
  * Wraps an array into a chunk without copying, unsafe on mutable arrays
470
486
  *
471
- * @example
487
+ * **Example** (Creating non-empty chunks without copying arrays)
488
+ *
472
489
  * ```ts
473
490
  * import { Chunk } from "effect"
474
491
  * import * as Array from "effect/Array"
@@ -481,87 +498,79 @@ export declare const fromArrayUnsafe: <A>(self: ReadonlyArray<A>) => Chunk<A>;
481
498
  * console.log(Chunk.isNonEmpty(chunk)) // true
482
499
  * ```
483
500
  *
484
- * @since 2.0.0
485
501
  * @category unsafe
502
+ * @since 2.0.0
486
503
  */
487
504
  export declare const fromNonEmptyArrayUnsafe: <A>(self: NonEmptyReadonlyArray<A>) => NonEmptyChunk<A>;
488
505
  /**
489
506
  * Gets an element unsafely, will throw on out of bounds
490
507
  *
491
- * @example
508
+ * **Example** (Accessing elements unsafely)
509
+ *
492
510
  * ```ts
493
- * import { Chunk } from "effect"
511
+ * import { Chunk, Option } from "effect"
494
512
  *
495
513
  * const chunk = Chunk.make("a", "b", "c", "d")
496
514
  *
497
515
  * console.log(Chunk.getUnsafe(chunk, 1)) // "b"
498
516
  * console.log(Chunk.getUnsafe(chunk, 3)) // "d"
499
517
  *
500
- * // Warning: This will throw an error for invalid indices
501
- * try {
502
- * Chunk.getUnsafe(chunk, 10) // throws "Index out of bounds"
503
- * } catch (error) {
504
- * console.log((error as Error).message) // "Index out of bounds"
505
- * }
518
+ * // Use Chunk.get when the index may be out of bounds
519
+ * console.log(Option.isNone(Chunk.get(chunk, 10))) // true
506
520
  * ```
507
521
  *
508
- * @since 2.0.0
509
522
  * @category unsafe
523
+ * @since 2.0.0
510
524
  */
511
525
  export declare const getUnsafe: {
512
526
  /**
513
527
  * Gets an element unsafely, will throw on out of bounds
514
528
  *
515
- * @example
529
+ * **Example** (Accessing elements unsafely)
530
+ *
516
531
  * ```ts
517
- * import { Chunk } from "effect"
532
+ * import { Chunk, Option } from "effect"
518
533
  *
519
534
  * const chunk = Chunk.make("a", "b", "c", "d")
520
535
  *
521
536
  * console.log(Chunk.getUnsafe(chunk, 1)) // "b"
522
537
  * console.log(Chunk.getUnsafe(chunk, 3)) // "d"
523
538
  *
524
- * // Warning: This will throw an error for invalid indices
525
- * try {
526
- * Chunk.getUnsafe(chunk, 10) // throws "Index out of bounds"
527
- * } catch (error) {
528
- * console.log((error as Error).message) // "Index out of bounds"
529
- * }
539
+ * // Use Chunk.get when the index may be out of bounds
540
+ * console.log(Option.isNone(Chunk.get(chunk, 10))) // true
530
541
  * ```
531
542
  *
532
- * @since 2.0.0
533
543
  * @category unsafe
544
+ * @since 2.0.0
534
545
  */
535
546
  (index: number): <A>(self: Chunk<A>) => A;
536
547
  /**
537
548
  * Gets an element unsafely, will throw on out of bounds
538
549
  *
539
- * @example
550
+ * **Example** (Accessing elements unsafely)
551
+ *
540
552
  * ```ts
541
- * import { Chunk } from "effect"
553
+ * import { Chunk, Option } from "effect"
542
554
  *
543
555
  * const chunk = Chunk.make("a", "b", "c", "d")
544
556
  *
545
557
  * console.log(Chunk.getUnsafe(chunk, 1)) // "b"
546
558
  * console.log(Chunk.getUnsafe(chunk, 3)) // "d"
547
559
  *
548
- * // Warning: This will throw an error for invalid indices
549
- * try {
550
- * Chunk.getUnsafe(chunk, 10) // throws "Index out of bounds"
551
- * } catch (error) {
552
- * console.log((error as Error).message) // "Index out of bounds"
553
- * }
560
+ * // Use Chunk.get when the index may be out of bounds
561
+ * console.log(Option.isNone(Chunk.get(chunk, 10))) // true
554
562
  * ```
555
563
  *
556
- * @since 2.0.0
557
564
  * @category unsafe
565
+ * @since 2.0.0
558
566
  */
559
567
  <A>(self: Chunk<A>, index: number): A;
560
568
  };
561
569
  /**
562
570
  * Appends the specified element to the end of the `Chunk`.
563
571
  *
564
- * @example
572
+ * **Example** (Appending an element)
573
+ *
565
574
  * ```ts
566
575
  * import { Chunk } from "effect"
567
576
  *
@@ -582,7 +591,8 @@ export declare const append: {
582
591
  /**
583
592
  * Appends the specified element to the end of the `Chunk`.
584
593
  *
585
- * @example
594
+ * **Example** (Appending an element)
595
+ *
586
596
  * ```ts
587
597
  * import { Chunk } from "effect"
588
598
  *
@@ -603,7 +613,8 @@ export declare const append: {
603
613
  /**
604
614
  * Appends the specified element to the end of the `Chunk`.
605
615
  *
606
- * @example
616
+ * **Example** (Appending an element)
617
+ *
607
618
  * ```ts
608
619
  * import { Chunk } from "effect"
609
620
  *
@@ -625,7 +636,8 @@ export declare const append: {
625
636
  /**
626
637
  * Prepend an element to the front of a `Chunk`, creating a new `NonEmptyChunk`.
627
638
  *
628
- * @example
639
+ * **Example** (Prepending an element)
640
+ *
629
641
  * ```ts
630
642
  * import { Chunk } from "effect"
631
643
  *
@@ -646,7 +658,8 @@ export declare const prepend: {
646
658
  /**
647
659
  * Prepend an element to the front of a `Chunk`, creating a new `NonEmptyChunk`.
648
660
  *
649
- * @example
661
+ * **Example** (Prepending an element)
662
+ *
650
663
  * ```ts
651
664
  * import { Chunk } from "effect"
652
665
  *
@@ -667,7 +680,8 @@ export declare const prepend: {
667
680
  /**
668
681
  * Prepend an element to the front of a `Chunk`, creating a new `NonEmptyChunk`.
669
682
  *
670
- * @example
683
+ * **Example** (Prepending an element)
684
+ *
671
685
  * ```ts
672
686
  * import { Chunk } from "effect"
673
687
  *
@@ -689,14 +703,14 @@ export declare const prepend: {
689
703
  /**
690
704
  * Takes the first up to `n` elements from the chunk.
691
705
  *
692
- * @example
706
+ * **Example** (Taking elements from the start)
707
+ *
693
708
  * ```ts
694
709
  * import { Chunk } from "effect"
695
710
  *
696
711
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
697
712
  * const result = Chunk.take(chunk, 3)
698
- * console.log(result)
699
- * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
713
+ * console.log(Chunk.toArray(result)) // [1, 2, 3]
700
714
  * ```
701
715
  *
702
716
  * @category elements
@@ -706,14 +720,14 @@ export declare const take: {
706
720
  /**
707
721
  * Takes the first up to `n` elements from the chunk.
708
722
  *
709
- * @example
723
+ * **Example** (Taking elements from the start)
724
+ *
710
725
  * ```ts
711
726
  * import { Chunk } from "effect"
712
727
  *
713
728
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
714
729
  * const result = Chunk.take(chunk, 3)
715
- * console.log(result)
716
- * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
730
+ * console.log(Chunk.toArray(result)) // [1, 2, 3]
717
731
  * ```
718
732
  *
719
733
  * @category elements
@@ -723,14 +737,14 @@ export declare const take: {
723
737
  /**
724
738
  * Takes the first up to `n` elements from the chunk.
725
739
  *
726
- * @example
740
+ * **Example** (Taking elements from the start)
741
+ *
727
742
  * ```ts
728
743
  * import { Chunk } from "effect"
729
744
  *
730
745
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
731
746
  * const result = Chunk.take(chunk, 3)
732
- * console.log(result)
733
- * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
747
+ * console.log(Chunk.toArray(result)) // [1, 2, 3]
734
748
  * ```
735
749
  *
736
750
  * @category elements
@@ -741,14 +755,14 @@ export declare const take: {
741
755
  /**
742
756
  * Drops the first up to `n` elements from the chunk.
743
757
  *
744
- * @example
758
+ * **Example** (Dropping elements from the start)
759
+ *
745
760
  * ```ts
746
761
  * import { Chunk } from "effect"
747
762
  *
748
763
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
749
764
  * const result = Chunk.drop(chunk, 2)
750
- * console.log(result)
751
- * // { _id: 'Chunk', values: [ 3, 4, 5 ] }
765
+ * console.log(Chunk.toArray(result)) // [3, 4, 5]
752
766
  * ```
753
767
  *
754
768
  * @category elements
@@ -758,14 +772,14 @@ export declare const drop: {
758
772
  /**
759
773
  * Drops the first up to `n` elements from the chunk.
760
774
  *
761
- * @example
775
+ * **Example** (Dropping elements from the start)
776
+ *
762
777
  * ```ts
763
778
  * import { Chunk } from "effect"
764
779
  *
765
780
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
766
781
  * const result = Chunk.drop(chunk, 2)
767
- * console.log(result)
768
- * // { _id: 'Chunk', values: [ 3, 4, 5 ] }
782
+ * console.log(Chunk.toArray(result)) // [3, 4, 5]
769
783
  * ```
770
784
  *
771
785
  * @category elements
@@ -775,14 +789,14 @@ export declare const drop: {
775
789
  /**
776
790
  * Drops the first up to `n` elements from the chunk.
777
791
  *
778
- * @example
792
+ * **Example** (Dropping elements from the start)
793
+ *
779
794
  * ```ts
780
795
  * import { Chunk } from "effect"
781
796
  *
782
797
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
783
798
  * const result = Chunk.drop(chunk, 2)
784
- * console.log(result)
785
- * // { _id: 'Chunk', values: [ 3, 4, 5 ] }
799
+ * console.log(Chunk.toArray(result)) // [3, 4, 5]
786
800
  * ```
787
801
  *
788
802
  * @category elements
@@ -793,14 +807,14 @@ export declare const drop: {
793
807
  /**
794
808
  * Drops the last `n` elements.
795
809
  *
796
- * @example
810
+ * **Example** (Dropping elements from the end)
811
+ *
797
812
  * ```ts
798
813
  * import { Chunk } from "effect"
799
814
  *
800
815
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
801
816
  * const result = Chunk.dropRight(chunk, 2)
802
- * console.log(result)
803
- * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
817
+ * console.log(Chunk.toArray(result)) // [1, 2, 3]
804
818
  * ```
805
819
  *
806
820
  * @category elements
@@ -810,14 +824,14 @@ export declare const dropRight: {
810
824
  /**
811
825
  * Drops the last `n` elements.
812
826
  *
813
- * @example
827
+ * **Example** (Dropping elements from the end)
828
+ *
814
829
  * ```ts
815
830
  * import { Chunk } from "effect"
816
831
  *
817
832
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
818
833
  * const result = Chunk.dropRight(chunk, 2)
819
- * console.log(result)
820
- * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
834
+ * console.log(Chunk.toArray(result)) // [1, 2, 3]
821
835
  * ```
822
836
  *
823
837
  * @category elements
@@ -827,14 +841,14 @@ export declare const dropRight: {
827
841
  /**
828
842
  * Drops the last `n` elements.
829
843
  *
830
- * @example
844
+ * **Example** (Dropping elements from the end)
845
+ *
831
846
  * ```ts
832
847
  * import { Chunk } from "effect"
833
848
  *
834
849
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
835
850
  * const result = Chunk.dropRight(chunk, 2)
836
- * console.log(result)
837
- * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
851
+ * console.log(Chunk.toArray(result)) // [1, 2, 3]
838
852
  * ```
839
853
  *
840
854
  * @category elements
@@ -845,14 +859,14 @@ export declare const dropRight: {
845
859
  /**
846
860
  * Drops all elements so long as the predicate returns true.
847
861
  *
848
- * @example
862
+ * **Example** (Dropping elements while a predicate matches)
863
+ *
849
864
  * ```ts
850
865
  * import { Chunk } from "effect"
851
866
  *
852
867
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
853
868
  * const result = Chunk.dropWhile(chunk, (n) => n < 3)
854
- * console.log(result)
855
- * // { _id: 'Chunk', values: [ 3, 4, 5 ] }
869
+ * console.log(Chunk.toArray(result)) // [3, 4, 5]
856
870
  * ```
857
871
  *
858
872
  * @category elements
@@ -862,14 +876,14 @@ export declare const dropWhile: {
862
876
  /**
863
877
  * Drops all elements so long as the predicate returns true.
864
878
  *
865
- * @example
879
+ * **Example** (Dropping elements while a predicate matches)
880
+ *
866
881
  * ```ts
867
882
  * import { Chunk } from "effect"
868
883
  *
869
884
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
870
885
  * const result = Chunk.dropWhile(chunk, (n) => n < 3)
871
- * console.log(result)
872
- * // { _id: 'Chunk', values: [ 3, 4, 5 ] }
886
+ * console.log(Chunk.toArray(result)) // [3, 4, 5]
873
887
  * ```
874
888
  *
875
889
  * @category elements
@@ -879,14 +893,14 @@ export declare const dropWhile: {
879
893
  /**
880
894
  * Drops all elements so long as the predicate returns true.
881
895
  *
882
- * @example
896
+ * **Example** (Dropping elements while a predicate matches)
897
+ *
883
898
  * ```ts
884
899
  * import { Chunk } from "effect"
885
900
  *
886
901
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
887
902
  * const result = Chunk.dropWhile(chunk, (n) => n < 3)
888
- * console.log(result)
889
- * // { _id: 'Chunk', values: [ 3, 4, 5 ] }
903
+ * console.log(Chunk.toArray(result)) // [3, 4, 5]
890
904
  * ```
891
905
  *
892
906
  * @category elements
@@ -898,7 +912,7 @@ export declare const dropWhile: {
898
912
  * Prepends the specified prefix chunk to the beginning of the specified chunk.
899
913
  * If either chunk is non-empty, the result is also a non-empty chunk.
900
914
  *
901
- * @example
915
+ * **Example** (Prepending all elements)
902
916
  *
903
917
  * ```ts
904
918
  * import { Chunk } from "effect"
@@ -920,7 +934,7 @@ export declare const prependAll: {
920
934
  * Prepends the specified prefix chunk to the beginning of the specified chunk.
921
935
  * If either chunk is non-empty, the result is also a non-empty chunk.
922
936
  *
923
- * @example
937
+ * **Example** (Prepending all elements)
924
938
  *
925
939
  * ```ts
926
940
  * import { Chunk } from "effect"
@@ -942,7 +956,7 @@ export declare const prependAll: {
942
956
  * Prepends the specified prefix chunk to the beginning of the specified chunk.
943
957
  * If either chunk is non-empty, the result is also a non-empty chunk.
944
958
  *
945
- * @example
959
+ * **Example** (Prepending all elements)
946
960
  *
947
961
  * ```ts
948
962
  * import { Chunk } from "effect"
@@ -964,7 +978,7 @@ export declare const prependAll: {
964
978
  * Prepends the specified prefix chunk to the beginning of the specified chunk.
965
979
  * If either chunk is non-empty, the result is also a non-empty chunk.
966
980
  *
967
- * @example
981
+ * **Example** (Prepending all elements)
968
982
  *
969
983
  * ```ts
970
984
  * import { Chunk } from "effect"
@@ -986,7 +1000,7 @@ export declare const prependAll: {
986
1000
  * Prepends the specified prefix chunk to the beginning of the specified chunk.
987
1001
  * If either chunk is non-empty, the result is also a non-empty chunk.
988
1002
  *
989
- * @example
1003
+ * **Example** (Prepending all elements)
990
1004
  *
991
1005
  * ```ts
992
1006
  * import { Chunk } from "effect"
@@ -1009,7 +1023,7 @@ export declare const prependAll: {
1009
1023
  * Concatenates two chunks, combining their elements.
1010
1024
  * If either chunk is non-empty, the result is also a non-empty chunk.
1011
1025
  *
1012
- * @example
1026
+ * **Example** (Appending all elements)
1013
1027
  *
1014
1028
  * ```ts
1015
1029
  * import { Chunk } from "effect"
@@ -1031,7 +1045,7 @@ export declare const appendAll: {
1031
1045
  * Concatenates two chunks, combining their elements.
1032
1046
  * If either chunk is non-empty, the result is also a non-empty chunk.
1033
1047
  *
1034
- * @example
1048
+ * **Example** (Appending all elements)
1035
1049
  *
1036
1050
  * ```ts
1037
1051
  * import { Chunk } from "effect"
@@ -1053,7 +1067,7 @@ export declare const appendAll: {
1053
1067
  * Concatenates two chunks, combining their elements.
1054
1068
  * If either chunk is non-empty, the result is also a non-empty chunk.
1055
1069
  *
1056
- * @example
1070
+ * **Example** (Appending all elements)
1057
1071
  *
1058
1072
  * ```ts
1059
1073
  * import { Chunk } from "effect"
@@ -1075,7 +1089,7 @@ export declare const appendAll: {
1075
1089
  * Concatenates two chunks, combining their elements.
1076
1090
  * If either chunk is non-empty, the result is also a non-empty chunk.
1077
1091
  *
1078
- * @example
1092
+ * **Example** (Appending all elements)
1079
1093
  *
1080
1094
  * ```ts
1081
1095
  * import { Chunk } from "effect"
@@ -1097,7 +1111,7 @@ export declare const appendAll: {
1097
1111
  * Concatenates two chunks, combining their elements.
1098
1112
  * If either chunk is non-empty, the result is also a non-empty chunk.
1099
1113
  *
1100
- * @example
1114
+ * **Example** (Appending all elements)
1101
1115
  *
1102
1116
  * ```ts
1103
1117
  * import { Chunk } from "effect"
@@ -1119,7 +1133,8 @@ export declare const appendAll: {
1119
1133
  /**
1120
1134
  * Returns a filtered and mapped subset of the elements.
1121
1135
  *
1122
- * @example
1136
+ * **Example** (Filtering and mapping values)
1137
+ *
1123
1138
  * ```ts
1124
1139
  * import { Chunk } from "effect"
1125
1140
  * import * as Result from "effect/Result"
@@ -1139,14 +1154,15 @@ export declare const appendAll: {
1139
1154
  * console.log(Chunk.toArray(evenIndexNumbers)) // [1]
1140
1155
  * ```
1141
1156
  *
1142
- * @since 2.0.0
1143
1157
  * @category filtering
1158
+ * @since 2.0.0
1144
1159
  */
1145
1160
  export declare const filterMap: {
1146
1161
  /**
1147
1162
  * Returns a filtered and mapped subset of the elements.
1148
1163
  *
1149
- * @example
1164
+ * **Example** (Filtering and mapping values)
1165
+ *
1150
1166
  * ```ts
1151
1167
  * import { Chunk } from "effect"
1152
1168
  * import * as Result from "effect/Result"
@@ -1166,14 +1182,15 @@ export declare const filterMap: {
1166
1182
  * console.log(Chunk.toArray(evenIndexNumbers)) // [1]
1167
1183
  * ```
1168
1184
  *
1169
- * @since 2.0.0
1170
1185
  * @category filtering
1186
+ * @since 2.0.0
1171
1187
  */
1172
1188
  <A, B, X>(f: (input: A, i: number) => Result<B, X>): (self: Chunk<A>) => Chunk<B>;
1173
1189
  /**
1174
1190
  * Returns a filtered and mapped subset of the elements.
1175
1191
  *
1176
- * @example
1192
+ * **Example** (Filtering and mapping values)
1193
+ *
1177
1194
  * ```ts
1178
1195
  * import { Chunk } from "effect"
1179
1196
  * import * as Result from "effect/Result"
@@ -1193,15 +1210,16 @@ export declare const filterMap: {
1193
1210
  * console.log(Chunk.toArray(evenIndexNumbers)) // [1]
1194
1211
  * ```
1195
1212
  *
1196
- * @since 2.0.0
1197
1213
  * @category filtering
1214
+ * @since 2.0.0
1198
1215
  */
1199
1216
  <A, B, X>(self: Chunk<A>, f: (input: A, i: number) => Result<B, X>): Chunk<B>;
1200
1217
  };
1201
1218
  /**
1202
1219
  * Returns a filtered subset of the elements.
1203
1220
  *
1204
- * @example
1221
+ * **Example** (Filtering values)
1222
+ *
1205
1223
  * ```ts
1206
1224
  * import { Chunk } from "effect"
1207
1225
  *
@@ -1215,14 +1233,15 @@ export declare const filterMap: {
1215
1233
  * console.log(Chunk.toArray(numbers)) // [42, 100]
1216
1234
  * ```
1217
1235
  *
1218
- * @since 2.0.0
1219
1236
  * @category filtering
1237
+ * @since 2.0.0
1220
1238
  */
1221
1239
  export declare const filter: {
1222
1240
  /**
1223
1241
  * Returns a filtered subset of the elements.
1224
1242
  *
1225
- * @example
1243
+ * **Example** (Filtering values)
1244
+ *
1226
1245
  * ```ts
1227
1246
  * import { Chunk } from "effect"
1228
1247
  *
@@ -1236,14 +1255,15 @@ export declare const filter: {
1236
1255
  * console.log(Chunk.toArray(numbers)) // [42, 100]
1237
1256
  * ```
1238
1257
  *
1239
- * @since 2.0.0
1240
1258
  * @category filtering
1259
+ * @since 2.0.0
1241
1260
  */
1242
1261
  <A, B extends A>(refinement: Refinement<NoInfer<A>, B>): (self: Chunk<A>) => Chunk<B>;
1243
1262
  /**
1244
1263
  * Returns a filtered subset of the elements.
1245
1264
  *
1246
- * @example
1265
+ * **Example** (Filtering values)
1266
+ *
1247
1267
  * ```ts
1248
1268
  * import { Chunk } from "effect"
1249
1269
  *
@@ -1257,14 +1277,15 @@ export declare const filter: {
1257
1277
  * console.log(Chunk.toArray(numbers)) // [42, 100]
1258
1278
  * ```
1259
1279
  *
1260
- * @since 2.0.0
1261
1280
  * @category filtering
1281
+ * @since 2.0.0
1262
1282
  */
1263
1283
  <A>(predicate: Predicate<NoInfer<A>>): (self: Chunk<A>) => Chunk<A>;
1264
1284
  /**
1265
1285
  * Returns a filtered subset of the elements.
1266
1286
  *
1267
- * @example
1287
+ * **Example** (Filtering values)
1288
+ *
1268
1289
  * ```ts
1269
1290
  * import { Chunk } from "effect"
1270
1291
  *
@@ -1278,14 +1299,15 @@ export declare const filter: {
1278
1299
  * console.log(Chunk.toArray(numbers)) // [42, 100]
1279
1300
  * ```
1280
1301
  *
1281
- * @since 2.0.0
1282
1302
  * @category filtering
1303
+ * @since 2.0.0
1283
1304
  */
1284
1305
  <A, B extends A>(self: Chunk<A>, refinement: Refinement<A, B>): Chunk<B>;
1285
1306
  /**
1286
1307
  * Returns a filtered subset of the elements.
1287
1308
  *
1288
- * @example
1309
+ * **Example** (Filtering values)
1310
+ *
1289
1311
  * ```ts
1290
1312
  * import { Chunk } from "effect"
1291
1313
  *
@@ -1299,15 +1321,16 @@ export declare const filter: {
1299
1321
  * console.log(Chunk.toArray(numbers)) // [42, 100]
1300
1322
  * ```
1301
1323
  *
1302
- * @since 2.0.0
1303
1324
  * @category filtering
1325
+ * @since 2.0.0
1304
1326
  */
1305
1327
  <A>(self: Chunk<A>, predicate: Predicate<A>): Chunk<A>;
1306
1328
  };
1307
1329
  /**
1308
1330
  * Transforms all elements of the chunk for as long as the specified function succeeds.
1309
1331
  *
1310
- * @example
1332
+ * **Example** (Filtering and mapping while values match)
1333
+ *
1311
1334
  * ```ts
1312
1335
  * import { Chunk } from "effect"
1313
1336
  * import * as Result from "effect/Result"
@@ -1328,14 +1351,15 @@ export declare const filter: {
1328
1351
  * console.log(Chunk.toArray(allNumbers)) // [1, 2, 3, 4]
1329
1352
  * ```
1330
1353
  *
1331
- * @since 2.0.0
1332
1354
  * @category filtering
1355
+ * @since 2.0.0
1333
1356
  */
1334
1357
  export declare const filterMapWhile: {
1335
1358
  /**
1336
1359
  * Transforms all elements of the chunk for as long as the specified function succeeds.
1337
1360
  *
1338
- * @example
1361
+ * **Example** (Filtering and mapping while values match)
1362
+ *
1339
1363
  * ```ts
1340
1364
  * import { Chunk } from "effect"
1341
1365
  * import * as Result from "effect/Result"
@@ -1356,14 +1380,15 @@ export declare const filterMapWhile: {
1356
1380
  * console.log(Chunk.toArray(allNumbers)) // [1, 2, 3, 4]
1357
1381
  * ```
1358
1382
  *
1359
- * @since 2.0.0
1360
1383
  * @category filtering
1384
+ * @since 2.0.0
1361
1385
  */
1362
1386
  <A, B, X>(f: Filter.Filter<A, B, X>): (self: Chunk<A>) => Chunk<B>;
1363
1387
  /**
1364
1388
  * Transforms all elements of the chunk for as long as the specified function succeeds.
1365
1389
  *
1366
- * @example
1390
+ * **Example** (Filtering and mapping while values match)
1391
+ *
1367
1392
  * ```ts
1368
1393
  * import { Chunk } from "effect"
1369
1394
  * import * as Result from "effect/Result"
@@ -1384,23 +1409,23 @@ export declare const filterMapWhile: {
1384
1409
  * console.log(Chunk.toArray(allNumbers)) // [1, 2, 3, 4]
1385
1410
  * ```
1386
1411
  *
1387
- * @since 2.0.0
1388
1412
  * @category filtering
1413
+ * @since 2.0.0
1389
1414
  */
1390
1415
  <A, B, X>(self: Chunk<A>, f: Filter.Filter<A, B, X>): Chunk<B>;
1391
1416
  };
1392
1417
  /**
1393
1418
  * Filter out optional values
1394
1419
  *
1395
- * @example
1420
+ * **Example** (Compacting optional values)
1421
+ *
1396
1422
  * ```ts
1397
1423
  * import { Chunk } from "effect"
1398
1424
  * import * as Option from "effect/Option"
1399
1425
  *
1400
1426
  * const chunk = Chunk.make(Option.some(1), Option.none(), Option.some(3))
1401
1427
  * const result = Chunk.compact(chunk)
1402
- * console.log(result)
1403
- * // { _id: 'Chunk', values: [ 1, 3 ] }
1428
+ * console.log(Chunk.toArray(result)) // [1, 3]
1404
1429
  * ```
1405
1430
  *
1406
1431
  * @category filtering
@@ -1410,7 +1435,8 @@ export declare const compact: <A>(self: Chunk<Option<A>>) => Chunk<A>;
1410
1435
  /**
1411
1436
  * Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
1412
1437
  *
1413
- * @example
1438
+ * **Example** (Flat mapping chunks)
1439
+ *
1414
1440
  * ```ts
1415
1441
  * import { Chunk } from "effect"
1416
1442
  *
@@ -1431,14 +1457,15 @@ export declare const compact: <A>(self: Chunk<Option<A>>) => Chunk<A>;
1431
1457
  * console.log(Chunk.toArray(indexed)) // [1, 3, 5]
1432
1458
  * ```
1433
1459
  *
1434
- * @since 2.0.0
1435
1460
  * @category sequencing
1461
+ * @since 2.0.0
1436
1462
  */
1437
1463
  export declare const flatMap: {
1438
1464
  /**
1439
1465
  * Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
1440
1466
  *
1441
- * @example
1467
+ * **Example** (Flat mapping chunks)
1468
+ *
1442
1469
  * ```ts
1443
1470
  * import { Chunk } from "effect"
1444
1471
  *
@@ -1459,14 +1486,15 @@ export declare const flatMap: {
1459
1486
  * console.log(Chunk.toArray(indexed)) // [1, 3, 5]
1460
1487
  * ```
1461
1488
  *
1462
- * @since 2.0.0
1463
1489
  * @category sequencing
1490
+ * @since 2.0.0
1464
1491
  */
1465
1492
  <S extends Chunk<any>, T extends Chunk<any>>(f: (a: Chunk.Infer<S>, i: number) => T): (self: S) => Chunk.AndNonEmpty<S, T, Chunk.Infer<T>>;
1466
1493
  /**
1467
1494
  * Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
1468
1495
  *
1469
- * @example
1496
+ * **Example** (Flat mapping chunks)
1497
+ *
1470
1498
  * ```ts
1471
1499
  * import { Chunk } from "effect"
1472
1500
  *
@@ -1487,14 +1515,15 @@ export declare const flatMap: {
1487
1515
  * console.log(Chunk.toArray(indexed)) // [1, 3, 5]
1488
1516
  * ```
1489
1517
  *
1490
- * @since 2.0.0
1491
1518
  * @category sequencing
1519
+ * @since 2.0.0
1492
1520
  */
1493
1521
  <A, B>(self: NonEmptyChunk<A>, f: (a: A, i: number) => NonEmptyChunk<B>): NonEmptyChunk<B>;
1494
1522
  /**
1495
1523
  * Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
1496
1524
  *
1497
- * @example
1525
+ * **Example** (Flat mapping chunks)
1526
+ *
1498
1527
  * ```ts
1499
1528
  * import { Chunk } from "effect"
1500
1529
  *
@@ -1515,8 +1544,8 @@ export declare const flatMap: {
1515
1544
  * console.log(Chunk.toArray(indexed)) // [1, 3, 5]
1516
1545
  * ```
1517
1546
  *
1518
- * @since 2.0.0
1519
1547
  * @category sequencing
1548
+ * @since 2.0.0
1520
1549
  */
1521
1550
  <A, B>(self: Chunk<A>, f: (a: A, i: number) => Chunk<B>): Chunk<B>;
1522
1551
  };
@@ -1530,7 +1559,8 @@ export declare const flatMap: {
1530
1559
  * instead, it is primarily used for side effects, such as logging or
1531
1560
  * accumulating data in an external variable.
1532
1561
  *
1533
- * @example
1562
+ * **Example** (Iterating over chunk values)
1563
+ *
1534
1564
  * ```ts
1535
1565
  * import { Chunk } from "effect"
1536
1566
  *
@@ -1553,8 +1583,8 @@ export declare const flatMap: {
1553
1583
  * // Index 3: 4
1554
1584
  * ```
1555
1585
  *
1556
- * @since 2.0.0
1557
1586
  * @category combinators
1587
+ * @since 2.0.0
1558
1588
  */
1559
1589
  export declare const forEach: {
1560
1590
  /**
@@ -1567,7 +1597,8 @@ export declare const forEach: {
1567
1597
  * instead, it is primarily used for side effects, such as logging or
1568
1598
  * accumulating data in an external variable.
1569
1599
  *
1570
- * @example
1600
+ * **Example** (Iterating over chunk values)
1601
+ *
1571
1602
  * ```ts
1572
1603
  * import { Chunk } from "effect"
1573
1604
  *
@@ -1590,8 +1621,8 @@ export declare const forEach: {
1590
1621
  * // Index 3: 4
1591
1622
  * ```
1592
1623
  *
1593
- * @since 2.0.0
1594
1624
  * @category combinators
1625
+ * @since 2.0.0
1595
1626
  */
1596
1627
  <A, B>(f: (a: A, index: number) => B): (self: Chunk<A>) => void;
1597
1628
  /**
@@ -1604,7 +1635,8 @@ export declare const forEach: {
1604
1635
  * instead, it is primarily used for side effects, such as logging or
1605
1636
  * accumulating data in an external variable.
1606
1637
  *
1607
- * @example
1638
+ * **Example** (Iterating over chunk values)
1639
+ *
1608
1640
  * ```ts
1609
1641
  * import { Chunk } from "effect"
1610
1642
  *
@@ -1627,15 +1659,16 @@ export declare const forEach: {
1627
1659
  * // Index 3: 4
1628
1660
  * ```
1629
1661
  *
1630
- * @since 2.0.0
1631
1662
  * @category combinators
1663
+ * @since 2.0.0
1632
1664
  */
1633
1665
  <A, B>(self: Chunk<A>, f: (a: A, index: number) => B): void;
1634
1666
  };
1635
1667
  /**
1636
1668
  * Flattens a chunk of chunks into a single chunk by concatenating all chunks.
1637
1669
  *
1638
- * @example
1670
+ * **Example** (Flattening nested chunks)
1671
+ *
1639
1672
  * ```ts
1640
1673
  * import { Chunk } from "effect"
1641
1674
  *
@@ -1656,14 +1689,15 @@ export declare const forEach: {
1656
1689
  * console.log(Chunk.toArray(Chunk.flatten(withEmpty))) // [1, 2, 3, 4]
1657
1690
  * ```
1658
1691
  *
1659
- * @since 2.0.0
1660
1692
  * @category sequencing
1693
+ * @since 2.0.0
1661
1694
  */
1662
1695
  export declare const flatten: <S extends Chunk<Chunk<any>>>(self: S) => Chunk.Flatten<S>;
1663
1696
  /**
1664
1697
  * Groups elements in chunks of up to `n` elements.
1665
1698
  *
1666
- * @example
1699
+ * **Example** (Splitting into fixed-size chunks)
1700
+ *
1667
1701
  * ```ts
1668
1702
  * import { Chunk } from "effect"
1669
1703
  *
@@ -1680,14 +1714,15 @@ export declare const flatten: <S extends Chunk<Chunk<any>>>(self: S) => Chunk.Fl
1680
1714
  * // [[1, 2], [3, 4], [5]]
1681
1715
  * ```
1682
1716
  *
1683
- * @since 2.0.0
1684
1717
  * @category elements
1718
+ * @since 2.0.0
1685
1719
  */
1686
1720
  export declare const chunksOf: {
1687
1721
  /**
1688
1722
  * Groups elements in chunks of up to `n` elements.
1689
1723
  *
1690
- * @example
1724
+ * **Example** (Splitting into fixed-size chunks)
1725
+ *
1691
1726
  * ```ts
1692
1727
  * import { Chunk } from "effect"
1693
1728
  *
@@ -1704,14 +1739,15 @@ export declare const chunksOf: {
1704
1739
  * // [[1, 2], [3, 4], [5]]
1705
1740
  * ```
1706
1741
  *
1707
- * @since 2.0.0
1708
1742
  * @category elements
1743
+ * @since 2.0.0
1709
1744
  */
1710
1745
  (n: number): <A>(self: Chunk<A>) => Chunk<Chunk<A>>;
1711
1746
  /**
1712
1747
  * Groups elements in chunks of up to `n` elements.
1713
1748
  *
1714
- * @example
1749
+ * **Example** (Splitting into fixed-size chunks)
1750
+ *
1715
1751
  * ```ts
1716
1752
  * import { Chunk } from "effect"
1717
1753
  *
@@ -1728,8 +1764,8 @@ export declare const chunksOf: {
1728
1764
  * // [[1, 2], [3, 4], [5]]
1729
1765
  * ```
1730
1766
  *
1731
- * @since 2.0.0
1732
1767
  * @category elements
1768
+ * @since 2.0.0
1733
1769
  */
1734
1770
  <A>(self: Chunk<A>, n: number): Chunk<Chunk<A>>;
1735
1771
  };
@@ -1738,7 +1774,8 @@ export declare const chunksOf: {
1738
1774
  *
1739
1775
  * The order and references of result values are determined by the Chunk.
1740
1776
  *
1741
- * @example
1777
+ * **Example** (Intersecting chunks)
1778
+ *
1742
1779
  * ```ts
1743
1780
  * import { Chunk } from "effect"
1744
1781
  *
@@ -1758,8 +1795,8 @@ export declare const chunksOf: {
1758
1795
  * console.log(Chunk.toArray(Chunk.intersection(chunk3, chunk4))) // []
1759
1796
  * ```
1760
1797
  *
1761
- * @since 2.0.0
1762
1798
  * @category elements
1799
+ * @since 2.0.0
1763
1800
  */
1764
1801
  export declare const intersection: {
1765
1802
  /**
@@ -1767,7 +1804,8 @@ export declare const intersection: {
1767
1804
  *
1768
1805
  * The order and references of result values are determined by the Chunk.
1769
1806
  *
1770
- * @example
1807
+ * **Example** (Intersecting chunks)
1808
+ *
1771
1809
  * ```ts
1772
1810
  * import { Chunk } from "effect"
1773
1811
  *
@@ -1787,8 +1825,8 @@ export declare const intersection: {
1787
1825
  * console.log(Chunk.toArray(Chunk.intersection(chunk3, chunk4))) // []
1788
1826
  * ```
1789
1827
  *
1790
- * @since 2.0.0
1791
1828
  * @category elements
1829
+ * @since 2.0.0
1792
1830
  */
1793
1831
  <A>(that: Chunk<A>): <B>(self: Chunk<B>) => Chunk<A & B>;
1794
1832
  /**
@@ -1796,7 +1834,8 @@ export declare const intersection: {
1796
1834
  *
1797
1835
  * The order and references of result values are determined by the Chunk.
1798
1836
  *
1799
- * @example
1837
+ * **Example** (Intersecting chunks)
1838
+ *
1800
1839
  * ```ts
1801
1840
  * import { Chunk } from "effect"
1802
1841
  *
@@ -1816,15 +1855,16 @@ export declare const intersection: {
1816
1855
  * console.log(Chunk.toArray(Chunk.intersection(chunk3, chunk4))) // []
1817
1856
  * ```
1818
1857
  *
1819
- * @since 2.0.0
1820
1858
  * @category elements
1859
+ * @since 2.0.0
1821
1860
  */
1822
1861
  <A, B>(self: Chunk<A>, that: Chunk<B>): Chunk<A & B>;
1823
1862
  };
1824
1863
  /**
1825
1864
  * Determines if the chunk is empty.
1826
1865
  *
1827
- * @example
1866
+ * **Example** (Checking for empty chunks)
1867
+ *
1828
1868
  * ```ts
1829
1869
  * import { Chunk } from "effect"
1830
1870
  *
@@ -1839,7 +1879,8 @@ export declare const isEmpty: <A>(self: Chunk<A>) => boolean;
1839
1879
  /**
1840
1880
  * Determines if the chunk is not empty.
1841
1881
  *
1842
- * @example
1882
+ * **Example** (Checking for non-empty chunks)
1883
+ *
1843
1884
  * ```ts
1844
1885
  * import { Chunk } from "effect"
1845
1886
  *
@@ -1854,7 +1895,8 @@ export declare const isNonEmpty: <A>(self: Chunk<A>) => self is NonEmptyChunk<A>
1854
1895
  /**
1855
1896
  * Returns the first element of this chunk if it exists.
1856
1897
  *
1857
- * @example
1898
+ * **Example** (Getting the first element)
1899
+ *
1858
1900
  * ```ts
1859
1901
  * import { Chunk } from "effect"
1860
1902
  *
@@ -1871,9 +1913,10 @@ export declare const head: <A>(self: Chunk<A>) => Option<A>;
1871
1913
  *
1872
1914
  * It will throw an error if the chunk is empty.
1873
1915
  *
1874
- * @example
1916
+ * **Example** (Getting the first element unsafely)
1917
+ *
1875
1918
  * ```ts
1876
- * import { Chunk } from "effect"
1919
+ * import { Chunk, Option } from "effect"
1877
1920
  *
1878
1921
  * const chunk = Chunk.make(1, 2, 3, 4)
1879
1922
  * console.log(Chunk.headUnsafe(chunk)) // 1
@@ -1881,22 +1924,19 @@ export declare const head: <A>(self: Chunk<A>) => Option<A>;
1881
1924
  * const singleElement = Chunk.make("hello")
1882
1925
  * console.log(Chunk.headUnsafe(singleElement)) // "hello"
1883
1926
  *
1884
- * // Warning: This will throw for empty chunks
1885
- * try {
1886
- * Chunk.headUnsafe(Chunk.empty())
1887
- * } catch (error) {
1888
- * console.log((error as Error).message) // "Index out of bounds"
1889
- * }
1927
+ * // Use Chunk.head when the chunk may be empty
1928
+ * console.log(Option.isNone(Chunk.head(Chunk.empty()))) // true
1890
1929
  * ```
1891
1930
  *
1892
- * @since 2.0.0
1893
1931
  * @category unsafe
1932
+ * @since 2.0.0
1894
1933
  */
1895
1934
  export declare const headUnsafe: <A>(self: Chunk<A>) => A;
1896
1935
  /**
1897
1936
  * Returns the first element of this non empty chunk.
1898
1937
  *
1899
- * @example
1938
+ * **Example** (Getting the first element of a non-empty chunk)
1939
+ *
1900
1940
  * ```ts
1901
1941
  * import { Chunk } from "effect"
1902
1942
  *
@@ -1910,14 +1950,15 @@ export declare const headUnsafe: <A>(self: Chunk<A>) => A;
1910
1950
  * // Chunk.headNonEmpty(Chunk.empty()) // TypeScript error
1911
1951
  * ```
1912
1952
  *
1913
- * @since 2.0.0
1914
1953
  * @category elements
1954
+ * @since 2.0.0
1915
1955
  */
1916
1956
  export declare const headNonEmpty: <A>(self: NonEmptyChunk<A>) => A;
1917
1957
  /**
1918
1958
  * Returns the last element of this chunk if it exists.
1919
1959
  *
1920
- * @example
1960
+ * **Example** (Getting the last element)
1961
+ *
1921
1962
  * ```ts
1922
1963
  * import { Chunk } from "effect"
1923
1964
  *
@@ -1934,9 +1975,10 @@ export declare const last: <A>(self: Chunk<A>) => Option<A>;
1934
1975
  *
1935
1976
  * It will throw an error if the chunk is empty.
1936
1977
  *
1937
- * @example
1978
+ * **Example** (Getting the last element unsafely)
1979
+ *
1938
1980
  * ```ts
1939
- * import { Chunk } from "effect"
1981
+ * import { Chunk, Option } from "effect"
1940
1982
  *
1941
1983
  * const chunk = Chunk.make(1, 2, 3, 4)
1942
1984
  * console.log(Chunk.lastUnsafe(chunk)) // 4
@@ -1944,22 +1986,19 @@ export declare const last: <A>(self: Chunk<A>) => Option<A>;
1944
1986
  * const singleElement = Chunk.make("hello")
1945
1987
  * console.log(Chunk.lastUnsafe(singleElement)) // "hello"
1946
1988
  *
1947
- * // Warning: This will throw for empty chunks
1948
- * try {
1949
- * Chunk.lastUnsafe(Chunk.empty())
1950
- * } catch (error) {
1951
- * console.log((error as Error).message) // "Index out of bounds"
1952
- * }
1989
+ * // Use Chunk.last when the chunk may be empty
1990
+ * console.log(Option.isNone(Chunk.last(Chunk.empty()))) // true
1953
1991
  * ```
1954
1992
  *
1955
- * @since 2.0.0
1956
1993
  * @category unsafe
1994
+ * @since 2.0.0
1957
1995
  */
1958
1996
  export declare const lastUnsafe: <A>(self: Chunk<A>) => A;
1959
1997
  /**
1960
1998
  * Returns the last element of this non empty chunk.
1961
1999
  *
1962
- * @example
2000
+ * **Example** (Getting the last element of a non-empty chunk)
2001
+ *
1963
2002
  * ```ts
1964
2003
  * import { Chunk } from "effect"
1965
2004
  *
@@ -1973,14 +2012,15 @@ export declare const lastUnsafe: <A>(self: Chunk<A>) => A;
1973
2012
  * // Chunk.lastNonEmpty(Chunk.empty()) // TypeScript error
1974
2013
  * ```
1975
2014
  *
1976
- * @since 3.4.0
1977
2015
  * @category elements
2016
+ * @since 3.4.0
1978
2017
  */
1979
2018
  export declare const lastNonEmpty: <A>(self: NonEmptyChunk<A>) => A;
1980
2019
  /**
1981
2020
  * A namespace containing utility types for Chunk operations.
1982
2021
  *
1983
- * @example
2022
+ * **Example** (Working with Chunk utility types)
2023
+ *
1984
2024
  * ```ts
1985
2025
  * import type { Chunk } from "effect"
1986
2026
  *
@@ -2000,7 +2040,8 @@ export declare namespace Chunk {
2000
2040
  /**
2001
2041
  * Infers the element type of a Chunk.
2002
2042
  *
2003
- * @example
2043
+ * **Example** (Inferring element types)
2044
+ *
2004
2045
  * ```ts
2005
2046
  * import type { Chunk } from "effect"
2006
2047
  *
@@ -2018,7 +2059,8 @@ export declare namespace Chunk {
2018
2059
  /**
2019
2060
  * Constructs a Chunk type preserving non-emptiness.
2020
2061
  *
2021
- * @example
2062
+ * **Example** (Preserving non-emptiness)
2063
+ *
2022
2064
  * ```ts
2023
2065
  * import type { Chunk } from "effect"
2024
2066
  *
@@ -2036,7 +2078,8 @@ export declare namespace Chunk {
2036
2078
  /**
2037
2079
  * Creates a non-empty Chunk if either input is non-empty.
2038
2080
  *
2039
- * @example
2081
+ * **Example** (Preserving non-emptiness from either input)
2082
+ *
2040
2083
  * ```ts
2041
2084
  * import type { Chunk } from "effect"
2042
2085
  *
@@ -2067,7 +2110,8 @@ export declare namespace Chunk {
2067
2110
  /**
2068
2111
  * Creates a non-empty Chunk only if both inputs are non-empty.
2069
2112
  *
2070
- * @example
2113
+ * **Example** (Requiring non-emptiness from both inputs)
2114
+ *
2071
2115
  * ```ts
2072
2116
  * import type { Chunk } from "effect"
2073
2117
  *
@@ -2098,7 +2142,8 @@ export declare namespace Chunk {
2098
2142
  /**
2099
2143
  * Flattens a nested Chunk type.
2100
2144
  *
2101
- * @example
2145
+ * **Example** (Flattening nested chunk types)
2146
+ *
2102
2147
  * ```ts
2103
2148
  * import type { Chunk } from "effect"
2104
2149
  *
@@ -2118,83 +2163,80 @@ export declare namespace Chunk {
2118
2163
  * Transforms the elements of a chunk using the specified mapping function.
2119
2164
  * If the input chunk is non-empty, the resulting chunk will also be non-empty.
2120
2165
  *
2121
- * @example
2166
+ * **Example** (Mapping values)
2122
2167
  *
2123
2168
  * ```ts
2124
2169
  * import { Chunk } from "effect"
2125
2170
  *
2126
2171
  * const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
2127
2172
  *
2128
- * console.log(result)
2129
- * // { _id: 'Chunk', values: [ 2, 3 ] }
2173
+ * console.log(Chunk.toArray(result)) // [2, 3]
2130
2174
  * ```
2131
2175
  *
2132
- * @since 2.0.0
2133
2176
  * @category mapping
2177
+ * @since 2.0.0
2134
2178
  */
2135
2179
  export declare const map: {
2136
2180
  /**
2137
2181
  * Transforms the elements of a chunk using the specified mapping function.
2138
2182
  * If the input chunk is non-empty, the resulting chunk will also be non-empty.
2139
2183
  *
2140
- * @example
2184
+ * **Example** (Mapping values)
2141
2185
  *
2142
2186
  * ```ts
2143
2187
  * import { Chunk } from "effect"
2144
2188
  *
2145
2189
  * const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
2146
2190
  *
2147
- * console.log(result)
2148
- * // { _id: 'Chunk', values: [ 2, 3 ] }
2191
+ * console.log(Chunk.toArray(result)) // [2, 3]
2149
2192
  * ```
2150
2193
  *
2151
- * @since 2.0.0
2152
2194
  * @category mapping
2195
+ * @since 2.0.0
2153
2196
  */
2154
2197
  <S extends Chunk<any>, B>(f: (a: Chunk.Infer<S>, i: number) => B): (self: S) => Chunk.With<S, B>;
2155
2198
  /**
2156
2199
  * Transforms the elements of a chunk using the specified mapping function.
2157
2200
  * If the input chunk is non-empty, the resulting chunk will also be non-empty.
2158
2201
  *
2159
- * @example
2202
+ * **Example** (Mapping values)
2160
2203
  *
2161
2204
  * ```ts
2162
2205
  * import { Chunk } from "effect"
2163
2206
  *
2164
2207
  * const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
2165
2208
  *
2166
- * console.log(result)
2167
- * // { _id: 'Chunk', values: [ 2, 3 ] }
2209
+ * console.log(Chunk.toArray(result)) // [2, 3]
2168
2210
  * ```
2169
2211
  *
2170
- * @since 2.0.0
2171
2212
  * @category mapping
2213
+ * @since 2.0.0
2172
2214
  */
2173
2215
  <A, B>(self: NonEmptyChunk<A>, f: (a: A, i: number) => B): NonEmptyChunk<B>;
2174
2216
  /**
2175
2217
  * Transforms the elements of a chunk using the specified mapping function.
2176
2218
  * If the input chunk is non-empty, the resulting chunk will also be non-empty.
2177
2219
  *
2178
- * @example
2220
+ * **Example** (Mapping values)
2179
2221
  *
2180
2222
  * ```ts
2181
2223
  * import { Chunk } from "effect"
2182
2224
  *
2183
2225
  * const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
2184
2226
  *
2185
- * console.log(result)
2186
- * // { _id: 'Chunk', values: [ 2, 3 ] }
2227
+ * console.log(Chunk.toArray(result)) // [2, 3]
2187
2228
  * ```
2188
2229
  *
2189
- * @since 2.0.0
2190
2230
  * @category mapping
2231
+ * @since 2.0.0
2191
2232
  */
2192
2233
  <A, B>(self: Chunk<A>, f: (a: A, i: number) => B): Chunk<B>;
2193
2234
  };
2194
2235
  /**
2195
2236
  * Statefully maps over the chunk, producing new elements of type `B`.
2196
2237
  *
2197
- * @example
2238
+ * **Example** (Mapping with accumulated state)
2239
+ *
2198
2240
  * ```ts
2199
2241
  * import { Chunk } from "effect"
2200
2242
  *
@@ -2217,14 +2259,15 @@ export declare const map: {
2217
2259
  * console.log(Chunk.toArray(indexed)) // ["0: hello", "1: world", "2: effect"]
2218
2260
  * ```
2219
2261
  *
2220
- * @since 2.0.0
2221
2262
  * @category folding
2263
+ * @since 2.0.0
2222
2264
  */
2223
2265
  export declare const mapAccum: {
2224
2266
  /**
2225
2267
  * Statefully maps over the chunk, producing new elements of type `B`.
2226
2268
  *
2227
- * @example
2269
+ * **Example** (Mapping with accumulated state)
2270
+ *
2228
2271
  * ```ts
2229
2272
  * import { Chunk } from "effect"
2230
2273
  *
@@ -2247,14 +2290,15 @@ export declare const mapAccum: {
2247
2290
  * console.log(Chunk.toArray(indexed)) // ["0: hello", "1: world", "2: effect"]
2248
2291
  * ```
2249
2292
  *
2250
- * @since 2.0.0
2251
2293
  * @category folding
2294
+ * @since 2.0.0
2252
2295
  */
2253
2296
  <S, A, B>(s: S, f: (s: S, a: A) => readonly [S, B]): (self: Chunk<A>) => [S, Chunk<B>];
2254
2297
  /**
2255
2298
  * Statefully maps over the chunk, producing new elements of type `B`.
2256
2299
  *
2257
- * @example
2300
+ * **Example** (Mapping with accumulated state)
2301
+ *
2258
2302
  * ```ts
2259
2303
  * import { Chunk } from "effect"
2260
2304
  *
@@ -2277,8 +2321,8 @@ export declare const mapAccum: {
2277
2321
  * console.log(Chunk.toArray(indexed)) // ["0: hello", "1: world", "2: effect"]
2278
2322
  * ```
2279
2323
  *
2280
- * @since 2.0.0
2281
2324
  * @category folding
2325
+ * @since 2.0.0
2282
2326
  */
2283
2327
  <S, A, B>(self: Chunk<A>, s: S, f: (s: S, a: A) => readonly [S, B]): [S, Chunk<B>];
2284
2328
  };
@@ -2288,7 +2332,8 @@ export declare const mapAccum: {
2288
2332
  * - Returns `[excluded, satisfying]`.
2289
2333
  * - The filter receives `(element, index)`.
2290
2334
  *
2291
- * @example
2335
+ * **Example** (Partitioning with a Result)
2336
+ *
2292
2337
  * ```ts
2293
2338
  * import { Chunk, Result } from "effect"
2294
2339
  *
@@ -2310,7 +2355,8 @@ export declare const partition: {
2310
2355
  * - Returns `[excluded, satisfying]`.
2311
2356
  * - The filter receives `(element, index)`.
2312
2357
  *
2313
- * @example
2358
+ * **Example** (Partitioning with a Result)
2359
+ *
2314
2360
  * ```ts
2315
2361
  * import { Chunk, Result } from "effect"
2316
2362
  *
@@ -2332,7 +2378,8 @@ export declare const partition: {
2332
2378
  * - Returns `[excluded, satisfying]`.
2333
2379
  * - The filter receives `(element, index)`.
2334
2380
  *
2335
- * @example
2381
+ * **Example** (Partitioning with a Result)
2382
+ *
2336
2383
  * ```ts
2337
2384
  * import { Chunk, Result } from "effect"
2338
2385
  *
@@ -2350,9 +2397,14 @@ export declare const partition: {
2350
2397
  <A, Pass, Fail>(self: Chunk<A>, f: (input: A, i: number) => Result<Pass, Fail>): [excluded: Chunk<Fail>, satisfying: Chunk<Pass>];
2351
2398
  };
2352
2399
  /**
2353
- * Partitions the elements of this chunk into two chunks.
2400
+ * Separates a chunk of `Result` values into a chunk of failures and a chunk of
2401
+ * successes.
2402
+ *
2403
+ * The returned tuple is `[failures, successes]`, preserving the original order
2404
+ * within each side.
2405
+ *
2406
+ * **Example** (Separating failures and successes)
2354
2407
  *
2355
- * @example
2356
2408
  * ```ts
2357
2409
  * import { Chunk } from "effect"
2358
2410
  * import * as Result from "effect/Result"
@@ -2383,7 +2435,8 @@ export declare const separate: <A, B>(self: Chunk<Result<B, A>>) => [Chunk<A>, C
2383
2435
  /**
2384
2436
  * Retrieves the size of the chunk.
2385
2437
  *
2386
- * @example
2438
+ * **Example** (Getting chunk size)
2439
+ *
2387
2440
  * ```ts
2388
2441
  * import { Chunk } from "effect"
2389
2442
  *
@@ -2398,7 +2451,8 @@ export declare const size: <A>(self: Chunk<A>) => number;
2398
2451
  /**
2399
2452
  * Sort the elements of a Chunk in increasing order, creating a new Chunk.
2400
2453
  *
2401
- * @example
2454
+ * **Example** (Sorting chunks)
2455
+ *
2402
2456
  * ```ts
2403
2457
  * import { Chunk } from "effect"
2404
2458
  * import * as Order from "effect/Order"
@@ -2417,14 +2471,15 @@ export declare const size: <A>(self: Chunk<A>) => number;
2417
2471
  * console.log(Chunk.toArray(sortedWords)) // ["apple", "banana", "cherry"]
2418
2472
  * ```
2419
2473
  *
2420
- * @since 2.0.0
2421
2474
  * @category sorting
2475
+ * @since 2.0.0
2422
2476
  */
2423
2477
  export declare const sort: {
2424
2478
  /**
2425
2479
  * Sort the elements of a Chunk in increasing order, creating a new Chunk.
2426
2480
  *
2427
- * @example
2481
+ * **Example** (Sorting chunks)
2482
+ *
2428
2483
  * ```ts
2429
2484
  * import { Chunk } from "effect"
2430
2485
  * import * as Order from "effect/Order"
@@ -2443,14 +2498,15 @@ export declare const sort: {
2443
2498
  * console.log(Chunk.toArray(sortedWords)) // ["apple", "banana", "cherry"]
2444
2499
  * ```
2445
2500
  *
2446
- * @since 2.0.0
2447
2501
  * @category sorting
2502
+ * @since 2.0.0
2448
2503
  */
2449
2504
  <B>(O: Order.Order<B>): <A extends B>(self: Chunk<A>) => Chunk<A>;
2450
2505
  /**
2451
2506
  * Sort the elements of a Chunk in increasing order, creating a new Chunk.
2452
2507
  *
2453
- * @example
2508
+ * **Example** (Sorting chunks)
2509
+ *
2454
2510
  * ```ts
2455
2511
  * import { Chunk } from "effect"
2456
2512
  * import * as Order from "effect/Order"
@@ -2469,15 +2525,16 @@ export declare const sort: {
2469
2525
  * console.log(Chunk.toArray(sortedWords)) // ["apple", "banana", "cherry"]
2470
2526
  * ```
2471
2527
  *
2472
- * @since 2.0.0
2473
2528
  * @category sorting
2529
+ * @since 2.0.0
2474
2530
  */
2475
2531
  <A extends B, B>(self: Chunk<A>, O: Order.Order<B>): Chunk<A>;
2476
2532
  };
2477
2533
  /**
2478
2534
  * Sorts the elements of a Chunk based on a projection function.
2479
2535
  *
2480
- * @example
2536
+ * **Example** (Sorting chunks by a derived value)
2537
+ *
2481
2538
  * ```ts
2482
2539
  * import { Chunk } from "effect"
2483
2540
  * import * as Order from "effect/Order"
@@ -2504,14 +2561,15 @@ export declare const sort: {
2504
2561
  * console.log(Chunk.toArray(byLength)) // ["a", "ab", "abc"]
2505
2562
  * ```
2506
2563
  *
2507
- * @since 2.0.0
2508
2564
  * @category sorting
2565
+ * @since 2.0.0
2509
2566
  */
2510
2567
  export declare const sortWith: {
2511
2568
  /**
2512
2569
  * Sorts the elements of a Chunk based on a projection function.
2513
2570
  *
2514
- * @example
2571
+ * **Example** (Sorting chunks by a derived value)
2572
+ *
2515
2573
  * ```ts
2516
2574
  * import { Chunk } from "effect"
2517
2575
  * import * as Order from "effect/Order"
@@ -2538,14 +2596,15 @@ export declare const sortWith: {
2538
2596
  * console.log(Chunk.toArray(byLength)) // ["a", "ab", "abc"]
2539
2597
  * ```
2540
2598
  *
2541
- * @since 2.0.0
2542
2599
  * @category sorting
2600
+ * @since 2.0.0
2543
2601
  */
2544
2602
  <A, B>(f: (a: A) => B, order: Order.Order<B>): (self: Chunk<A>) => Chunk<A>;
2545
2603
  /**
2546
2604
  * Sorts the elements of a Chunk based on a projection function.
2547
2605
  *
2548
- * @example
2606
+ * **Example** (Sorting chunks by a derived value)
2607
+ *
2549
2608
  * ```ts
2550
2609
  * import { Chunk } from "effect"
2551
2610
  * import * as Order from "effect/Order"
@@ -2572,15 +2631,16 @@ export declare const sortWith: {
2572
2631
  * console.log(Chunk.toArray(byLength)) // ["a", "ab", "abc"]
2573
2632
  * ```
2574
2633
  *
2575
- * @since 2.0.0
2576
2634
  * @category sorting
2635
+ * @since 2.0.0
2577
2636
  */
2578
2637
  <A, B>(self: Chunk<A>, f: (a: A) => B, order: Order.Order<B>): Chunk<A>;
2579
2638
  };
2580
2639
  /**
2581
2640
  * Returns two splits of this chunk at the specified index.
2582
2641
  *
2583
- * @example
2642
+ * **Example** (Splitting at an index)
2643
+ *
2584
2644
  * ```ts
2585
2645
  * import { Chunk } from "effect"
2586
2646
  *
@@ -2600,14 +2660,15 @@ export declare const sortWith: {
2600
2660
  * console.log(Chunk.toArray(empty2)) // []
2601
2661
  * ```
2602
2662
  *
2603
- * @since 2.0.0
2604
2663
  * @category splitting
2664
+ * @since 2.0.0
2605
2665
  */
2606
2666
  export declare const splitAt: {
2607
2667
  /**
2608
2668
  * Returns two splits of this chunk at the specified index.
2609
2669
  *
2610
- * @example
2670
+ * **Example** (Splitting at an index)
2671
+ *
2611
2672
  * ```ts
2612
2673
  * import { Chunk } from "effect"
2613
2674
  *
@@ -2627,14 +2688,15 @@ export declare const splitAt: {
2627
2688
  * console.log(Chunk.toArray(empty2)) // []
2628
2689
  * ```
2629
2690
  *
2630
- * @since 2.0.0
2631
2691
  * @category splitting
2692
+ * @since 2.0.0
2632
2693
  */
2633
2694
  (n: number): <A>(self: Chunk<A>) => [beforeIndex: Chunk<A>, fromIndex: Chunk<A>];
2634
2695
  /**
2635
2696
  * Returns two splits of this chunk at the specified index.
2636
2697
  *
2637
- * @example
2698
+ * **Example** (Splitting at an index)
2699
+ *
2638
2700
  * ```ts
2639
2701
  * import { Chunk } from "effect"
2640
2702
  *
@@ -2654,16 +2716,21 @@ export declare const splitAt: {
2654
2716
  * console.log(Chunk.toArray(empty2)) // []
2655
2717
  * ```
2656
2718
  *
2657
- * @since 2.0.0
2658
2719
  * @category splitting
2720
+ * @since 2.0.0
2659
2721
  */
2660
2722
  <A>(self: Chunk<A>, n: number): [beforeIndex: Chunk<A>, fromIndex: Chunk<A>];
2661
2723
  };
2662
2724
  /**
2663
- * Splits a `NonEmptyChunk` into two segments, with the first segment containing a maximum of `n` elements.
2664
- * The value of `n` must be `>= 1`.
2725
+ * Splits a `NonEmptyChunk` at `n`, returning a non-empty prefix and the
2726
+ * remaining suffix.
2727
+ *
2728
+ * `n` is floored and normalized to at least `1`. If `n` is greater than or
2729
+ * equal to the chunk length, the first result is the original chunk and the
2730
+ * second result is empty.
2731
+ *
2732
+ * **Example** (Splitting non-empty chunks at an index)
2665
2733
  *
2666
- * @example
2667
2734
  * ```ts
2668
2735
  * import { Chunk } from "effect"
2669
2736
  *
@@ -2686,10 +2753,15 @@ export declare const splitAt: {
2686
2753
  */
2687
2754
  export declare const splitNonEmptyAt: {
2688
2755
  /**
2689
- * Splits a `NonEmptyChunk` into two segments, with the first segment containing a maximum of `n` elements.
2690
- * The value of `n` must be `>= 1`.
2756
+ * Splits a `NonEmptyChunk` at `n`, returning a non-empty prefix and the
2757
+ * remaining suffix.
2758
+ *
2759
+ * `n` is floored and normalized to at least `1`. If `n` is greater than or
2760
+ * equal to the chunk length, the first result is the original chunk and the
2761
+ * second result is empty.
2762
+ *
2763
+ * **Example** (Splitting non-empty chunks at an index)
2691
2764
  *
2692
- * @example
2693
2765
  * ```ts
2694
2766
  * import { Chunk } from "effect"
2695
2767
  *
@@ -2712,10 +2784,15 @@ export declare const splitNonEmptyAt: {
2712
2784
  */
2713
2785
  (n: number): <A>(self: NonEmptyChunk<A>) => [beforeIndex: NonEmptyChunk<A>, fromIndex: Chunk<A>];
2714
2786
  /**
2715
- * Splits a `NonEmptyChunk` into two segments, with the first segment containing a maximum of `n` elements.
2716
- * The value of `n` must be `>= 1`.
2787
+ * Splits a `NonEmptyChunk` at `n`, returning a non-empty prefix and the
2788
+ * remaining suffix.
2789
+ *
2790
+ * `n` is floored and normalized to at least `1`. If `n` is greater than or
2791
+ * equal to the chunk length, the first result is the original chunk and the
2792
+ * second result is empty.
2793
+ *
2794
+ * **Example** (Splitting non-empty chunks at an index)
2717
2795
  *
2718
- * @example
2719
2796
  * ```ts
2720
2797
  * import { Chunk } from "effect"
2721
2798
  *
@@ -2739,9 +2816,13 @@ export declare const splitNonEmptyAt: {
2739
2816
  <A>(self: NonEmptyChunk<A>, n: number): [beforeIndex: NonEmptyChunk<A>, fromIndex: Chunk<A>];
2740
2817
  };
2741
2818
  /**
2742
- * Splits this chunk into `n` equally sized chunks.
2819
+ * Splits a chunk into up to `n` chunks, distributing elements in order.
2820
+ *
2821
+ * The chunk size is derived from the input length and `n`; the final chunk may
2822
+ * contain fewer elements than the others.
2823
+ *
2824
+ * **Example** (Splitting chunks into groups)
2743
2825
  *
2744
- * @example
2745
2826
  * ```ts
2746
2827
  * import { Chunk } from "effect"
2747
2828
  *
@@ -2762,14 +2843,18 @@ export declare const splitNonEmptyAt: {
2762
2843
  * // [[1, 2, 3, 4, 5, 6, 7, 8, 9]]
2763
2844
  * ```
2764
2845
  *
2765
- * @since 2.0.0
2766
2846
  * @category splitting
2847
+ * @since 2.0.0
2767
2848
  */
2768
2849
  export declare const split: {
2769
2850
  /**
2770
- * Splits this chunk into `n` equally sized chunks.
2851
+ * Splits a chunk into up to `n` chunks, distributing elements in order.
2852
+ *
2853
+ * The chunk size is derived from the input length and `n`; the final chunk may
2854
+ * contain fewer elements than the others.
2855
+ *
2856
+ * **Example** (Splitting chunks into groups)
2771
2857
  *
2772
- * @example
2773
2858
  * ```ts
2774
2859
  * import { Chunk } from "effect"
2775
2860
  *
@@ -2790,14 +2875,18 @@ export declare const split: {
2790
2875
  * // [[1, 2, 3, 4, 5, 6, 7, 8, 9]]
2791
2876
  * ```
2792
2877
  *
2793
- * @since 2.0.0
2794
2878
  * @category splitting
2879
+ * @since 2.0.0
2795
2880
  */
2796
2881
  (n: number): <A>(self: Chunk<A>) => Chunk<Chunk<A>>;
2797
2882
  /**
2798
- * Splits this chunk into `n` equally sized chunks.
2883
+ * Splits a chunk into up to `n` chunks, distributing elements in order.
2884
+ *
2885
+ * The chunk size is derived from the input length and `n`; the final chunk may
2886
+ * contain fewer elements than the others.
2887
+ *
2888
+ * **Example** (Splitting chunks into groups)
2799
2889
  *
2800
- * @example
2801
2890
  * ```ts
2802
2891
  * import { Chunk } from "effect"
2803
2892
  *
@@ -2818,8 +2907,8 @@ export declare const split: {
2818
2907
  * // [[1, 2, 3, 4, 5, 6, 7, 8, 9]]
2819
2908
  * ```
2820
2909
  *
2821
- * @since 2.0.0
2822
2910
  * @category splitting
2911
+ * @since 2.0.0
2823
2912
  */
2824
2913
  <A>(self: Chunk<A>, n: number): Chunk<Chunk<A>>;
2825
2914
  };
@@ -2827,7 +2916,8 @@ export declare const split: {
2827
2916
  * Splits this chunk on the first element that matches this predicate.
2828
2917
  * Returns a tuple containing two chunks: the first one is before the match, and the second one is from the match onward.
2829
2918
  *
2830
- * @example
2919
+ * **Example** (Splitting at a matching element)
2920
+ *
2831
2921
  * ```ts
2832
2922
  * import { Chunk } from "effect"
2833
2923
  *
@@ -2855,7 +2945,8 @@ export declare const splitWhere: {
2855
2945
  * Splits this chunk on the first element that matches this predicate.
2856
2946
  * Returns a tuple containing two chunks: the first one is before the match, and the second one is from the match onward.
2857
2947
  *
2858
- * @example
2948
+ * **Example** (Splitting at a matching element)
2949
+ *
2859
2950
  * ```ts
2860
2951
  * import { Chunk } from "effect"
2861
2952
  *
@@ -2883,7 +2974,8 @@ export declare const splitWhere: {
2883
2974
  * Splits this chunk on the first element that matches this predicate.
2884
2975
  * Returns a tuple containing two chunks: the first one is before the match, and the second one is from the match onward.
2885
2976
  *
2886
- * @example
2977
+ * **Example** (Splitting at a matching element)
2978
+ *
2887
2979
  * ```ts
2888
2980
  * import { Chunk } from "effect"
2889
2981
  *
@@ -2911,7 +3003,8 @@ export declare const splitWhere: {
2911
3003
  /**
2912
3004
  * Returns every elements after the first.
2913
3005
  *
2914
- * @example
3006
+ * **Example** (Getting the tail safely)
3007
+ *
2915
3008
  * ```ts
2916
3009
  * import { Chunk } from "effect"
2917
3010
  *
@@ -2925,14 +3018,15 @@ export declare const splitWhere: {
2925
3018
  * console.log(Chunk.tail(empty)) // Option.none()
2926
3019
  * ```
2927
3020
  *
2928
- * @since 2.0.0
2929
3021
  * @category elements
3022
+ * @since 2.0.0
2930
3023
  */
2931
3024
  export declare const tail: <A>(self: Chunk<A>) => O.Option<Chunk<A>>;
2932
3025
  /**
2933
3026
  * Returns every elements after the first.
2934
3027
  *
2935
- * @example
3028
+ * **Example** (Getting the tail of a non-empty chunk)
3029
+ *
2936
3030
  * ```ts
2937
3031
  * import { Chunk } from "effect"
2938
3032
  *
@@ -2948,14 +3042,15 @@ export declare const tail: <A>(self: Chunk<A>) => O.Option<Chunk<A>>;
2948
3042
  * // Chunk.tailNonEmpty(Chunk.empty()) // TypeScript error
2949
3043
  * ```
2950
3044
  *
2951
- * @since 2.0.0
2952
3045
  * @category elements
3046
+ * @since 2.0.0
2953
3047
  */
2954
3048
  export declare const tailNonEmpty: <A>(self: NonEmptyChunk<A>) => Chunk<A>;
2955
3049
  /**
2956
3050
  * Takes the last `n` elements.
2957
3051
  *
2958
- * @example
3052
+ * **Example** (Taking elements from the end)
3053
+ *
2959
3054
  * ```ts
2960
3055
  * import { Chunk } from "effect"
2961
3056
  *
@@ -2972,14 +3067,15 @@ export declare const tailNonEmpty: <A>(self: NonEmptyChunk<A>) => Chunk<A>;
2972
3067
  * console.log(Chunk.toArray(none)) // []
2973
3068
  * ```
2974
3069
  *
2975
- * @since 2.0.0
2976
3070
  * @category elements
3071
+ * @since 2.0.0
2977
3072
  */
2978
3073
  export declare const takeRight: {
2979
3074
  /**
2980
3075
  * Takes the last `n` elements.
2981
3076
  *
2982
- * @example
3077
+ * **Example** (Taking elements from the end)
3078
+ *
2983
3079
  * ```ts
2984
3080
  * import { Chunk } from "effect"
2985
3081
  *
@@ -2996,14 +3092,15 @@ export declare const takeRight: {
2996
3092
  * console.log(Chunk.toArray(none)) // []
2997
3093
  * ```
2998
3094
  *
2999
- * @since 2.0.0
3000
3095
  * @category elements
3096
+ * @since 2.0.0
3001
3097
  */
3002
3098
  (n: number): <A>(self: Chunk<A>) => Chunk<A>;
3003
3099
  /**
3004
3100
  * Takes the last `n` elements.
3005
3101
  *
3006
- * @example
3102
+ * **Example** (Taking elements from the end)
3103
+ *
3007
3104
  * ```ts
3008
3105
  * import { Chunk } from "effect"
3009
3106
  *
@@ -3020,15 +3117,16 @@ export declare const takeRight: {
3020
3117
  * console.log(Chunk.toArray(none)) // []
3021
3118
  * ```
3022
3119
  *
3023
- * @since 2.0.0
3024
3120
  * @category elements
3121
+ * @since 2.0.0
3025
3122
  */
3026
3123
  <A>(self: Chunk<A>, n: number): Chunk<A>;
3027
3124
  };
3028
3125
  /**
3029
3126
  * Takes all elements so long as the predicate returns true.
3030
3127
  *
3031
- * @example
3128
+ * **Example** (Taking elements while a predicate matches)
3129
+ *
3032
3130
  * ```ts
3033
3131
  * import { Chunk } from "effect"
3034
3132
  *
@@ -3046,14 +3144,15 @@ export declare const takeRight: {
3046
3144
  * console.log(Chunk.toArray(all)) // [1, 2, 3]
3047
3145
  * ```
3048
3146
  *
3049
- * @since 2.0.0
3050
3147
  * @category elements
3148
+ * @since 2.0.0
3051
3149
  */
3052
3150
  export declare const takeWhile: {
3053
3151
  /**
3054
3152
  * Takes all elements so long as the predicate returns true.
3055
3153
  *
3056
- * @example
3154
+ * **Example** (Taking elements while a predicate matches)
3155
+ *
3057
3156
  * ```ts
3058
3157
  * import { Chunk } from "effect"
3059
3158
  *
@@ -3071,14 +3170,15 @@ export declare const takeWhile: {
3071
3170
  * console.log(Chunk.toArray(all)) // [1, 2, 3]
3072
3171
  * ```
3073
3172
  *
3074
- * @since 2.0.0
3075
3173
  * @category elements
3174
+ * @since 2.0.0
3076
3175
  */
3077
3176
  <A, B extends A>(refinement: Refinement<NoInfer<A>, B>): (self: Chunk<A>) => Chunk<B>;
3078
3177
  /**
3079
3178
  * Takes all elements so long as the predicate returns true.
3080
3179
  *
3081
- * @example
3180
+ * **Example** (Taking elements while a predicate matches)
3181
+ *
3082
3182
  * ```ts
3083
3183
  * import { Chunk } from "effect"
3084
3184
  *
@@ -3096,14 +3196,15 @@ export declare const takeWhile: {
3096
3196
  * console.log(Chunk.toArray(all)) // [1, 2, 3]
3097
3197
  * ```
3098
3198
  *
3099
- * @since 2.0.0
3100
3199
  * @category elements
3200
+ * @since 2.0.0
3101
3201
  */
3102
3202
  <A>(predicate: Predicate<NoInfer<A>>): (self: Chunk<A>) => Chunk<A>;
3103
3203
  /**
3104
3204
  * Takes all elements so long as the predicate returns true.
3105
3205
  *
3106
- * @example
3206
+ * **Example** (Taking elements while a predicate matches)
3207
+ *
3107
3208
  * ```ts
3108
3209
  * import { Chunk } from "effect"
3109
3210
  *
@@ -3121,14 +3222,15 @@ export declare const takeWhile: {
3121
3222
  * console.log(Chunk.toArray(all)) // [1, 2, 3]
3122
3223
  * ```
3123
3224
  *
3124
- * @since 2.0.0
3125
3225
  * @category elements
3226
+ * @since 2.0.0
3126
3227
  */
3127
3228
  <A, B extends A>(self: Chunk<A>, refinement: Refinement<A, B>): Chunk<B>;
3128
3229
  /**
3129
3230
  * Takes all elements so long as the predicate returns true.
3130
3231
  *
3131
- * @example
3232
+ * **Example** (Taking elements while a predicate matches)
3233
+ *
3132
3234
  * ```ts
3133
3235
  * import { Chunk } from "effect"
3134
3236
  *
@@ -3146,15 +3248,16 @@ export declare const takeWhile: {
3146
3248
  * console.log(Chunk.toArray(all)) // [1, 2, 3]
3147
3249
  * ```
3148
3250
  *
3149
- * @since 2.0.0
3150
3251
  * @category elements
3252
+ * @since 2.0.0
3151
3253
  */
3152
3254
  <A>(self: Chunk<A>, predicate: Predicate<A>): Chunk<A>;
3153
3255
  };
3154
3256
  /**
3155
3257
  * Creates a Chunks of unique values, in order, from all given Chunks.
3156
3258
  *
3157
- * @example
3259
+ * **Example** (Unioning chunks)
3260
+ *
3158
3261
  * ```ts
3159
3262
  * import { Chunk } from "effect"
3160
3263
  *
@@ -3170,14 +3273,15 @@ export declare const takeWhile: {
3170
3273
  * console.log(Chunk.toArray(unified)) // [1, 2, 3]
3171
3274
  * ```
3172
3275
  *
3173
- * @since 2.0.0
3174
3276
  * @category elements
3277
+ * @since 2.0.0
3175
3278
  */
3176
3279
  export declare const union: {
3177
3280
  /**
3178
3281
  * Creates a Chunks of unique values, in order, from all given Chunks.
3179
3282
  *
3180
- * @example
3283
+ * **Example** (Unioning chunks)
3284
+ *
3181
3285
  * ```ts
3182
3286
  * import { Chunk } from "effect"
3183
3287
  *
@@ -3193,14 +3297,15 @@ export declare const union: {
3193
3297
  * console.log(Chunk.toArray(unified)) // [1, 2, 3]
3194
3298
  * ```
3195
3299
  *
3196
- * @since 2.0.0
3197
3300
  * @category elements
3301
+ * @since 2.0.0
3198
3302
  */
3199
3303
  <A>(that: Chunk<A>): <B>(self: Chunk<B>) => Chunk<A | B>;
3200
3304
  /**
3201
3305
  * Creates a Chunks of unique values, in order, from all given Chunks.
3202
3306
  *
3203
- * @example
3307
+ * **Example** (Unioning chunks)
3308
+ *
3204
3309
  * ```ts
3205
3310
  * import { Chunk } from "effect"
3206
3311
  *
@@ -3216,15 +3321,17 @@ export declare const union: {
3216
3321
  * console.log(Chunk.toArray(unified)) // [1, 2, 3]
3217
3322
  * ```
3218
3323
  *
3219
- * @since 2.0.0
3220
3324
  * @category elements
3325
+ * @since 2.0.0
3221
3326
  */
3222
3327
  <A, B>(self: Chunk<A>, that: Chunk<B>): Chunk<A | B>;
3223
3328
  };
3224
3329
  /**
3225
- * Remove duplicates from an array, keeping the first occurrence of an element.
3330
+ * Removes duplicate elements from a `Chunk`, preserving the first occurrence
3331
+ * of each value.
3332
+ *
3333
+ * **Example** (Removing duplicate values)
3226
3334
  *
3227
- * @example
3228
3335
  * ```ts
3229
3336
  * import { Chunk } from "effect"
3230
3337
  *
@@ -3243,14 +3350,15 @@ export declare const union: {
3243
3350
  * console.log(Chunk.toArray(uniqueDeduped)) // [1, 2, 3]
3244
3351
  * ```
3245
3352
  *
3246
- * @since 2.0.0
3247
3353
  * @category elements
3354
+ * @since 2.0.0
3248
3355
  */
3249
3356
  export declare const dedupe: <A>(self: Chunk<A>) => Chunk<A>;
3250
3357
  /**
3251
3358
  * Deduplicates adjacent elements that are identical.
3252
3359
  *
3253
- * @example
3360
+ * **Example** (Removing adjacent duplicates)
3361
+ *
3254
3362
  * ```ts
3255
3363
  * import { Chunk } from "effect"
3256
3364
  *
@@ -3264,8 +3372,8 @@ export declare const dedupe: <A>(self: Chunk<A>) => Chunk<A>;
3264
3372
  * console.log(Chunk.toArray(mixedResult)) // ["a", "b", "a"]
3265
3373
  * ```
3266
3374
  *
3267
- * @since 2.0.0
3268
3375
  * @category filtering
3376
+ * @since 2.0.0
3269
3377
  */
3270
3378
  export declare const dedupeAdjacent: <A>(self: Chunk<A>) => Chunk<A>;
3271
3379
  /**
@@ -3273,7 +3381,8 @@ export declare const dedupeAdjacent: <A>(self: Chunk<A>) => Chunk<A>;
3273
3381
  *
3274
3382
  * Note: The function is reverse of `zip`.
3275
3383
  *
3276
- * @example
3384
+ * **Example** (Unzipping pairs)
3385
+ *
3277
3386
  * ```ts
3278
3387
  * import { Chunk } from "effect"
3279
3388
  *
@@ -3293,14 +3402,15 @@ export declare const dedupeAdjacent: <A>(self: Chunk<A>) => Chunk<A>;
3293
3402
  * console.log(Chunk.toArray(emptyStrs)) // []
3294
3403
  * ```
3295
3404
  *
3296
- * @since 2.0.0
3297
3405
  * @category elements
3406
+ * @since 2.0.0
3298
3407
  */
3299
3408
  export declare const unzip: <A, B>(self: Chunk<readonly [A, B]>) => [Chunk<A>, Chunk<B>];
3300
3409
  /**
3301
3410
  * Zips this chunk pointwise with the specified chunk using the specified combiner.
3302
3411
  *
3303
- * @example
3412
+ * **Example** (Zipping chunks with a function)
3413
+ *
3304
3414
  * ```ts
3305
3415
  * import { Chunk } from "effect"
3306
3416
  *
@@ -3316,14 +3426,15 @@ export declare const unzip: <A, B>(self: Chunk<readonly [A, B]>) => [Chunk<A>, C
3316
3426
  * console.log(Chunk.toArray(mixed)) // [[1, "a"], [2, "b"]]
3317
3427
  * ```
3318
3428
  *
3319
- * @since 2.0.0
3320
3429
  * @category zipping
3430
+ * @since 2.0.0
3321
3431
  */
3322
3432
  export declare const zipWith: {
3323
3433
  /**
3324
3434
  * Zips this chunk pointwise with the specified chunk using the specified combiner.
3325
3435
  *
3326
- * @example
3436
+ * **Example** (Zipping chunks with a function)
3437
+ *
3327
3438
  * ```ts
3328
3439
  * import { Chunk } from "effect"
3329
3440
  *
@@ -3339,14 +3450,15 @@ export declare const zipWith: {
3339
3450
  * console.log(Chunk.toArray(mixed)) // [[1, "a"], [2, "b"]]
3340
3451
  * ```
3341
3452
  *
3342
- * @since 2.0.0
3343
3453
  * @category zipping
3454
+ * @since 2.0.0
3344
3455
  */
3345
3456
  <A, B, C>(that: Chunk<B>, f: (a: A, b: B) => C): (self: Chunk<A>) => Chunk<C>;
3346
3457
  /**
3347
3458
  * Zips this chunk pointwise with the specified chunk using the specified combiner.
3348
3459
  *
3349
- * @example
3460
+ * **Example** (Zipping chunks with a function)
3461
+ *
3350
3462
  * ```ts
3351
3463
  * import { Chunk } from "effect"
3352
3464
  *
@@ -3362,15 +3474,16 @@ export declare const zipWith: {
3362
3474
  * console.log(Chunk.toArray(mixed)) // [[1, "a"], [2, "b"]]
3363
3475
  * ```
3364
3476
  *
3365
- * @since 2.0.0
3366
3477
  * @category zipping
3478
+ * @since 2.0.0
3367
3479
  */
3368
3480
  <A, B, C>(self: Chunk<A>, that: Chunk<B>, f: (a: A, b: B) => C): Chunk<C>;
3369
3481
  };
3370
3482
  /**
3371
3483
  * Zips this chunk pointwise with the specified chunk.
3372
3484
  *
3373
- * @example
3485
+ * **Example** (Zipping chunks)
3486
+ *
3374
3487
  * ```ts
3375
3488
  * import { Chunk } from "effect"
3376
3489
  *
@@ -3386,14 +3499,15 @@ export declare const zipWith: {
3386
3499
  * console.log(Chunk.toArray(zipped)) // [[1, "a"], [2, "b"]]
3387
3500
  * ```
3388
3501
  *
3389
- * @since 2.0.0
3390
3502
  * @category zipping
3503
+ * @since 2.0.0
3391
3504
  */
3392
3505
  export declare const zip: {
3393
3506
  /**
3394
3507
  * Zips this chunk pointwise with the specified chunk.
3395
3508
  *
3396
- * @example
3509
+ * **Example** (Zipping chunks)
3510
+ *
3397
3511
  * ```ts
3398
3512
  * import { Chunk } from "effect"
3399
3513
  *
@@ -3409,14 +3523,15 @@ export declare const zip: {
3409
3523
  * console.log(Chunk.toArray(zipped)) // [[1, "a"], [2, "b"]]
3410
3524
  * ```
3411
3525
  *
3412
- * @since 2.0.0
3413
3526
  * @category zipping
3527
+ * @since 2.0.0
3414
3528
  */
3415
3529
  <B>(that: Chunk<B>): <A>(self: Chunk<A>) => Chunk<[A, B]>;
3416
3530
  /**
3417
3531
  * Zips this chunk pointwise with the specified chunk.
3418
3532
  *
3419
- * @example
3533
+ * **Example** (Zipping chunks)
3534
+ *
3420
3535
  * ```ts
3421
3536
  * import { Chunk } from "effect"
3422
3537
  *
@@ -3432,15 +3547,16 @@ export declare const zip: {
3432
3547
  * console.log(Chunk.toArray(zipped)) // [[1, "a"], [2, "b"]]
3433
3548
  * ```
3434
3549
  *
3435
- * @since 2.0.0
3436
3550
  * @category zipping
3551
+ * @since 2.0.0
3437
3552
  */
3438
3553
  <A, B>(self: Chunk<A>, that: Chunk<B>): Chunk<[A, B]>;
3439
3554
  };
3440
3555
  /**
3441
3556
  * Delete the element at the specified index, creating a new `Chunk`.
3442
3557
  *
3443
- * @example
3558
+ * **Example** (Removing an element)
3559
+ *
3444
3560
  * ```ts
3445
3561
  * import { Chunk } from "effect"
3446
3562
  *
@@ -3464,7 +3580,8 @@ export declare const remove: {
3464
3580
  /**
3465
3581
  * Delete the element at the specified index, creating a new `Chunk`.
3466
3582
  *
3467
- * @example
3583
+ * **Example** (Removing an element)
3584
+ *
3468
3585
  * ```ts
3469
3586
  * import { Chunk } from "effect"
3470
3587
  *
@@ -3488,7 +3605,8 @@ export declare const remove: {
3488
3605
  /**
3489
3606
  * Delete the element at the specified index, creating a new `Chunk`.
3490
3607
  *
3491
- * @example
3608
+ * **Example** (Removing an element)
3609
+ *
3492
3610
  * ```ts
3493
3611
  * import { Chunk } from "effect"
3494
3612
  *
@@ -3514,7 +3632,8 @@ export declare const remove: {
3514
3632
  * Applies a function to the element at the specified index, creating a new `Chunk`,
3515
3633
  * or returns `None` if the index is out of bounds.
3516
3634
  *
3517
- * @example
3635
+ * **Example** (Modifying an element)
3636
+ *
3518
3637
  * ```ts
3519
3638
  * import { Chunk } from "effect"
3520
3639
  *
@@ -3539,7 +3658,8 @@ export declare const modify: {
3539
3658
  * Applies a function to the element at the specified index, creating a new `Chunk`,
3540
3659
  * or returns `None` if the index is out of bounds.
3541
3660
  *
3542
- * @example
3661
+ * **Example** (Modifying an element)
3662
+ *
3543
3663
  * ```ts
3544
3664
  * import { Chunk } from "effect"
3545
3665
  *
@@ -3564,7 +3684,8 @@ export declare const modify: {
3564
3684
  * Applies a function to the element at the specified index, creating a new `Chunk`,
3565
3685
  * or returns `None` if the index is out of bounds.
3566
3686
  *
3567
- * @example
3687
+ * **Example** (Modifying an element)
3688
+ *
3568
3689
  * ```ts
3569
3690
  * import { Chunk } from "effect"
3570
3691
  *
@@ -3590,7 +3711,8 @@ export declare const modify: {
3590
3711
  * Change the element at the specified index, creating a new `Chunk`,
3591
3712
  * or returns `None` if the index is out of bounds.
3592
3713
  *
3593
- * @example
3714
+ * **Example** (Replacing an element)
3715
+ *
3594
3716
  * ```ts
3595
3717
  * import { Chunk } from "effect"
3596
3718
  *
@@ -3615,7 +3737,8 @@ export declare const replace: {
3615
3737
  * Change the element at the specified index, creating a new `Chunk`,
3616
3738
  * or returns `None` if the index is out of bounds.
3617
3739
  *
3618
- * @example
3740
+ * **Example** (Replacing an element)
3741
+ *
3619
3742
  * ```ts
3620
3743
  * import { Chunk } from "effect"
3621
3744
  *
@@ -3640,7 +3763,8 @@ export declare const replace: {
3640
3763
  * Change the element at the specified index, creating a new `Chunk`,
3641
3764
  * or returns `None` if the index is out of bounds.
3642
3765
  *
3643
- * @example
3766
+ * **Example** (Replacing an element)
3767
+ *
3644
3768
  * ```ts
3645
3769
  * import { Chunk } from "effect"
3646
3770
  *
@@ -3667,13 +3791,13 @@ export declare const replace: {
3667
3791
  *
3668
3792
  * **Note**. `n` is normalized to an integer >= 1.
3669
3793
  *
3670
- * @example
3794
+ * **Example** (Generating chunks from indices)
3795
+ *
3671
3796
  * ```ts
3672
3797
  * import { Chunk } from "effect"
3673
3798
  *
3674
3799
  * const chunk = Chunk.makeBy(5, (i) => i * 2)
3675
- * console.log(chunk)
3676
- * // { _id: 'Chunk', values: [ 0, 2, 4, 6, 8 ] }
3800
+ * console.log(Chunk.toArray(chunk)) // [0, 2, 4, 6, 8]
3677
3801
  * ```
3678
3802
  *
3679
3803
  * @category constructors
@@ -3685,13 +3809,13 @@ export declare const makeBy: {
3685
3809
  *
3686
3810
  * **Note**. `n` is normalized to an integer >= 1.
3687
3811
  *
3688
- * @example
3812
+ * **Example** (Generating chunks from indices)
3813
+ *
3689
3814
  * ```ts
3690
3815
  * import { Chunk } from "effect"
3691
3816
  *
3692
3817
  * const chunk = Chunk.makeBy(5, (i) => i * 2)
3693
- * console.log(chunk)
3694
- * // { _id: 'Chunk', values: [ 0, 2, 4, 6, 8 ] }
3818
+ * console.log(Chunk.toArray(chunk)) // [0, 2, 4, 6, 8]
3695
3819
  * ```
3696
3820
  *
3697
3821
  * @category constructors
@@ -3703,13 +3827,13 @@ export declare const makeBy: {
3703
3827
  *
3704
3828
  * **Note**. `n` is normalized to an integer >= 1.
3705
3829
  *
3706
- * @example
3830
+ * **Example** (Generating chunks from indices)
3831
+ *
3707
3832
  * ```ts
3708
3833
  * import { Chunk } from "effect"
3709
3834
  *
3710
3835
  * const chunk = Chunk.makeBy(5, (i) => i * 2)
3711
- * console.log(chunk)
3712
- * // { _id: 'Chunk', values: [ 0, 2, 4, 6, 8 ] }
3836
+ * console.log(Chunk.toArray(chunk)) // [0, 2, 4, 6, 8]
3713
3837
  * ```
3714
3838
  *
3715
3839
  * @category constructors
@@ -3718,15 +3842,19 @@ export declare const makeBy: {
3718
3842
  <A>(n: number, f: (i: number) => A): NonEmptyChunk<A>;
3719
3843
  };
3720
3844
  /**
3721
- * Create a non empty `Chunk` containing a range of integers, including both endpoints.
3845
+ * Creates a non-empty `Chunk` of consecutive integers from `start` through
3846
+ * `end`, inclusive.
3847
+ *
3848
+ * If `start` is greater than `end`, returns a single-element chunk containing
3849
+ * `start`.
3850
+ *
3851
+ * **Example** (Creating a range)
3722
3852
  *
3723
- * @example
3724
3853
  * ```ts
3725
3854
  * import { Chunk } from "effect"
3726
3855
  *
3727
3856
  * const chunk = Chunk.range(1, 5)
3728
- * console.log(chunk)
3729
- * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5 ] }
3857
+ * console.log(Chunk.toArray(chunk)) // [1, 2, 3, 4, 5]
3730
3858
  * ```
3731
3859
  *
3732
3860
  * @category constructors
@@ -3736,7 +3864,8 @@ export declare const range: (start: number, end: number) => NonEmptyChunk<number
3736
3864
  /**
3737
3865
  * Returns a function that checks if a `Chunk` contains a given value using the default `Equivalence`.
3738
3866
  *
3739
- * @example
3867
+ * **Example** (Checking membership)
3868
+ *
3740
3869
  * ```ts
3741
3870
  * import { Chunk } from "effect"
3742
3871
  *
@@ -3761,7 +3890,8 @@ export declare const contains: {
3761
3890
  /**
3762
3891
  * Returns a function that checks if a `Chunk` contains a given value using the default `Equivalence`.
3763
3892
  *
3764
- * @example
3893
+ * **Example** (Checking membership)
3894
+ *
3765
3895
  * ```ts
3766
3896
  * import { Chunk } from "effect"
3767
3897
  *
@@ -3786,7 +3916,8 @@ export declare const contains: {
3786
3916
  /**
3787
3917
  * Returns a function that checks if a `Chunk` contains a given value using the default `Equivalence`.
3788
3918
  *
3789
- * @example
3919
+ * **Example** (Checking membership)
3920
+ *
3790
3921
  * ```ts
3791
3922
  * import { Chunk } from "effect"
3792
3923
  *
@@ -3812,7 +3943,8 @@ export declare const contains: {
3812
3943
  /**
3813
3944
  * Returns a function that checks if a `Chunk` contains a given value using a provided `isEquivalent` function.
3814
3945
  *
3815
- * @example
3946
+ * **Example** (Checking membership with custom equivalence)
3947
+ *
3816
3948
  * ```ts
3817
3949
  * import { Chunk } from "effect"
3818
3950
  *
@@ -3845,7 +3977,8 @@ export declare const containsWith: <A>(isEquivalent: (self: A, that: A) => boole
3845
3977
  * Returns the first element that satisfies the specified
3846
3978
  * predicate, or `None` if no such element exists.
3847
3979
  *
3848
- * @example
3980
+ * **Example** (Finding the first matching element)
3981
+ *
3849
3982
  * ```ts
3850
3983
  * import { Chunk, Option } from "effect"
3851
3984
  *
@@ -3875,7 +4008,8 @@ export declare const findFirst: {
3875
4008
  * Returns the first element that satisfies the specified
3876
4009
  * predicate, or `None` if no such element exists.
3877
4010
  *
3878
- * @example
4011
+ * **Example** (Finding the first matching element)
4012
+ *
3879
4013
  * ```ts
3880
4014
  * import { Chunk, Option } from "effect"
3881
4015
  *
@@ -3905,7 +4039,8 @@ export declare const findFirst: {
3905
4039
  * Returns the first element that satisfies the specified
3906
4040
  * predicate, or `None` if no such element exists.
3907
4041
  *
3908
- * @example
4042
+ * **Example** (Finding the first matching element)
4043
+ *
3909
4044
  * ```ts
3910
4045
  * import { Chunk, Option } from "effect"
3911
4046
  *
@@ -3935,7 +4070,8 @@ export declare const findFirst: {
3935
4070
  * Returns the first element that satisfies the specified
3936
4071
  * predicate, or `None` if no such element exists.
3937
4072
  *
3938
- * @example
4073
+ * **Example** (Finding the first matching element)
4074
+ *
3939
4075
  * ```ts
3940
4076
  * import { Chunk, Option } from "effect"
3941
4077
  *
@@ -3965,7 +4101,8 @@ export declare const findFirst: {
3965
4101
  * Returns the first element that satisfies the specified
3966
4102
  * predicate, or `None` if no such element exists.
3967
4103
  *
3968
- * @example
4104
+ * **Example** (Finding the first matching element)
4105
+ *
3969
4106
  * ```ts
3970
4107
  * import { Chunk, Option } from "effect"
3971
4108
  *
@@ -3995,7 +4132,8 @@ export declare const findFirst: {
3995
4132
  /**
3996
4133
  * Return the first index for which a predicate holds.
3997
4134
  *
3998
- * @example
4135
+ * **Example** (Finding the first matching index)
4136
+ *
3999
4137
  * ```ts
4000
4138
  * import { Chunk } from "effect"
4001
4139
  *
@@ -4019,7 +4157,8 @@ export declare const findFirstIndex: {
4019
4157
  /**
4020
4158
  * Return the first index for which a predicate holds.
4021
4159
  *
4022
- * @example
4160
+ * **Example** (Finding the first matching index)
4161
+ *
4023
4162
  * ```ts
4024
4163
  * import { Chunk } from "effect"
4025
4164
  *
@@ -4043,7 +4182,8 @@ export declare const findFirstIndex: {
4043
4182
  /**
4044
4183
  * Return the first index for which a predicate holds.
4045
4184
  *
4046
- * @example
4185
+ * **Example** (Finding the first matching index)
4186
+ *
4047
4187
  * ```ts
4048
4188
  * import { Chunk } from "effect"
4049
4189
  *
@@ -4068,7 +4208,8 @@ export declare const findFirstIndex: {
4068
4208
  /**
4069
4209
  * Find the last element for which a predicate holds.
4070
4210
  *
4071
- * @example
4211
+ * **Example** (Finding the last matching element)
4212
+ *
4072
4213
  * ```ts
4073
4214
  * import { Chunk } from "effect"
4074
4215
  * import * as Option from "effect/Option"
@@ -4094,7 +4235,8 @@ export declare const findLast: {
4094
4235
  /**
4095
4236
  * Find the last element for which a predicate holds.
4096
4237
  *
4097
- * @example
4238
+ * **Example** (Finding the last matching element)
4239
+ *
4098
4240
  * ```ts
4099
4241
  * import { Chunk } from "effect"
4100
4242
  * import * as Option from "effect/Option"
@@ -4120,7 +4262,8 @@ export declare const findLast: {
4120
4262
  /**
4121
4263
  * Find the last element for which a predicate holds.
4122
4264
  *
4123
- * @example
4265
+ * **Example** (Finding the last matching element)
4266
+ *
4124
4267
  * ```ts
4125
4268
  * import { Chunk } from "effect"
4126
4269
  * import * as Option from "effect/Option"
@@ -4146,7 +4289,8 @@ export declare const findLast: {
4146
4289
  /**
4147
4290
  * Find the last element for which a predicate holds.
4148
4291
  *
4149
- * @example
4292
+ * **Example** (Finding the last matching element)
4293
+ *
4150
4294
  * ```ts
4151
4295
  * import { Chunk } from "effect"
4152
4296
  * import * as Option from "effect/Option"
@@ -4172,7 +4316,8 @@ export declare const findLast: {
4172
4316
  /**
4173
4317
  * Find the last element for which a predicate holds.
4174
4318
  *
4175
- * @example
4319
+ * **Example** (Finding the last matching element)
4320
+ *
4176
4321
  * ```ts
4177
4322
  * import { Chunk } from "effect"
4178
4323
  * import * as Option from "effect/Option"
@@ -4199,7 +4344,8 @@ export declare const findLast: {
4199
4344
  /**
4200
4345
  * Return the last index for which a predicate holds.
4201
4346
  *
4202
- * @example
4347
+ * **Example** (Finding the last matching index)
4348
+ *
4203
4349
  * ```ts
4204
4350
  * import { Chunk } from "effect"
4205
4351
  *
@@ -4223,7 +4369,8 @@ export declare const findLastIndex: {
4223
4369
  /**
4224
4370
  * Return the last index for which a predicate holds.
4225
4371
  *
4226
- * @example
4372
+ * **Example** (Finding the last matching index)
4373
+ *
4227
4374
  * ```ts
4228
4375
  * import { Chunk } from "effect"
4229
4376
  *
@@ -4247,7 +4394,8 @@ export declare const findLastIndex: {
4247
4394
  /**
4248
4395
  * Return the last index for which a predicate holds.
4249
4396
  *
4250
- * @example
4397
+ * **Example** (Finding the last matching index)
4398
+ *
4251
4399
  * ```ts
4252
4400
  * import { Chunk } from "effect"
4253
4401
  *
@@ -4272,7 +4420,8 @@ export declare const findLastIndex: {
4272
4420
  /**
4273
4421
  * Check if a predicate holds true for every `Chunk` element.
4274
4422
  *
4275
- * @example
4423
+ * **Example** (Checking every element)
4424
+ *
4276
4425
  * ```ts
4277
4426
  * import { Chunk } from "effect"
4278
4427
  *
@@ -4299,7 +4448,8 @@ export declare const every: {
4299
4448
  /**
4300
4449
  * Check if a predicate holds true for every `Chunk` element.
4301
4450
  *
4302
- * @example
4451
+ * **Example** (Checking every element)
4452
+ *
4303
4453
  * ```ts
4304
4454
  * import { Chunk } from "effect"
4305
4455
  *
@@ -4326,7 +4476,8 @@ export declare const every: {
4326
4476
  /**
4327
4477
  * Check if a predicate holds true for every `Chunk` element.
4328
4478
  *
4329
- * @example
4479
+ * **Example** (Checking every element)
4480
+ *
4330
4481
  * ```ts
4331
4482
  * import { Chunk } from "effect"
4332
4483
  *
@@ -4353,7 +4504,8 @@ export declare const every: {
4353
4504
  /**
4354
4505
  * Check if a predicate holds true for every `Chunk` element.
4355
4506
  *
4356
- * @example
4507
+ * **Example** (Checking every element)
4508
+ *
4357
4509
  * ```ts
4358
4510
  * import { Chunk } from "effect"
4359
4511
  *
@@ -4380,7 +4532,8 @@ export declare const every: {
4380
4532
  /**
4381
4533
  * Check if a predicate holds true for every `Chunk` element.
4382
4534
  *
4383
- * @example
4535
+ * **Example** (Checking every element)
4536
+ *
4384
4537
  * ```ts
4385
4538
  * import { Chunk } from "effect"
4386
4539
  *
@@ -4408,7 +4561,8 @@ export declare const every: {
4408
4561
  /**
4409
4562
  * Check if a predicate holds true for some `Chunk` element.
4410
4563
  *
4411
- * @example
4564
+ * **Example** (Checking for some matching element)
4565
+ *
4412
4566
  * ```ts
4413
4567
  * import { Chunk } from "effect"
4414
4568
  *
@@ -4432,7 +4586,8 @@ export declare const some: {
4432
4586
  /**
4433
4587
  * Check if a predicate holds true for some `Chunk` element.
4434
4588
  *
4435
- * @example
4589
+ * **Example** (Checking for some matching element)
4590
+ *
4436
4591
  * ```ts
4437
4592
  * import { Chunk } from "effect"
4438
4593
  *
@@ -4456,7 +4611,8 @@ export declare const some: {
4456
4611
  /**
4457
4612
  * Check if a predicate holds true for some `Chunk` element.
4458
4613
  *
4459
- * @example
4614
+ * **Example** (Checking for some matching element)
4615
+ *
4460
4616
  * ```ts
4461
4617
  * import { Chunk } from "effect"
4462
4618
  *
@@ -4481,7 +4637,8 @@ export declare const some: {
4481
4637
  /**
4482
4638
  * Joins the elements together with "sep" in the middle.
4483
4639
  *
4484
- * @example
4640
+ * **Example** (Joining chunks into a string)
4641
+ *
4485
4642
  * ```ts
4486
4643
  * import { Chunk } from "effect"
4487
4644
  *
@@ -4509,7 +4666,8 @@ export declare const join: {
4509
4666
  /**
4510
4667
  * Joins the elements together with "sep" in the middle.
4511
4668
  *
4512
- * @example
4669
+ * **Example** (Joining chunks into a string)
4670
+ *
4513
4671
  * ```ts
4514
4672
  * import { Chunk } from "effect"
4515
4673
  *
@@ -4537,7 +4695,8 @@ export declare const join: {
4537
4695
  /**
4538
4696
  * Joins the elements together with "sep" in the middle.
4539
4697
  *
4540
- * @example
4698
+ * **Example** (Joining chunks into a string)
4699
+ *
4541
4700
  * ```ts
4542
4701
  * import { Chunk } from "effect"
4543
4702
  *
@@ -4566,7 +4725,8 @@ export declare const join: {
4566
4725
  /**
4567
4726
  * Reduces the elements of a chunk from left to right.
4568
4727
  *
4569
- * @example
4728
+ * **Example** (Reducing from the left)
4729
+ *
4570
4730
  * ```ts
4571
4731
  * import { Chunk } from "effect"
4572
4732
  *
@@ -4591,7 +4751,8 @@ export declare const reduce: {
4591
4751
  /**
4592
4752
  * Reduces the elements of a chunk from left to right.
4593
4753
  *
4594
- * @example
4754
+ * **Example** (Reducing from the left)
4755
+ *
4595
4756
  * ```ts
4596
4757
  * import { Chunk } from "effect"
4597
4758
  *
@@ -4616,7 +4777,8 @@ export declare const reduce: {
4616
4777
  /**
4617
4778
  * Reduces the elements of a chunk from left to right.
4618
4779
  *
4619
- * @example
4780
+ * **Example** (Reducing from the left)
4781
+ *
4620
4782
  * ```ts
4621
4783
  * import { Chunk } from "effect"
4622
4784
  *
@@ -4642,7 +4804,8 @@ export declare const reduce: {
4642
4804
  /**
4643
4805
  * Reduces the elements of a chunk from right to left.
4644
4806
  *
4645
- * @example
4807
+ * **Example** (Reducing from the right)
4808
+ *
4646
4809
  * ```ts
4647
4810
  * import { Chunk } from "effect"
4648
4811
  *
@@ -4671,7 +4834,8 @@ export declare const reduceRight: {
4671
4834
  /**
4672
4835
  * Reduces the elements of a chunk from right to left.
4673
4836
  *
4674
- * @example
4837
+ * **Example** (Reducing from the right)
4838
+ *
4675
4839
  * ```ts
4676
4840
  * import { Chunk } from "effect"
4677
4841
  *
@@ -4700,7 +4864,8 @@ export declare const reduceRight: {
4700
4864
  /**
4701
4865
  * Reduces the elements of a chunk from right to left.
4702
4866
  *
4703
- * @example
4867
+ * **Example** (Reducing from the right)
4868
+ *
4704
4869
  * ```ts
4705
4870
  * import { Chunk } from "effect"
4706
4871
  *
@@ -4731,7 +4896,8 @@ export declare const reduceRight: {
4731
4896
  * Creates a `Chunk` of values not included in the other given `Chunk` using the provided `isEquivalent` function.
4732
4897
  * The order and references of result values are determined by the first `Chunk`.
4733
4898
  *
4734
- * @example
4899
+ * **Example** (Computing difference with custom equivalence)
4900
+ *
4735
4901
  * ```ts
4736
4902
  * import { Chunk } from "effect"
4737
4903
  *
@@ -4766,7 +4932,8 @@ export declare const differenceWith: <A>(isEquivalent: (self: A, that: A) => boo
4766
4932
  * Creates a `Chunk` of values not included in the other given `Chunk`.
4767
4933
  * The order and references of result values are determined by the first `Chunk`.
4768
4934
  *
4769
- * @example
4935
+ * **Example** (Computing chunk difference)
4936
+ *
4770
4937
  * ```ts
4771
4938
  * import { Chunk } from "effect"
4772
4939
  *
@@ -4795,7 +4962,8 @@ export declare const difference: {
4795
4962
  * Creates a `Chunk` of values not included in the other given `Chunk`.
4796
4963
  * The order and references of result values are determined by the first `Chunk`.
4797
4964
  *
4798
- * @example
4965
+ * **Example** (Computing chunk difference)
4966
+ *
4799
4967
  * ```ts
4800
4968
  * import { Chunk } from "effect"
4801
4969
  *
@@ -4824,7 +4992,8 @@ export declare const difference: {
4824
4992
  * Creates a `Chunk` of values not included in the other given `Chunk`.
4825
4993
  * The order and references of result values are determined by the first `Chunk`.
4826
4994
  *
4827
- * @example
4995
+ * **Example** (Computing chunk difference)
4996
+ *
4828
4997
  * ```ts
4829
4998
  * import { Chunk } from "effect"
4830
4999
  *