effect 4.0.0-beta.66 → 4.0.0-beta.68

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 (1767) hide show
  1. package/dist/Array.d.ts +151 -106
  2. package/dist/Array.d.ts.map +1 -1
  3. package/dist/Array.js +50 -40
  4. package/dist/Array.js.map +1 -1
  5. package/dist/BigDecimal.d.ts +620 -553
  6. package/dist/BigDecimal.d.ts.map +1 -1
  7. package/dist/BigDecimal.js +298 -254
  8. package/dist/BigDecimal.js.map +1 -1
  9. package/dist/BigInt.d.ts +342 -274
  10. package/dist/BigInt.d.ts.map +1 -1
  11. package/dist/BigInt.js +168 -126
  12. package/dist/BigInt.js.map +1 -1
  13. package/dist/Boolean.d.ts +189 -156
  14. package/dist/Boolean.d.ts.map +1 -1
  15. package/dist/Boolean.js +85 -68
  16. package/dist/Boolean.js.map +1 -1
  17. package/dist/Brand.d.ts +30 -5
  18. package/dist/Brand.d.ts.map +1 -1
  19. package/dist/Brand.js +19 -2
  20. package/dist/Brand.js.map +1 -1
  21. package/dist/Cache.d.ts +239 -135
  22. package/dist/Cache.d.ts.map +1 -1
  23. package/dist/Cache.js +135 -59
  24. package/dist/Cache.js.map +1 -1
  25. package/dist/Cause.d.ts +84 -73
  26. package/dist/Cause.d.ts.map +1 -1
  27. package/dist/Cause.js +51 -44
  28. package/dist/Cause.js.map +1 -1
  29. package/dist/Channel.d.ts +1568 -632
  30. package/dist/Channel.d.ts.map +1 -1
  31. package/dist/Channel.js +685 -315
  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 +574 -428
  38. package/dist/Chunk.d.ts.map +1 -1
  39. package/dist/Chunk.js +250 -191
  40. package/dist/Chunk.js.map +1 -1
  41. package/dist/Clock.d.ts +16 -9
  42. package/dist/Clock.d.ts.map +1 -1
  43. package/dist/Clock.js +9 -5
  44. package/dist/Clock.js.map +1 -1
  45. package/dist/Combiner.d.ts +11 -5
  46. package/dist/Combiner.d.ts.map +1 -1
  47. package/dist/Combiner.js +10 -4
  48. package/dist/Combiner.js.map +1 -1
  49. package/dist/Config.d.ts +80 -68
  50. package/dist/Config.d.ts.map +1 -1
  51. package/dist/Config.js +53 -49
  52. package/dist/Config.js.map +1 -1
  53. package/dist/ConfigProvider.d.ts +33 -32
  54. package/dist/ConfigProvider.d.ts.map +1 -1
  55. package/dist/ConfigProvider.js +19 -18
  56. package/dist/ConfigProvider.js.map +1 -1
  57. package/dist/Console.d.ts +76 -50
  58. package/dist/Console.d.ts.map +1 -1
  59. package/dist/Console.js +69 -46
  60. package/dist/Console.js.map +1 -1
  61. package/dist/Context.d.ts +400 -189
  62. package/dist/Context.d.ts.map +1 -1
  63. package/dist/Context.js +143 -77
  64. package/dist/Context.js.map +1 -1
  65. package/dist/Cron.d.ts +67 -48
  66. package/dist/Cron.d.ts.map +1 -1
  67. package/dist/Cron.js +94 -36
  68. package/dist/Cron.js.map +1 -1
  69. package/dist/Crypto.d.ts +208 -0
  70. package/dist/Crypto.d.ts.map +1 -0
  71. package/dist/Crypto.js +157 -0
  72. package/dist/Crypto.js.map +1 -0
  73. package/dist/Data.d.ts +9 -3
  74. package/dist/Data.d.ts.map +1 -1
  75. package/dist/Data.js.map +1 -1
  76. package/dist/DateTime.d.ts +893 -464
  77. package/dist/DateTime.d.ts.map +1 -1
  78. package/dist/DateTime.js +387 -228
  79. package/dist/DateTime.js.map +1 -1
  80. package/dist/Deferred.d.ts +367 -175
  81. package/dist/Deferred.d.ts.map +1 -1
  82. package/dist/Deferred.js +146 -72
  83. package/dist/Deferred.js.map +1 -1
  84. package/dist/Differ.d.ts +44 -2
  85. package/dist/Differ.d.ts.map +1 -1
  86. package/dist/Differ.js +36 -0
  87. package/dist/Duration.d.ts +333 -186
  88. package/dist/Duration.d.ts.map +1 -1
  89. package/dist/Duration.js +178 -107
  90. package/dist/Duration.js.map +1 -1
  91. package/dist/Effect.d.ts +2181 -2275
  92. package/dist/Effect.d.ts.map +1 -1
  93. package/dist/Effect.js +935 -850
  94. package/dist/Effect.js.map +1 -1
  95. package/dist/Effectable.d.ts +38 -3
  96. package/dist/Effectable.d.ts.map +1 -1
  97. package/dist/Effectable.js +3 -3
  98. package/dist/Effectable.js.map +1 -1
  99. package/dist/Encoding.d.ts +78 -28
  100. package/dist/Encoding.d.ts.map +1 -1
  101. package/dist/Encoding.js +75 -27
  102. package/dist/Encoding.js.map +1 -1
  103. package/dist/Equal.d.ts +4 -3
  104. package/dist/Equal.d.ts.map +1 -1
  105. package/dist/Equal.js +4 -3
  106. package/dist/Equal.js.map +1 -1
  107. package/dist/Equivalence.d.ts +18 -24
  108. package/dist/Equivalence.d.ts.map +1 -1
  109. package/dist/Equivalence.js +16 -21
  110. package/dist/Equivalence.js.map +1 -1
  111. package/dist/ErrorReporter.d.ts +66 -82
  112. package/dist/ErrorReporter.d.ts.map +1 -1
  113. package/dist/ErrorReporter.js +38 -29
  114. package/dist/ErrorReporter.js.map +1 -1
  115. package/dist/ExecutionPlan.d.ts +106 -12
  116. package/dist/ExecutionPlan.d.ts.map +1 -1
  117. package/dist/ExecutionPlan.js +23 -6
  118. package/dist/ExecutionPlan.js.map +1 -1
  119. package/dist/Exit.d.ts +6 -5
  120. package/dist/Exit.d.ts.map +1 -1
  121. package/dist/Exit.js.map +1 -1
  122. package/dist/Fiber.d.ts +71 -40
  123. package/dist/Fiber.d.ts.map +1 -1
  124. package/dist/Fiber.js +39 -21
  125. package/dist/Fiber.js.map +1 -1
  126. package/dist/FiberHandle.d.ts +118 -57
  127. package/dist/FiberHandle.d.ts.map +1 -1
  128. package/dist/FiberHandle.js +121 -39
  129. package/dist/FiberHandle.js.map +1 -1
  130. package/dist/FiberMap.d.ts +287 -159
  131. package/dist/FiberMap.d.ts.map +1 -1
  132. package/dist/FiberMap.js +175 -73
  133. package/dist/FiberMap.js.map +1 -1
  134. package/dist/FiberSet.d.ts +93 -52
  135. package/dist/FiberSet.d.ts.map +1 -1
  136. package/dist/FiberSet.js +97 -34
  137. package/dist/FiberSet.js.map +1 -1
  138. package/dist/FileSystem.d.ts +102 -73
  139. package/dist/FileSystem.d.ts.map +1 -1
  140. package/dist/FileSystem.js +53 -39
  141. package/dist/FileSystem.js.map +1 -1
  142. package/dist/Filter.d.ts +166 -88
  143. package/dist/Filter.d.ts.map +1 -1
  144. package/dist/Filter.js +68 -42
  145. package/dist/Filter.js.map +1 -1
  146. package/dist/Formatter.d.ts +4 -2
  147. package/dist/Formatter.d.ts.map +1 -1
  148. package/dist/Formatter.js +3 -69
  149. package/dist/Formatter.js.map +1 -1
  150. package/dist/Function.d.ts +218 -151
  151. package/dist/Function.d.ts.map +1 -1
  152. package/dist/Function.js +94 -78
  153. package/dist/Function.js.map +1 -1
  154. package/dist/Graph.d.ts +714 -415
  155. package/dist/Graph.d.ts.map +1 -1
  156. package/dist/Graph.js +325 -182
  157. package/dist/Graph.js.map +1 -1
  158. package/dist/HKT.d.ts +29 -13
  159. package/dist/HKT.d.ts.map +1 -1
  160. package/dist/Hash.d.ts +35 -24
  161. package/dist/Hash.d.ts.map +1 -1
  162. package/dist/Hash.js +27 -17
  163. package/dist/Hash.js.map +1 -1
  164. package/dist/HashMap.d.ts +540 -388
  165. package/dist/HashMap.d.ts.map +1 -1
  166. package/dist/HashMap.js +262 -156
  167. package/dist/HashMap.js.map +1 -1
  168. package/dist/HashRing.d.ts +53 -34
  169. package/dist/HashRing.d.ts.map +1 -1
  170. package/dist/HashRing.js +83 -16
  171. package/dist/HashRing.js.map +1 -1
  172. package/dist/HashSet.d.ts +239 -153
  173. package/dist/HashSet.d.ts.map +1 -1
  174. package/dist/HashSet.js +110 -56
  175. package/dist/HashSet.js.map +1 -1
  176. package/dist/Inspectable.d.ts +26 -13
  177. package/dist/Inspectable.d.ts.map +1 -1
  178. package/dist/Inspectable.js +22 -10
  179. package/dist/Inspectable.js.map +1 -1
  180. package/dist/Iterable.d.ts +336 -222
  181. package/dist/Iterable.d.ts.map +1 -1
  182. package/dist/Iterable.js +146 -100
  183. package/dist/Iterable.js.map +1 -1
  184. package/dist/JsonPatch.d.ts +12 -9
  185. package/dist/JsonPatch.d.ts.map +1 -1
  186. package/dist/JsonPatch.js +9 -6
  187. package/dist/JsonPatch.js.map +1 -1
  188. package/dist/JsonPointer.d.ts +13 -11
  189. package/dist/JsonPointer.d.ts.map +1 -1
  190. package/dist/JsonPointer.js +13 -11
  191. package/dist/JsonPointer.js.map +1 -1
  192. package/dist/JsonSchema.d.ts +16 -0
  193. package/dist/JsonSchema.d.ts.map +1 -1
  194. package/dist/JsonSchema.js +10 -0
  195. package/dist/JsonSchema.js.map +1 -1
  196. package/dist/Latch.d.ts +97 -26
  197. package/dist/Latch.d.ts.map +1 -1
  198. package/dist/Latch.js +39 -20
  199. package/dist/Latch.js.map +1 -1
  200. package/dist/Layer.d.ts +472 -410
  201. package/dist/Layer.d.ts.map +1 -1
  202. package/dist/Layer.js +290 -226
  203. package/dist/Layer.js.map +1 -1
  204. package/dist/LayerMap.d.ts +99 -26
  205. package/dist/LayerMap.d.ts.map +1 -1
  206. package/dist/LayerMap.js +58 -14
  207. package/dist/LayerMap.js.map +1 -1
  208. package/dist/LogLevel.d.ts +92 -131
  209. package/dist/LogLevel.d.ts.map +1 -1
  210. package/dist/LogLevel.js +25 -15
  211. package/dist/LogLevel.js.map +1 -1
  212. package/dist/Logger.d.ts +159 -104
  213. package/dist/Logger.d.ts.map +1 -1
  214. package/dist/Logger.js +215 -189
  215. package/dist/Logger.js.map +1 -1
  216. package/dist/ManagedRuntime.d.ts +78 -19
  217. package/dist/ManagedRuntime.d.ts.map +1 -1
  218. package/dist/ManagedRuntime.js +24 -17
  219. package/dist/ManagedRuntime.js.map +1 -1
  220. package/dist/Match.d.ts +135 -161
  221. package/dist/Match.d.ts.map +1 -1
  222. package/dist/Match.js +86 -78
  223. package/dist/Match.js.map +1 -1
  224. package/dist/Metric.d.ts +330 -291
  225. package/dist/Metric.d.ts.map +1 -1
  226. package/dist/Metric.js +219 -214
  227. package/dist/Metric.js.map +1 -1
  228. package/dist/MutableHashMap.d.ts +146 -87
  229. package/dist/MutableHashMap.d.ts.map +1 -1
  230. package/dist/MutableHashMap.js +67 -43
  231. package/dist/MutableHashMap.js.map +1 -1
  232. package/dist/MutableHashSet.d.ts +52 -30
  233. package/dist/MutableHashSet.d.ts.map +1 -1
  234. package/dist/MutableHashSet.js +92 -38
  235. package/dist/MutableHashSet.js.map +1 -1
  236. package/dist/MutableList.d.ts +110 -68
  237. package/dist/MutableList.d.ts.map +1 -1
  238. package/dist/MutableList.js +135 -85
  239. package/dist/MutableList.js.map +1 -1
  240. package/dist/MutableRef.d.ts +99 -62
  241. package/dist/MutableRef.d.ts.map +1 -1
  242. package/dist/MutableRef.js +78 -60
  243. package/dist/MutableRef.js.map +1 -1
  244. package/dist/Newtype.d.ts +15 -2
  245. package/dist/Newtype.d.ts.map +1 -1
  246. package/dist/Newtype.js +8 -2
  247. package/dist/Newtype.js.map +1 -1
  248. package/dist/NonEmptyIterable.d.ts +38 -48
  249. package/dist/NonEmptyIterable.d.ts.map +1 -1
  250. package/dist/NonEmptyIterable.js +34 -25
  251. package/dist/NonEmptyIterable.js.map +1 -1
  252. package/dist/Number.d.ts +261 -205
  253. package/dist/Number.d.ts.map +1 -1
  254. package/dist/Number.js +119 -91
  255. package/dist/Number.js.map +1 -1
  256. package/dist/Optic.d.ts +6 -7
  257. package/dist/Optic.d.ts.map +1 -1
  258. package/dist/Optic.js +5 -6
  259. package/dist/Optic.js.map +1 -1
  260. package/dist/Option.d.ts +133 -156
  261. package/dist/Option.d.ts.map +1 -1
  262. package/dist/Option.js +64 -64
  263. package/dist/Option.js.map +1 -1
  264. package/dist/Order.d.ts +6 -6
  265. package/dist/Order.js +6 -6
  266. package/dist/Ordering.d.ts +56 -45
  267. package/dist/Ordering.d.ts.map +1 -1
  268. package/dist/Ordering.js +10 -8
  269. package/dist/Ordering.js.map +1 -1
  270. package/dist/PartitionedSemaphore.d.ts +225 -40
  271. package/dist/PartitionedSemaphore.d.ts.map +1 -1
  272. package/dist/PartitionedSemaphore.js +113 -17
  273. package/dist/PartitionedSemaphore.js.map +1 -1
  274. package/dist/Path.d.ts +77 -13
  275. package/dist/Path.d.ts.map +1 -1
  276. package/dist/Path.js +49 -4
  277. package/dist/Path.js.map +1 -1
  278. package/dist/Pipeable.d.ts +77 -18
  279. package/dist/Pipeable.d.ts.map +1 -1
  280. package/dist/Pipeable.js +63 -14
  281. package/dist/Pipeable.js.map +1 -1
  282. package/dist/PlatformError.d.ts +74 -6
  283. package/dist/PlatformError.d.ts.map +1 -1
  284. package/dist/PlatformError.js +68 -5
  285. package/dist/PlatformError.js.map +1 -1
  286. package/dist/Pool.d.ts +66 -31
  287. package/dist/Pool.d.ts.map +1 -1
  288. package/dist/Pool.js +26 -24
  289. package/dist/Pool.js.map +1 -1
  290. package/dist/Predicate.d.ts +16 -23
  291. package/dist/Predicate.d.ts.map +1 -1
  292. package/dist/Predicate.js +12 -17
  293. package/dist/Predicate.js.map +1 -1
  294. package/dist/PrimaryKey.d.ts +11 -3
  295. package/dist/PrimaryKey.d.ts.map +1 -1
  296. package/dist/PrimaryKey.js +9 -2
  297. package/dist/PrimaryKey.js.map +1 -1
  298. package/dist/PubSub.d.ts +385 -309
  299. package/dist/PubSub.d.ts.map +1 -1
  300. package/dist/PubSub.js +260 -207
  301. package/dist/PubSub.js.map +1 -1
  302. package/dist/Pull.d.ts +94 -25
  303. package/dist/Pull.d.ts.map +1 -1
  304. package/dist/Pull.js +61 -13
  305. package/dist/Pull.js.map +1 -1
  306. package/dist/Queue.d.ts +303 -184
  307. package/dist/Queue.d.ts.map +1 -1
  308. package/dist/Queue.js +231 -134
  309. package/dist/Queue.js.map +1 -1
  310. package/dist/Random.d.ts +65 -57
  311. package/dist/Random.d.ts.map +1 -1
  312. package/dist/Random.js +41 -66
  313. package/dist/Random.js.map +1 -1
  314. package/dist/RcMap.d.ts +151 -141
  315. package/dist/RcMap.d.ts.map +1 -1
  316. package/dist/RcMap.js +66 -20
  317. package/dist/RcMap.js.map +1 -1
  318. package/dist/RcRef.d.ts +68 -32
  319. package/dist/RcRef.d.ts.map +1 -1
  320. package/dist/RcRef.js +33 -16
  321. package/dist/RcRef.js.map +1 -1
  322. package/dist/Record.d.ts +282 -137
  323. package/dist/Record.d.ts.map +1 -1
  324. package/dist/Record.js +124 -62
  325. package/dist/Record.js.map +1 -1
  326. package/dist/Redactable.d.ts +7 -5
  327. package/dist/Redactable.d.ts.map +1 -1
  328. package/dist/Redactable.js +5 -3
  329. package/dist/Redactable.js.map +1 -1
  330. package/dist/Redacted.d.ts +63 -34
  331. package/dist/Redacted.d.ts.map +1 -1
  332. package/dist/Redacted.js +31 -15
  333. package/dist/Redacted.js.map +1 -1
  334. package/dist/Reducer.d.ts +3 -1
  335. package/dist/Reducer.d.ts.map +1 -1
  336. package/dist/Reducer.js +2 -0
  337. package/dist/Reducer.js.map +1 -1
  338. package/dist/Ref.d.ts +85 -66
  339. package/dist/Ref.d.ts.map +1 -1
  340. package/dist/Ref.js +57 -45
  341. package/dist/Ref.js.map +1 -1
  342. package/dist/References.d.ts +73 -31
  343. package/dist/References.d.ts.map +1 -1
  344. package/dist/References.js +66 -30
  345. package/dist/References.js.map +1 -1
  346. package/dist/RegExp.d.ts +12 -6
  347. package/dist/RegExp.d.ts.map +1 -1
  348. package/dist/RegExp.js +12 -6
  349. package/dist/RegExp.js.map +1 -1
  350. package/dist/Request.d.ts +159 -34
  351. package/dist/Request.d.ts.map +1 -1
  352. package/dist/Request.js +68 -12
  353. package/dist/Request.js.map +1 -1
  354. package/dist/RequestResolver.d.ts +262 -118
  355. package/dist/RequestResolver.d.ts.map +1 -1
  356. package/dist/RequestResolver.js +78 -42
  357. package/dist/RequestResolver.js.map +1 -1
  358. package/dist/Resource.d.ts +13 -7
  359. package/dist/Resource.d.ts.map +1 -1
  360. package/dist/Resource.js +44 -6
  361. package/dist/Resource.js.map +1 -1
  362. package/dist/Result.d.ts +135 -151
  363. package/dist/Result.d.ts.map +1 -1
  364. package/dist/Result.js +56 -68
  365. package/dist/Result.js.map +1 -1
  366. package/dist/Runtime.d.ts +40 -20
  367. package/dist/Runtime.d.ts.map +1 -1
  368. package/dist/Runtime.js +34 -17
  369. package/dist/Runtime.js.map +1 -1
  370. package/dist/Schedule.d.ts +556 -590
  371. package/dist/Schedule.d.ts.map +1 -1
  372. package/dist/Schedule.js +265 -253
  373. package/dist/Schedule.js.map +1 -1
  374. package/dist/Scheduler.d.ts +44 -7
  375. package/dist/Scheduler.d.ts.map +1 -1
  376. package/dist/Scheduler.js +34 -5
  377. package/dist/Scheduler.js.map +1 -1
  378. package/dist/Schema.d.ts +1293 -602
  379. package/dist/Schema.d.ts.map +1 -1
  380. package/dist/Schema.js +501 -361
  381. package/dist/Schema.js.map +1 -1
  382. package/dist/SchemaAST.d.ts +122 -92
  383. package/dist/SchemaAST.d.ts.map +1 -1
  384. package/dist/SchemaAST.js +102 -77
  385. package/dist/SchemaAST.js.map +1 -1
  386. package/dist/SchemaGetter.d.ts +49 -36
  387. package/dist/SchemaGetter.d.ts.map +1 -1
  388. package/dist/SchemaGetter.js +42 -29
  389. package/dist/SchemaGetter.js.map +1 -1
  390. package/dist/SchemaIssue.d.ts +19 -24
  391. package/dist/SchemaIssue.d.ts.map +1 -1
  392. package/dist/SchemaIssue.js +16 -14
  393. package/dist/SchemaIssue.js.map +1 -1
  394. package/dist/SchemaParser.d.ts +231 -63
  395. package/dist/SchemaParser.d.ts.map +1 -1
  396. package/dist/SchemaParser.js +266 -75
  397. package/dist/SchemaParser.js.map +1 -1
  398. package/dist/SchemaRepresentation.d.ts +89 -77
  399. package/dist/SchemaRepresentation.d.ts.map +1 -1
  400. package/dist/SchemaRepresentation.js +47 -37
  401. package/dist/SchemaRepresentation.js.map +1 -1
  402. package/dist/SchemaTransformation.d.ts +97 -46
  403. package/dist/SchemaTransformation.d.ts.map +1 -1
  404. package/dist/SchemaTransformation.js +89 -38
  405. package/dist/SchemaTransformation.js.map +1 -1
  406. package/dist/SchemaUtils.d.ts +8 -1
  407. package/dist/SchemaUtils.d.ts.map +1 -1
  408. package/dist/SchemaUtils.js +24 -1
  409. package/dist/SchemaUtils.js.map +1 -1
  410. package/dist/Scope.d.ts +107 -65
  411. package/dist/Scope.d.ts.map +1 -1
  412. package/dist/Scope.js +61 -32
  413. package/dist/Scope.js.map +1 -1
  414. package/dist/ScopedCache.d.ts +141 -49
  415. package/dist/ScopedCache.d.ts.map +1 -1
  416. package/dist/ScopedCache.js +82 -21
  417. package/dist/ScopedCache.js.map +1 -1
  418. package/dist/ScopedRef.d.ts +28 -8
  419. package/dist/ScopedRef.d.ts.map +1 -1
  420. package/dist/ScopedRef.js +25 -5
  421. package/dist/ScopedRef.js.map +1 -1
  422. package/dist/Semaphore.d.ts +61 -37
  423. package/dist/Semaphore.d.ts.map +1 -1
  424. package/dist/Semaphore.js +18 -21
  425. package/dist/Semaphore.js.map +1 -1
  426. package/dist/Sink.d.ts +461 -206
  427. package/dist/Sink.d.ts.map +1 -1
  428. package/dist/Sink.js +241 -90
  429. package/dist/Sink.js.map +1 -1
  430. package/dist/Stdio.d.ts +43 -6
  431. package/dist/Stdio.d.ts.map +1 -1
  432. package/dist/Stdio.js +33 -4
  433. package/dist/Stdio.js.map +1 -1
  434. package/dist/Stream.d.ts +2117 -1541
  435. package/dist/Stream.d.ts.map +1 -1
  436. package/dist/Stream.js +951 -682
  437. package/dist/Stream.js.map +1 -1
  438. package/dist/String.d.ts +174 -97
  439. package/dist/String.d.ts.map +1 -1
  440. package/dist/String.js +128 -69
  441. package/dist/String.js.map +1 -1
  442. package/dist/Struct.d.ts +20 -18
  443. package/dist/Struct.d.ts.map +1 -1
  444. package/dist/Struct.js +10 -8
  445. package/dist/Struct.js.map +1 -1
  446. package/dist/SubscriptionRef.d.ts +309 -204
  447. package/dist/SubscriptionRef.d.ts.map +1 -1
  448. package/dist/SubscriptionRef.js +126 -77
  449. package/dist/SubscriptionRef.js.map +1 -1
  450. package/dist/Symbol.d.ts +13 -5
  451. package/dist/Symbol.d.ts.map +1 -1
  452. package/dist/Symbol.js +13 -5
  453. package/dist/Symbol.js.map +1 -1
  454. package/dist/SynchronizedRef.d.ts +278 -62
  455. package/dist/SynchronizedRef.d.ts.map +1 -1
  456. package/dist/SynchronizedRef.js +116 -23
  457. package/dist/SynchronizedRef.js.map +1 -1
  458. package/dist/Take.d.ts +26 -2
  459. package/dist/Take.d.ts.map +1 -1
  460. package/dist/Take.js +4 -1
  461. package/dist/Take.js.map +1 -1
  462. package/dist/Terminal.d.ts +39 -7
  463. package/dist/Terminal.d.ts.map +1 -1
  464. package/dist/Terminal.js +10 -4
  465. package/dist/Terminal.js.map +1 -1
  466. package/dist/Tracer.d.ts +233 -59
  467. package/dist/Tracer.d.ts.map +1 -1
  468. package/dist/Tracer.js +94 -18
  469. package/dist/Tracer.js.map +1 -1
  470. package/dist/Trie.d.ts +280 -245
  471. package/dist/Trie.d.ts.map +1 -1
  472. package/dist/Trie.js +116 -102
  473. package/dist/Trie.js.map +1 -1
  474. package/dist/Tuple.d.ts +34 -32
  475. package/dist/Tuple.d.ts.map +1 -1
  476. package/dist/Tuple.js +16 -14
  477. package/dist/Tuple.js.map +1 -1
  478. package/dist/TxChunk.d.ts +200 -155
  479. package/dist/TxChunk.d.ts.map +1 -1
  480. package/dist/TxChunk.js +83 -61
  481. package/dist/TxChunk.js.map +1 -1
  482. package/dist/TxDeferred.d.ts +43 -29
  483. package/dist/TxDeferred.d.ts.map +1 -1
  484. package/dist/TxDeferred.js +22 -15
  485. package/dist/TxDeferred.js.map +1 -1
  486. package/dist/TxHashMap.d.ts +362 -223
  487. package/dist/TxHashMap.d.ts.map +1 -1
  488. package/dist/TxHashMap.js +171 -98
  489. package/dist/TxHashMap.js.map +1 -1
  490. package/dist/TxHashSet.d.ts +181 -111
  491. package/dist/TxHashSet.d.ts.map +1 -1
  492. package/dist/TxHashSet.js +87 -49
  493. package/dist/TxHashSet.js.map +1 -1
  494. package/dist/TxPriorityQueue.d.ts +94 -63
  495. package/dist/TxPriorityQueue.d.ts.map +1 -1
  496. package/dist/TxPriorityQueue.js +55 -37
  497. package/dist/TxPriorityQueue.js.map +1 -1
  498. package/dist/TxPubSub.d.ts +77 -49
  499. package/dist/TxPubSub.d.ts.map +1 -1
  500. package/dist/TxPubSub.js +60 -37
  501. package/dist/TxPubSub.js.map +1 -1
  502. package/dist/TxQueue.d.ts +277 -242
  503. package/dist/TxQueue.d.ts.map +1 -1
  504. package/dist/TxQueue.js +147 -101
  505. package/dist/TxQueue.js.map +1 -1
  506. package/dist/TxReentrantLock.d.ts +69 -46
  507. package/dist/TxReentrantLock.d.ts.map +1 -1
  508. package/dist/TxReentrantLock.js +48 -32
  509. package/dist/TxReentrantLock.js.map +1 -1
  510. package/dist/TxRef.d.ts +69 -40
  511. package/dist/TxRef.d.ts.map +1 -1
  512. package/dist/TxRef.js +34 -19
  513. package/dist/TxRef.js.map +1 -1
  514. package/dist/TxSemaphore.d.ts +101 -115
  515. package/dist/TxSemaphore.d.ts.map +1 -1
  516. package/dist/TxSemaphore.js +76 -77
  517. package/dist/TxSemaphore.js.map +1 -1
  518. package/dist/TxSubscriptionRef.d.ts +74 -50
  519. package/dist/TxSubscriptionRef.d.ts.map +1 -1
  520. package/dist/TxSubscriptionRef.js +34 -23
  521. package/dist/TxSubscriptionRef.js.map +1 -1
  522. package/dist/Types.d.ts +31 -34
  523. package/dist/Types.d.ts.map +1 -1
  524. package/dist/UndefinedOr.d.ts +62 -25
  525. package/dist/UndefinedOr.d.ts.map +1 -1
  526. package/dist/UndefinedOr.js +36 -25
  527. package/dist/UndefinedOr.js.map +1 -1
  528. package/dist/Unify.d.ts +72 -117
  529. package/dist/Unify.d.ts.map +1 -1
  530. package/dist/Unify.js +20 -6
  531. package/dist/Unify.js.map +1 -1
  532. package/dist/Utils.d.ts +5 -2
  533. package/dist/Utils.d.ts.map +1 -1
  534. package/dist/Utils.js +4 -0
  535. package/dist/Utils.js.map +1 -1
  536. package/dist/index.d.ts +1973 -418
  537. package/dist/index.d.ts.map +1 -1
  538. package/dist/index.js +1973 -418
  539. package/dist/index.js.map +1 -1
  540. package/dist/internal/schema/schema.js +1 -1
  541. package/dist/internal/schema/schema.js.map +1 -1
  542. package/dist/testing/FastCheck.d.ts +9 -6
  543. package/dist/testing/FastCheck.d.ts.map +1 -1
  544. package/dist/testing/FastCheck.js +9 -6
  545. package/dist/testing/FastCheck.js.map +1 -1
  546. package/dist/testing/TestClock.d.ts +39 -35
  547. package/dist/testing/TestClock.d.ts.map +1 -1
  548. package/dist/testing/TestClock.js +42 -12
  549. package/dist/testing/TestClock.js.map +1 -1
  550. package/dist/testing/TestConsole.d.ts +44 -36
  551. package/dist/testing/TestConsole.d.ts.map +1 -1
  552. package/dist/testing/TestConsole.js +30 -15
  553. package/dist/testing/TestConsole.js.map +1 -1
  554. package/dist/testing/TestSchema.d.ts +2 -0
  555. package/dist/testing/TestSchema.d.ts.map +1 -1
  556. package/dist/testing/TestSchema.js +9 -7
  557. package/dist/testing/TestSchema.js.map +1 -1
  558. package/dist/testing/index.d.ts +34 -0
  559. package/dist/testing/index.d.ts.map +1 -1
  560. package/dist/testing/index.js +34 -0
  561. package/dist/testing/index.js.map +1 -1
  562. package/dist/unstable/ai/AiError.d.ts +205 -147
  563. package/dist/unstable/ai/AiError.d.ts.map +1 -1
  564. package/dist/unstable/ai/AiError.js +164 -109
  565. package/dist/unstable/ai/AiError.js.map +1 -1
  566. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
  567. package/dist/unstable/ai/AnthropicStructuredOutput.js +2 -2
  568. package/dist/unstable/ai/Chat.d.ts +64 -41
  569. package/dist/unstable/ai/Chat.d.ts.map +1 -1
  570. package/dist/unstable/ai/Chat.js +51 -33
  571. package/dist/unstable/ai/Chat.js.map +1 -1
  572. package/dist/unstable/ai/EmbeddingModel.d.ts +12 -11
  573. package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
  574. package/dist/unstable/ai/EmbeddingModel.js +9 -8
  575. package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
  576. package/dist/unstable/ai/IdGenerator.d.ts +28 -18
  577. package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
  578. package/dist/unstable/ai/IdGenerator.js +18 -11
  579. package/dist/unstable/ai/IdGenerator.js.map +1 -1
  580. package/dist/unstable/ai/LanguageModel.d.ts +31 -25
  581. package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
  582. package/dist/unstable/ai/LanguageModel.js +20 -14
  583. package/dist/unstable/ai/LanguageModel.js.map +1 -1
  584. package/dist/unstable/ai/McpSchema.d.ts +342 -119
  585. package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
  586. package/dist/unstable/ai/McpSchema.js +266 -98
  587. package/dist/unstable/ai/McpSchema.js.map +1 -1
  588. package/dist/unstable/ai/McpServer.d.ts +56 -20
  589. package/dist/unstable/ai/McpServer.d.ts.map +1 -1
  590. package/dist/unstable/ai/McpServer.js +64 -16
  591. package/dist/unstable/ai/McpServer.js.map +1 -1
  592. package/dist/unstable/ai/Model.d.ts +10 -12
  593. package/dist/unstable/ai/Model.d.ts.map +1 -1
  594. package/dist/unstable/ai/Model.js +9 -7
  595. package/dist/unstable/ai/Model.js.map +1 -1
  596. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +1 -1
  597. package/dist/unstable/ai/OpenAiStructuredOutput.js +2 -2
  598. package/dist/unstable/ai/Prompt.d.ts +200 -176
  599. package/dist/unstable/ai/Prompt.d.ts.map +1 -1
  600. package/dist/unstable/ai/Prompt.js +77 -68
  601. package/dist/unstable/ai/Prompt.js.map +1 -1
  602. package/dist/unstable/ai/Response.d.ts +173 -160
  603. package/dist/unstable/ai/Response.d.ts.map +1 -1
  604. package/dist/unstable/ai/Response.js +43 -48
  605. package/dist/unstable/ai/Response.js.map +1 -1
  606. package/dist/unstable/ai/ResponseIdTracker.d.ts +43 -4
  607. package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
  608. package/dist/unstable/ai/ResponseIdTracker.js +27 -2
  609. package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
  610. package/dist/unstable/ai/Telemetry.d.ts +43 -33
  611. package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
  612. package/dist/unstable/ai/Telemetry.js +15 -11
  613. package/dist/unstable/ai/Telemetry.js.map +1 -1
  614. package/dist/unstable/ai/Tokenizer.d.ts +14 -9
  615. package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
  616. package/dist/unstable/ai/Tokenizer.js +10 -6
  617. package/dist/unstable/ai/Tokenizer.js.map +1 -1
  618. package/dist/unstable/ai/Tool.d.ts +167 -96
  619. package/dist/unstable/ai/Tool.d.ts.map +1 -1
  620. package/dist/unstable/ai/Tool.js +107 -53
  621. package/dist/unstable/ai/Tool.js.map +1 -1
  622. package/dist/unstable/ai/Toolkit.d.ts +32 -39
  623. package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
  624. package/dist/unstable/ai/Toolkit.js +7 -5
  625. package/dist/unstable/ai/Toolkit.js.map +1 -1
  626. package/dist/unstable/ai/index.d.ts +121 -29
  627. package/dist/unstable/ai/index.d.ts.map +1 -1
  628. package/dist/unstable/ai/index.js +121 -29
  629. package/dist/unstable/ai/index.js.map +1 -1
  630. package/dist/unstable/cli/Argument.d.ts +226 -134
  631. package/dist/unstable/cli/Argument.d.ts.map +1 -1
  632. package/dist/unstable/cli/Argument.js +101 -65
  633. package/dist/unstable/cli/Argument.js.map +1 -1
  634. package/dist/unstable/cli/CliError.d.ts +72 -26
  635. package/dist/unstable/cli/CliError.d.ts.map +1 -1
  636. package/dist/unstable/cli/CliError.js +86 -23
  637. package/dist/unstable/cli/CliError.js.map +1 -1
  638. package/dist/unstable/cli/CliOutput.d.ts +48 -19
  639. package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
  640. package/dist/unstable/cli/CliOutput.js +32 -9
  641. package/dist/unstable/cli/CliOutput.js.map +1 -1
  642. package/dist/unstable/cli/Command.d.ts +196 -115
  643. package/dist/unstable/cli/Command.d.ts.map +1 -1
  644. package/dist/unstable/cli/Command.js +45 -31
  645. package/dist/unstable/cli/Command.js.map +1 -1
  646. package/dist/unstable/cli/Completions.d.ts +7 -7
  647. package/dist/unstable/cli/Completions.js +1 -1
  648. package/dist/unstable/cli/Flag.d.ts +235 -142
  649. package/dist/unstable/cli/Flag.d.ts.map +1 -1
  650. package/dist/unstable/cli/Flag.js +111 -71
  651. package/dist/unstable/cli/Flag.js.map +1 -1
  652. package/dist/unstable/cli/GlobalFlag.d.ts +41 -13
  653. package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
  654. package/dist/unstable/cli/GlobalFlag.js +30 -7
  655. package/dist/unstable/cli/GlobalFlag.js.map +1 -1
  656. package/dist/unstable/cli/HelpDoc.d.ts +39 -14
  657. package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
  658. package/dist/unstable/cli/HelpDoc.js +21 -0
  659. package/dist/unstable/cli/Param.d.ts +110 -32
  660. package/dist/unstable/cli/Param.d.ts.map +1 -1
  661. package/dist/unstable/cli/Param.js +196 -135
  662. package/dist/unstable/cli/Param.js.map +1 -1
  663. package/dist/unstable/cli/Primitive.d.ts +79 -42
  664. package/dist/unstable/cli/Primitive.d.ts.map +1 -1
  665. package/dist/unstable/cli/Primitive.js +66 -35
  666. package/dist/unstable/cli/Primitive.js.map +1 -1
  667. package/dist/unstable/cli/Prompt.d.ts +183 -59
  668. package/dist/unstable/cli/Prompt.d.ts.map +1 -1
  669. package/dist/unstable/cli/Prompt.js +105 -23
  670. package/dist/unstable/cli/Prompt.js.map +1 -1
  671. package/dist/unstable/cli/index.d.ts +182 -0
  672. package/dist/unstable/cli/index.d.ts.map +1 -1
  673. package/dist/unstable/cli/index.js +205 -6
  674. package/dist/unstable/cli/index.js.map +1 -1
  675. package/dist/unstable/cli/internal/ansi.d.ts.map +1 -1
  676. package/dist/unstable/cli/internal/ansi.js +13 -0
  677. package/dist/unstable/cli/internal/ansi.js.map +1 -1
  678. package/dist/unstable/cli/internal/command.d.ts +5 -1
  679. package/dist/unstable/cli/internal/command.d.ts.map +1 -1
  680. package/dist/unstable/cli/internal/command.js +5 -1
  681. package/dist/unstable/cli/internal/command.js.map +1 -1
  682. package/dist/unstable/cli/internal/config.d.ts +3 -0
  683. package/dist/unstable/cli/internal/config.d.ts.map +1 -1
  684. package/dist/unstable/cli/internal/config.js.map +1 -1
  685. package/dist/unstable/cli/internal/lexer.js.map +1 -1
  686. package/dist/unstable/cli/internal/parser.js +0 -1
  687. package/dist/unstable/cli/internal/parser.js.map +1 -1
  688. package/dist/unstable/cluster/ClusterCron.d.ts +35 -1
  689. package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
  690. package/dist/unstable/cluster/ClusterCron.js +35 -1
  691. package/dist/unstable/cluster/ClusterCron.js.map +1 -1
  692. package/dist/unstable/cluster/ClusterError.d.ts +56 -7
  693. package/dist/unstable/cluster/ClusterError.d.ts.map +1 -1
  694. package/dist/unstable/cluster/ClusterError.js +56 -7
  695. package/dist/unstable/cluster/ClusterError.js.map +1 -1
  696. package/dist/unstable/cluster/ClusterMetrics.d.ts +39 -5
  697. package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
  698. package/dist/unstable/cluster/ClusterMetrics.js +39 -5
  699. package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
  700. package/dist/unstable/cluster/ClusterSchema.d.ts +61 -8
  701. package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
  702. package/dist/unstable/cluster/ClusterSchema.js +61 -8
  703. package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
  704. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +14 -2
  705. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
  706. package/dist/unstable/cluster/ClusterWorkflowEngine.js +35 -2
  707. package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
  708. package/dist/unstable/cluster/DeliverAt.d.ts +39 -4
  709. package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
  710. package/dist/unstable/cluster/DeliverAt.js +11 -3
  711. package/dist/unstable/cluster/DeliverAt.js.map +1 -1
  712. package/dist/unstable/cluster/Entity.d.ts +74 -16
  713. package/dist/unstable/cluster/Entity.d.ts.map +1 -1
  714. package/dist/unstable/cluster/Entity.js +75 -10
  715. package/dist/unstable/cluster/Entity.js.map +1 -1
  716. package/dist/unstable/cluster/EntityAddress.d.ts +30 -2
  717. package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
  718. package/dist/unstable/cluster/EntityAddress.js +30 -2
  719. package/dist/unstable/cluster/EntityAddress.js.map +1 -1
  720. package/dist/unstable/cluster/EntityId.d.ts +18 -3
  721. package/dist/unstable/cluster/EntityId.d.ts.map +1 -1
  722. package/dist/unstable/cluster/EntityId.js +15 -2
  723. package/dist/unstable/cluster/EntityId.js.map +1 -1
  724. package/dist/unstable/cluster/EntityProxy.d.ts +42 -14
  725. package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
  726. package/dist/unstable/cluster/EntityProxy.js +30 -14
  727. package/dist/unstable/cluster/EntityProxy.js.map +1 -1
  728. package/dist/unstable/cluster/EntityProxyServer.d.ts +18 -2
  729. package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
  730. package/dist/unstable/cluster/EntityProxyServer.js +40 -8
  731. package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
  732. package/dist/unstable/cluster/EntityResource.d.ts +43 -6
  733. package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
  734. package/dist/unstable/cluster/EntityResource.js +11 -4
  735. package/dist/unstable/cluster/EntityResource.js.map +1 -1
  736. package/dist/unstable/cluster/EntityType.d.ts +27 -3
  737. package/dist/unstable/cluster/EntityType.d.ts.map +1 -1
  738. package/dist/unstable/cluster/EntityType.js +24 -2
  739. package/dist/unstable/cluster/EntityType.js.map +1 -1
  740. package/dist/unstable/cluster/Envelope.d.ts +105 -23
  741. package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
  742. package/dist/unstable/cluster/Envelope.js +88 -14
  743. package/dist/unstable/cluster/Envelope.js.map +1 -1
  744. package/dist/unstable/cluster/HttpRunner.d.ts +88 -13
  745. package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
  746. package/dist/unstable/cluster/HttpRunner.js +88 -13
  747. package/dist/unstable/cluster/HttpRunner.js.map +1 -1
  748. package/dist/unstable/cluster/K8sHttpClient.d.ts +49 -6
  749. package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
  750. package/dist/unstable/cluster/K8sHttpClient.js +31 -6
  751. package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
  752. package/dist/unstable/cluster/MachineId.d.ts +24 -3
  753. package/dist/unstable/cluster/MachineId.d.ts.map +1 -1
  754. package/dist/unstable/cluster/MachineId.js +21 -2
  755. package/dist/unstable/cluster/MachineId.js.map +1 -1
  756. package/dist/unstable/cluster/Message.d.ts +102 -13
  757. package/dist/unstable/cluster/Message.d.ts.map +1 -1
  758. package/dist/unstable/cluster/Message.js +86 -10
  759. package/dist/unstable/cluster/Message.js.map +1 -1
  760. package/dist/unstable/cluster/MessageStorage.d.ts +126 -21
  761. package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
  762. package/dist/unstable/cluster/MessageStorage.js +70 -10
  763. package/dist/unstable/cluster/MessageStorage.js.map +1 -1
  764. package/dist/unstable/cluster/Reply.d.ts +101 -12
  765. package/dist/unstable/cluster/Reply.d.ts.map +1 -1
  766. package/dist/unstable/cluster/Reply.js +64 -8
  767. package/dist/unstable/cluster/Reply.js.map +1 -1
  768. package/dist/unstable/cluster/Runner.d.ts +47 -17
  769. package/dist/unstable/cluster/Runner.d.ts.map +1 -1
  770. package/dist/unstable/cluster/Runner.js +47 -17
  771. package/dist/unstable/cluster/Runner.js.map +1 -1
  772. package/dist/unstable/cluster/RunnerAddress.d.ts +34 -2
  773. package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
  774. package/dist/unstable/cluster/RunnerAddress.js +34 -2
  775. package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
  776. package/dist/unstable/cluster/RunnerHealth.d.ts +40 -12
  777. package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
  778. package/dist/unstable/cluster/RunnerHealth.js +40 -12
  779. package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
  780. package/dist/unstable/cluster/RunnerServer.d.ts +7 -4
  781. package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
  782. package/dist/unstable/cluster/RunnerServer.js +31 -4
  783. package/dist/unstable/cluster/RunnerServer.js.map +1 -1
  784. package/dist/unstable/cluster/RunnerStorage.d.ts +42 -5
  785. package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
  786. package/dist/unstable/cluster/RunnerStorage.js +38 -4
  787. package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
  788. package/dist/unstable/cluster/Runners.d.ts +76 -13
  789. package/dist/unstable/cluster/Runners.d.ts.map +1 -1
  790. package/dist/unstable/cluster/Runners.js +73 -12
  791. package/dist/unstable/cluster/Runners.js.map +1 -1
  792. package/dist/unstable/cluster/ShardId.d.ts +53 -5
  793. package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
  794. package/dist/unstable/cluster/ShardId.js +49 -4
  795. package/dist/unstable/cluster/ShardId.js.map +1 -1
  796. package/dist/unstable/cluster/Sharding.d.ts +10 -2
  797. package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
  798. package/dist/unstable/cluster/Sharding.js +35 -4
  799. package/dist/unstable/cluster/Sharding.js.map +1 -1
  800. package/dist/unstable/cluster/ShardingConfig.d.ts +65 -9
  801. package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
  802. package/dist/unstable/cluster/ShardingConfig.js +66 -9
  803. package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
  804. package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts +27 -6
  805. package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts.map +1 -1
  806. package/dist/unstable/cluster/ShardingRegistrationEvent.js +28 -4
  807. package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
  808. package/dist/unstable/cluster/SingleRunner.d.ts +23 -1
  809. package/dist/unstable/cluster/SingleRunner.d.ts.map +1 -1
  810. package/dist/unstable/cluster/SingleRunner.js +23 -1
  811. package/dist/unstable/cluster/SingleRunner.js.map +1 -1
  812. package/dist/unstable/cluster/Singleton.d.ts +15 -1
  813. package/dist/unstable/cluster/Singleton.d.ts.map +1 -1
  814. package/dist/unstable/cluster/Singleton.js +15 -1
  815. package/dist/unstable/cluster/Singleton.js.map +1 -1
  816. package/dist/unstable/cluster/SingletonAddress.d.ts +21 -1
  817. package/dist/unstable/cluster/SingletonAddress.d.ts.map +1 -1
  818. package/dist/unstable/cluster/SingletonAddress.js +21 -1
  819. package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
  820. package/dist/unstable/cluster/Snowflake.d.ts +90 -19
  821. package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
  822. package/dist/unstable/cluster/Snowflake.js +49 -13
  823. package/dist/unstable/cluster/Snowflake.js.map +1 -1
  824. package/dist/unstable/cluster/SocketRunner.d.ts +8 -2
  825. package/dist/unstable/cluster/SocketRunner.d.ts.map +1 -1
  826. package/dist/unstable/cluster/SocketRunner.js +29 -2
  827. package/dist/unstable/cluster/SocketRunner.js.map +1 -1
  828. package/dist/unstable/cluster/SqlMessageStorage.d.ts +11 -3
  829. package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
  830. package/dist/unstable/cluster/SqlMessageStorage.js +27 -3
  831. package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
  832. package/dist/unstable/cluster/SqlRunnerStorage.d.ts +11 -3
  833. package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
  834. package/dist/unstable/cluster/SqlRunnerStorage.js +46 -7
  835. package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
  836. package/dist/unstable/cluster/TestRunner.d.ts +18 -1
  837. package/dist/unstable/cluster/TestRunner.d.ts.map +1 -1
  838. package/dist/unstable/cluster/TestRunner.js +18 -1
  839. package/dist/unstable/cluster/TestRunner.js.map +1 -1
  840. package/dist/unstable/cluster/index.d.ts +790 -0
  841. package/dist/unstable/cluster/index.d.ts.map +1 -1
  842. package/dist/unstable/cluster/index.js +790 -0
  843. package/dist/unstable/cluster/index.js.map +1 -1
  844. package/dist/unstable/cluster/internal/hash.js +12 -0
  845. package/dist/unstable/cluster/internal/hash.js.map +1 -1
  846. package/dist/unstable/devtools/DevTools.d.ts +26 -3
  847. package/dist/unstable/devtools/DevTools.d.ts.map +1 -1
  848. package/dist/unstable/devtools/DevTools.js +26 -3
  849. package/dist/unstable/devtools/DevTools.js.map +1 -1
  850. package/dist/unstable/devtools/DevToolsClient.d.ts +20 -5
  851. package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
  852. package/dist/unstable/devtools/DevToolsClient.js +32 -5
  853. package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
  854. package/dist/unstable/devtools/DevToolsSchema.d.ts +184 -44
  855. package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
  856. package/dist/unstable/devtools/DevToolsSchema.js +102 -20
  857. package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
  858. package/dist/unstable/devtools/DevToolsServer.d.ts +27 -2
  859. package/dist/unstable/devtools/DevToolsServer.d.ts.map +1 -1
  860. package/dist/unstable/devtools/DevToolsServer.js +21 -1
  861. package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
  862. package/dist/unstable/devtools/index.d.ts +58 -0
  863. package/dist/unstable/devtools/index.d.ts.map +1 -1
  864. package/dist/unstable/devtools/index.js +58 -0
  865. package/dist/unstable/devtools/index.js.map +1 -1
  866. package/dist/unstable/encoding/Msgpack.d.ts +81 -12
  867. package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
  868. package/dist/unstable/encoding/Msgpack.js +75 -9
  869. package/dist/unstable/encoding/Msgpack.js.map +1 -1
  870. package/dist/unstable/encoding/Ndjson.d.ts +149 -21
  871. package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
  872. package/dist/unstable/encoding/Ndjson.js +97 -13
  873. package/dist/unstable/encoding/Ndjson.js.map +1 -1
  874. package/dist/unstable/encoding/Sse.d.ts +109 -18
  875. package/dist/unstable/encoding/Sse.d.ts.map +1 -1
  876. package/dist/unstable/encoding/Sse.js +69 -13
  877. package/dist/unstable/encoding/Sse.js.map +1 -1
  878. package/dist/unstable/encoding/index.d.ts +49 -0
  879. package/dist/unstable/encoding/index.d.ts.map +1 -1
  880. package/dist/unstable/encoding/index.js +49 -0
  881. package/dist/unstable/encoding/index.js.map +1 -1
  882. package/dist/unstable/eventlog/Event.d.ts +115 -30
  883. package/dist/unstable/eventlog/Event.d.ts.map +1 -1
  884. package/dist/unstable/eventlog/Event.js +22 -2
  885. package/dist/unstable/eventlog/Event.js.map +1 -1
  886. package/dist/unstable/eventlog/EventGroup.d.ts +50 -17
  887. package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
  888. package/dist/unstable/eventlog/EventGroup.js +24 -6
  889. package/dist/unstable/eventlog/EventGroup.js.map +1 -1
  890. package/dist/unstable/eventlog/EventJournal.d.ts +104 -20
  891. package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
  892. package/dist/unstable/eventlog/EventJournal.js +108 -16
  893. package/dist/unstable/eventlog/EventJournal.js.map +1 -1
  894. package/dist/unstable/eventlog/EventLog.d.ts +150 -31
  895. package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
  896. package/dist/unstable/eventlog/EventLog.js +111 -20
  897. package/dist/unstable/eventlog/EventLog.js.map +1 -1
  898. package/dist/unstable/eventlog/EventLogEncryption.d.ts +42 -6
  899. package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
  900. package/dist/unstable/eventlog/EventLogEncryption.js +38 -5
  901. package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
  902. package/dist/unstable/eventlog/EventLogMessage.d.ts +92 -18
  903. package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
  904. package/dist/unstable/eventlog/EventLogMessage.js +72 -16
  905. package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
  906. package/dist/unstable/eventlog/EventLogRemote.d.ts +35 -8
  907. package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
  908. package/dist/unstable/eventlog/EventLogRemote.js +54 -8
  909. package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
  910. package/dist/unstable/eventlog/EventLogServer.d.ts +17 -3
  911. package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
  912. package/dist/unstable/eventlog/EventLogServer.js +17 -3
  913. package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
  914. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +32 -6
  915. package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
  916. package/dist/unstable/eventlog/EventLogServerEncrypted.js +52 -6
  917. package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
  918. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +74 -16
  919. package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
  920. package/dist/unstable/eventlog/EventLogServerUnencrypted.js +90 -16
  921. package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
  922. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +59 -15
  923. package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
  924. package/dist/unstable/eventlog/EventLogSessionAuth.js +73 -14
  925. package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
  926. package/dist/unstable/eventlog/SqlEventJournal.d.ts +10 -2
  927. package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
  928. package/dist/unstable/eventlog/SqlEventJournal.js +28 -2
  929. package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
  930. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts +32 -3
  931. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
  932. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +32 -3
  933. package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
  934. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts +10 -2
  935. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
  936. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +28 -2
  937. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
  938. package/dist/unstable/eventlog/index.d.ts +240 -0
  939. package/dist/unstable/eventlog/index.d.ts.map +1 -1
  940. package/dist/unstable/eventlog/index.js +240 -0
  941. package/dist/unstable/eventlog/index.js.map +1 -1
  942. package/dist/unstable/http/Cookies.d.ts +156 -77
  943. package/dist/unstable/http/Cookies.d.ts.map +1 -1
  944. package/dist/unstable/http/Cookies.js +93 -39
  945. package/dist/unstable/http/Cookies.js.map +1 -1
  946. package/dist/unstable/http/Etag.d.ts +40 -7
  947. package/dist/unstable/http/Etag.d.ts.map +1 -1
  948. package/dist/unstable/http/Etag.js +27 -4
  949. package/dist/unstable/http/Etag.js.map +1 -1
  950. package/dist/unstable/http/FetchHttpClient.d.ts +29 -3
  951. package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
  952. package/dist/unstable/http/FetchHttpClient.js +33 -4
  953. package/dist/unstable/http/FetchHttpClient.js.map +1 -1
  954. package/dist/unstable/http/FindMyWay.d.ts +1 -1
  955. package/dist/unstable/http/FindMyWay.js +1 -1
  956. package/dist/unstable/http/Headers.d.ts +182 -36
  957. package/dist/unstable/http/Headers.d.ts.map +1 -1
  958. package/dist/unstable/http/Headers.js +86 -16
  959. package/dist/unstable/http/Headers.js.map +1 -1
  960. package/dist/unstable/http/HttpBody.d.ts +114 -26
  961. package/dist/unstable/http/HttpBody.d.ts.map +1 -1
  962. package/dist/unstable/http/HttpBody.js +98 -20
  963. package/dist/unstable/http/HttpBody.js.map +1 -1
  964. package/dist/unstable/http/HttpClient.d.ts +204 -96
  965. package/dist/unstable/http/HttpClient.d.ts.map +1 -1
  966. package/dist/unstable/http/HttpClient.js +85 -38
  967. package/dist/unstable/http/HttpClient.js.map +1 -1
  968. package/dist/unstable/http/HttpClientError.d.ts +68 -12
  969. package/dist/unstable/http/HttpClientError.d.ts.map +1 -1
  970. package/dist/unstable/http/HttpClientError.js +71 -9
  971. package/dist/unstable/http/HttpClientError.js.map +1 -1
  972. package/dist/unstable/http/HttpClientRequest.d.ts +318 -100
  973. package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
  974. package/dist/unstable/http/HttpClientRequest.js +151 -45
  975. package/dist/unstable/http/HttpClientRequest.js.map +1 -1
  976. package/dist/unstable/http/HttpClientResponse.d.ts +59 -16
  977. package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
  978. package/dist/unstable/http/HttpClientResponse.js +44 -11
  979. package/dist/unstable/http/HttpClientResponse.js.map +1 -1
  980. package/dist/unstable/http/HttpEffect.d.ts +42 -16
  981. package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
  982. package/dist/unstable/http/HttpEffect.js +33 -13
  983. package/dist/unstable/http/HttpEffect.js.map +1 -1
  984. package/dist/unstable/http/HttpIncomingMessage.d.ts +48 -7
  985. package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
  986. package/dist/unstable/http/HttpIncomingMessage.js +45 -6
  987. package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
  988. package/dist/unstable/http/HttpMethod.d.ts +38 -6
  989. package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
  990. package/dist/unstable/http/HttpMethod.js +27 -2
  991. package/dist/unstable/http/HttpMethod.js.map +1 -1
  992. package/dist/unstable/http/HttpMiddleware.d.ts +38 -11
  993. package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
  994. package/dist/unstable/http/HttpMiddleware.js +52 -10
  995. package/dist/unstable/http/HttpMiddleware.js.map +1 -1
  996. package/dist/unstable/http/HttpPlatform.d.ts +34 -3
  997. package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
  998. package/dist/unstable/http/HttpPlatform.js +34 -3
  999. package/dist/unstable/http/HttpPlatform.js.map +1 -1
  1000. package/dist/unstable/http/HttpRouter.d.ts +209 -62
  1001. package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
  1002. package/dist/unstable/http/HttpRouter.js +136 -41
  1003. package/dist/unstable/http/HttpRouter.js.map +1 -1
  1004. package/dist/unstable/http/HttpServer.d.ts +151 -22
  1005. package/dist/unstable/http/HttpServer.d.ts.map +1 -1
  1006. package/dist/unstable/http/HttpServer.js +76 -11
  1007. package/dist/unstable/http/HttpServer.js.map +1 -1
  1008. package/dist/unstable/http/HttpServerError.d.ts +93 -10
  1009. package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
  1010. package/dist/unstable/http/HttpServerError.js +85 -8
  1011. package/dist/unstable/http/HttpServerError.js.map +1 -1
  1012. package/dist/unstable/http/HttpServerRequest.d.ts +125 -21
  1013. package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
  1014. package/dist/unstable/http/HttpServerRequest.js +101 -20
  1015. package/dist/unstable/http/HttpServerRequest.js.map +1 -1
  1016. package/dist/unstable/http/HttpServerRespondable.d.ts +32 -6
  1017. package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
  1018. package/dist/unstable/http/HttpServerRespondable.js +43 -5
  1019. package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
  1020. package/dist/unstable/http/HttpServerResponse.d.ts +391 -67
  1021. package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
  1022. package/dist/unstable/http/HttpServerResponse.js +205 -33
  1023. package/dist/unstable/http/HttpServerResponse.js.map +1 -1
  1024. package/dist/unstable/http/HttpStaticServer.d.ts +24 -8
  1025. package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
  1026. package/dist/unstable/http/HttpStaticServer.js +24 -8
  1027. package/dist/unstable/http/HttpStaticServer.js.map +1 -1
  1028. package/dist/unstable/http/HttpTraceContext.d.ts +53 -6
  1029. package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
  1030. package/dist/unstable/http/HttpTraceContext.js +47 -5
  1031. package/dist/unstable/http/HttpTraceContext.js.map +1 -1
  1032. package/dist/unstable/http/Multipart.d.ts +179 -28
  1033. package/dist/unstable/http/Multipart.d.ts.map +1 -1
  1034. package/dist/unstable/http/Multipart.js +131 -19
  1035. package/dist/unstable/http/Multipart.js.map +1 -1
  1036. package/dist/unstable/http/Multipasta/HeadersParser.d.ts +1 -1
  1037. package/dist/unstable/http/Multipasta/HeadersParser.js +1 -1
  1038. package/dist/unstable/http/Multipasta/Node.d.ts +1 -1
  1039. package/dist/unstable/http/Multipasta/Node.js +1 -1
  1040. package/dist/unstable/http/Multipasta/Search.d.ts +1 -1
  1041. package/dist/unstable/http/Multipasta/Search.js +1 -1
  1042. package/dist/unstable/http/Multipasta/Web.d.ts +1 -1
  1043. package/dist/unstable/http/Multipasta/Web.js +1 -1
  1044. package/dist/unstable/http/Multipasta.d.ts +1 -1
  1045. package/dist/unstable/http/Multipasta.js +1 -1
  1046. package/dist/unstable/http/Template.d.ts +53 -1
  1047. package/dist/unstable/http/Template.d.ts.map +1 -1
  1048. package/dist/unstable/http/Template.js +26 -0
  1049. package/dist/unstable/http/Template.js.map +1 -1
  1050. package/dist/unstable/http/Url.d.ts +70 -56
  1051. package/dist/unstable/http/Url.d.ts.map +1 -1
  1052. package/dist/unstable/http/Url.js +35 -21
  1053. package/dist/unstable/http/Url.js.map +1 -1
  1054. package/dist/unstable/http/UrlParams.d.ts +237 -51
  1055. package/dist/unstable/http/UrlParams.d.ts.map +1 -1
  1056. package/dist/unstable/http/UrlParams.js +120 -25
  1057. package/dist/unstable/http/UrlParams.js.map +1 -1
  1058. package/dist/unstable/http/index.d.ts +452 -0
  1059. package/dist/unstable/http/index.d.ts.map +1 -1
  1060. package/dist/unstable/http/index.js +452 -0
  1061. package/dist/unstable/http/index.js.map +1 -1
  1062. package/dist/unstable/httpapi/HttpApi.d.ts +49 -14
  1063. package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
  1064. package/dist/unstable/httpapi/HttpApi.js +14 -8
  1065. package/dist/unstable/httpapi/HttpApi.js.map +1 -1
  1066. package/dist/unstable/httpapi/HttpApiBuilder.d.ts +54 -16
  1067. package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
  1068. package/dist/unstable/httpapi/HttpApiBuilder.js +44 -6
  1069. package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
  1070. package/dist/unstable/httpapi/HttpApiClient.d.ts +57 -15
  1071. package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
  1072. package/dist/unstable/httpapi/HttpApiClient.js +42 -6
  1073. package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
  1074. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +214 -59
  1075. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
  1076. package/dist/unstable/httpapi/HttpApiEndpoint.js +53 -9
  1077. package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
  1078. package/dist/unstable/httpapi/HttpApiError.d.ts +81 -1
  1079. package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
  1080. package/dist/unstable/httpapi/HttpApiError.js +98 -1
  1081. package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
  1082. package/dist/unstable/httpapi/HttpApiGroup.d.ts +87 -20
  1083. package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
  1084. package/dist/unstable/httpapi/HttpApiGroup.js +5 -2
  1085. package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
  1086. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +113 -22
  1087. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
  1088. package/dist/unstable/httpapi/HttpApiMiddleware.js +49 -5
  1089. package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
  1090. package/dist/unstable/httpapi/HttpApiScalar.d.ts +19 -4
  1091. package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
  1092. package/dist/unstable/httpapi/HttpApiScalar.js +32 -2
  1093. package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
  1094. package/dist/unstable/httpapi/HttpApiSchema.d.ts +86 -38
  1095. package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
  1096. package/dist/unstable/httpapi/HttpApiSchema.js +59 -35
  1097. package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
  1098. package/dist/unstable/httpapi/HttpApiSecurity.d.ts +73 -17
  1099. package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
  1100. package/dist/unstable/httpapi/HttpApiSecurity.js +38 -5
  1101. package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
  1102. package/dist/unstable/httpapi/HttpApiSwagger.d.ts +4 -3
  1103. package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
  1104. package/dist/unstable/httpapi/HttpApiSwagger.js +23 -3
  1105. package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
  1106. package/dist/unstable/httpapi/HttpApiTest.d.ts +6 -1
  1107. package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
  1108. package/dist/unstable/httpapi/HttpApiTest.js +26 -1
  1109. package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
  1110. package/dist/unstable/httpapi/OpenApi.d.ts +86 -15
  1111. package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
  1112. package/dist/unstable/httpapi/OpenApi.js +73 -15
  1113. package/dist/unstable/httpapi/OpenApi.js.map +1 -1
  1114. package/dist/unstable/httpapi/index.d.ts +310 -25
  1115. package/dist/unstable/httpapi/index.d.ts.map +1 -1
  1116. package/dist/unstable/httpapi/index.js +310 -25
  1117. package/dist/unstable/httpapi/index.js.map +1 -1
  1118. package/dist/unstable/observability/Otlp.d.ts +33 -3
  1119. package/dist/unstable/observability/Otlp.d.ts.map +1 -1
  1120. package/dist/unstable/observability/Otlp.js +14 -3
  1121. package/dist/unstable/observability/Otlp.js.map +1 -1
  1122. package/dist/unstable/observability/OtlpExporter.d.ts +8 -1
  1123. package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
  1124. package/dist/unstable/observability/OtlpExporter.js +32 -1
  1125. package/dist/unstable/observability/OtlpExporter.js.map +1 -1
  1126. package/dist/unstable/observability/OtlpLogger.d.ts +15 -2
  1127. package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
  1128. package/dist/unstable/observability/OtlpLogger.js +29 -2
  1129. package/dist/unstable/observability/OtlpLogger.js.map +1 -1
  1130. package/dist/unstable/observability/OtlpMetrics.d.ts +17 -5
  1131. package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
  1132. package/dist/unstable/observability/OtlpMetrics.js +32 -2
  1133. package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
  1134. package/dist/unstable/observability/OtlpResource.d.ts +49 -12
  1135. package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
  1136. package/dist/unstable/observability/OtlpResource.js +47 -5
  1137. package/dist/unstable/observability/OtlpResource.js.map +1 -1
  1138. package/dist/unstable/observability/OtlpSerialization.d.ts +28 -3
  1139. package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
  1140. package/dist/unstable/observability/OtlpSerialization.js +28 -3
  1141. package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
  1142. package/dist/unstable/observability/OtlpTracer.d.ts +19 -2
  1143. package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
  1144. package/dist/unstable/observability/OtlpTracer.js +32 -2
  1145. package/dist/unstable/observability/OtlpTracer.js.map +1 -1
  1146. package/dist/unstable/observability/PrometheusMetrics.d.ts +36 -16
  1147. package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
  1148. package/dist/unstable/observability/PrometheusMetrics.js +9 -7
  1149. package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
  1150. package/dist/unstable/observability/index.d.ts +160 -3
  1151. package/dist/unstable/observability/index.d.ts.map +1 -1
  1152. package/dist/unstable/observability/index.js +160 -3
  1153. package/dist/unstable/observability/index.js.map +1 -1
  1154. package/dist/unstable/persistence/KeyValueStore.d.ts +93 -18
  1155. package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
  1156. package/dist/unstable/persistence/KeyValueStore.js +81 -21
  1157. package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
  1158. package/dist/unstable/persistence/Persistable.d.ts +76 -15
  1159. package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
  1160. package/dist/unstable/persistence/Persistable.js +22 -5
  1161. package/dist/unstable/persistence/Persistable.js.map +1 -1
  1162. package/dist/unstable/persistence/PersistedCache.d.ts +27 -2
  1163. package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
  1164. package/dist/unstable/persistence/PersistedCache.js +24 -1
  1165. package/dist/unstable/persistence/PersistedCache.js.map +1 -1
  1166. package/dist/unstable/persistence/PersistedQueue.d.ts +73 -16
  1167. package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
  1168. package/dist/unstable/persistence/PersistedQueue.js +60 -13
  1169. package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
  1170. package/dist/unstable/persistence/Persistence.d.ts +98 -16
  1171. package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
  1172. package/dist/unstable/persistence/Persistence.js +91 -14
  1173. package/dist/unstable/persistence/Persistence.js.map +1 -1
  1174. package/dist/unstable/persistence/RateLimiter.d.ts +101 -21
  1175. package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
  1176. package/dist/unstable/persistence/RateLimiter.js +85 -16
  1177. package/dist/unstable/persistence/RateLimiter.js.map +1 -1
  1178. package/dist/unstable/persistence/Redis.d.ts +26 -5
  1179. package/dist/unstable/persistence/Redis.d.ts.map +1 -1
  1180. package/dist/unstable/persistence/Redis.js +36 -4
  1181. package/dist/unstable/persistence/Redis.js.map +1 -1
  1182. package/dist/unstable/persistence/index.d.ts +147 -0
  1183. package/dist/unstable/persistence/index.d.ts.map +1 -1
  1184. package/dist/unstable/persistence/index.js +147 -0
  1185. package/dist/unstable/persistence/index.js.map +1 -1
  1186. package/dist/unstable/process/ChildProcess.d.ts +87 -64
  1187. package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
  1188. package/dist/unstable/process/ChildProcess.js +25 -18
  1189. package/dist/unstable/process/ChildProcess.js.map +1 -1
  1190. package/dist/unstable/process/ChildProcessSpawner.d.ts +23 -12
  1191. package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
  1192. package/dist/unstable/process/ChildProcessSpawner.js +11 -6
  1193. package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
  1194. package/dist/unstable/process/index.d.ts +2 -1
  1195. package/dist/unstable/process/index.d.ts.map +1 -1
  1196. package/dist/unstable/process/index.js +2 -1
  1197. package/dist/unstable/process/index.js.map +1 -1
  1198. package/dist/unstable/reactivity/AsyncResult.d.ts +198 -59
  1199. package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
  1200. package/dist/unstable/reactivity/AsyncResult.js +121 -36
  1201. package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
  1202. package/dist/unstable/reactivity/Atom.d.ts +544 -130
  1203. package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
  1204. package/dist/unstable/reactivity/Atom.js +252 -58
  1205. package/dist/unstable/reactivity/Atom.js.map +1 -1
  1206. package/dist/unstable/reactivity/AtomHttpApi.d.ts +41 -2
  1207. package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
  1208. package/dist/unstable/reactivity/AtomHttpApi.js +35 -1
  1209. package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
  1210. package/dist/unstable/reactivity/AtomRef.d.ts +51 -7
  1211. package/dist/unstable/reactivity/AtomRef.d.ts.map +1 -1
  1212. package/dist/unstable/reactivity/AtomRef.js +29 -3
  1213. package/dist/unstable/reactivity/AtomRef.js.map +1 -1
  1214. package/dist/unstable/reactivity/AtomRegistry.d.ts +135 -21
  1215. package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
  1216. package/dist/unstable/reactivity/AtomRegistry.js +69 -10
  1217. package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
  1218. package/dist/unstable/reactivity/AtomRpc.d.ts +36 -2
  1219. package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
  1220. package/dist/unstable/reactivity/AtomRpc.js +29 -1
  1221. package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
  1222. package/dist/unstable/reactivity/Hydration.d.ts +28 -5
  1223. package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
  1224. package/dist/unstable/reactivity/Hydration.js +35 -3
  1225. package/dist/unstable/reactivity/Hydration.js.map +1 -1
  1226. package/dist/unstable/reactivity/Reactivity.d.ts +94 -13
  1227. package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
  1228. package/dist/unstable/reactivity/Reactivity.js +60 -7
  1229. package/dist/unstable/reactivity/Reactivity.js.map +1 -1
  1230. package/dist/unstable/reactivity/index.d.ts +167 -0
  1231. package/dist/unstable/reactivity/index.d.ts.map +1 -1
  1232. package/dist/unstable/reactivity/index.js +167 -0
  1233. package/dist/unstable/reactivity/index.js.map +1 -1
  1234. package/dist/unstable/rpc/Rpc.d.ts +254 -56
  1235. package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
  1236. package/dist/unstable/rpc/Rpc.js +44 -11
  1237. package/dist/unstable/rpc/Rpc.js.map +1 -1
  1238. package/dist/unstable/rpc/RpcClient.d.ts +80 -19
  1239. package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
  1240. package/dist/unstable/rpc/RpcClient.js +52 -12
  1241. package/dist/unstable/rpc/RpcClient.js.map +1 -1
  1242. package/dist/unstable/rpc/RpcClientError.d.ts +26 -2
  1243. package/dist/unstable/rpc/RpcClientError.d.ts.map +1 -1
  1244. package/dist/unstable/rpc/RpcClientError.js +26 -2
  1245. package/dist/unstable/rpc/RpcClientError.js.map +1 -1
  1246. package/dist/unstable/rpc/RpcGroup.d.ts +51 -8
  1247. package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
  1248. package/dist/unstable/rpc/RpcGroup.js +3 -1
  1249. package/dist/unstable/rpc/RpcGroup.js.map +1 -1
  1250. package/dist/unstable/rpc/RpcMessage.d.ts +128 -32
  1251. package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
  1252. package/dist/unstable/rpc/RpcMessage.js +23 -7
  1253. package/dist/unstable/rpc/RpcMessage.js.map +1 -1
  1254. package/dist/unstable/rpc/RpcMiddleware.d.ts +100 -20
  1255. package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
  1256. package/dist/unstable/rpc/RpcMiddleware.js +39 -3
  1257. package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
  1258. package/dist/unstable/rpc/RpcSchema.d.ts +38 -4
  1259. package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
  1260. package/dist/unstable/rpc/RpcSchema.js +34 -3
  1261. package/dist/unstable/rpc/RpcSchema.js.map +1 -1
  1262. package/dist/unstable/rpc/RpcSerialization.d.ts +60 -13
  1263. package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
  1264. package/dist/unstable/rpc/RpcSerialization.js +56 -12
  1265. package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
  1266. package/dist/unstable/rpc/RpcServer.d.ts +73 -23
  1267. package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
  1268. package/dist/unstable/rpc/RpcServer.js +69 -22
  1269. package/dist/unstable/rpc/RpcServer.js.map +1 -1
  1270. package/dist/unstable/rpc/RpcTest.d.ts +20 -1
  1271. package/dist/unstable/rpc/RpcTest.d.ts.map +1 -1
  1272. package/dist/unstable/rpc/RpcTest.js +20 -1
  1273. package/dist/unstable/rpc/RpcTest.js.map +1 -1
  1274. package/dist/unstable/rpc/RpcWorker.d.ts +39 -6
  1275. package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
  1276. package/dist/unstable/rpc/RpcWorker.js +16 -4
  1277. package/dist/unstable/rpc/RpcWorker.js.map +1 -1
  1278. package/dist/unstable/rpc/Utils.d.ts +10 -0
  1279. package/dist/unstable/rpc/Utils.d.ts.map +1 -1
  1280. package/dist/unstable/rpc/Utils.js +10 -0
  1281. package/dist/unstable/rpc/Utils.js.map +1 -1
  1282. package/dist/unstable/rpc/index.d.ts +272 -0
  1283. package/dist/unstable/rpc/index.d.ts.map +1 -1
  1284. package/dist/unstable/rpc/index.js +272 -0
  1285. package/dist/unstable/rpc/index.js.map +1 -1
  1286. package/dist/unstable/schema/Model.d.ts +192 -59
  1287. package/dist/unstable/schema/Model.d.ts.map +1 -1
  1288. package/dist/unstable/schema/Model.js +122 -38
  1289. package/dist/unstable/schema/Model.js.map +1 -1
  1290. package/dist/unstable/schema/VariantSchema.d.ts +101 -24
  1291. package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
  1292. package/dist/unstable/schema/VariantSchema.js +22 -6
  1293. package/dist/unstable/schema/VariantSchema.js.map +1 -1
  1294. package/dist/unstable/schema/index.d.ts +37 -0
  1295. package/dist/unstable/schema/index.d.ts.map +1 -1
  1296. package/dist/unstable/schema/index.js +37 -0
  1297. package/dist/unstable/schema/index.js.map +1 -1
  1298. package/dist/unstable/socket/Socket.d.ts +168 -34
  1299. package/dist/unstable/socket/Socket.d.ts.map +1 -1
  1300. package/dist/unstable/socket/Socket.js +124 -28
  1301. package/dist/unstable/socket/Socket.js.map +1 -1
  1302. package/dist/unstable/socket/SocketServer.d.ts +58 -10
  1303. package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
  1304. package/dist/unstable/socket/SocketServer.js +43 -5
  1305. package/dist/unstable/socket/SocketServer.js.map +1 -1
  1306. package/dist/unstable/socket/index.d.ts +44 -0
  1307. package/dist/unstable/socket/index.d.ts.map +1 -1
  1308. package/dist/unstable/socket/index.js +44 -0
  1309. package/dist/unstable/socket/index.js.map +1 -1
  1310. package/dist/unstable/sql/Migrator.d.ts +40 -9
  1311. package/dist/unstable/sql/Migrator.d.ts.map +1 -1
  1312. package/dist/unstable/sql/Migrator.js +45 -5
  1313. package/dist/unstable/sql/Migrator.js.map +1 -1
  1314. package/dist/unstable/sql/SqlClient.d.ts +38 -2
  1315. package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
  1316. package/dist/unstable/sql/SqlClient.js +40 -1
  1317. package/dist/unstable/sql/SqlClient.js.map +1 -1
  1318. package/dist/unstable/sql/SqlConnection.d.ts +34 -3
  1319. package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
  1320. package/dist/unstable/sql/SqlConnection.js +22 -0
  1321. package/dist/unstable/sql/SqlConnection.js.map +1 -1
  1322. package/dist/unstable/sql/SqlError.d.ts +117 -0
  1323. package/dist/unstable/sql/SqlError.d.ts.map +1 -1
  1324. package/dist/unstable/sql/SqlError.js +131 -0
  1325. package/dist/unstable/sql/SqlError.js.map +1 -1
  1326. package/dist/unstable/sql/SqlModel.d.ts +25 -5
  1327. package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
  1328. package/dist/unstable/sql/SqlModel.js +8 -4
  1329. package/dist/unstable/sql/SqlModel.js.map +1 -1
  1330. package/dist/unstable/sql/SqlResolver.d.ts +56 -13
  1331. package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
  1332. package/dist/unstable/sql/SqlResolver.js +44 -10
  1333. package/dist/unstable/sql/SqlResolver.js.map +1 -1
  1334. package/dist/unstable/sql/SqlSchema.d.ts +29 -8
  1335. package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
  1336. package/dist/unstable/sql/SqlSchema.js +29 -8
  1337. package/dist/unstable/sql/SqlSchema.js.map +1 -1
  1338. package/dist/unstable/sql/SqlStream.d.ts +4 -0
  1339. package/dist/unstable/sql/SqlStream.d.ts.map +1 -1
  1340. package/dist/unstable/sql/SqlStream.js +24 -0
  1341. package/dist/unstable/sql/SqlStream.js.map +1 -1
  1342. package/dist/unstable/sql/Statement.d.ts +151 -24
  1343. package/dist/unstable/sql/Statement.d.ts.map +1 -1
  1344. package/dist/unstable/sql/Statement.js +91 -6
  1345. package/dist/unstable/sql/Statement.js.map +1 -1
  1346. package/dist/unstable/sql/index.d.ts +179 -1
  1347. package/dist/unstable/sql/index.d.ts.map +1 -1
  1348. package/dist/unstable/sql/index.js +179 -1
  1349. package/dist/unstable/sql/index.js.map +1 -1
  1350. package/dist/unstable/workers/Transferable.d.ts +72 -20
  1351. package/dist/unstable/workers/Transferable.d.ts.map +1 -1
  1352. package/dist/unstable/workers/Transferable.js +57 -14
  1353. package/dist/unstable/workers/Transferable.js.map +1 -1
  1354. package/dist/unstable/workers/Worker.d.ts +61 -8
  1355. package/dist/unstable/workers/Worker.d.ts.map +1 -1
  1356. package/dist/unstable/workers/Worker.js +44 -4
  1357. package/dist/unstable/workers/Worker.js.map +1 -1
  1358. package/dist/unstable/workers/WorkerError.d.ts +31 -9
  1359. package/dist/unstable/workers/WorkerError.d.ts.map +1 -1
  1360. package/dist/unstable/workers/WorkerError.js +44 -7
  1361. package/dist/unstable/workers/WorkerError.js.map +1 -1
  1362. package/dist/unstable/workers/WorkerRunner.d.ts +32 -3
  1363. package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
  1364. package/dist/unstable/workers/WorkerRunner.js +24 -1
  1365. package/dist/unstable/workers/WorkerRunner.js.map +1 -1
  1366. package/dist/unstable/workers/index.d.ts +81 -1
  1367. package/dist/unstable/workers/index.d.ts.map +1 -1
  1368. package/dist/unstable/workers/index.js +81 -1
  1369. package/dist/unstable/workers/index.js.map +1 -1
  1370. package/dist/unstable/workflow/Activity.d.ts +61 -10
  1371. package/dist/unstable/workflow/Activity.d.ts.map +1 -1
  1372. package/dist/unstable/workflow/Activity.js +20 -5
  1373. package/dist/unstable/workflow/Activity.js.map +1 -1
  1374. package/dist/unstable/workflow/DurableClock.d.ts +12 -3
  1375. package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
  1376. package/dist/unstable/workflow/DurableClock.js +22 -2
  1377. package/dist/unstable/workflow/DurableClock.js.map +1 -1
  1378. package/dist/unstable/workflow/DurableDeferred.d.ts +128 -31
  1379. package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
  1380. package/dist/unstable/workflow/DurableDeferred.js +77 -13
  1381. package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
  1382. package/dist/unstable/workflow/DurableQueue.d.ts +33 -8
  1383. package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
  1384. package/dist/unstable/workflow/DurableQueue.js +26 -6
  1385. package/dist/unstable/workflow/DurableQueue.js.map +1 -1
  1386. package/dist/unstable/workflow/Workflow.d.ts +102 -31
  1387. package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
  1388. package/dist/unstable/workflow/Workflow.js +75 -19
  1389. package/dist/unstable/workflow/Workflow.js.map +1 -1
  1390. package/dist/unstable/workflow/WorkflowEngine.d.ts +40 -5
  1391. package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
  1392. package/dist/unstable/workflow/WorkflowEngine.js +16 -4
  1393. package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
  1394. package/dist/unstable/workflow/WorkflowProxy.d.ts +40 -12
  1395. package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
  1396. package/dist/unstable/workflow/WorkflowProxy.js +8 -12
  1397. package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
  1398. package/dist/unstable/workflow/WorkflowProxyServer.d.ts +37 -2
  1399. package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
  1400. package/dist/unstable/workflow/WorkflowProxyServer.js +12 -6
  1401. package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
  1402. package/dist/unstable/workflow/index.d.ts +160 -0
  1403. package/dist/unstable/workflow/index.d.ts.map +1 -1
  1404. package/dist/unstable/workflow/index.js +160 -0
  1405. package/dist/unstable/workflow/index.js.map +1 -1
  1406. package/package.json +11 -11
  1407. package/src/Array.ts +151 -106
  1408. package/src/BigDecimal.ts +620 -553
  1409. package/src/BigInt.ts +342 -274
  1410. package/src/Boolean.ts +189 -156
  1411. package/src/Brand.ts +30 -5
  1412. package/src/Cache.ts +334 -167
  1413. package/src/Cause.ts +84 -73
  1414. package/src/Channel.ts +1639 -667
  1415. package/src/ChannelSchema.ts +137 -12
  1416. package/src/Chunk.ts +575 -429
  1417. package/src/Clock.ts +16 -9
  1418. package/src/Combiner.ts +11 -5
  1419. package/src/Config.ts +80 -68
  1420. package/src/ConfigProvider.ts +33 -32
  1421. package/src/Console.ts +88 -58
  1422. package/src/Context.ts +401 -190
  1423. package/src/Cron.ts +109 -48
  1424. package/src/Crypto.ts +327 -0
  1425. package/src/Data.ts +9 -3
  1426. package/src/DateTime.ts +893 -464
  1427. package/src/Deferred.ts +367 -175
  1428. package/src/Differ.ts +44 -2
  1429. package/src/Duration.ts +333 -186
  1430. package/src/Effect.ts +2201 -2289
  1431. package/src/Effectable.ts +38 -3
  1432. package/src/Encoding.ts +78 -28
  1433. package/src/Equal.ts +4 -3
  1434. package/src/Equivalence.ts +18 -24
  1435. package/src/ErrorReporter.ts +66 -82
  1436. package/src/ExecutionPlan.ts +106 -12
  1437. package/src/Exit.ts +6 -5
  1438. package/src/Fiber.ts +71 -40
  1439. package/src/FiberHandle.ts +157 -57
  1440. package/src/FiberMap.ts +328 -163
  1441. package/src/FiberSet.ts +130 -52
  1442. package/src/FileSystem.ts +104 -74
  1443. package/src/Filter.ts +166 -88
  1444. package/src/Formatter.ts +4 -70
  1445. package/src/Function.ts +218 -151
  1446. package/src/Graph.ts +714 -415
  1447. package/src/HKT.ts +29 -13
  1448. package/src/Hash.ts +35 -24
  1449. package/src/HashMap.ts +540 -388
  1450. package/src/HashRing.ts +111 -34
  1451. package/src/HashSet.ts +239 -153
  1452. package/src/Inspectable.ts +30 -17
  1453. package/src/Iterable.ts +336 -222
  1454. package/src/JsonPatch.ts +13 -10
  1455. package/src/JsonPointer.ts +13 -11
  1456. package/src/JsonSchema.ts +16 -0
  1457. package/src/Latch.ts +97 -26
  1458. package/src/Layer.ts +547 -445
  1459. package/src/LayerMap.ts +99 -26
  1460. package/src/LogLevel.ts +92 -131
  1461. package/src/Logger.ts +365 -297
  1462. package/src/ManagedRuntime.ts +78 -19
  1463. package/src/Match.ts +135 -161
  1464. package/src/Metric.ts +362 -313
  1465. package/src/MutableHashMap.ts +202 -127
  1466. package/src/MutableHashSet.ts +120 -52
  1467. package/src/MutableList.ts +157 -100
  1468. package/src/MutableRef.ts +129 -90
  1469. package/src/Newtype.ts +15 -2
  1470. package/src/NonEmptyIterable.ts +38 -48
  1471. package/src/Number.ts +261 -205
  1472. package/src/Optic.ts +6 -7
  1473. package/src/Option.ts +133 -156
  1474. package/src/Order.ts +6 -6
  1475. package/src/Ordering.ts +56 -45
  1476. package/src/PartitionedSemaphore.ts +225 -40
  1477. package/src/Path.ts +77 -13
  1478. package/src/Pipeable.ts +82 -24
  1479. package/src/PlatformError.ts +74 -6
  1480. package/src/Pool.ts +94 -31
  1481. package/src/Predicate.ts +17 -24
  1482. package/src/PrimaryKey.ts +11 -3
  1483. package/src/PubSub.ts +385 -309
  1484. package/src/Pull.ts +94 -25
  1485. package/src/Queue.ts +303 -184
  1486. package/src/Random.ts +69 -93
  1487. package/src/RcMap.ts +151 -141
  1488. package/src/RcRef.ts +68 -32
  1489. package/src/Record.ts +282 -137
  1490. package/src/Redactable.ts +7 -5
  1491. package/src/Redacted.ts +63 -34
  1492. package/src/Reducer.ts +3 -1
  1493. package/src/Ref.ts +173 -134
  1494. package/src/References.ts +73 -31
  1495. package/src/RegExp.ts +12 -6
  1496. package/src/Request.ts +159 -34
  1497. package/src/RequestResolver.ts +278 -121
  1498. package/src/Resource.ts +45 -7
  1499. package/src/Result.ts +137 -153
  1500. package/src/Runtime.ts +42 -21
  1501. package/src/Schedule.ts +585 -613
  1502. package/src/Scheduler.ts +44 -7
  1503. package/src/Schema.ts +1309 -615
  1504. package/src/SchemaAST.ts +123 -93
  1505. package/src/SchemaGetter.ts +52 -37
  1506. package/src/SchemaIssue.ts +19 -24
  1507. package/src/SchemaParser.ts +306 -85
  1508. package/src/SchemaRepresentation.ts +89 -77
  1509. package/src/SchemaTransformation.ts +97 -46
  1510. package/src/SchemaUtils.ts +24 -1
  1511. package/src/Scope.ts +107 -65
  1512. package/src/ScopedCache.ts +195 -59
  1513. package/src/ScopedRef.ts +28 -8
  1514. package/src/Semaphore.ts +61 -37
  1515. package/src/Sink.ts +461 -206
  1516. package/src/Stdio.ts +43 -6
  1517. package/src/Stream.ts +2361 -1613
  1518. package/src/String.ts +174 -97
  1519. package/src/Struct.ts +20 -18
  1520. package/src/SubscriptionRef.ts +309 -204
  1521. package/src/Symbol.ts +13 -5
  1522. package/src/SynchronizedRef.ts +278 -62
  1523. package/src/Take.ts +26 -2
  1524. package/src/Terminal.ts +40 -7
  1525. package/src/Tracer.ts +233 -59
  1526. package/src/Trie.ts +280 -245
  1527. package/src/Tuple.ts +34 -32
  1528. package/src/TxChunk.ts +200 -155
  1529. package/src/TxDeferred.ts +43 -29
  1530. package/src/TxHashMap.ts +370 -231
  1531. package/src/TxHashSet.ts +253 -159
  1532. package/src/TxPriorityQueue.ts +97 -65
  1533. package/src/TxPubSub.ts +77 -49
  1534. package/src/TxQueue.ts +277 -242
  1535. package/src/TxReentrantLock.ts +70 -47
  1536. package/src/TxRef.ts +69 -40
  1537. package/src/TxSemaphore.ts +101 -115
  1538. package/src/TxSubscriptionRef.ts +74 -50
  1539. package/src/Types.ts +31 -34
  1540. package/src/UndefinedOr.ts +62 -25
  1541. package/src/Unify.ts +72 -117
  1542. package/src/Utils.ts +5 -2
  1543. package/src/index.ts +1976 -420
  1544. package/src/internal/schema/schema.ts +1 -1
  1545. package/src/testing/FastCheck.ts +9 -6
  1546. package/src/testing/TestClock.ts +63 -35
  1547. package/src/testing/TestConsole.ts +54 -36
  1548. package/src/testing/TestSchema.ts +10 -8
  1549. package/src/testing/index.ts +34 -0
  1550. package/src/unstable/ai/AiError.ts +195 -137
  1551. package/src/unstable/ai/AnthropicStructuredOutput.ts +2 -2
  1552. package/src/unstable/ai/Chat.ts +68 -43
  1553. package/src/unstable/ai/EmbeddingModel.ts +12 -11
  1554. package/src/unstable/ai/IdGenerator.ts +28 -18
  1555. package/src/unstable/ai/LanguageModel.ts +35 -27
  1556. package/src/unstable/ai/McpSchema.ts +342 -119
  1557. package/src/unstable/ai/McpServer.ts +79 -20
  1558. package/src/unstable/ai/Model.ts +10 -12
  1559. package/src/unstable/ai/OpenAiStructuredOutput.ts +2 -2
  1560. package/src/unstable/ai/Prompt.ts +216 -192
  1561. package/src/unstable/ai/Response.ts +179 -167
  1562. package/src/unstable/ai/ResponseIdTracker.ts +43 -4
  1563. package/src/unstable/ai/Telemetry.ts +43 -33
  1564. package/src/unstable/ai/Tokenizer.ts +14 -9
  1565. package/src/unstable/ai/Tool.ts +168 -97
  1566. package/src/unstable/ai/Toolkit.ts +51 -46
  1567. package/src/unstable/ai/index.ts +121 -29
  1568. package/src/unstable/cli/Argument.ts +226 -134
  1569. package/src/unstable/cli/CliError.ts +96 -26
  1570. package/src/unstable/cli/CliOutput.ts +48 -19
  1571. package/src/unstable/cli/Command.ts +196 -115
  1572. package/src/unstable/cli/Completions.ts +7 -7
  1573. package/src/unstable/cli/Flag.ts +235 -142
  1574. package/src/unstable/cli/GlobalFlag.ts +41 -13
  1575. package/src/unstable/cli/HelpDoc.ts +39 -14
  1576. package/src/unstable/cli/Param.ts +395 -260
  1577. package/src/unstable/cli/Primitive.ts +79 -42
  1578. package/src/unstable/cli/Prompt.ts +207 -59
  1579. package/src/unstable/cli/index.ts +205 -6
  1580. package/src/unstable/cli/internal/ansi.ts +13 -0
  1581. package/src/unstable/cli/internal/command.ts +5 -1
  1582. package/src/unstable/cli/internal/config.ts +3 -0
  1583. package/src/unstable/cli/internal/lexer.ts +11 -0
  1584. package/src/unstable/cli/internal/parser.ts +0 -1
  1585. package/src/unstable/cluster/ClusterCron.ts +35 -1
  1586. package/src/unstable/cluster/ClusterError.ts +56 -7
  1587. package/src/unstable/cluster/ClusterMetrics.ts +39 -5
  1588. package/src/unstable/cluster/ClusterSchema.ts +61 -8
  1589. package/src/unstable/cluster/ClusterWorkflowEngine.ts +35 -2
  1590. package/src/unstable/cluster/DeliverAt.ts +39 -4
  1591. package/src/unstable/cluster/Entity.ts +106 -16
  1592. package/src/unstable/cluster/EntityAddress.ts +30 -2
  1593. package/src/unstable/cluster/EntityId.ts +18 -3
  1594. package/src/unstable/cluster/EntityProxy.ts +42 -14
  1595. package/src/unstable/cluster/EntityProxyServer.ts +45 -8
  1596. package/src/unstable/cluster/EntityResource.ts +43 -6
  1597. package/src/unstable/cluster/EntityType.ts +27 -3
  1598. package/src/unstable/cluster/Envelope.ts +128 -23
  1599. package/src/unstable/cluster/HttpRunner.ts +88 -13
  1600. package/src/unstable/cluster/K8sHttpClient.ts +49 -6
  1601. package/src/unstable/cluster/MachineId.ts +24 -3
  1602. package/src/unstable/cluster/Message.ts +102 -13
  1603. package/src/unstable/cluster/MessageStorage.ts +126 -21
  1604. package/src/unstable/cluster/Reply.ts +101 -12
  1605. package/src/unstable/cluster/Runner.ts +47 -17
  1606. package/src/unstable/cluster/RunnerAddress.ts +34 -2
  1607. package/src/unstable/cluster/RunnerHealth.ts +40 -12
  1608. package/src/unstable/cluster/RunnerServer.ts +31 -4
  1609. package/src/unstable/cluster/RunnerStorage.ts +42 -5
  1610. package/src/unstable/cluster/Runners.ts +76 -13
  1611. package/src/unstable/cluster/ShardId.ts +53 -5
  1612. package/src/unstable/cluster/Sharding.ts +35 -4
  1613. package/src/unstable/cluster/ShardingConfig.ts +75 -10
  1614. package/src/unstable/cluster/ShardingRegistrationEvent.ts +31 -7
  1615. package/src/unstable/cluster/SingleRunner.ts +23 -1
  1616. package/src/unstable/cluster/Singleton.ts +15 -1
  1617. package/src/unstable/cluster/SingletonAddress.ts +21 -1
  1618. package/src/unstable/cluster/Snowflake.ts +90 -19
  1619. package/src/unstable/cluster/SocketRunner.ts +29 -2
  1620. package/src/unstable/cluster/SqlMessageStorage.ts +27 -3
  1621. package/src/unstable/cluster/SqlRunnerStorage.ts +46 -7
  1622. package/src/unstable/cluster/TestRunner.ts +18 -1
  1623. package/src/unstable/cluster/index.ts +790 -0
  1624. package/src/unstable/cluster/internal/hash.ts +12 -0
  1625. package/src/unstable/devtools/DevTools.ts +26 -3
  1626. package/src/unstable/devtools/DevToolsClient.ts +32 -5
  1627. package/src/unstable/devtools/DevToolsSchema.ts +201 -44
  1628. package/src/unstable/devtools/DevToolsServer.ts +27 -2
  1629. package/src/unstable/devtools/index.ts +58 -0
  1630. package/src/unstable/encoding/Msgpack.ts +97 -12
  1631. package/src/unstable/encoding/Ndjson.ts +149 -21
  1632. package/src/unstable/encoding/Sse.ts +109 -18
  1633. package/src/unstable/encoding/index.ts +49 -0
  1634. package/src/unstable/eventlog/Event.ts +131 -30
  1635. package/src/unstable/eventlog/EventGroup.ts +50 -17
  1636. package/src/unstable/eventlog/EventJournal.ts +120 -20
  1637. package/src/unstable/eventlog/EventLog.ts +150 -31
  1638. package/src/unstable/eventlog/EventLogEncryption.ts +42 -6
  1639. package/src/unstable/eventlog/EventLogMessage.ts +92 -18
  1640. package/src/unstable/eventlog/EventLogRemote.ts +54 -8
  1641. package/src/unstable/eventlog/EventLogServer.ts +33 -3
  1642. package/src/unstable/eventlog/EventLogServerEncrypted.ts +52 -6
  1643. package/src/unstable/eventlog/EventLogServerUnencrypted.ts +90 -16
  1644. package/src/unstable/eventlog/EventLogSessionAuth.ts +77 -15
  1645. package/src/unstable/eventlog/SqlEventJournal.ts +28 -2
  1646. package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +32 -3
  1647. package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +28 -2
  1648. package/src/unstable/eventlog/index.ts +240 -0
  1649. package/src/unstable/http/Cookies.ts +156 -77
  1650. package/src/unstable/http/Etag.ts +40 -7
  1651. package/src/unstable/http/FetchHttpClient.ts +33 -4
  1652. package/src/unstable/http/FindMyWay.ts +1 -1
  1653. package/src/unstable/http/Headers.ts +252 -50
  1654. package/src/unstable/http/HttpBody.ts +128 -26
  1655. package/src/unstable/http/HttpClient.ts +204 -96
  1656. package/src/unstable/http/HttpClientError.ts +80 -12
  1657. package/src/unstable/http/HttpClientRequest.ts +318 -100
  1658. package/src/unstable/http/HttpClientResponse.ts +59 -16
  1659. package/src/unstable/http/HttpEffect.ts +66 -18
  1660. package/src/unstable/http/HttpIncomingMessage.ts +48 -7
  1661. package/src/unstable/http/HttpMethod.ts +38 -6
  1662. package/src/unstable/http/HttpMiddleware.ts +60 -11
  1663. package/src/unstable/http/HttpPlatform.ts +34 -3
  1664. package/src/unstable/http/HttpRouter.ts +232 -69
  1665. package/src/unstable/http/HttpServer.ts +151 -22
  1666. package/src/unstable/http/HttpServerError.ts +93 -10
  1667. package/src/unstable/http/HttpServerRequest.ts +125 -21
  1668. package/src/unstable/http/HttpServerRespondable.ts +49 -6
  1669. package/src/unstable/http/HttpServerResponse.ts +391 -67
  1670. package/src/unstable/http/HttpStaticServer.ts +24 -8
  1671. package/src/unstable/http/HttpTraceContext.ts +53 -6
  1672. package/src/unstable/http/Multipart.ts +179 -28
  1673. package/src/unstable/http/Multipasta/HeadersParser.ts +1 -1
  1674. package/src/unstable/http/Multipasta/Node.ts +1 -1
  1675. package/src/unstable/http/Multipasta/Search.ts +1 -1
  1676. package/src/unstable/http/Multipasta/Web.ts +1 -1
  1677. package/src/unstable/http/Multipasta.ts +1 -1
  1678. package/src/unstable/http/Template.ts +53 -1
  1679. package/src/unstable/http/Url.ts +70 -56
  1680. package/src/unstable/http/UrlParams.ts +237 -51
  1681. package/src/unstable/http/index.ts +452 -0
  1682. package/src/unstable/httpapi/HttpApi.ts +49 -14
  1683. package/src/unstable/httpapi/HttpApiBuilder.ts +81 -16
  1684. package/src/unstable/httpapi/HttpApiClient.ts +78 -15
  1685. package/src/unstable/httpapi/HttpApiEndpoint.ts +238 -59
  1686. package/src/unstable/httpapi/HttpApiError.ts +100 -1
  1687. package/src/unstable/httpapi/HttpApiGroup.ts +87 -20
  1688. package/src/unstable/httpapi/HttpApiMiddleware.ts +113 -22
  1689. package/src/unstable/httpapi/HttpApiScalar.ts +38 -4
  1690. package/src/unstable/httpapi/HttpApiSchema.ts +86 -38
  1691. package/src/unstable/httpapi/HttpApiSecurity.ts +73 -17
  1692. package/src/unstable/httpapi/HttpApiSwagger.ts +23 -3
  1693. package/src/unstable/httpapi/HttpApiTest.ts +26 -1
  1694. package/src/unstable/httpapi/OpenApi.ts +115 -15
  1695. package/src/unstable/httpapi/index.ts +310 -25
  1696. package/src/unstable/observability/Otlp.ts +33 -3
  1697. package/src/unstable/observability/OtlpExporter.ts +32 -1
  1698. package/src/unstable/observability/OtlpLogger.ts +32 -2
  1699. package/src/unstable/observability/OtlpMetrics.ts +39 -5
  1700. package/src/unstable/observability/OtlpResource.ts +68 -12
  1701. package/src/unstable/observability/OtlpSerialization.ts +28 -3
  1702. package/src/unstable/observability/OtlpTracer.ts +41 -2
  1703. package/src/unstable/observability/PrometheusMetrics.ts +36 -16
  1704. package/src/unstable/observability/index.ts +160 -3
  1705. package/src/unstable/persistence/KeyValueStore.ts +108 -28
  1706. package/src/unstable/persistence/Persistable.ts +76 -15
  1707. package/src/unstable/persistence/PersistedCache.ts +27 -2
  1708. package/src/unstable/persistence/PersistedQueue.ts +98 -16
  1709. package/src/unstable/persistence/Persistence.ts +98 -16
  1710. package/src/unstable/persistence/RateLimiter.ts +101 -21
  1711. package/src/unstable/persistence/Redis.ts +42 -5
  1712. package/src/unstable/persistence/index.ts +147 -0
  1713. package/src/unstable/process/ChildProcess.ts +90 -66
  1714. package/src/unstable/process/ChildProcessSpawner.ts +23 -12
  1715. package/src/unstable/process/index.ts +2 -1
  1716. package/src/unstable/reactivity/AsyncResult.ts +204 -61
  1717. package/src/unstable/reactivity/Atom.ts +598 -139
  1718. package/src/unstable/reactivity/AtomHttpApi.ts +41 -2
  1719. package/src/unstable/reactivity/AtomRef.ts +51 -7
  1720. package/src/unstable/reactivity/AtomRegistry.ts +141 -22
  1721. package/src/unstable/reactivity/AtomRpc.ts +36 -2
  1722. package/src/unstable/reactivity/Hydration.ts +45 -5
  1723. package/src/unstable/reactivity/Reactivity.ts +94 -13
  1724. package/src/unstable/reactivity/index.ts +167 -0
  1725. package/src/unstable/rpc/Rpc.ts +254 -56
  1726. package/src/unstable/rpc/RpcClient.ts +106 -19
  1727. package/src/unstable/rpc/RpcClientError.ts +26 -2
  1728. package/src/unstable/rpc/RpcGroup.ts +51 -8
  1729. package/src/unstable/rpc/RpcMessage.ts +128 -32
  1730. package/src/unstable/rpc/RpcMiddleware.ts +100 -20
  1731. package/src/unstable/rpc/RpcSchema.ts +38 -4
  1732. package/src/unstable/rpc/RpcSerialization.ts +60 -13
  1733. package/src/unstable/rpc/RpcServer.ts +107 -23
  1734. package/src/unstable/rpc/RpcTest.ts +20 -1
  1735. package/src/unstable/rpc/RpcWorker.ts +39 -6
  1736. package/src/unstable/rpc/Utils.ts +33 -0
  1737. package/src/unstable/rpc/index.ts +272 -0
  1738. package/src/unstable/schema/Model.ts +245 -61
  1739. package/src/unstable/schema/VariantSchema.ts +101 -24
  1740. package/src/unstable/schema/index.ts +37 -0
  1741. package/src/unstable/socket/Socket.ts +168 -34
  1742. package/src/unstable/socket/SocketServer.ts +58 -10
  1743. package/src/unstable/socket/index.ts +44 -0
  1744. package/src/unstable/sql/Migrator.ts +61 -9
  1745. package/src/unstable/sql/SqlClient.ts +59 -2
  1746. package/src/unstable/sql/SqlConnection.ts +34 -3
  1747. package/src/unstable/sql/SqlError.ts +135 -0
  1748. package/src/unstable/sql/SqlModel.ts +25 -5
  1749. package/src/unstable/sql/SqlResolver.ts +56 -13
  1750. package/src/unstable/sql/SqlSchema.ts +29 -8
  1751. package/src/unstable/sql/SqlStream.ts +24 -0
  1752. package/src/unstable/sql/Statement.ts +168 -24
  1753. package/src/unstable/sql/index.ts +179 -1
  1754. package/src/unstable/workers/Transferable.ts +72 -20
  1755. package/src/unstable/workers/Worker.ts +61 -8
  1756. package/src/unstable/workers/WorkerError.ts +50 -9
  1757. package/src/unstable/workers/WorkerRunner.ts +32 -3
  1758. package/src/unstable/workers/index.ts +81 -1
  1759. package/src/unstable/workflow/Activity.ts +61 -10
  1760. package/src/unstable/workflow/DurableClock.ts +26 -3
  1761. package/src/unstable/workflow/DurableDeferred.ts +148 -31
  1762. package/src/unstable/workflow/DurableQueue.ts +33 -8
  1763. package/src/unstable/workflow/Workflow.ts +123 -31
  1764. package/src/unstable/workflow/WorkflowEngine.ts +40 -5
  1765. package/src/unstable/workflow/WorkflowProxy.ts +40 -12
  1766. package/src/unstable/workflow/WorkflowProxyServer.ts +41 -6
  1767. package/src/unstable/workflow/index.ts +160 -0
package/src/Chunk.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
@@ -94,7 +96,8 @@ const TypeId = "~effect/collections/Chunk"
94
96
  /**
95
97
  * A Chunk is an immutable, ordered collection optimized for efficient concatenation and access patterns.
96
98
  *
97
- * @example
99
+ * **Example** (Inspecting chunk values)
100
+ *
98
101
  * ```ts
99
102
  * import { Chunk } from "effect"
100
103
  *
@@ -120,7 +123,8 @@ export interface Chunk<out A> extends Iterable<A>, Equal.Equal, Pipeable, Inspec
120
123
  /**
121
124
  * A non-empty Chunk guaranteed to contain at least one element.
122
125
  *
123
- * @example
126
+ * **Example** (Working with non-empty chunks)
127
+ *
124
128
  * ```ts
125
129
  * import { Chunk } from "effect"
126
130
  *
@@ -137,13 +141,13 @@ export interface NonEmptyChunk<out A> extends Chunk<A>, NonEmptyIterable<A> {}
137
141
  /**
138
142
  * Type lambda for Chunk, used for higher-kinded type operations.
139
143
  *
140
- * @example
144
+ * **Example** (Applying the Chunk type lambda)
145
+ *
141
146
  * ```ts
142
- * import type { ChunkTypeLambda } from "effect/Chunk"
143
- * import type { Kind } from "effect/HKT"
147
+ * import type { Chunk, HKT } from "effect"
144
148
  *
145
149
  * // Create a Chunk type using the type lambda
146
- * type NumberChunk = Kind<ChunkTypeLambda, never, never, never, number>
150
+ * type NumberChunk = HKT.Kind<Chunk.ChunkTypeLambda, never, never, never, number>
147
151
  * // Equivalent to: Chunk<number>
148
152
  * ```
149
153
  *
@@ -204,12 +208,13 @@ function copy<A>(
204
208
  const emptyArray: ReadonlyArray<never> = []
205
209
 
206
210
  /**
207
- * Compares the two chunks of equal length using the specified function
211
+ * Creates an `Equivalence` for chunks that compares chunk lengths and then
212
+ * compares corresponding elements with the provided element equivalence.
213
+ *
214
+ * **Example** (Comparing chunks for equivalence)
208
215
  *
209
- * @example
210
216
  * ```ts
211
- * import { Chunk } from "effect"
212
- * import * as Equivalence from "effect/Equivalence"
217
+ * import { Chunk, Equivalence } from "effect"
213
218
  *
214
219
  * const chunk1 = Chunk.make(1, 2, 3)
215
220
  * const chunk2 = Chunk.make(1, 2, 3)
@@ -221,7 +226,7 @@ const emptyArray: ReadonlyArray<never> = []
221
226
  * ```
222
227
  *
223
228
  * @category equivalence
224
- * @since 2.0.0
229
+ * @since 4.0.0
225
230
  */
226
231
  export const makeEquivalence = <A>(isEquivalent: Equivalence.Equivalence<A>): Equivalence.Equivalence<Chunk<A>> =>
227
232
  Equivalence.make((self, that) =>
@@ -316,7 +321,8 @@ const makeChunk = <A>(backing: Backing<A>): Chunk<A> => {
316
321
  /**
317
322
  * Checks if `u` is a `Chunk<unknown>`
318
323
  *
319
- * @example
324
+ * **Example** (Checking for chunks)
325
+ *
320
326
  * ```ts
321
327
  * import { Chunk } from "effect"
322
328
  *
@@ -335,7 +341,8 @@ export const isChunk: {
335
341
  /**
336
342
  * Checks if `u` is a `Chunk<unknown>`
337
343
  *
338
- * @example
344
+ * **Example** (Checking for chunks)
345
+ *
339
346
  * ```ts
340
347
  * import { Chunk } from "effect"
341
348
  *
@@ -354,7 +361,8 @@ export const isChunk: {
354
361
  /**
355
362
  * Checks if `u` is a `Chunk<unknown>`
356
363
  *
357
- * @example
364
+ * **Example** (Checking for chunks)
365
+ *
358
366
  * ```ts
359
367
  * import { Chunk } from "effect"
360
368
  *
@@ -377,7 +385,8 @@ const _empty = makeChunk<never>({ _tag: "IEmpty" })
377
385
  /**
378
386
  * Creates an empty `Chunk`.
379
387
  *
380
- * @example
388
+ * **Example** (Creating an empty chunk)
389
+ *
381
390
  * ```ts
382
391
  * import { Chunk } from "effect"
383
392
  *
@@ -393,13 +402,13 @@ export const empty: <A = never>() => Chunk<A> = () => _empty
393
402
  /**
394
403
  * Builds a `NonEmptyChunk` from an non-empty collection of elements.
395
404
  *
396
- * @example
405
+ * **Example** (Creating a non-empty chunk)
406
+ *
397
407
  * ```ts
398
408
  * import { Chunk } from "effect"
399
409
  *
400
410
  * const chunk = Chunk.make(1, 2, 3, 4)
401
- * console.log(chunk)
402
- * // { _id: 'Chunk', values: [ 1, 2, 3, 4 ] }
411
+ * console.log(Chunk.toArray(chunk)) // [1, 2, 3, 4]
403
412
  * ```
404
413
  *
405
414
  * @category constructors
@@ -411,13 +420,13 @@ export const make = <As extends readonly [any, ...Array<any>]>(...as: As): NonEm
411
420
  /**
412
421
  * Builds a `NonEmptyChunk` from a single element.
413
422
  *
414
- * @example
423
+ * **Example** (Creating a single-element chunk)
424
+ *
415
425
  * ```ts
416
426
  * import { Chunk } from "effect"
417
427
  *
418
428
  * const chunk = Chunk.of("hello")
419
- * console.log(chunk)
420
- * // { _id: 'Chunk', values: [ "hello" ] }
429
+ * console.log(Chunk.toArray(chunk)) // ["hello"]
421
430
  * ```
422
431
  *
423
432
  * @category constructors
@@ -428,13 +437,13 @@ export const of = <A>(a: A): NonEmptyChunk<A> => makeChunk({ _tag: "ISingleton",
428
437
  /**
429
438
  * Creates a new `Chunk` from an iterable collection of values.
430
439
  *
431
- * @example
440
+ * **Example** (Creating chunks from iterables)
441
+ *
432
442
  * ```ts
433
443
  * import { Chunk } from "effect"
434
444
  *
435
445
  * const chunk = Chunk.fromIterable([1, 2, 3])
436
- * console.log(chunk)
437
- * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
446
+ * console.log(Chunk.toArray(chunk)) // [1, 2, 3]
438
447
  * ```
439
448
  *
440
449
  * @category constructors
@@ -478,7 +487,8 @@ const toArray_ = <A>(self: Chunk<A>): Array<A> => toReadonlyArray(self).slice()
478
487
  * (`NonEmptyChunk`), the function will return a `NonEmptyArray`, ensuring the
479
488
  * non-empty property is preserved.
480
489
  *
481
- * @example
490
+ * **Example** (Converting chunks to mutable arrays)
491
+ *
482
492
  * ```ts
483
493
  * import { Chunk } from "effect"
484
494
  *
@@ -492,7 +502,7 @@ const toArray_ = <A>(self: Chunk<A>): Array<A> => toReadonlyArray(self).slice()
492
502
  * console.log(Chunk.toArray(emptyChunk)) // []
493
503
  * ```
494
504
  *
495
- * @category conversions
505
+ * @category converting
496
506
  * @since 2.0.0
497
507
  */
498
508
  export const toArray: <S extends Chunk<any>>(
@@ -527,7 +537,8 @@ const toReadonlyArray_ = <A>(self: Chunk<A>): ReadonlyArray<A> => {
527
537
  * non-empty (`NonEmptyChunk`), the function will return a
528
538
  * `NonEmptyReadonlyArray`, ensuring the non-empty property is preserved.
529
539
  *
530
- * @example
540
+ * **Example** (Converting chunks to readonly arrays)
541
+ *
531
542
  * ```ts
532
543
  * import { Chunk } from "effect"
533
544
  *
@@ -543,7 +554,7 @@ const toReadonlyArray_ = <A>(self: Chunk<A>): ReadonlyArray<A> => {
543
554
  * console.log(Chunk.toReadonlyArray(emptyChunk)) // []
544
555
  * ```
545
556
  *
546
- * @category conversions
557
+ * @category converting
547
558
  * @since 2.0.0
548
559
  */
549
560
  export const toReadonlyArray: <S extends Chunk<any>>(
@@ -571,7 +582,7 @@ const reverseChunk = <A>(self: Chunk<A>): Chunk<A> => {
571
582
  * Reverses the order of elements in a `Chunk`.
572
583
  * Importantly, if the input chunk is a `NonEmptyChunk`, the reversed chunk will also be a `NonEmptyChunk`.
573
584
  *
574
- * @example
585
+ * **Example** (Reversing chunks)
575
586
  *
576
587
  * ```ts
577
588
  * import { Chunk } from "effect"
@@ -579,19 +590,19 @@ const reverseChunk = <A>(self: Chunk<A>): Chunk<A> => {
579
590
  * const chunk = Chunk.make(1, 2, 3)
580
591
  * const result = Chunk.reverse(chunk)
581
592
  *
582
- * console.log(result)
583
- * // { _id: 'Chunk', values: [ 3, 2, 1 ] }
593
+ * console.log(Chunk.toArray(result)) // [3, 2, 1]
584
594
  * ```
585
595
  *
586
- * @since 2.0.0
587
596
  * @category elements
597
+ * @since 2.0.0
588
598
  */
589
599
  export const reverse: <S extends Chunk<any>>(self: S) => Chunk.With<S, Chunk.Infer<S>> = reverseChunk as any
590
600
 
591
601
  /**
592
602
  * This function provides a safe way to read a value at a particular index from a `Chunk`.
593
603
  *
594
- * @example
604
+ * **Example** (Accessing elements safely)
605
+ *
595
606
  * ```ts
596
607
  * import { Chunk } from "effect"
597
608
  *
@@ -613,7 +624,8 @@ export const get: {
613
624
  /**
614
625
  * This function provides a safe way to read a value at a particular index from a `Chunk`.
615
626
  *
616
- * @example
627
+ * **Example** (Accessing elements safely)
628
+ *
617
629
  * ```ts
618
630
  * import { Chunk } from "effect"
619
631
  *
@@ -635,7 +647,8 @@ export const get: {
635
647
  /**
636
648
  * This function provides a safe way to read a value at a particular index from a `Chunk`.
637
649
  *
638
- * @example
650
+ * **Example** (Accessing elements safely)
651
+ *
639
652
  * ```ts
640
653
  * import { Chunk } from "effect"
641
654
  *
@@ -663,7 +676,8 @@ export const get: {
663
676
  /**
664
677
  * Wraps an array into a chunk without copying, unsafe on mutable arrays
665
678
  *
666
- * @example
679
+ * **Example** (Creating chunks without copying arrays)
680
+ *
667
681
  * ```ts
668
682
  * import { Chunk } from "effect"
669
683
  *
@@ -676,8 +690,8 @@ export const get: {
676
690
  * console.log(Chunk.toArray(chunk)) // [999, 2, 3, 4, 5]
677
691
  * ```
678
692
  *
679
- * @since 2.0.0
680
693
  * @category unsafe
694
+ * @since 4.0.0
681
695
  */
682
696
  export const fromArrayUnsafe = <A>(self: ReadonlyArray<A>): Chunk<A> =>
683
697
  self.length === 0 ? empty() : self.length === 1 ? of(self[0]) : makeChunk({ _tag: "IArray", array: self })
@@ -685,10 +699,10 @@ export const fromArrayUnsafe = <A>(self: ReadonlyArray<A>): Chunk<A> =>
685
699
  /**
686
700
  * Wraps an array into a chunk without copying, unsafe on mutable arrays
687
701
  *
688
- * @example
702
+ * **Example** (Creating non-empty chunks without copying arrays)
703
+ *
689
704
  * ```ts
690
- * import { Chunk } from "effect"
691
- * import * as Array from "effect/Array"
705
+ * import { Array, Chunk } from "effect"
692
706
  *
693
707
  * const nonEmptyArray = Array.make(1, 2, 3, 4, 5)
694
708
  * const chunk = Chunk.fromNonEmptyArrayUnsafe(nonEmptyArray)
@@ -698,8 +712,8 @@ export const fromArrayUnsafe = <A>(self: ReadonlyArray<A>): Chunk<A> =>
698
712
  * console.log(Chunk.isNonEmpty(chunk)) // true
699
713
  * ```
700
714
  *
701
- * @since 2.0.0
702
715
  * @category unsafe
716
+ * @since 4.0.0
703
717
  */
704
718
  export const fromNonEmptyArrayUnsafe = <A>(self: NonEmptyReadonlyArray<A>): NonEmptyChunk<A> =>
705
719
  fromArrayUnsafe(self) as any
@@ -707,73 +721,64 @@ export const fromNonEmptyArrayUnsafe = <A>(self: NonEmptyReadonlyArray<A>): NonE
707
721
  /**
708
722
  * Gets an element unsafely, will throw on out of bounds
709
723
  *
710
- * @example
724
+ * **Example** (Accessing elements unsafely)
725
+ *
711
726
  * ```ts
712
- * import { Chunk } from "effect"
727
+ * import { Chunk, Option } from "effect"
713
728
  *
714
729
  * const chunk = Chunk.make("a", "b", "c", "d")
715
730
  *
716
731
  * console.log(Chunk.getUnsafe(chunk, 1)) // "b"
717
732
  * console.log(Chunk.getUnsafe(chunk, 3)) // "d"
718
733
  *
719
- * // Warning: This will throw an error for invalid indices
720
- * try {
721
- * Chunk.getUnsafe(chunk, 10) // throws "Index out of bounds"
722
- * } catch (error) {
723
- * console.log((error as Error).message) // "Index out of bounds"
724
- * }
734
+ * // Use Chunk.get when the index may be out of bounds
735
+ * console.log(Option.isNone(Chunk.get(chunk, 10))) // true
725
736
  * ```
726
737
  *
727
- * @since 2.0.0
728
738
  * @category unsafe
739
+ * @since 4.0.0
729
740
  */
730
741
  export const getUnsafe: {
731
742
  /**
732
743
  * Gets an element unsafely, will throw on out of bounds
733
744
  *
734
- * @example
745
+ * **Example** (Accessing elements unsafely)
746
+ *
735
747
  * ```ts
736
- * import { Chunk } from "effect"
748
+ * import { Chunk, Option } from "effect"
737
749
  *
738
750
  * const chunk = Chunk.make("a", "b", "c", "d")
739
751
  *
740
752
  * console.log(Chunk.getUnsafe(chunk, 1)) // "b"
741
753
  * console.log(Chunk.getUnsafe(chunk, 3)) // "d"
742
754
  *
743
- * // Warning: This will throw an error for invalid indices
744
- * try {
745
- * Chunk.getUnsafe(chunk, 10) // throws "Index out of bounds"
746
- * } catch (error) {
747
- * console.log((error as Error).message) // "Index out of bounds"
748
- * }
755
+ * // Use Chunk.get when the index may be out of bounds
756
+ * console.log(Option.isNone(Chunk.get(chunk, 10))) // true
749
757
  * ```
750
758
  *
751
- * @since 2.0.0
752
759
  * @category unsafe
760
+ * @since 4.0.0
753
761
  */
754
762
  (index: number): <A>(self: Chunk<A>) => A
755
763
  /**
756
764
  * Gets an element unsafely, will throw on out of bounds
757
765
  *
758
- * @example
766
+ * **Example** (Accessing elements unsafely)
767
+ *
759
768
  * ```ts
760
- * import { Chunk } from "effect"
769
+ * import { Chunk, Option } from "effect"
761
770
  *
762
771
  * const chunk = Chunk.make("a", "b", "c", "d")
763
772
  *
764
773
  * console.log(Chunk.getUnsafe(chunk, 1)) // "b"
765
774
  * console.log(Chunk.getUnsafe(chunk, 3)) // "d"
766
775
  *
767
- * // Warning: This will throw an error for invalid indices
768
- * try {
769
- * Chunk.getUnsafe(chunk, 10) // throws "Index out of bounds"
770
- * } catch (error) {
771
- * console.log((error as Error).message) // "Index out of bounds"
772
- * }
776
+ * // Use Chunk.get when the index may be out of bounds
777
+ * console.log(Option.isNone(Chunk.get(chunk, 10))) // true
773
778
  * ```
774
779
  *
775
- * @since 2.0.0
776
780
  * @category unsafe
781
+ * @since 4.0.0
777
782
  */
778
783
  <A>(self: Chunk<A>, index: number): A
779
784
  } = dual(2, <A>(self: Chunk<A>, index: number): A => {
@@ -808,7 +813,8 @@ export const getUnsafe: {
808
813
  /**
809
814
  * Appends the specified element to the end of the `Chunk`.
810
815
  *
811
- * @example
816
+ * **Example** (Appending an element)
817
+ *
812
818
  * ```ts
813
819
  * import { Chunk } from "effect"
814
820
  *
@@ -829,7 +835,8 @@ export const append: {
829
835
  /**
830
836
  * Appends the specified element to the end of the `Chunk`.
831
837
  *
832
- * @example
838
+ * **Example** (Appending an element)
839
+ *
833
840
  * ```ts
834
841
  * import { Chunk } from "effect"
835
842
  *
@@ -850,7 +857,8 @@ export const append: {
850
857
  /**
851
858
  * Appends the specified element to the end of the `Chunk`.
852
859
  *
853
- * @example
860
+ * **Example** (Appending an element)
861
+ *
854
862
  * ```ts
855
863
  * import { Chunk } from "effect"
856
864
  *
@@ -873,7 +881,8 @@ export const append: {
873
881
  /**
874
882
  * Prepend an element to the front of a `Chunk`, creating a new `NonEmptyChunk`.
875
883
  *
876
- * @example
884
+ * **Example** (Prepending an element)
885
+ *
877
886
  * ```ts
878
887
  * import { Chunk } from "effect"
879
888
  *
@@ -894,7 +903,8 @@ export const prepend: {
894
903
  /**
895
904
  * Prepend an element to the front of a `Chunk`, creating a new `NonEmptyChunk`.
896
905
  *
897
- * @example
906
+ * **Example** (Prepending an element)
907
+ *
898
908
  * ```ts
899
909
  * import { Chunk } from "effect"
900
910
  *
@@ -915,7 +925,8 @@ export const prepend: {
915
925
  /**
916
926
  * Prepend an element to the front of a `Chunk`, creating a new `NonEmptyChunk`.
917
927
  *
918
- * @example
928
+ * **Example** (Prepending an element)
929
+ *
919
930
  * ```ts
920
931
  * import { Chunk } from "effect"
921
932
  *
@@ -938,14 +949,14 @@ export const prepend: {
938
949
  /**
939
950
  * Takes the first up to `n` elements from the chunk.
940
951
  *
941
- * @example
952
+ * **Example** (Taking elements from the start)
953
+ *
942
954
  * ```ts
943
955
  * import { Chunk } from "effect"
944
956
  *
945
957
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
946
958
  * const result = Chunk.take(chunk, 3)
947
- * console.log(result)
948
- * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
959
+ * console.log(Chunk.toArray(result)) // [1, 2, 3]
949
960
  * ```
950
961
  *
951
962
  * @category elements
@@ -955,14 +966,14 @@ export const take: {
955
966
  /**
956
967
  * Takes the first up to `n` elements from the chunk.
957
968
  *
958
- * @example
969
+ * **Example** (Taking elements from the start)
970
+ *
959
971
  * ```ts
960
972
  * import { Chunk } from "effect"
961
973
  *
962
974
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
963
975
  * const result = Chunk.take(chunk, 3)
964
- * console.log(result)
965
- * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
976
+ * console.log(Chunk.toArray(result)) // [1, 2, 3]
966
977
  * ```
967
978
  *
968
979
  * @category elements
@@ -972,14 +983,14 @@ export const take: {
972
983
  /**
973
984
  * Takes the first up to `n` elements from the chunk.
974
985
  *
975
- * @example
986
+ * **Example** (Taking elements from the start)
987
+ *
976
988
  * ```ts
977
989
  * import { Chunk } from "effect"
978
990
  *
979
991
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
980
992
  * const result = Chunk.take(chunk, 3)
981
- * console.log(result)
982
- * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
993
+ * console.log(Chunk.toArray(result)) // [1, 2, 3]
983
994
  * ```
984
995
  *
985
996
  * @category elements
@@ -1027,14 +1038,14 @@ export const take: {
1027
1038
  /**
1028
1039
  * Drops the first up to `n` elements from the chunk.
1029
1040
  *
1030
- * @example
1041
+ * **Example** (Dropping elements from the start)
1042
+ *
1031
1043
  * ```ts
1032
1044
  * import { Chunk } from "effect"
1033
1045
  *
1034
1046
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
1035
1047
  * const result = Chunk.drop(chunk, 2)
1036
- * console.log(result)
1037
- * // { _id: 'Chunk', values: [ 3, 4, 5 ] }
1048
+ * console.log(Chunk.toArray(result)) // [3, 4, 5]
1038
1049
  * ```
1039
1050
  *
1040
1051
  * @category elements
@@ -1044,14 +1055,14 @@ export const drop: {
1044
1055
  /**
1045
1056
  * Drops the first up to `n` elements from the chunk.
1046
1057
  *
1047
- * @example
1058
+ * **Example** (Dropping elements from the start)
1059
+ *
1048
1060
  * ```ts
1049
1061
  * import { Chunk } from "effect"
1050
1062
  *
1051
1063
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
1052
1064
  * const result = Chunk.drop(chunk, 2)
1053
- * console.log(result)
1054
- * // { _id: 'Chunk', values: [ 3, 4, 5 ] }
1065
+ * console.log(Chunk.toArray(result)) // [3, 4, 5]
1055
1066
  * ```
1056
1067
  *
1057
1068
  * @category elements
@@ -1061,14 +1072,14 @@ export const drop: {
1061
1072
  /**
1062
1073
  * Drops the first up to `n` elements from the chunk.
1063
1074
  *
1064
- * @example
1075
+ * **Example** (Dropping elements from the start)
1076
+ *
1065
1077
  * ```ts
1066
1078
  * import { Chunk } from "effect"
1067
1079
  *
1068
1080
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
1069
1081
  * const result = Chunk.drop(chunk, 2)
1070
- * console.log(result)
1071
- * // { _id: 'Chunk', values: [ 3, 4, 5 ] }
1082
+ * console.log(Chunk.toArray(result)) // [3, 4, 5]
1072
1083
  * ```
1073
1084
  *
1074
1085
  * @category elements
@@ -1115,14 +1126,14 @@ export const drop: {
1115
1126
  /**
1116
1127
  * Drops the last `n` elements.
1117
1128
  *
1118
- * @example
1129
+ * **Example** (Dropping elements from the end)
1130
+ *
1119
1131
  * ```ts
1120
1132
  * import { Chunk } from "effect"
1121
1133
  *
1122
1134
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
1123
1135
  * const result = Chunk.dropRight(chunk, 2)
1124
- * console.log(result)
1125
- * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
1136
+ * console.log(Chunk.toArray(result)) // [1, 2, 3]
1126
1137
  * ```
1127
1138
  *
1128
1139
  * @category elements
@@ -1132,14 +1143,14 @@ export const dropRight: {
1132
1143
  /**
1133
1144
  * Drops the last `n` elements.
1134
1145
  *
1135
- * @example
1146
+ * **Example** (Dropping elements from the end)
1147
+ *
1136
1148
  * ```ts
1137
1149
  * import { Chunk } from "effect"
1138
1150
  *
1139
1151
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
1140
1152
  * const result = Chunk.dropRight(chunk, 2)
1141
- * console.log(result)
1142
- * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
1153
+ * console.log(Chunk.toArray(result)) // [1, 2, 3]
1143
1154
  * ```
1144
1155
  *
1145
1156
  * @category elements
@@ -1149,14 +1160,14 @@ export const dropRight: {
1149
1160
  /**
1150
1161
  * Drops the last `n` elements.
1151
1162
  *
1152
- * @example
1163
+ * **Example** (Dropping elements from the end)
1164
+ *
1153
1165
  * ```ts
1154
1166
  * import { Chunk } from "effect"
1155
1167
  *
1156
1168
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
1157
1169
  * const result = Chunk.dropRight(chunk, 2)
1158
- * console.log(result)
1159
- * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
1170
+ * console.log(Chunk.toArray(result)) // [1, 2, 3]
1160
1171
  * ```
1161
1172
  *
1162
1173
  * @category elements
@@ -1168,14 +1179,14 @@ export const dropRight: {
1168
1179
  /**
1169
1180
  * Drops all elements so long as the predicate returns true.
1170
1181
  *
1171
- * @example
1182
+ * **Example** (Dropping elements while a predicate matches)
1183
+ *
1172
1184
  * ```ts
1173
1185
  * import { Chunk } from "effect"
1174
1186
  *
1175
1187
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
1176
1188
  * const result = Chunk.dropWhile(chunk, (n) => n < 3)
1177
- * console.log(result)
1178
- * // { _id: 'Chunk', values: [ 3, 4, 5 ] }
1189
+ * console.log(Chunk.toArray(result)) // [3, 4, 5]
1179
1190
  * ```
1180
1191
  *
1181
1192
  * @category elements
@@ -1185,14 +1196,14 @@ export const dropWhile: {
1185
1196
  /**
1186
1197
  * Drops all elements so long as the predicate returns true.
1187
1198
  *
1188
- * @example
1199
+ * **Example** (Dropping elements while a predicate matches)
1200
+ *
1189
1201
  * ```ts
1190
1202
  * import { Chunk } from "effect"
1191
1203
  *
1192
1204
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
1193
1205
  * const result = Chunk.dropWhile(chunk, (n) => n < 3)
1194
- * console.log(result)
1195
- * // { _id: 'Chunk', values: [ 3, 4, 5 ] }
1206
+ * console.log(Chunk.toArray(result)) // [3, 4, 5]
1196
1207
  * ```
1197
1208
  *
1198
1209
  * @category elements
@@ -1202,14 +1213,14 @@ export const dropWhile: {
1202
1213
  /**
1203
1214
  * Drops all elements so long as the predicate returns true.
1204
1215
  *
1205
- * @example
1216
+ * **Example** (Dropping elements while a predicate matches)
1217
+ *
1206
1218
  * ```ts
1207
1219
  * import { Chunk } from "effect"
1208
1220
  *
1209
1221
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
1210
1222
  * const result = Chunk.dropWhile(chunk, (n) => n < 3)
1211
- * console.log(result)
1212
- * // { _id: 'Chunk', values: [ 3, 4, 5 ] }
1223
+ * console.log(Chunk.toArray(result)) // [3, 4, 5]
1213
1224
  * ```
1214
1225
  *
1215
1226
  * @category elements
@@ -1230,7 +1241,7 @@ export const dropWhile: {
1230
1241
  * Prepends the specified prefix chunk to the beginning of the specified chunk.
1231
1242
  * If either chunk is non-empty, the result is also a non-empty chunk.
1232
1243
  *
1233
- * @example
1244
+ * **Example** (Prepending all elements)
1234
1245
  *
1235
1246
  * ```ts
1236
1247
  * import { Chunk } from "effect"
@@ -1252,7 +1263,7 @@ export const prependAll: {
1252
1263
  * Prepends the specified prefix chunk to the beginning of the specified chunk.
1253
1264
  * If either chunk is non-empty, the result is also a non-empty chunk.
1254
1265
  *
1255
- * @example
1266
+ * **Example** (Prepending all elements)
1256
1267
  *
1257
1268
  * ```ts
1258
1269
  * import { Chunk } from "effect"
@@ -1274,7 +1285,7 @@ export const prependAll: {
1274
1285
  * Prepends the specified prefix chunk to the beginning of the specified chunk.
1275
1286
  * If either chunk is non-empty, the result is also a non-empty chunk.
1276
1287
  *
1277
- * @example
1288
+ * **Example** (Prepending all elements)
1278
1289
  *
1279
1290
  * ```ts
1280
1291
  * import { Chunk } from "effect"
@@ -1296,7 +1307,7 @@ export const prependAll: {
1296
1307
  * Prepends the specified prefix chunk to the beginning of the specified chunk.
1297
1308
  * If either chunk is non-empty, the result is also a non-empty chunk.
1298
1309
  *
1299
- * @example
1310
+ * **Example** (Prepending all elements)
1300
1311
  *
1301
1312
  * ```ts
1302
1313
  * import { Chunk } from "effect"
@@ -1318,7 +1329,7 @@ export const prependAll: {
1318
1329
  * Prepends the specified prefix chunk to the beginning of the specified chunk.
1319
1330
  * If either chunk is non-empty, the result is also a non-empty chunk.
1320
1331
  *
1321
- * @example
1332
+ * **Example** (Prepending all elements)
1322
1333
  *
1323
1334
  * ```ts
1324
1335
  * import { Chunk } from "effect"
@@ -1342,7 +1353,7 @@ export const prependAll: {
1342
1353
  * Concatenates two chunks, combining their elements.
1343
1354
  * If either chunk is non-empty, the result is also a non-empty chunk.
1344
1355
  *
1345
- * @example
1356
+ * **Example** (Appending all elements)
1346
1357
  *
1347
1358
  * ```ts
1348
1359
  * import { Chunk } from "effect"
@@ -1364,7 +1375,7 @@ export const appendAll: {
1364
1375
  * Concatenates two chunks, combining their elements.
1365
1376
  * If either chunk is non-empty, the result is also a non-empty chunk.
1366
1377
  *
1367
- * @example
1378
+ * **Example** (Appending all elements)
1368
1379
  *
1369
1380
  * ```ts
1370
1381
  * import { Chunk } from "effect"
@@ -1386,7 +1397,7 @@ export const appendAll: {
1386
1397
  * Concatenates two chunks, combining their elements.
1387
1398
  * If either chunk is non-empty, the result is also a non-empty chunk.
1388
1399
  *
1389
- * @example
1400
+ * **Example** (Appending all elements)
1390
1401
  *
1391
1402
  * ```ts
1392
1403
  * import { Chunk } from "effect"
@@ -1408,7 +1419,7 @@ export const appendAll: {
1408
1419
  * Concatenates two chunks, combining their elements.
1409
1420
  * If either chunk is non-empty, the result is also a non-empty chunk.
1410
1421
  *
1411
- * @example
1422
+ * **Example** (Appending all elements)
1412
1423
  *
1413
1424
  * ```ts
1414
1425
  * import { Chunk } from "effect"
@@ -1430,7 +1441,7 @@ export const appendAll: {
1430
1441
  * Concatenates two chunks, combining their elements.
1431
1442
  * If either chunk is non-empty, the result is also a non-empty chunk.
1432
1443
  *
1433
- * @example
1444
+ * **Example** (Appending all elements)
1434
1445
  *
1435
1446
  * ```ts
1436
1447
  * import { Chunk } from "effect"
@@ -1461,7 +1472,7 @@ export const appendAll: {
1461
1472
  * Concatenates two chunks, combining their elements.
1462
1473
  * If either chunk is non-empty, the result is also a non-empty chunk.
1463
1474
  *
1464
- * @example
1475
+ * **Example** (Appending all elements)
1465
1476
  *
1466
1477
  * ```ts
1467
1478
  * import { Chunk } from "effect"
@@ -1513,10 +1524,10 @@ export const appendAll: {
1513
1524
  /**
1514
1525
  * Returns a filtered and mapped subset of the elements.
1515
1526
  *
1516
- * @example
1527
+ * **Example** (Filtering and mapping values)
1528
+ *
1517
1529
  * ```ts
1518
- * import { Chunk } from "effect"
1519
- * import * as Result from "effect/Result"
1530
+ * import { Chunk, Result } from "effect"
1520
1531
  *
1521
1532
  * const chunk = Chunk.make("1", "2", "hello", "3", "world")
1522
1533
  * const numbers = Chunk.filterMap(chunk, (str) => {
@@ -1533,17 +1544,17 @@ export const appendAll: {
1533
1544
  * console.log(Chunk.toArray(evenIndexNumbers)) // [1]
1534
1545
  * ```
1535
1546
  *
1536
- * @since 2.0.0
1537
1547
  * @category filtering
1548
+ * @since 2.0.0
1538
1549
  */
1539
1550
  export const filterMap: {
1540
1551
  /**
1541
1552
  * Returns a filtered and mapped subset of the elements.
1542
1553
  *
1543
- * @example
1554
+ * **Example** (Filtering and mapping values)
1555
+ *
1544
1556
  * ```ts
1545
- * import { Chunk } from "effect"
1546
- * import * as Result from "effect/Result"
1557
+ * import { Chunk, Result } from "effect"
1547
1558
  *
1548
1559
  * const chunk = Chunk.make("1", "2", "hello", "3", "world")
1549
1560
  * const numbers = Chunk.filterMap(chunk, (str) => {
@@ -1560,17 +1571,17 @@ export const filterMap: {
1560
1571
  * console.log(Chunk.toArray(evenIndexNumbers)) // [1]
1561
1572
  * ```
1562
1573
  *
1563
- * @since 2.0.0
1564
1574
  * @category filtering
1575
+ * @since 2.0.0
1565
1576
  */
1566
1577
  <A, B, X>(f: (input: A, i: number) => Result<B, X>): (self: Chunk<A>) => Chunk<B>
1567
1578
  /**
1568
1579
  * Returns a filtered and mapped subset of the elements.
1569
1580
  *
1570
- * @example
1581
+ * **Example** (Filtering and mapping values)
1582
+ *
1571
1583
  * ```ts
1572
- * import { Chunk } from "effect"
1573
- * import * as Result from "effect/Result"
1584
+ * import { Chunk, Result } from "effect"
1574
1585
  *
1575
1586
  * const chunk = Chunk.make("1", "2", "hello", "3", "world")
1576
1587
  * const numbers = Chunk.filterMap(chunk, (str) => {
@@ -1587,8 +1598,8 @@ export const filterMap: {
1587
1598
  * console.log(Chunk.toArray(evenIndexNumbers)) // [1]
1588
1599
  * ```
1589
1600
  *
1590
- * @since 2.0.0
1591
1601
  * @category filtering
1602
+ * @since 2.0.0
1592
1603
  */
1593
1604
  <A, B, X>(self: Chunk<A>, f: (input: A, i: number) => Result<B, X>): Chunk<B>
1594
1605
  } = dual(
@@ -1609,7 +1620,8 @@ export const filterMap: {
1609
1620
  /**
1610
1621
  * Returns a filtered subset of the elements.
1611
1622
  *
1612
- * @example
1623
+ * **Example** (Filtering values)
1624
+ *
1613
1625
  * ```ts
1614
1626
  * import { Chunk } from "effect"
1615
1627
  *
@@ -1623,14 +1635,15 @@ export const filterMap: {
1623
1635
  * console.log(Chunk.toArray(numbers)) // [42, 100]
1624
1636
  * ```
1625
1637
  *
1626
- * @since 2.0.0
1627
1638
  * @category filtering
1639
+ * @since 2.0.0
1628
1640
  */
1629
1641
  export const filter: {
1630
1642
  /**
1631
1643
  * Returns a filtered subset of the elements.
1632
1644
  *
1633
- * @example
1645
+ * **Example** (Filtering values)
1646
+ *
1634
1647
  * ```ts
1635
1648
  * import { Chunk } from "effect"
1636
1649
  *
@@ -1644,14 +1657,15 @@ export const filter: {
1644
1657
  * console.log(Chunk.toArray(numbers)) // [42, 100]
1645
1658
  * ```
1646
1659
  *
1647
- * @since 2.0.0
1648
1660
  * @category filtering
1661
+ * @since 2.0.0
1649
1662
  */
1650
1663
  <A, B extends A>(refinement: Refinement<NoInfer<A>, B>): (self: Chunk<A>) => Chunk<B>
1651
1664
  /**
1652
1665
  * Returns a filtered subset of the elements.
1653
1666
  *
1654
- * @example
1667
+ * **Example** (Filtering values)
1668
+ *
1655
1669
  * ```ts
1656
1670
  * import { Chunk } from "effect"
1657
1671
  *
@@ -1665,14 +1679,15 @@ export const filter: {
1665
1679
  * console.log(Chunk.toArray(numbers)) // [42, 100]
1666
1680
  * ```
1667
1681
  *
1668
- * @since 2.0.0
1669
1682
  * @category filtering
1683
+ * @since 2.0.0
1670
1684
  */
1671
1685
  <A>(predicate: Predicate<NoInfer<A>>): (self: Chunk<A>) => Chunk<A>
1672
1686
  /**
1673
1687
  * Returns a filtered subset of the elements.
1674
1688
  *
1675
- * @example
1689
+ * **Example** (Filtering values)
1690
+ *
1676
1691
  * ```ts
1677
1692
  * import { Chunk } from "effect"
1678
1693
  *
@@ -1686,14 +1701,15 @@ export const filter: {
1686
1701
  * console.log(Chunk.toArray(numbers)) // [42, 100]
1687
1702
  * ```
1688
1703
  *
1689
- * @since 2.0.0
1690
1704
  * @category filtering
1705
+ * @since 2.0.0
1691
1706
  */
1692
1707
  <A, B extends A>(self: Chunk<A>, refinement: Refinement<A, B>): Chunk<B>
1693
1708
  /**
1694
1709
  * Returns a filtered subset of the elements.
1695
1710
  *
1696
- * @example
1711
+ * **Example** (Filtering values)
1712
+ *
1697
1713
  * ```ts
1698
1714
  * import { Chunk } from "effect"
1699
1715
  *
@@ -1707,8 +1723,8 @@ export const filter: {
1707
1723
  * console.log(Chunk.toArray(numbers)) // [42, 100]
1708
1724
  * ```
1709
1725
  *
1710
- * @since 2.0.0
1711
1726
  * @category filtering
1727
+ * @since 2.0.0
1712
1728
  */
1713
1729
  <A>(self: Chunk<A>, predicate: Predicate<A>): Chunk<A>
1714
1730
  } = dual(
@@ -1719,10 +1735,10 @@ export const filter: {
1719
1735
  /**
1720
1736
  * Transforms all elements of the chunk for as long as the specified function succeeds.
1721
1737
  *
1722
- * @example
1738
+ * **Example** (Filtering and mapping while values match)
1739
+ *
1723
1740
  * ```ts
1724
- * import { Chunk } from "effect"
1725
- * import * as Result from "effect/Result"
1741
+ * import { Chunk, Result } from "effect"
1726
1742
  *
1727
1743
  * const chunk = Chunk.make("1", "2", "hello", "3", "4")
1728
1744
  * const result = Chunk.filterMapWhile(chunk, (s) => {
@@ -1740,17 +1756,17 @@ export const filter: {
1740
1756
  * console.log(Chunk.toArray(allNumbers)) // [1, 2, 3, 4]
1741
1757
  * ```
1742
1758
  *
1743
- * @since 2.0.0
1744
1759
  * @category filtering
1760
+ * @since 2.0.0
1745
1761
  */
1746
1762
  export const filterMapWhile: {
1747
1763
  /**
1748
1764
  * Transforms all elements of the chunk for as long as the specified function succeeds.
1749
1765
  *
1750
- * @example
1766
+ * **Example** (Filtering and mapping while values match)
1767
+ *
1751
1768
  * ```ts
1752
- * import { Chunk } from "effect"
1753
- * import * as Result from "effect/Result"
1769
+ * import { Chunk, Result } from "effect"
1754
1770
  *
1755
1771
  * const chunk = Chunk.make("1", "2", "hello", "3", "4")
1756
1772
  * const result = Chunk.filterMapWhile(chunk, (s) => {
@@ -1768,17 +1784,17 @@ export const filterMapWhile: {
1768
1784
  * console.log(Chunk.toArray(allNumbers)) // [1, 2, 3, 4]
1769
1785
  * ```
1770
1786
  *
1771
- * @since 2.0.0
1772
1787
  * @category filtering
1788
+ * @since 2.0.0
1773
1789
  */
1774
1790
  <A, B, X>(f: Filter.Filter<A, B, X>): (self: Chunk<A>) => Chunk<B>
1775
1791
  /**
1776
1792
  * Transforms all elements of the chunk for as long as the specified function succeeds.
1777
1793
  *
1778
- * @example
1794
+ * **Example** (Filtering and mapping while values match)
1795
+ *
1779
1796
  * ```ts
1780
- * import { Chunk } from "effect"
1781
- * import * as Result from "effect/Result"
1797
+ * import { Chunk, Result } from "effect"
1782
1798
  *
1783
1799
  * const chunk = Chunk.make("1", "2", "hello", "3", "4")
1784
1800
  * const result = Chunk.filterMapWhile(chunk, (s) => {
@@ -1796,8 +1812,8 @@ export const filterMapWhile: {
1796
1812
  * console.log(Chunk.toArray(allNumbers)) // [1, 2, 3, 4]
1797
1813
  * ```
1798
1814
  *
1799
- * @since 2.0.0
1800
1815
  * @category filtering
1816
+ * @since 2.0.0
1801
1817
  */
1802
1818
  <A, B, X>(self: Chunk<A>, f: Filter.Filter<A, B, X>): Chunk<B>
1803
1819
  } = dual(2, <A, B, X>(self: Chunk<A>, f: Filter.Filter<A, B, X>): Chunk<B> => {
@@ -1816,15 +1832,14 @@ export const filterMapWhile: {
1816
1832
  /**
1817
1833
  * Filter out optional values
1818
1834
  *
1819
- * @example
1835
+ * **Example** (Compacting optional values)
1836
+ *
1820
1837
  * ```ts
1821
- * import { Chunk } from "effect"
1822
- * import * as Option from "effect/Option"
1838
+ * import { Chunk, Option } from "effect"
1823
1839
  *
1824
1840
  * const chunk = Chunk.make(Option.some(1), Option.none(), Option.some(3))
1825
1841
  * const result = Chunk.compact(chunk)
1826
- * console.log(result)
1827
- * // { _id: 'Chunk', values: [ 1, 3 ] }
1842
+ * console.log(Chunk.toArray(result)) // [1, 3]
1828
1843
  * ```
1829
1844
  *
1830
1845
  * @category filtering
@@ -1843,7 +1858,8 @@ export const compact = <A>(self: Chunk<Option<A>>): Chunk<A> => {
1843
1858
  /**
1844
1859
  * Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
1845
1860
  *
1846
- * @example
1861
+ * **Example** (Flat mapping chunks)
1862
+ *
1847
1863
  * ```ts
1848
1864
  * import { Chunk } from "effect"
1849
1865
  *
@@ -1864,14 +1880,15 @@ export const compact = <A>(self: Chunk<Option<A>>): Chunk<A> => {
1864
1880
  * console.log(Chunk.toArray(indexed)) // [1, 3, 5]
1865
1881
  * ```
1866
1882
  *
1867
- * @since 2.0.0
1868
1883
  * @category sequencing
1884
+ * @since 2.0.0
1869
1885
  */
1870
1886
  export const flatMap: {
1871
1887
  /**
1872
1888
  * Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
1873
1889
  *
1874
- * @example
1890
+ * **Example** (Flat mapping chunks)
1891
+ *
1875
1892
  * ```ts
1876
1893
  * import { Chunk } from "effect"
1877
1894
  *
@@ -1892,14 +1909,15 @@ export const flatMap: {
1892
1909
  * console.log(Chunk.toArray(indexed)) // [1, 3, 5]
1893
1910
  * ```
1894
1911
  *
1895
- * @since 2.0.0
1896
1912
  * @category sequencing
1913
+ * @since 2.0.0
1897
1914
  */
1898
1915
  <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>>
1899
1916
  /**
1900
1917
  * Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
1901
1918
  *
1902
- * @example
1919
+ * **Example** (Flat mapping chunks)
1920
+ *
1903
1921
  * ```ts
1904
1922
  * import { Chunk } from "effect"
1905
1923
  *
@@ -1920,14 +1938,15 @@ export const flatMap: {
1920
1938
  * console.log(Chunk.toArray(indexed)) // [1, 3, 5]
1921
1939
  * ```
1922
1940
  *
1923
- * @since 2.0.0
1924
1941
  * @category sequencing
1942
+ * @since 2.0.0
1925
1943
  */
1926
1944
  <A, B>(self: NonEmptyChunk<A>, f: (a: A, i: number) => NonEmptyChunk<B>): NonEmptyChunk<B>
1927
1945
  /**
1928
1946
  * Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
1929
1947
  *
1930
- * @example
1948
+ * **Example** (Flat mapping chunks)
1949
+ *
1931
1950
  * ```ts
1932
1951
  * import { Chunk } from "effect"
1933
1952
  *
@@ -1948,8 +1967,8 @@ export const flatMap: {
1948
1967
  * console.log(Chunk.toArray(indexed)) // [1, 3, 5]
1949
1968
  * ```
1950
1969
  *
1951
- * @since 2.0.0
1952
1970
  * @category sequencing
1971
+ * @since 2.0.0
1953
1972
  */
1954
1973
  <A, B>(self: Chunk<A>, f: (a: A, i: number) => Chunk<B>): Chunk<B>
1955
1974
  } = dual(2, <A, B>(self: Chunk<A>, f: (a: A, i: number) => Chunk<B>) => {
@@ -1974,7 +1993,8 @@ export const flatMap: {
1974
1993
  * instead, it is primarily used for side effects, such as logging or
1975
1994
  * accumulating data in an external variable.
1976
1995
  *
1977
- * @example
1996
+ * **Example** (Iterating over chunk values)
1997
+ *
1978
1998
  * ```ts
1979
1999
  * import { Chunk } from "effect"
1980
2000
  *
@@ -1997,8 +2017,8 @@ export const flatMap: {
1997
2017
  * // Index 3: 4
1998
2018
  * ```
1999
2019
  *
2000
- * @since 2.0.0
2001
2020
  * @category combinators
2021
+ * @since 2.0.0
2002
2022
  */
2003
2023
  export const forEach: {
2004
2024
  /**
@@ -2011,7 +2031,8 @@ export const forEach: {
2011
2031
  * instead, it is primarily used for side effects, such as logging or
2012
2032
  * accumulating data in an external variable.
2013
2033
  *
2014
- * @example
2034
+ * **Example** (Iterating over chunk values)
2035
+ *
2015
2036
  * ```ts
2016
2037
  * import { Chunk } from "effect"
2017
2038
  *
@@ -2034,8 +2055,8 @@ export const forEach: {
2034
2055
  * // Index 3: 4
2035
2056
  * ```
2036
2057
  *
2037
- * @since 2.0.0
2038
2058
  * @category combinators
2059
+ * @since 2.0.0
2039
2060
  */
2040
2061
  <A, B>(f: (a: A, index: number) => B): (self: Chunk<A>) => void
2041
2062
  /**
@@ -2048,7 +2069,8 @@ export const forEach: {
2048
2069
  * instead, it is primarily used for side effects, such as logging or
2049
2070
  * accumulating data in an external variable.
2050
2071
  *
2051
- * @example
2072
+ * **Example** (Iterating over chunk values)
2073
+ *
2052
2074
  * ```ts
2053
2075
  * import { Chunk } from "effect"
2054
2076
  *
@@ -2071,8 +2093,8 @@ export const forEach: {
2071
2093
  * // Index 3: 4
2072
2094
  * ```
2073
2095
  *
2074
- * @since 2.0.0
2075
2096
  * @category combinators
2097
+ * @since 2.0.0
2076
2098
  */
2077
2099
  <A, B>(self: Chunk<A>, f: (a: A, index: number) => B): void
2078
2100
  } = dual(2, <A, B>(self: Chunk<A>, f: (a: A) => B): void => toReadonlyArray(self).forEach(f))
@@ -2080,7 +2102,8 @@ export const forEach: {
2080
2102
  /**
2081
2103
  * Flattens a chunk of chunks into a single chunk by concatenating all chunks.
2082
2104
  *
2083
- * @example
2105
+ * **Example** (Flattening nested chunks)
2106
+ *
2084
2107
  * ```ts
2085
2108
  * import { Chunk } from "effect"
2086
2109
  *
@@ -2101,15 +2124,16 @@ export const forEach: {
2101
2124
  * console.log(Chunk.toArray(Chunk.flatten(withEmpty))) // [1, 2, 3, 4]
2102
2125
  * ```
2103
2126
  *
2104
- * @since 2.0.0
2105
2127
  * @category sequencing
2128
+ * @since 2.0.0
2106
2129
  */
2107
2130
  export const flatten: <S extends Chunk<Chunk<any>>>(self: S) => Chunk.Flatten<S> = flatMap(identity) as any
2108
2131
 
2109
2132
  /**
2110
2133
  * Groups elements in chunks of up to `n` elements.
2111
2134
  *
2112
- * @example
2135
+ * **Example** (Splitting into fixed-size chunks)
2136
+ *
2113
2137
  * ```ts
2114
2138
  * import { Chunk } from "effect"
2115
2139
  *
@@ -2126,14 +2150,15 @@ export const flatten: <S extends Chunk<Chunk<any>>>(self: S) => Chunk.Flatten<S>
2126
2150
  * // [[1, 2], [3, 4], [5]]
2127
2151
  * ```
2128
2152
  *
2129
- * @since 2.0.0
2130
2153
  * @category elements
2154
+ * @since 2.0.0
2131
2155
  */
2132
2156
  export const chunksOf: {
2133
2157
  /**
2134
2158
  * Groups elements in chunks of up to `n` elements.
2135
2159
  *
2136
- * @example
2160
+ * **Example** (Splitting into fixed-size chunks)
2161
+ *
2137
2162
  * ```ts
2138
2163
  * import { Chunk } from "effect"
2139
2164
  *
@@ -2150,14 +2175,15 @@ export const chunksOf: {
2150
2175
  * // [[1, 2], [3, 4], [5]]
2151
2176
  * ```
2152
2177
  *
2153
- * @since 2.0.0
2154
2178
  * @category elements
2179
+ * @since 2.0.0
2155
2180
  */
2156
2181
  (n: number): <A>(self: Chunk<A>) => Chunk<Chunk<A>>
2157
2182
  /**
2158
2183
  * Groups elements in chunks of up to `n` elements.
2159
2184
  *
2160
- * @example
2185
+ * **Example** (Splitting into fixed-size chunks)
2186
+ *
2161
2187
  * ```ts
2162
2188
  * import { Chunk } from "effect"
2163
2189
  *
@@ -2174,8 +2200,8 @@ export const chunksOf: {
2174
2200
  * // [[1, 2], [3, 4], [5]]
2175
2201
  * ```
2176
2202
  *
2177
- * @since 2.0.0
2178
2203
  * @category elements
2204
+ * @since 2.0.0
2179
2205
  */
2180
2206
  <A>(self: Chunk<A>, n: number): Chunk<Chunk<A>>
2181
2207
  } = dual(2, <A>(self: Chunk<A>, n: number) => {
@@ -2199,7 +2225,8 @@ export const chunksOf: {
2199
2225
  *
2200
2226
  * The order and references of result values are determined by the Chunk.
2201
2227
  *
2202
- * @example
2228
+ * **Example** (Intersecting chunks)
2229
+ *
2203
2230
  * ```ts
2204
2231
  * import { Chunk } from "effect"
2205
2232
  *
@@ -2219,8 +2246,8 @@ export const chunksOf: {
2219
2246
  * console.log(Chunk.toArray(Chunk.intersection(chunk3, chunk4))) // []
2220
2247
  * ```
2221
2248
  *
2222
- * @since 2.0.0
2223
2249
  * @category elements
2250
+ * @since 2.0.0
2224
2251
  */
2225
2252
  export const intersection: {
2226
2253
  /**
@@ -2228,7 +2255,8 @@ export const intersection: {
2228
2255
  *
2229
2256
  * The order and references of result values are determined by the Chunk.
2230
2257
  *
2231
- * @example
2258
+ * **Example** (Intersecting chunks)
2259
+ *
2232
2260
  * ```ts
2233
2261
  * import { Chunk } from "effect"
2234
2262
  *
@@ -2248,8 +2276,8 @@ export const intersection: {
2248
2276
  * console.log(Chunk.toArray(Chunk.intersection(chunk3, chunk4))) // []
2249
2277
  * ```
2250
2278
  *
2251
- * @since 2.0.0
2252
2279
  * @category elements
2280
+ * @since 2.0.0
2253
2281
  */
2254
2282
  <A>(that: Chunk<A>): <B>(self: Chunk<B>) => Chunk<A & B>
2255
2283
  /**
@@ -2257,7 +2285,8 @@ export const intersection: {
2257
2285
  *
2258
2286
  * The order and references of result values are determined by the Chunk.
2259
2287
  *
2260
- * @example
2288
+ * **Example** (Intersecting chunks)
2289
+ *
2261
2290
  * ```ts
2262
2291
  * import { Chunk } from "effect"
2263
2292
  *
@@ -2277,8 +2306,8 @@ export const intersection: {
2277
2306
  * console.log(Chunk.toArray(Chunk.intersection(chunk3, chunk4))) // []
2278
2307
  * ```
2279
2308
  *
2280
- * @since 2.0.0
2281
2309
  * @category elements
2310
+ * @since 2.0.0
2282
2311
  */
2283
2312
  <A, B>(self: Chunk<A>, that: Chunk<B>): Chunk<A & B>
2284
2313
  } = dual(
@@ -2290,7 +2319,8 @@ export const intersection: {
2290
2319
  /**
2291
2320
  * Determines if the chunk is empty.
2292
2321
  *
2293
- * @example
2322
+ * **Example** (Checking for empty chunks)
2323
+ *
2294
2324
  * ```ts
2295
2325
  * import { Chunk } from "effect"
2296
2326
  *
@@ -2306,7 +2336,8 @@ export const isEmpty = <A>(self: Chunk<A>): boolean => self.length === 0
2306
2336
  /**
2307
2337
  * Determines if the chunk is not empty.
2308
2338
  *
2309
- * @example
2339
+ * **Example** (Checking for non-empty chunks)
2340
+ *
2310
2341
  * ```ts
2311
2342
  * import { Chunk } from "effect"
2312
2343
  *
@@ -2322,7 +2353,8 @@ export const isNonEmpty = <A>(self: Chunk<A>): self is NonEmptyChunk<A> => self.
2322
2353
  /**
2323
2354
  * Returns the first element of this chunk if it exists.
2324
2355
  *
2325
- * @example
2356
+ * **Example** (Getting the first element)
2357
+ *
2326
2358
  * ```ts
2327
2359
  * import { Chunk } from "effect"
2328
2360
  *
@@ -2340,9 +2372,10 @@ export const head: <A>(self: Chunk<A>) => Option<A> = get(0)
2340
2372
  *
2341
2373
  * It will throw an error if the chunk is empty.
2342
2374
  *
2343
- * @example
2375
+ * **Example** (Getting the first element unsafely)
2376
+ *
2344
2377
  * ```ts
2345
- * import { Chunk } from "effect"
2378
+ * import { Chunk, Option } from "effect"
2346
2379
  *
2347
2380
  * const chunk = Chunk.make(1, 2, 3, 4)
2348
2381
  * console.log(Chunk.headUnsafe(chunk)) // 1
@@ -2350,23 +2383,20 @@ export const head: <A>(self: Chunk<A>) => Option<A> = get(0)
2350
2383
  * const singleElement = Chunk.make("hello")
2351
2384
  * console.log(Chunk.headUnsafe(singleElement)) // "hello"
2352
2385
  *
2353
- * // Warning: This will throw for empty chunks
2354
- * try {
2355
- * Chunk.headUnsafe(Chunk.empty())
2356
- * } catch (error) {
2357
- * console.log((error as Error).message) // "Index out of bounds"
2358
- * }
2386
+ * // Use Chunk.head when the chunk may be empty
2387
+ * console.log(Option.isNone(Chunk.head(Chunk.empty()))) // true
2359
2388
  * ```
2360
2389
  *
2361
- * @since 2.0.0
2362
2390
  * @category unsafe
2391
+ * @since 4.0.0
2363
2392
  */
2364
2393
  export const headUnsafe = <A>(self: Chunk<A>): A => getUnsafe(self, 0)
2365
2394
 
2366
2395
  /**
2367
2396
  * Returns the first element of this non empty chunk.
2368
2397
  *
2369
- * @example
2398
+ * **Example** (Getting the first element of a non-empty chunk)
2399
+ *
2370
2400
  * ```ts
2371
2401
  * import { Chunk } from "effect"
2372
2402
  *
@@ -2380,15 +2410,16 @@ export const headUnsafe = <A>(self: Chunk<A>): A => getUnsafe(self, 0)
2380
2410
  * // Chunk.headNonEmpty(Chunk.empty()) // TypeScript error
2381
2411
  * ```
2382
2412
  *
2383
- * @since 2.0.0
2384
2413
  * @category elements
2414
+ * @since 2.0.0
2385
2415
  */
2386
2416
  export const headNonEmpty: <A>(self: NonEmptyChunk<A>) => A = headUnsafe
2387
2417
 
2388
2418
  /**
2389
2419
  * Returns the last element of this chunk if it exists.
2390
2420
  *
2391
- * @example
2421
+ * **Example** (Getting the last element)
2422
+ *
2392
2423
  * ```ts
2393
2424
  * import { Chunk } from "effect"
2394
2425
  *
@@ -2406,9 +2437,10 @@ export const last = <A>(self: Chunk<A>): Option<A> => get(self, self.length - 1)
2406
2437
  *
2407
2438
  * It will throw an error if the chunk is empty.
2408
2439
  *
2409
- * @example
2440
+ * **Example** (Getting the last element unsafely)
2441
+ *
2410
2442
  * ```ts
2411
- * import { Chunk } from "effect"
2443
+ * import { Chunk, Option } from "effect"
2412
2444
  *
2413
2445
  * const chunk = Chunk.make(1, 2, 3, 4)
2414
2446
  * console.log(Chunk.lastUnsafe(chunk)) // 4
@@ -2416,23 +2448,20 @@ export const last = <A>(self: Chunk<A>): Option<A> => get(self, self.length - 1)
2416
2448
  * const singleElement = Chunk.make("hello")
2417
2449
  * console.log(Chunk.lastUnsafe(singleElement)) // "hello"
2418
2450
  *
2419
- * // Warning: This will throw for empty chunks
2420
- * try {
2421
- * Chunk.lastUnsafe(Chunk.empty())
2422
- * } catch (error) {
2423
- * console.log((error as Error).message) // "Index out of bounds"
2424
- * }
2451
+ * // Use Chunk.last when the chunk may be empty
2452
+ * console.log(Option.isNone(Chunk.last(Chunk.empty()))) // true
2425
2453
  * ```
2426
2454
  *
2427
- * @since 2.0.0
2428
2455
  * @category unsafe
2456
+ * @since 4.0.0
2429
2457
  */
2430
2458
  export const lastUnsafe = <A>(self: Chunk<A>): A => getUnsafe(self, self.length - 1)
2431
2459
 
2432
2460
  /**
2433
2461
  * Returns the last element of this non empty chunk.
2434
2462
  *
2435
- * @example
2463
+ * **Example** (Getting the last element of a non-empty chunk)
2464
+ *
2436
2465
  * ```ts
2437
2466
  * import { Chunk } from "effect"
2438
2467
  *
@@ -2446,15 +2475,16 @@ export const lastUnsafe = <A>(self: Chunk<A>): A => getUnsafe(self, self.length
2446
2475
  * // Chunk.lastNonEmpty(Chunk.empty()) // TypeScript error
2447
2476
  * ```
2448
2477
  *
2449
- * @since 3.4.0
2450
2478
  * @category elements
2479
+ * @since 3.4.0
2451
2480
  */
2452
2481
  export const lastNonEmpty: <A>(self: NonEmptyChunk<A>) => A = lastUnsafe
2453
2482
 
2454
2483
  /**
2455
2484
  * A namespace containing utility types for Chunk operations.
2456
2485
  *
2457
- * @example
2486
+ * **Example** (Working with Chunk utility types)
2487
+ *
2458
2488
  * ```ts
2459
2489
  * import type { Chunk } from "effect"
2460
2490
  *
@@ -2467,14 +2497,14 @@ export const lastNonEmpty: <A>(self: NonEmptyChunk<A>) => A = lastUnsafe
2467
2497
  * type WithString = Chunk.Chunk.With<typeof nonEmptyChunk, string> // Chunk.NonEmptyChunk<string>
2468
2498
  * ```
2469
2499
  *
2470
- * @category types
2471
2500
  * @since 2.0.0
2472
2501
  */
2473
2502
  export declare namespace Chunk {
2474
2503
  /**
2475
2504
  * Infers the element type of a Chunk.
2476
2505
  *
2477
- * @example
2506
+ * **Example** (Inferring element types)
2507
+ *
2478
2508
  * ```ts
2479
2509
  * import type { Chunk } from "effect"
2480
2510
  *
@@ -2493,7 +2523,8 @@ export declare namespace Chunk {
2493
2523
  /**
2494
2524
  * Constructs a Chunk type preserving non-emptiness.
2495
2525
  *
2496
- * @example
2526
+ * **Example** (Preserving non-emptiness)
2527
+ *
2497
2528
  * ```ts
2498
2529
  * import type { Chunk } from "effect"
2499
2530
  *
@@ -2512,7 +2543,8 @@ export declare namespace Chunk {
2512
2543
  /**
2513
2544
  * Creates a non-empty Chunk if either input is non-empty.
2514
2545
  *
2515
- * @example
2546
+ * **Example** (Preserving non-emptiness from either input)
2547
+ *
2516
2548
  * ```ts
2517
2549
  * import type { Chunk } from "effect"
2518
2550
  *
@@ -2547,7 +2579,8 @@ export declare namespace Chunk {
2547
2579
  /**
2548
2580
  * Creates a non-empty Chunk only if both inputs are non-empty.
2549
2581
  *
2550
- * @example
2582
+ * **Example** (Requiring non-emptiness from both inputs)
2583
+ *
2551
2584
  * ```ts
2552
2585
  * import type { Chunk } from "effect"
2553
2586
  *
@@ -2582,7 +2615,8 @@ export declare namespace Chunk {
2582
2615
  /**
2583
2616
  * Flattens a nested Chunk type.
2584
2617
  *
2585
- * @example
2618
+ * **Example** (Flattening nested chunk types)
2619
+ *
2586
2620
  * ```ts
2587
2621
  * import type { Chunk } from "effect"
2588
2622
  *
@@ -2605,76 +2639,72 @@ export declare namespace Chunk {
2605
2639
  * Transforms the elements of a chunk using the specified mapping function.
2606
2640
  * If the input chunk is non-empty, the resulting chunk will also be non-empty.
2607
2641
  *
2608
- * @example
2642
+ * **Example** (Mapping values)
2609
2643
  *
2610
2644
  * ```ts
2611
2645
  * import { Chunk } from "effect"
2612
2646
  *
2613
2647
  * const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
2614
2648
  *
2615
- * console.log(result)
2616
- * // { _id: 'Chunk', values: [ 2, 3 ] }
2649
+ * console.log(Chunk.toArray(result)) // [2, 3]
2617
2650
  * ```
2618
2651
  *
2619
- * @since 2.0.0
2620
2652
  * @category mapping
2653
+ * @since 2.0.0
2621
2654
  */
2622
2655
  export const map: {
2623
2656
  /**
2624
2657
  * Transforms the elements of a chunk using the specified mapping function.
2625
2658
  * If the input chunk is non-empty, the resulting chunk will also be non-empty.
2626
2659
  *
2627
- * @example
2660
+ * **Example** (Mapping values)
2628
2661
  *
2629
2662
  * ```ts
2630
2663
  * import { Chunk } from "effect"
2631
2664
  *
2632
2665
  * const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
2633
2666
  *
2634
- * console.log(result)
2635
- * // { _id: 'Chunk', values: [ 2, 3 ] }
2667
+ * console.log(Chunk.toArray(result)) // [2, 3]
2636
2668
  * ```
2637
2669
  *
2638
- * @since 2.0.0
2639
2670
  * @category mapping
2671
+ * @since 2.0.0
2640
2672
  */
2641
2673
  <S extends Chunk<any>, B>(f: (a: Chunk.Infer<S>, i: number) => B): (self: S) => Chunk.With<S, B>
2642
2674
  /**
2643
2675
  * Transforms the elements of a chunk using the specified mapping function.
2644
2676
  * If the input chunk is non-empty, the resulting chunk will also be non-empty.
2645
2677
  *
2646
- * @example
2678
+ * **Example** (Mapping values)
2647
2679
  *
2648
2680
  * ```ts
2649
2681
  * import { Chunk } from "effect"
2650
2682
  *
2651
2683
  * const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
2652
2684
  *
2653
- * console.log(result)
2654
- * // { _id: 'Chunk', values: [ 2, 3 ] }
2685
+ * console.log(Chunk.toArray(result)) // [2, 3]
2655
2686
  * ```
2656
2687
  *
2657
- * @since 2.0.0
2658
2688
  * @category mapping
2689
+ * @since 2.0.0
2659
2690
  */
2660
2691
  <A, B>(self: NonEmptyChunk<A>, f: (a: A, i: number) => B): NonEmptyChunk<B>
2661
2692
  /**
2662
2693
  * Transforms the elements of a chunk using the specified mapping function.
2663
2694
  * If the input chunk is non-empty, the resulting chunk will also be non-empty.
2664
2695
  *
2665
- * @example
2696
+ * **Example** (Mapping values)
2666
2697
  *
2667
2698
  * ```ts
2668
2699
  * import { Chunk } from "effect"
2669
2700
  *
2670
2701
  * const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
2671
2702
  *
2672
- * console.log(result)
2673
- * // { _id: 'Chunk', values: [ 2, 3 ] }
2703
+ * console.log(Chunk.toArray(result)) // [2, 3]
2674
2704
  * ```
2675
2705
  *
2676
- * @since 2.0.0
2677
2706
  * @category mapping
2707
+ * @since 2.0.0
2678
2708
  */
2679
2709
  <A, B>(self: Chunk<A>, f: (a: A, i: number) => B): Chunk<B>
2680
2710
  } = dual(2, <A, B>(self: Chunk<A>, f: (a: A, i: number) => B): Chunk<B> =>
@@ -2685,7 +2715,8 @@ export const map: {
2685
2715
  /**
2686
2716
  * Statefully maps over the chunk, producing new elements of type `B`.
2687
2717
  *
2688
- * @example
2718
+ * **Example** (Mapping with accumulated state)
2719
+ *
2689
2720
  * ```ts
2690
2721
  * import { Chunk } from "effect"
2691
2722
  *
@@ -2708,14 +2739,15 @@ export const map: {
2708
2739
  * console.log(Chunk.toArray(indexed)) // ["0: hello", "1: world", "2: effect"]
2709
2740
  * ```
2710
2741
  *
2711
- * @since 2.0.0
2712
2742
  * @category folding
2743
+ * @since 2.0.0
2713
2744
  */
2714
2745
  export const mapAccum: {
2715
2746
  /**
2716
2747
  * Statefully maps over the chunk, producing new elements of type `B`.
2717
2748
  *
2718
- * @example
2749
+ * **Example** (Mapping with accumulated state)
2750
+ *
2719
2751
  * ```ts
2720
2752
  * import { Chunk } from "effect"
2721
2753
  *
@@ -2738,14 +2770,15 @@ export const mapAccum: {
2738
2770
  * console.log(Chunk.toArray(indexed)) // ["0: hello", "1: world", "2: effect"]
2739
2771
  * ```
2740
2772
  *
2741
- * @since 2.0.0
2742
2773
  * @category folding
2774
+ * @since 2.0.0
2743
2775
  */
2744
2776
  <S, A, B>(s: S, f: (s: S, a: A) => readonly [S, B]): (self: Chunk<A>) => [S, Chunk<B>]
2745
2777
  /**
2746
2778
  * Statefully maps over the chunk, producing new elements of type `B`.
2747
2779
  *
2748
- * @example
2780
+ * **Example** (Mapping with accumulated state)
2781
+ *
2749
2782
  * ```ts
2750
2783
  * import { Chunk } from "effect"
2751
2784
  *
@@ -2768,8 +2801,8 @@ export const mapAccum: {
2768
2801
  * console.log(Chunk.toArray(indexed)) // ["0: hello", "1: world", "2: effect"]
2769
2802
  * ```
2770
2803
  *
2771
- * @since 2.0.0
2772
2804
  * @category folding
2805
+ * @since 2.0.0
2773
2806
  */
2774
2807
  <S, A, B>(self: Chunk<A>, s: S, f: (s: S, a: A) => readonly [S, B]): [S, Chunk<B>]
2775
2808
  } = dual(3, <S, A, B>(self: Chunk<A>, s: S, f: (s: S, a: A) => readonly [S, B]): [S, Chunk<B>] => {
@@ -2783,7 +2816,8 @@ export const mapAccum: {
2783
2816
  * - Returns `[excluded, satisfying]`.
2784
2817
  * - The filter receives `(element, index)`.
2785
2818
  *
2786
- * @example
2819
+ * **Example** (Partitioning with a Result)
2820
+ *
2787
2821
  * ```ts
2788
2822
  * import { Chunk, Result } from "effect"
2789
2823
  *
@@ -2805,7 +2839,8 @@ export const partition: {
2805
2839
  * - Returns `[excluded, satisfying]`.
2806
2840
  * - The filter receives `(element, index)`.
2807
2841
  *
2808
- * @example
2842
+ * **Example** (Partitioning with a Result)
2843
+ *
2809
2844
  * ```ts
2810
2845
  * import { Chunk, Result } from "effect"
2811
2846
  *
@@ -2827,7 +2862,8 @@ export const partition: {
2827
2862
  * - Returns `[excluded, satisfying]`.
2828
2863
  * - The filter receives `(element, index)`.
2829
2864
  *
2830
- * @example
2865
+ * **Example** (Partitioning with a Result)
2866
+ *
2831
2867
  * ```ts
2832
2868
  * import { Chunk, Result } from "effect"
2833
2869
  *
@@ -2855,12 +2891,16 @@ export const partition: {
2855
2891
  )
2856
2892
 
2857
2893
  /**
2858
- * Partitions the elements of this chunk into two chunks.
2894
+ * Separates a chunk of `Result` values into a chunk of failures and a chunk of
2895
+ * successes.
2896
+ *
2897
+ * The returned tuple is `[failures, successes]`, preserving the original order
2898
+ * within each side.
2899
+ *
2900
+ * **Example** (Separating failures and successes)
2859
2901
  *
2860
- * @example
2861
2902
  * ```ts
2862
- * import { Chunk } from "effect"
2863
- * import * as Result from "effect/Result"
2903
+ * import { Chunk, Result } from "effect"
2864
2904
  *
2865
2905
  * const chunk = Chunk.make(
2866
2906
  * Result.succeed(1),
@@ -2893,7 +2933,8 @@ export const separate = <A, B>(self: Chunk<Result<B, A>>): [Chunk<A>, Chunk<B>]
2893
2933
  /**
2894
2934
  * Retrieves the size of the chunk.
2895
2935
  *
2896
- * @example
2936
+ * **Example** (Getting chunk size)
2937
+ *
2897
2938
  * ```ts
2898
2939
  * import { Chunk } from "effect"
2899
2940
  *
@@ -2909,10 +2950,10 @@ export const size = <A>(self: Chunk<A>): number => self.length
2909
2950
  /**
2910
2951
  * Sort the elements of a Chunk in increasing order, creating a new Chunk.
2911
2952
  *
2912
- * @example
2953
+ * **Example** (Sorting chunks)
2954
+ *
2913
2955
  * ```ts
2914
- * import { Chunk } from "effect"
2915
- * import * as Order from "effect/Order"
2956
+ * import { Chunk, Order } from "effect"
2916
2957
  *
2917
2958
  * const numbers = Chunk.make(3, 1, 4, 1, 5, 9, 2, 6)
2918
2959
  * const sorted = Chunk.sort(numbers, Order.Number)
@@ -2928,17 +2969,17 @@ export const size = <A>(self: Chunk<A>): number => self.length
2928
2969
  * console.log(Chunk.toArray(sortedWords)) // ["apple", "banana", "cherry"]
2929
2970
  * ```
2930
2971
  *
2931
- * @since 2.0.0
2932
2972
  * @category sorting
2973
+ * @since 2.0.0
2933
2974
  */
2934
2975
  export const sort: {
2935
2976
  /**
2936
2977
  * Sort the elements of a Chunk in increasing order, creating a new Chunk.
2937
2978
  *
2938
- * @example
2979
+ * **Example** (Sorting chunks)
2980
+ *
2939
2981
  * ```ts
2940
- * import { Chunk } from "effect"
2941
- * import * as Order from "effect/Order"
2982
+ * import { Chunk, Order } from "effect"
2942
2983
  *
2943
2984
  * const numbers = Chunk.make(3, 1, 4, 1, 5, 9, 2, 6)
2944
2985
  * const sorted = Chunk.sort(numbers, Order.Number)
@@ -2954,17 +2995,17 @@ export const sort: {
2954
2995
  * console.log(Chunk.toArray(sortedWords)) // ["apple", "banana", "cherry"]
2955
2996
  * ```
2956
2997
  *
2957
- * @since 2.0.0
2958
2998
  * @category sorting
2999
+ * @since 2.0.0
2959
3000
  */
2960
3001
  <B>(O: Order.Order<B>): <A extends B>(self: Chunk<A>) => Chunk<A>
2961
3002
  /**
2962
3003
  * Sort the elements of a Chunk in increasing order, creating a new Chunk.
2963
3004
  *
2964
- * @example
3005
+ * **Example** (Sorting chunks)
3006
+ *
2965
3007
  * ```ts
2966
- * import { Chunk } from "effect"
2967
- * import * as Order from "effect/Order"
3008
+ * import { Chunk, Order } from "effect"
2968
3009
  *
2969
3010
  * const numbers = Chunk.make(3, 1, 4, 1, 5, 9, 2, 6)
2970
3011
  * const sorted = Chunk.sort(numbers, Order.Number)
@@ -2980,8 +3021,8 @@ export const sort: {
2980
3021
  * console.log(Chunk.toArray(sortedWords)) // ["apple", "banana", "cherry"]
2981
3022
  * ```
2982
3023
  *
2983
- * @since 2.0.0
2984
3024
  * @category sorting
3025
+ * @since 2.0.0
2985
3026
  */
2986
3027
  <A extends B, B>(self: Chunk<A>, O: Order.Order<B>): Chunk<A>
2987
3028
  } = dual(
@@ -2992,10 +3033,10 @@ export const sort: {
2992
3033
  /**
2993
3034
  * Sorts the elements of a Chunk based on a projection function.
2994
3035
  *
2995
- * @example
3036
+ * **Example** (Sorting chunks by a derived value)
3037
+ *
2996
3038
  * ```ts
2997
- * import { Chunk } from "effect"
2998
- * import * as Order from "effect/Order"
3039
+ * import { Chunk, Order } from "effect"
2999
3040
  *
3000
3041
  * const people = Chunk.make(
3001
3042
  * { name: "Alice", age: 30 },
@@ -3019,17 +3060,17 @@ export const sort: {
3019
3060
  * console.log(Chunk.toArray(byLength)) // ["a", "ab", "abc"]
3020
3061
  * ```
3021
3062
  *
3022
- * @since 2.0.0
3023
3063
  * @category sorting
3064
+ * @since 2.0.0
3024
3065
  */
3025
3066
  export const sortWith: {
3026
3067
  /**
3027
3068
  * Sorts the elements of a Chunk based on a projection function.
3028
3069
  *
3029
- * @example
3070
+ * **Example** (Sorting chunks by a derived value)
3071
+ *
3030
3072
  * ```ts
3031
- * import { Chunk } from "effect"
3032
- * import * as Order from "effect/Order"
3073
+ * import { Chunk, Order } from "effect"
3033
3074
  *
3034
3075
  * const people = Chunk.make(
3035
3076
  * { name: "Alice", age: 30 },
@@ -3053,17 +3094,17 @@ export const sortWith: {
3053
3094
  * console.log(Chunk.toArray(byLength)) // ["a", "ab", "abc"]
3054
3095
  * ```
3055
3096
  *
3056
- * @since 2.0.0
3057
3097
  * @category sorting
3098
+ * @since 2.0.0
3058
3099
  */
3059
3100
  <A, B>(f: (a: A) => B, order: Order.Order<B>): (self: Chunk<A>) => Chunk<A>
3060
3101
  /**
3061
3102
  * Sorts the elements of a Chunk based on a projection function.
3062
3103
  *
3063
- * @example
3104
+ * **Example** (Sorting chunks by a derived value)
3105
+ *
3064
3106
  * ```ts
3065
- * import { Chunk } from "effect"
3066
- * import * as Order from "effect/Order"
3107
+ * import { Chunk, Order } from "effect"
3067
3108
  *
3068
3109
  * const people = Chunk.make(
3069
3110
  * { name: "Alice", age: 30 },
@@ -3087,8 +3128,8 @@ export const sortWith: {
3087
3128
  * console.log(Chunk.toArray(byLength)) // ["a", "ab", "abc"]
3088
3129
  * ```
3089
3130
  *
3090
- * @since 2.0.0
3091
3131
  * @category sorting
3132
+ * @since 2.0.0
3092
3133
  */
3093
3134
  <A, B>(self: Chunk<A>, f: (a: A) => B, order: Order.Order<B>): Chunk<A>
3094
3135
  } = dual(
@@ -3099,7 +3140,8 @@ export const sortWith: {
3099
3140
  /**
3100
3141
  * Returns two splits of this chunk at the specified index.
3101
3142
  *
3102
- * @example
3143
+ * **Example** (Splitting at an index)
3144
+ *
3103
3145
  * ```ts
3104
3146
  * import { Chunk } from "effect"
3105
3147
  *
@@ -3119,14 +3161,15 @@ export const sortWith: {
3119
3161
  * console.log(Chunk.toArray(empty2)) // []
3120
3162
  * ```
3121
3163
  *
3122
- * @since 2.0.0
3123
3164
  * @category splitting
3165
+ * @since 2.0.0
3124
3166
  */
3125
3167
  export const splitAt: {
3126
3168
  /**
3127
3169
  * Returns two splits of this chunk at the specified index.
3128
3170
  *
3129
- * @example
3171
+ * **Example** (Splitting at an index)
3172
+ *
3130
3173
  * ```ts
3131
3174
  * import { Chunk } from "effect"
3132
3175
  *
@@ -3146,14 +3189,15 @@ export const splitAt: {
3146
3189
  * console.log(Chunk.toArray(empty2)) // []
3147
3190
  * ```
3148
3191
  *
3149
- * @since 2.0.0
3150
3192
  * @category splitting
3193
+ * @since 2.0.0
3151
3194
  */
3152
3195
  (n: number): <A>(self: Chunk<A>) => [beforeIndex: Chunk<A>, fromIndex: Chunk<A>]
3153
3196
  /**
3154
3197
  * Returns two splits of this chunk at the specified index.
3155
3198
  *
3156
- * @example
3199
+ * **Example** (Splitting at an index)
3200
+ *
3157
3201
  * ```ts
3158
3202
  * import { Chunk } from "effect"
3159
3203
  *
@@ -3173,17 +3217,22 @@ export const splitAt: {
3173
3217
  * console.log(Chunk.toArray(empty2)) // []
3174
3218
  * ```
3175
3219
  *
3176
- * @since 2.0.0
3177
3220
  * @category splitting
3221
+ * @since 2.0.0
3178
3222
  */
3179
3223
  <A>(self: Chunk<A>, n: number): [beforeIndex: Chunk<A>, fromIndex: Chunk<A>]
3180
3224
  } = dual(2, <A>(self: Chunk<A>, n: number): [Chunk<A>, Chunk<A>] => [take(self, n), drop(self, n)])
3181
3225
 
3182
3226
  /**
3183
- * Splits a `NonEmptyChunk` into two segments, with the first segment containing a maximum of `n` elements.
3184
- * The value of `n` must be `>= 1`.
3227
+ * Splits a `NonEmptyChunk` at `n`, returning a non-empty prefix and the
3228
+ * remaining suffix.
3229
+ *
3230
+ * `n` is floored and normalized to at least `1`. If `n` is greater than or
3231
+ * equal to the chunk length, the first result is the original chunk and the
3232
+ * second result is empty.
3233
+ *
3234
+ * **Example** (Splitting non-empty chunks at an index)
3185
3235
  *
3186
- * @example
3187
3236
  * ```ts
3188
3237
  * import { Chunk } from "effect"
3189
3238
  *
@@ -3206,10 +3255,15 @@ export const splitAt: {
3206
3255
  */
3207
3256
  export const splitNonEmptyAt: {
3208
3257
  /**
3209
- * Splits a `NonEmptyChunk` into two segments, with the first segment containing a maximum of `n` elements.
3210
- * The value of `n` must be `>= 1`.
3258
+ * Splits a `NonEmptyChunk` at `n`, returning a non-empty prefix and the
3259
+ * remaining suffix.
3260
+ *
3261
+ * `n` is floored and normalized to at least `1`. If `n` is greater than or
3262
+ * equal to the chunk length, the first result is the original chunk and the
3263
+ * second result is empty.
3264
+ *
3265
+ * **Example** (Splitting non-empty chunks at an index)
3211
3266
  *
3212
- * @example
3213
3267
  * ```ts
3214
3268
  * import { Chunk } from "effect"
3215
3269
  *
@@ -3232,10 +3286,15 @@ export const splitNonEmptyAt: {
3232
3286
  */
3233
3287
  (n: number): <A>(self: NonEmptyChunk<A>) => [beforeIndex: NonEmptyChunk<A>, fromIndex: Chunk<A>]
3234
3288
  /**
3235
- * Splits a `NonEmptyChunk` into two segments, with the first segment containing a maximum of `n` elements.
3236
- * The value of `n` must be `>= 1`.
3289
+ * Splits a `NonEmptyChunk` at `n`, returning a non-empty prefix and the
3290
+ * remaining suffix.
3291
+ *
3292
+ * `n` is floored and normalized to at least `1`. If `n` is greater than or
3293
+ * equal to the chunk length, the first result is the original chunk and the
3294
+ * second result is empty.
3295
+ *
3296
+ * **Example** (Splitting non-empty chunks at an index)
3237
3297
  *
3238
- * @example
3239
3298
  * ```ts
3240
3299
  * import { Chunk } from "effect"
3241
3300
  *
@@ -3265,9 +3324,13 @@ export const splitNonEmptyAt: {
3265
3324
  })
3266
3325
 
3267
3326
  /**
3268
- * Splits this chunk into `n` equally sized chunks.
3327
+ * Splits a chunk into up to `n` chunks, distributing elements in order.
3328
+ *
3329
+ * The chunk size is derived from the input length and `n`; the final chunk may
3330
+ * contain fewer elements than the others.
3331
+ *
3332
+ * **Example** (Splitting chunks into groups)
3269
3333
  *
3270
- * @example
3271
3334
  * ```ts
3272
3335
  * import { Chunk } from "effect"
3273
3336
  *
@@ -3288,14 +3351,18 @@ export const splitNonEmptyAt: {
3288
3351
  * // [[1, 2, 3, 4, 5, 6, 7, 8, 9]]
3289
3352
  * ```
3290
3353
  *
3291
- * @since 2.0.0
3292
3354
  * @category splitting
3355
+ * @since 2.0.0
3293
3356
  */
3294
3357
  export const split: {
3295
3358
  /**
3296
- * Splits this chunk into `n` equally sized chunks.
3359
+ * Splits a chunk into up to `n` chunks, distributing elements in order.
3360
+ *
3361
+ * The chunk size is derived from the input length and `n`; the final chunk may
3362
+ * contain fewer elements than the others.
3363
+ *
3364
+ * **Example** (Splitting chunks into groups)
3297
3365
  *
3298
- * @example
3299
3366
  * ```ts
3300
3367
  * import { Chunk } from "effect"
3301
3368
  *
@@ -3316,14 +3383,18 @@ export const split: {
3316
3383
  * // [[1, 2, 3, 4, 5, 6, 7, 8, 9]]
3317
3384
  * ```
3318
3385
  *
3319
- * @since 2.0.0
3320
3386
  * @category splitting
3387
+ * @since 2.0.0
3321
3388
  */
3322
3389
  (n: number): <A>(self: Chunk<A>) => Chunk<Chunk<A>>
3323
3390
  /**
3324
- * Splits this chunk into `n` equally sized chunks.
3391
+ * Splits a chunk into up to `n` chunks, distributing elements in order.
3392
+ *
3393
+ * The chunk size is derived from the input length and `n`; the final chunk may
3394
+ * contain fewer elements than the others.
3395
+ *
3396
+ * **Example** (Splitting chunks into groups)
3325
3397
  *
3326
- * @example
3327
3398
  * ```ts
3328
3399
  * import { Chunk } from "effect"
3329
3400
  *
@@ -3344,8 +3415,8 @@ export const split: {
3344
3415
  * // [[1, 2, 3, 4, 5, 6, 7, 8, 9]]
3345
3416
  * ```
3346
3417
  *
3347
- * @since 2.0.0
3348
3418
  * @category splitting
3419
+ * @since 2.0.0
3349
3420
  */
3350
3421
  <A>(self: Chunk<A>, n: number): Chunk<Chunk<A>>
3351
3422
  } = dual(2, <A>(self: Chunk<A>, n: number) => chunksOf(self, Math.ceil(self.length / Math.floor(n))))
@@ -3354,7 +3425,8 @@ export const split: {
3354
3425
  * Splits this chunk on the first element that matches this predicate.
3355
3426
  * Returns a tuple containing two chunks: the first one is before the match, and the second one is from the match onward.
3356
3427
  *
3357
- * @example
3428
+ * **Example** (Splitting at a matching element)
3429
+ *
3358
3430
  * ```ts
3359
3431
  * import { Chunk } from "effect"
3360
3432
  *
@@ -3382,7 +3454,8 @@ export const splitWhere: {
3382
3454
  * Splits this chunk on the first element that matches this predicate.
3383
3455
  * Returns a tuple containing two chunks: the first one is before the match, and the second one is from the match onward.
3384
3456
  *
3385
- * @example
3457
+ * **Example** (Splitting at a matching element)
3458
+ *
3386
3459
  * ```ts
3387
3460
  * import { Chunk } from "effect"
3388
3461
  *
@@ -3410,7 +3483,8 @@ export const splitWhere: {
3410
3483
  * Splits this chunk on the first element that matches this predicate.
3411
3484
  * Returns a tuple containing two chunks: the first one is before the match, and the second one is from the match onward.
3412
3485
  *
3413
- * @example
3486
+ * **Example** (Splitting at a matching element)
3487
+ *
3414
3488
  * ```ts
3415
3489
  * import { Chunk } from "effect"
3416
3490
  *
@@ -3449,7 +3523,8 @@ export const splitWhere: {
3449
3523
  /**
3450
3524
  * Returns every elements after the first.
3451
3525
  *
3452
- * @example
3526
+ * **Example** (Getting the tail safely)
3527
+ *
3453
3528
  * ```ts
3454
3529
  * import { Chunk } from "effect"
3455
3530
  *
@@ -3463,15 +3538,16 @@ export const splitWhere: {
3463
3538
  * console.log(Chunk.tail(empty)) // Option.none()
3464
3539
  * ```
3465
3540
  *
3466
- * @since 2.0.0
3467
3541
  * @category elements
3542
+ * @since 2.0.0
3468
3543
  */
3469
3544
  export const tail = <A>(self: Chunk<A>): O.Option<Chunk<A>> => self.length > 0 ? O.some(drop(self, 1)) : O.none()
3470
3545
 
3471
3546
  /**
3472
3547
  * Returns every elements after the first.
3473
3548
  *
3474
- * @example
3549
+ * **Example** (Getting the tail of a non-empty chunk)
3550
+ *
3475
3551
  * ```ts
3476
3552
  * import { Chunk } from "effect"
3477
3553
  *
@@ -3487,15 +3563,16 @@ export const tail = <A>(self: Chunk<A>): O.Option<Chunk<A>> => self.length > 0 ?
3487
3563
  * // Chunk.tailNonEmpty(Chunk.empty()) // TypeScript error
3488
3564
  * ```
3489
3565
  *
3490
- * @since 2.0.0
3491
3566
  * @category elements
3567
+ * @since 2.0.0
3492
3568
  */
3493
3569
  export const tailNonEmpty = <A>(self: NonEmptyChunk<A>): Chunk<A> => drop(self, 1)
3494
3570
 
3495
3571
  /**
3496
3572
  * Takes the last `n` elements.
3497
3573
  *
3498
- * @example
3574
+ * **Example** (Taking elements from the end)
3575
+ *
3499
3576
  * ```ts
3500
3577
  * import { Chunk } from "effect"
3501
3578
  *
@@ -3512,14 +3589,15 @@ export const tailNonEmpty = <A>(self: NonEmptyChunk<A>): Chunk<A> => drop(self,
3512
3589
  * console.log(Chunk.toArray(none)) // []
3513
3590
  * ```
3514
3591
  *
3515
- * @since 2.0.0
3516
3592
  * @category elements
3593
+ * @since 2.0.0
3517
3594
  */
3518
3595
  export const takeRight: {
3519
3596
  /**
3520
3597
  * Takes the last `n` elements.
3521
3598
  *
3522
- * @example
3599
+ * **Example** (Taking elements from the end)
3600
+ *
3523
3601
  * ```ts
3524
3602
  * import { Chunk } from "effect"
3525
3603
  *
@@ -3536,14 +3614,15 @@ export const takeRight: {
3536
3614
  * console.log(Chunk.toArray(none)) // []
3537
3615
  * ```
3538
3616
  *
3539
- * @since 2.0.0
3540
3617
  * @category elements
3618
+ * @since 2.0.0
3541
3619
  */
3542
3620
  (n: number): <A>(self: Chunk<A>) => Chunk<A>
3543
3621
  /**
3544
3622
  * Takes the last `n` elements.
3545
3623
  *
3546
- * @example
3624
+ * **Example** (Taking elements from the end)
3625
+ *
3547
3626
  * ```ts
3548
3627
  * import { Chunk } from "effect"
3549
3628
  *
@@ -3560,8 +3639,8 @@ export const takeRight: {
3560
3639
  * console.log(Chunk.toArray(none)) // []
3561
3640
  * ```
3562
3641
  *
3563
- * @since 2.0.0
3564
3642
  * @category elements
3643
+ * @since 2.0.0
3565
3644
  */
3566
3645
  <A>(self: Chunk<A>, n: number): Chunk<A>
3567
3646
  } = dual(2, <A>(self: Chunk<A>, n: number): Chunk<A> => drop(self, self.length - n))
@@ -3569,7 +3648,8 @@ export const takeRight: {
3569
3648
  /**
3570
3649
  * Takes all elements so long as the predicate returns true.
3571
3650
  *
3572
- * @example
3651
+ * **Example** (Taking elements while a predicate matches)
3652
+ *
3573
3653
  * ```ts
3574
3654
  * import { Chunk } from "effect"
3575
3655
  *
@@ -3587,14 +3667,15 @@ export const takeRight: {
3587
3667
  * console.log(Chunk.toArray(all)) // [1, 2, 3]
3588
3668
  * ```
3589
3669
  *
3590
- * @since 2.0.0
3591
3670
  * @category elements
3671
+ * @since 2.0.0
3592
3672
  */
3593
3673
  export const takeWhile: {
3594
3674
  /**
3595
3675
  * Takes all elements so long as the predicate returns true.
3596
3676
  *
3597
- * @example
3677
+ * **Example** (Taking elements while a predicate matches)
3678
+ *
3598
3679
  * ```ts
3599
3680
  * import { Chunk } from "effect"
3600
3681
  *
@@ -3612,14 +3693,15 @@ export const takeWhile: {
3612
3693
  * console.log(Chunk.toArray(all)) // [1, 2, 3]
3613
3694
  * ```
3614
3695
  *
3615
- * @since 2.0.0
3616
3696
  * @category elements
3697
+ * @since 2.0.0
3617
3698
  */
3618
3699
  <A, B extends A>(refinement: Refinement<NoInfer<A>, B>): (self: Chunk<A>) => Chunk<B>
3619
3700
  /**
3620
3701
  * Takes all elements so long as the predicate returns true.
3621
3702
  *
3622
- * @example
3703
+ * **Example** (Taking elements while a predicate matches)
3704
+ *
3623
3705
  * ```ts
3624
3706
  * import { Chunk } from "effect"
3625
3707
  *
@@ -3637,14 +3719,15 @@ export const takeWhile: {
3637
3719
  * console.log(Chunk.toArray(all)) // [1, 2, 3]
3638
3720
  * ```
3639
3721
  *
3640
- * @since 2.0.0
3641
3722
  * @category elements
3723
+ * @since 2.0.0
3642
3724
  */
3643
3725
  <A>(predicate: Predicate<NoInfer<A>>): (self: Chunk<A>) => Chunk<A>
3644
3726
  /**
3645
3727
  * Takes all elements so long as the predicate returns true.
3646
3728
  *
3647
- * @example
3729
+ * **Example** (Taking elements while a predicate matches)
3730
+ *
3648
3731
  * ```ts
3649
3732
  * import { Chunk } from "effect"
3650
3733
  *
@@ -3662,14 +3745,15 @@ export const takeWhile: {
3662
3745
  * console.log(Chunk.toArray(all)) // [1, 2, 3]
3663
3746
  * ```
3664
3747
  *
3665
- * @since 2.0.0
3666
3748
  * @category elements
3749
+ * @since 2.0.0
3667
3750
  */
3668
3751
  <A, B extends A>(self: Chunk<A>, refinement: Refinement<A, B>): Chunk<B>
3669
3752
  /**
3670
3753
  * Takes all elements so long as the predicate returns true.
3671
3754
  *
3672
- * @example
3755
+ * **Example** (Taking elements while a predicate matches)
3756
+ *
3673
3757
  * ```ts
3674
3758
  * import { Chunk } from "effect"
3675
3759
  *
@@ -3687,8 +3771,8 @@ export const takeWhile: {
3687
3771
  * console.log(Chunk.toArray(all)) // [1, 2, 3]
3688
3772
  * ```
3689
3773
  *
3690
- * @since 2.0.0
3691
3774
  * @category elements
3775
+ * @since 2.0.0
3692
3776
  */
3693
3777
  <A>(self: Chunk<A>, predicate: Predicate<A>): Chunk<A>
3694
3778
  } = dual(2, <A>(self: Chunk<A>, predicate: Predicate<A>): Chunk<A> => {
@@ -3706,7 +3790,8 @@ export const takeWhile: {
3706
3790
  /**
3707
3791
  * Creates a Chunks of unique values, in order, from all given Chunks.
3708
3792
  *
3709
- * @example
3793
+ * **Example** (Unioning chunks)
3794
+ *
3710
3795
  * ```ts
3711
3796
  * import { Chunk } from "effect"
3712
3797
  *
@@ -3722,14 +3807,15 @@ export const takeWhile: {
3722
3807
  * console.log(Chunk.toArray(unified)) // [1, 2, 3]
3723
3808
  * ```
3724
3809
  *
3725
- * @since 2.0.0
3726
3810
  * @category elements
3811
+ * @since 2.0.0
3727
3812
  */
3728
3813
  export const union: {
3729
3814
  /**
3730
3815
  * Creates a Chunks of unique values, in order, from all given Chunks.
3731
3816
  *
3732
- * @example
3817
+ * **Example** (Unioning chunks)
3818
+ *
3733
3819
  * ```ts
3734
3820
  * import { Chunk } from "effect"
3735
3821
  *
@@ -3745,14 +3831,15 @@ export const union: {
3745
3831
  * console.log(Chunk.toArray(unified)) // [1, 2, 3]
3746
3832
  * ```
3747
3833
  *
3748
- * @since 2.0.0
3749
3834
  * @category elements
3835
+ * @since 2.0.0
3750
3836
  */
3751
3837
  <A>(that: Chunk<A>): <B>(self: Chunk<B>) => Chunk<A | B>
3752
3838
  /**
3753
3839
  * Creates a Chunks of unique values, in order, from all given Chunks.
3754
3840
  *
3755
- * @example
3841
+ * **Example** (Unioning chunks)
3842
+ *
3756
3843
  * ```ts
3757
3844
  * import { Chunk } from "effect"
3758
3845
  *
@@ -3768,8 +3855,8 @@ export const union: {
3768
3855
  * console.log(Chunk.toArray(unified)) // [1, 2, 3]
3769
3856
  * ```
3770
3857
  *
3771
- * @since 2.0.0
3772
3858
  * @category elements
3859
+ * @since 2.0.0
3773
3860
  */
3774
3861
  <A, B>(self: Chunk<A>, that: Chunk<B>): Chunk<A | B>
3775
3862
  } = dual(
@@ -3778,9 +3865,11 @@ export const union: {
3778
3865
  )
3779
3866
 
3780
3867
  /**
3781
- * Remove duplicates from an array, keeping the first occurrence of an element.
3868
+ * Removes duplicate elements from a `Chunk`, preserving the first occurrence
3869
+ * of each value.
3870
+ *
3871
+ * **Example** (Removing duplicate values)
3782
3872
  *
3783
- * @example
3784
3873
  * ```ts
3785
3874
  * import { Chunk } from "effect"
3786
3875
  *
@@ -3799,15 +3888,16 @@ export const union: {
3799
3888
  * console.log(Chunk.toArray(uniqueDeduped)) // [1, 2, 3]
3800
3889
  * ```
3801
3890
  *
3802
- * @since 2.0.0
3803
3891
  * @category elements
3892
+ * @since 2.0.0
3804
3893
  */
3805
3894
  export const dedupe = <A>(self: Chunk<A>): Chunk<A> => fromArrayUnsafe(RA.dedupe(toReadonlyArray(self)))
3806
3895
 
3807
3896
  /**
3808
3897
  * Deduplicates adjacent elements that are identical.
3809
3898
  *
3810
- * @example
3899
+ * **Example** (Removing adjacent duplicates)
3900
+ *
3811
3901
  * ```ts
3812
3902
  * import { Chunk } from "effect"
3813
3903
  *
@@ -3821,8 +3911,8 @@ export const dedupe = <A>(self: Chunk<A>): Chunk<A> => fromArrayUnsafe(RA.dedupe
3821
3911
  * console.log(Chunk.toArray(mixedResult)) // ["a", "b", "a"]
3822
3912
  * ```
3823
3913
  *
3824
- * @since 2.0.0
3825
3914
  * @category filtering
3915
+ * @since 2.0.0
3826
3916
  */
3827
3917
  export const dedupeAdjacent = <A>(self: Chunk<A>): Chunk<A> => fromArrayUnsafe(RA.dedupeAdjacent(self))
3828
3918
 
@@ -3831,7 +3921,8 @@ export const dedupeAdjacent = <A>(self: Chunk<A>): Chunk<A> => fromArrayUnsafe(R
3831
3921
  *
3832
3922
  * Note: The function is reverse of `zip`.
3833
3923
  *
3834
- * @example
3924
+ * **Example** (Unzipping pairs)
3925
+ *
3835
3926
  * ```ts
3836
3927
  * import { Chunk } from "effect"
3837
3928
  *
@@ -3851,8 +3942,8 @@ export const dedupeAdjacent = <A>(self: Chunk<A>): Chunk<A> => fromArrayUnsafe(R
3851
3942
  * console.log(Chunk.toArray(emptyStrs)) // []
3852
3943
  * ```
3853
3944
  *
3854
- * @since 2.0.0
3855
3945
  * @category elements
3946
+ * @since 2.0.0
3856
3947
  */
3857
3948
  export const unzip = <A, B>(self: Chunk<readonly [A, B]>): [Chunk<A>, Chunk<B>] => {
3858
3949
  const [left, right] = RA.unzip(self)
@@ -3862,7 +3953,8 @@ export const unzip = <A, B>(self: Chunk<readonly [A, B]>): [Chunk<A>, Chunk<B>]
3862
3953
  /**
3863
3954
  * Zips this chunk pointwise with the specified chunk using the specified combiner.
3864
3955
  *
3865
- * @example
3956
+ * **Example** (Zipping chunks with a function)
3957
+ *
3866
3958
  * ```ts
3867
3959
  * import { Chunk } from "effect"
3868
3960
  *
@@ -3878,14 +3970,15 @@ export const unzip = <A, B>(self: Chunk<readonly [A, B]>): [Chunk<A>, Chunk<B>]
3878
3970
  * console.log(Chunk.toArray(mixed)) // [[1, "a"], [2, "b"]]
3879
3971
  * ```
3880
3972
  *
3881
- * @since 2.0.0
3882
3973
  * @category zipping
3974
+ * @since 2.0.0
3883
3975
  */
3884
3976
  export const zipWith: {
3885
3977
  /**
3886
3978
  * Zips this chunk pointwise with the specified chunk using the specified combiner.
3887
3979
  *
3888
- * @example
3980
+ * **Example** (Zipping chunks with a function)
3981
+ *
3889
3982
  * ```ts
3890
3983
  * import { Chunk } from "effect"
3891
3984
  *
@@ -3901,14 +3994,15 @@ export const zipWith: {
3901
3994
  * console.log(Chunk.toArray(mixed)) // [[1, "a"], [2, "b"]]
3902
3995
  * ```
3903
3996
  *
3904
- * @since 2.0.0
3905
3997
  * @category zipping
3998
+ * @since 2.0.0
3906
3999
  */
3907
4000
  <A, B, C>(that: Chunk<B>, f: (a: A, b: B) => C): (self: Chunk<A>) => Chunk<C>
3908
4001
  /**
3909
4002
  * Zips this chunk pointwise with the specified chunk using the specified combiner.
3910
4003
  *
3911
- * @example
4004
+ * **Example** (Zipping chunks with a function)
4005
+ *
3912
4006
  * ```ts
3913
4007
  * import { Chunk } from "effect"
3914
4008
  *
@@ -3924,8 +4018,8 @@ export const zipWith: {
3924
4018
  * console.log(Chunk.toArray(mixed)) // [[1, "a"], [2, "b"]]
3925
4019
  * ```
3926
4020
  *
3927
- * @since 2.0.0
3928
4021
  * @category zipping
4022
+ * @since 2.0.0
3929
4023
  */
3930
4024
  <A, B, C>(self: Chunk<A>, that: Chunk<B>, f: (a: A, b: B) => C): Chunk<C>
3931
4025
  } = dual(
@@ -3937,7 +4031,8 @@ export const zipWith: {
3937
4031
  /**
3938
4032
  * Zips this chunk pointwise with the specified chunk.
3939
4033
  *
3940
- * @example
4034
+ * **Example** (Zipping chunks)
4035
+ *
3941
4036
  * ```ts
3942
4037
  * import { Chunk } from "effect"
3943
4038
  *
@@ -3953,14 +4048,15 @@ export const zipWith: {
3953
4048
  * console.log(Chunk.toArray(zipped)) // [[1, "a"], [2, "b"]]
3954
4049
  * ```
3955
4050
  *
3956
- * @since 2.0.0
3957
4051
  * @category zipping
4052
+ * @since 2.0.0
3958
4053
  */
3959
4054
  export const zip: {
3960
4055
  /**
3961
4056
  * Zips this chunk pointwise with the specified chunk.
3962
4057
  *
3963
- * @example
4058
+ * **Example** (Zipping chunks)
4059
+ *
3964
4060
  * ```ts
3965
4061
  * import { Chunk } from "effect"
3966
4062
  *
@@ -3976,14 +4072,15 @@ export const zip: {
3976
4072
  * console.log(Chunk.toArray(zipped)) // [[1, "a"], [2, "b"]]
3977
4073
  * ```
3978
4074
  *
3979
- * @since 2.0.0
3980
4075
  * @category zipping
4076
+ * @since 2.0.0
3981
4077
  */
3982
4078
  <B>(that: Chunk<B>): <A>(self: Chunk<A>) => Chunk<[A, B]>
3983
4079
  /**
3984
4080
  * Zips this chunk pointwise with the specified chunk.
3985
4081
  *
3986
- * @example
4082
+ * **Example** (Zipping chunks)
4083
+ *
3987
4084
  * ```ts
3988
4085
  * import { Chunk } from "effect"
3989
4086
  *
@@ -3999,8 +4096,8 @@ export const zip: {
3999
4096
  * console.log(Chunk.toArray(zipped)) // [[1, "a"], [2, "b"]]
4000
4097
  * ```
4001
4098
  *
4002
- * @since 2.0.0
4003
4099
  * @category zipping
4100
+ * @since 2.0.0
4004
4101
  */
4005
4102
  <A, B>(self: Chunk<A>, that: Chunk<B>): Chunk<[A, B]>
4006
4103
  } = dual(
@@ -4011,7 +4108,8 @@ export const zip: {
4011
4108
  /**
4012
4109
  * Delete the element at the specified index, creating a new `Chunk`.
4013
4110
  *
4014
- * @example
4111
+ * **Example** (Removing an element)
4112
+ *
4015
4113
  * ```ts
4016
4114
  * import { Chunk } from "effect"
4017
4115
  *
@@ -4035,7 +4133,8 @@ export const remove: {
4035
4133
  /**
4036
4134
  * Delete the element at the specified index, creating a new `Chunk`.
4037
4135
  *
4038
- * @example
4136
+ * **Example** (Removing an element)
4137
+ *
4039
4138
  * ```ts
4040
4139
  * import { Chunk } from "effect"
4041
4140
  *
@@ -4059,7 +4158,8 @@ export const remove: {
4059
4158
  /**
4060
4159
  * Delete the element at the specified index, creating a new `Chunk`.
4061
4160
  *
4062
- * @example
4161
+ * **Example** (Removing an element)
4162
+ *
4063
4163
  * ```ts
4064
4164
  * import { Chunk } from "effect"
4065
4165
  *
@@ -4089,7 +4189,8 @@ export const remove: {
4089
4189
  * Applies a function to the element at the specified index, creating a new `Chunk`,
4090
4190
  * or returns `None` if the index is out of bounds.
4091
4191
  *
4092
- * @example
4192
+ * **Example** (Modifying an element)
4193
+ *
4093
4194
  * ```ts
4094
4195
  * import { Chunk } from "effect"
4095
4196
  *
@@ -4114,7 +4215,8 @@ export const modify: {
4114
4215
  * Applies a function to the element at the specified index, creating a new `Chunk`,
4115
4216
  * or returns `None` if the index is out of bounds.
4116
4217
  *
4117
- * @example
4218
+ * **Example** (Modifying an element)
4219
+ *
4118
4220
  * ```ts
4119
4221
  * import { Chunk } from "effect"
4120
4222
  *
@@ -4139,7 +4241,8 @@ export const modify: {
4139
4241
  * Applies a function to the element at the specified index, creating a new `Chunk`,
4140
4242
  * or returns `None` if the index is out of bounds.
4141
4243
  *
4142
- * @example
4244
+ * **Example** (Modifying an element)
4245
+ *
4143
4246
  * ```ts
4144
4247
  * import { Chunk } from "effect"
4145
4248
  *
@@ -4170,7 +4273,8 @@ export const modify: {
4170
4273
  * Change the element at the specified index, creating a new `Chunk`,
4171
4274
  * or returns `None` if the index is out of bounds.
4172
4275
  *
4173
- * @example
4276
+ * **Example** (Replacing an element)
4277
+ *
4174
4278
  * ```ts
4175
4279
  * import { Chunk } from "effect"
4176
4280
  *
@@ -4195,7 +4299,8 @@ export const replace: {
4195
4299
  * Change the element at the specified index, creating a new `Chunk`,
4196
4300
  * or returns `None` if the index is out of bounds.
4197
4301
  *
4198
- * @example
4302
+ * **Example** (Replacing an element)
4303
+ *
4199
4304
  * ```ts
4200
4305
  * import { Chunk } from "effect"
4201
4306
  *
@@ -4220,7 +4325,8 @@ export const replace: {
4220
4325
  * Change the element at the specified index, creating a new `Chunk`,
4221
4326
  * or returns `None` if the index is out of bounds.
4222
4327
  *
4223
- * @example
4328
+ * **Example** (Replacing an element)
4329
+ *
4224
4330
  * ```ts
4225
4331
  * import { Chunk } from "effect"
4226
4332
  *
@@ -4248,13 +4354,13 @@ export const replace: {
4248
4354
  *
4249
4355
  * **Note**. `n` is normalized to an integer >= 1.
4250
4356
  *
4251
- * @example
4357
+ * **Example** (Generating chunks from indices)
4358
+ *
4252
4359
  * ```ts
4253
4360
  * import { Chunk } from "effect"
4254
4361
  *
4255
4362
  * const chunk = Chunk.makeBy(5, (i) => i * 2)
4256
- * console.log(chunk)
4257
- * // { _id: 'Chunk', values: [ 0, 2, 4, 6, 8 ] }
4363
+ * console.log(Chunk.toArray(chunk)) // [0, 2, 4, 6, 8]
4258
4364
  * ```
4259
4365
  *
4260
4366
  * @category constructors
@@ -4266,13 +4372,13 @@ export const makeBy: {
4266
4372
  *
4267
4373
  * **Note**. `n` is normalized to an integer >= 1.
4268
4374
  *
4269
- * @example
4375
+ * **Example** (Generating chunks from indices)
4376
+ *
4270
4377
  * ```ts
4271
4378
  * import { Chunk } from "effect"
4272
4379
  *
4273
4380
  * const chunk = Chunk.makeBy(5, (i) => i * 2)
4274
- * console.log(chunk)
4275
- * // { _id: 'Chunk', values: [ 0, 2, 4, 6, 8 ] }
4381
+ * console.log(Chunk.toArray(chunk)) // [0, 2, 4, 6, 8]
4276
4382
  * ```
4277
4383
  *
4278
4384
  * @category constructors
@@ -4284,13 +4390,13 @@ export const makeBy: {
4284
4390
  *
4285
4391
  * **Note**. `n` is normalized to an integer >= 1.
4286
4392
  *
4287
- * @example
4393
+ * **Example** (Generating chunks from indices)
4394
+ *
4288
4395
  * ```ts
4289
4396
  * import { Chunk } from "effect"
4290
4397
  *
4291
4398
  * const chunk = Chunk.makeBy(5, (i) => i * 2)
4292
- * console.log(chunk)
4293
- * // { _id: 'Chunk', values: [ 0, 2, 4, 6, 8 ] }
4399
+ * console.log(Chunk.toArray(chunk)) // [0, 2, 4, 6, 8]
4294
4400
  * ```
4295
4401
  *
4296
4402
  * @category constructors
@@ -4300,15 +4406,19 @@ export const makeBy: {
4300
4406
  } = dual(2, (n, f) => fromIterable(RA.makeBy(n, f)))
4301
4407
 
4302
4408
  /**
4303
- * Create a non empty `Chunk` containing a range of integers, including both endpoints.
4409
+ * Creates a non-empty `Chunk` of consecutive integers from `start` through
4410
+ * `end`, inclusive.
4411
+ *
4412
+ * If `start` is greater than `end`, returns a single-element chunk containing
4413
+ * `start`.
4414
+ *
4415
+ * **Example** (Creating a range)
4304
4416
  *
4305
- * @example
4306
4417
  * ```ts
4307
4418
  * import { Chunk } from "effect"
4308
4419
  *
4309
4420
  * const chunk = Chunk.range(1, 5)
4310
- * console.log(chunk)
4311
- * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5 ] }
4421
+ * console.log(Chunk.toArray(chunk)) // [1, 2, 3, 4, 5]
4312
4422
  * ```
4313
4423
  *
4314
4424
  * @category constructors
@@ -4324,7 +4434,8 @@ export const range = (start: number, end: number): NonEmptyChunk<number> =>
4324
4434
  /**
4325
4435
  * Returns a function that checks if a `Chunk` contains a given value using the default `Equivalence`.
4326
4436
  *
4327
- * @example
4437
+ * **Example** (Checking membership)
4438
+ *
4328
4439
  * ```ts
4329
4440
  * import { Chunk } from "effect"
4330
4441
  *
@@ -4353,7 +4464,8 @@ export const contains: {
4353
4464
  /**
4354
4465
  * Returns a function that checks if a `Chunk` contains a given value using the default `Equivalence`.
4355
4466
  *
4356
- * @example
4467
+ * **Example** (Checking membership)
4468
+ *
4357
4469
  * ```ts
4358
4470
  * import { Chunk } from "effect"
4359
4471
  *
@@ -4382,7 +4494,8 @@ export const contains: {
4382
4494
  /**
4383
4495
  * Returns a function that checks if a `Chunk` contains a given value using the default `Equivalence`.
4384
4496
  *
4385
- * @example
4497
+ * **Example** (Checking membership)
4498
+ *
4386
4499
  * ```ts
4387
4500
  * import { Chunk } from "effect"
4388
4501
  *
@@ -4409,7 +4522,8 @@ export const contains: {
4409
4522
  /**
4410
4523
  * Returns a function that checks if a `Chunk` contains a given value using a provided `isEquivalent` function.
4411
4524
  *
4412
- * @example
4525
+ * **Example** (Checking membership with custom equivalence)
4526
+ *
4413
4527
  * ```ts
4414
4528
  * import { Chunk } from "effect"
4415
4529
  *
@@ -4445,7 +4559,8 @@ export const containsWith: <A>(
4445
4559
  * Returns the first element that satisfies the specified
4446
4560
  * predicate, or `None` if no such element exists.
4447
4561
  *
4448
- * @example
4562
+ * **Example** (Finding the first matching element)
4563
+ *
4449
4564
  * ```ts
4450
4565
  * import { Chunk, Option } from "effect"
4451
4566
  *
@@ -4475,7 +4590,8 @@ export const findFirst: {
4475
4590
  * Returns the first element that satisfies the specified
4476
4591
  * predicate, or `None` if no such element exists.
4477
4592
  *
4478
- * @example
4593
+ * **Example** (Finding the first matching element)
4594
+ *
4479
4595
  * ```ts
4480
4596
  * import { Chunk, Option } from "effect"
4481
4597
  *
@@ -4505,7 +4621,8 @@ export const findFirst: {
4505
4621
  * Returns the first element that satisfies the specified
4506
4622
  * predicate, or `None` if no such element exists.
4507
4623
  *
4508
- * @example
4624
+ * **Example** (Finding the first matching element)
4625
+ *
4509
4626
  * ```ts
4510
4627
  * import { Chunk, Option } from "effect"
4511
4628
  *
@@ -4535,7 +4652,8 @@ export const findFirst: {
4535
4652
  * Returns the first element that satisfies the specified
4536
4653
  * predicate, or `None` if no such element exists.
4537
4654
  *
4538
- * @example
4655
+ * **Example** (Finding the first matching element)
4656
+ *
4539
4657
  * ```ts
4540
4658
  * import { Chunk, Option } from "effect"
4541
4659
  *
@@ -4565,7 +4683,8 @@ export const findFirst: {
4565
4683
  * Returns the first element that satisfies the specified
4566
4684
  * predicate, or `None` if no such element exists.
4567
4685
  *
4568
- * @example
4686
+ * **Example** (Finding the first matching element)
4687
+ *
4569
4688
  * ```ts
4570
4689
  * import { Chunk, Option } from "effect"
4571
4690
  *
@@ -4596,7 +4715,8 @@ export const findFirst: {
4596
4715
  /**
4597
4716
  * Return the first index for which a predicate holds.
4598
4717
  *
4599
- * @example
4718
+ * **Example** (Finding the first matching index)
4719
+ *
4600
4720
  * ```ts
4601
4721
  * import { Chunk } from "effect"
4602
4722
  *
@@ -4620,7 +4740,8 @@ export const findFirstIndex: {
4620
4740
  /**
4621
4741
  * Return the first index for which a predicate holds.
4622
4742
  *
4623
- * @example
4743
+ * **Example** (Finding the first matching index)
4744
+ *
4624
4745
  * ```ts
4625
4746
  * import { Chunk } from "effect"
4626
4747
  *
@@ -4644,7 +4765,8 @@ export const findFirstIndex: {
4644
4765
  /**
4645
4766
  * Return the first index for which a predicate holds.
4646
4767
  *
4647
- * @example
4768
+ * **Example** (Finding the first matching index)
4769
+ *
4648
4770
  * ```ts
4649
4771
  * import { Chunk } from "effect"
4650
4772
  *
@@ -4673,10 +4795,10 @@ export const findFirstIndex: {
4673
4795
  /**
4674
4796
  * Find the last element for which a predicate holds.
4675
4797
  *
4676
- * @example
4798
+ * **Example** (Finding the last matching element)
4799
+ *
4677
4800
  * ```ts
4678
- * import { Chunk } from "effect"
4679
- * import * as Option from "effect/Option"
4801
+ * import { Chunk, Option } from "effect"
4680
4802
  *
4681
4803
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
4682
4804
  * const result = Chunk.findLast(chunk, (n) => n < 4)
@@ -4699,10 +4821,10 @@ export const findLast: {
4699
4821
  /**
4700
4822
  * Find the last element for which a predicate holds.
4701
4823
  *
4702
- * @example
4824
+ * **Example** (Finding the last matching element)
4825
+ *
4703
4826
  * ```ts
4704
- * import { Chunk } from "effect"
4705
- * import * as Option from "effect/Option"
4827
+ * import { Chunk, Option } from "effect"
4706
4828
  *
4707
4829
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
4708
4830
  * const result = Chunk.findLast(chunk, (n) => n < 4)
@@ -4725,10 +4847,10 @@ export const findLast: {
4725
4847
  /**
4726
4848
  * Find the last element for which a predicate holds.
4727
4849
  *
4728
- * @example
4850
+ * **Example** (Finding the last matching element)
4851
+ *
4729
4852
  * ```ts
4730
- * import { Chunk } from "effect"
4731
- * import * as Option from "effect/Option"
4853
+ * import { Chunk, Option } from "effect"
4732
4854
  *
4733
4855
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
4734
4856
  * const result = Chunk.findLast(chunk, (n) => n < 4)
@@ -4751,10 +4873,10 @@ export const findLast: {
4751
4873
  /**
4752
4874
  * Find the last element for which a predicate holds.
4753
4875
  *
4754
- * @example
4876
+ * **Example** (Finding the last matching element)
4877
+ *
4755
4878
  * ```ts
4756
- * import { Chunk } from "effect"
4757
- * import * as Option from "effect/Option"
4879
+ * import { Chunk, Option } from "effect"
4758
4880
  *
4759
4881
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
4760
4882
  * const result = Chunk.findLast(chunk, (n) => n < 4)
@@ -4777,10 +4899,10 @@ export const findLast: {
4777
4899
  /**
4778
4900
  * Find the last element for which a predicate holds.
4779
4901
  *
4780
- * @example
4902
+ * **Example** (Finding the last matching element)
4903
+ *
4781
4904
  * ```ts
4782
- * import { Chunk } from "effect"
4783
- * import * as Option from "effect/Option"
4905
+ * import { Chunk, Option } from "effect"
4784
4906
  *
4785
4907
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
4786
4908
  * const result = Chunk.findLast(chunk, (n) => n < 4)
@@ -4805,7 +4927,8 @@ export const findLast: {
4805
4927
  /**
4806
4928
  * Return the last index for which a predicate holds.
4807
4929
  *
4808
- * @example
4930
+ * **Example** (Finding the last matching index)
4931
+ *
4809
4932
  * ```ts
4810
4933
  * import { Chunk } from "effect"
4811
4934
  *
@@ -4829,7 +4952,8 @@ export const findLastIndex: {
4829
4952
  /**
4830
4953
  * Return the last index for which a predicate holds.
4831
4954
  *
4832
- * @example
4955
+ * **Example** (Finding the last matching index)
4956
+ *
4833
4957
  * ```ts
4834
4958
  * import { Chunk } from "effect"
4835
4959
  *
@@ -4853,7 +4977,8 @@ export const findLastIndex: {
4853
4977
  /**
4854
4978
  * Return the last index for which a predicate holds.
4855
4979
  *
4856
- * @example
4980
+ * **Example** (Finding the last matching index)
4981
+ *
4857
4982
  * ```ts
4858
4983
  * import { Chunk } from "effect"
4859
4984
  *
@@ -4882,7 +5007,8 @@ export const findLastIndex: {
4882
5007
  /**
4883
5008
  * Check if a predicate holds true for every `Chunk` element.
4884
5009
  *
4885
- * @example
5010
+ * **Example** (Checking every element)
5011
+ *
4886
5012
  * ```ts
4887
5013
  * import { Chunk } from "effect"
4888
5014
  *
@@ -4909,7 +5035,8 @@ export const every: {
4909
5035
  /**
4910
5036
  * Check if a predicate holds true for every `Chunk` element.
4911
5037
  *
4912
- * @example
5038
+ * **Example** (Checking every element)
5039
+ *
4913
5040
  * ```ts
4914
5041
  * import { Chunk } from "effect"
4915
5042
  *
@@ -4936,7 +5063,8 @@ export const every: {
4936
5063
  /**
4937
5064
  * Check if a predicate holds true for every `Chunk` element.
4938
5065
  *
4939
- * @example
5066
+ * **Example** (Checking every element)
5067
+ *
4940
5068
  * ```ts
4941
5069
  * import { Chunk } from "effect"
4942
5070
  *
@@ -4963,7 +5091,8 @@ export const every: {
4963
5091
  /**
4964
5092
  * Check if a predicate holds true for every `Chunk` element.
4965
5093
  *
4966
- * @example
5094
+ * **Example** (Checking every element)
5095
+ *
4967
5096
  * ```ts
4968
5097
  * import { Chunk } from "effect"
4969
5098
  *
@@ -4990,7 +5119,8 @@ export const every: {
4990
5119
  /**
4991
5120
  * Check if a predicate holds true for every `Chunk` element.
4992
5121
  *
4993
- * @example
5122
+ * **Example** (Checking every element)
5123
+ *
4994
5124
  * ```ts
4995
5125
  * import { Chunk } from "effect"
4996
5126
  *
@@ -5023,7 +5153,8 @@ export const every: {
5023
5153
  /**
5024
5154
  * Check if a predicate holds true for some `Chunk` element.
5025
5155
  *
5026
- * @example
5156
+ * **Example** (Checking for some matching element)
5157
+ *
5027
5158
  * ```ts
5028
5159
  * import { Chunk } from "effect"
5029
5160
  *
@@ -5047,7 +5178,8 @@ export const some: {
5047
5178
  /**
5048
5179
  * Check if a predicate holds true for some `Chunk` element.
5049
5180
  *
5050
- * @example
5181
+ * **Example** (Checking for some matching element)
5182
+ *
5051
5183
  * ```ts
5052
5184
  * import { Chunk } from "effect"
5053
5185
  *
@@ -5071,7 +5203,8 @@ export const some: {
5071
5203
  /**
5072
5204
  * Check if a predicate holds true for some `Chunk` element.
5073
5205
  *
5074
- * @example
5206
+ * **Example** (Checking for some matching element)
5207
+ *
5075
5208
  * ```ts
5076
5209
  * import { Chunk } from "effect"
5077
5210
  *
@@ -5100,7 +5233,8 @@ export const some: {
5100
5233
  /**
5101
5234
  * Joins the elements together with "sep" in the middle.
5102
5235
  *
5103
- * @example
5236
+ * **Example** (Joining chunks into a string)
5237
+ *
5104
5238
  * ```ts
5105
5239
  * import { Chunk } from "effect"
5106
5240
  *
@@ -5128,7 +5262,8 @@ export const join: {
5128
5262
  /**
5129
5263
  * Joins the elements together with "sep" in the middle.
5130
5264
  *
5131
- * @example
5265
+ * **Example** (Joining chunks into a string)
5266
+ *
5132
5267
  * ```ts
5133
5268
  * import { Chunk } from "effect"
5134
5269
  *
@@ -5156,7 +5291,8 @@ export const join: {
5156
5291
  /**
5157
5292
  * Joins the elements together with "sep" in the middle.
5158
5293
  *
5159
- * @example
5294
+ * **Example** (Joining chunks into a string)
5295
+ *
5160
5296
  * ```ts
5161
5297
  * import { Chunk } from "effect"
5162
5298
  *
@@ -5186,7 +5322,8 @@ export const join: {
5186
5322
  /**
5187
5323
  * Reduces the elements of a chunk from left to right.
5188
5324
  *
5189
- * @example
5325
+ * **Example** (Reducing from the left)
5326
+ *
5190
5327
  * ```ts
5191
5328
  * import { Chunk } from "effect"
5192
5329
  *
@@ -5211,7 +5348,8 @@ export const reduce: {
5211
5348
  /**
5212
5349
  * Reduces the elements of a chunk from left to right.
5213
5350
  *
5214
- * @example
5351
+ * **Example** (Reducing from the left)
5352
+ *
5215
5353
  * ```ts
5216
5354
  * import { Chunk } from "effect"
5217
5355
  *
@@ -5236,7 +5374,8 @@ export const reduce: {
5236
5374
  /**
5237
5375
  * Reduces the elements of a chunk from left to right.
5238
5376
  *
5239
- * @example
5377
+ * **Example** (Reducing from the left)
5378
+ *
5240
5379
  * ```ts
5241
5380
  * import { Chunk } from "effect"
5242
5381
  *
@@ -5263,7 +5402,8 @@ export const reduce: {
5263
5402
  /**
5264
5403
  * Reduces the elements of a chunk from right to left.
5265
5404
  *
5266
- * @example
5405
+ * **Example** (Reducing from the right)
5406
+ *
5267
5407
  * ```ts
5268
5408
  * import { Chunk } from "effect"
5269
5409
  *
@@ -5292,7 +5432,8 @@ export const reduceRight: {
5292
5432
  /**
5293
5433
  * Reduces the elements of a chunk from right to left.
5294
5434
  *
5295
- * @example
5435
+ * **Example** (Reducing from the right)
5436
+ *
5296
5437
  * ```ts
5297
5438
  * import { Chunk } from "effect"
5298
5439
  *
@@ -5321,7 +5462,8 @@ export const reduceRight: {
5321
5462
  /**
5322
5463
  * Reduces the elements of a chunk from right to left.
5323
5464
  *
5324
- * @example
5465
+ * **Example** (Reducing from the right)
5466
+ *
5325
5467
  * ```ts
5326
5468
  * import { Chunk } from "effect"
5327
5469
  *
@@ -5353,7 +5495,8 @@ export const reduceRight: {
5353
5495
  * Creates a `Chunk` of values not included in the other given `Chunk` using the provided `isEquivalent` function.
5354
5496
  * The order and references of result values are determined by the first `Chunk`.
5355
5497
  *
5356
- * @example
5498
+ * **Example** (Computing difference with custom equivalence)
5499
+ *
5357
5500
  * ```ts
5358
5501
  * import { Chunk } from "effect"
5359
5502
  *
@@ -5394,7 +5537,8 @@ export const differenceWith = <A>(isEquivalent: (self: A, that: A) => boolean):
5394
5537
  * Creates a `Chunk` of values not included in the other given `Chunk`.
5395
5538
  * The order and references of result values are determined by the first `Chunk`.
5396
5539
  *
5397
- * @example
5540
+ * **Example** (Computing chunk difference)
5541
+ *
5398
5542
  * ```ts
5399
5543
  * import { Chunk } from "effect"
5400
5544
  *
@@ -5423,7 +5567,8 @@ export const difference: {
5423
5567
  * Creates a `Chunk` of values not included in the other given `Chunk`.
5424
5568
  * The order and references of result values are determined by the first `Chunk`.
5425
5569
  *
5426
- * @example
5570
+ * **Example** (Computing chunk difference)
5571
+ *
5427
5572
  * ```ts
5428
5573
  * import { Chunk } from "effect"
5429
5574
  *
@@ -5452,7 +5597,8 @@ export const difference: {
5452
5597
  * Creates a `Chunk` of values not included in the other given `Chunk`.
5453
5598
  * The order and references of result values are determined by the first `Chunk`.
5454
5599
  *
5455
- * @example
5600
+ * **Example** (Computing chunk difference)
5601
+ *
5456
5602
  * ```ts
5457
5603
  * import { Chunk } from "effect"
5458
5604
  *