effect 3.8.4 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (757) hide show
  1. package/dist/cjs/Array.js +24 -3
  2. package/dist/cjs/Array.js.map +1 -1
  3. package/dist/cjs/BigDecimal.js +5 -3
  4. package/dist/cjs/BigDecimal.js.map +1 -1
  5. package/dist/cjs/BigInt.js.map +1 -1
  6. package/dist/cjs/Boolean.js.map +1 -1
  7. package/dist/cjs/Cause.js.map +1 -1
  8. package/dist/cjs/Channel.js.map +1 -1
  9. package/dist/cjs/ChildExecutorDecision.js.map +1 -1
  10. package/dist/cjs/Chunk.js +3 -0
  11. package/dist/cjs/Chunk.js.map +1 -1
  12. package/dist/cjs/Config.js.map +1 -1
  13. package/dist/cjs/ConfigError.js.map +1 -1
  14. package/dist/cjs/ConfigProvider.js.map +1 -1
  15. package/dist/cjs/ConfigProviderPathPatch.js.map +1 -1
  16. package/dist/cjs/Console.js.map +1 -1
  17. package/dist/cjs/Context.js.map +1 -1
  18. package/dist/cjs/Cron.js +3 -0
  19. package/dist/cjs/Cron.js.map +1 -1
  20. package/dist/cjs/Data.js.map +1 -1
  21. package/dist/cjs/DateTime.js +6 -0
  22. package/dist/cjs/DateTime.js.map +1 -1
  23. package/dist/cjs/Deferred.js.map +1 -1
  24. package/dist/cjs/Differ.js.map +1 -1
  25. package/dist/cjs/Duration.js +3 -0
  26. package/dist/cjs/Duration.js.map +1 -1
  27. package/dist/cjs/Effect.js +122 -35
  28. package/dist/cjs/Effect.js.map +1 -1
  29. package/dist/cjs/Either.js.map +1 -1
  30. package/dist/cjs/Equivalence.js.map +1 -1
  31. package/dist/cjs/ExecutionStrategy.js.map +1 -1
  32. package/dist/cjs/Exit.js.map +1 -1
  33. package/dist/cjs/Fiber.js.map +1 -1
  34. package/dist/cjs/FiberHandle.js +3 -0
  35. package/dist/cjs/FiberHandle.js.map +1 -1
  36. package/dist/cjs/FiberId.js.map +1 -1
  37. package/dist/cjs/FiberMap.js +3 -0
  38. package/dist/cjs/FiberMap.js.map +1 -1
  39. package/dist/cjs/FiberRef.js.map +1 -1
  40. package/dist/cjs/FiberRefs.js.map +1 -1
  41. package/dist/cjs/FiberRefsPatch.js.map +1 -1
  42. package/dist/cjs/FiberSet.js +3 -0
  43. package/dist/cjs/FiberSet.js.map +1 -1
  44. package/dist/cjs/Function.js.map +1 -1
  45. package/dist/cjs/GroupBy.js.map +1 -1
  46. package/dist/cjs/Hash.js.map +1 -1
  47. package/dist/cjs/HashMap.js.map +1 -1
  48. package/dist/cjs/HashSet.js.map +1 -1
  49. package/dist/cjs/Inspectable.js +15 -1
  50. package/dist/cjs/Inspectable.js.map +1 -1
  51. package/dist/cjs/Iterable.js.map +1 -1
  52. package/dist/cjs/KeyedPool.js.map +1 -1
  53. package/dist/cjs/Layer.js.map +1 -1
  54. package/dist/cjs/List.js +6 -0
  55. package/dist/cjs/List.js.map +1 -1
  56. package/dist/cjs/LogLevel.js.map +1 -1
  57. package/dist/cjs/Logger.js.map +1 -1
  58. package/dist/cjs/Mailbox.js.map +1 -1
  59. package/dist/cjs/ManagedRuntime.js +16 -1
  60. package/dist/cjs/ManagedRuntime.js.map +1 -1
  61. package/dist/cjs/MergeDecision.js.map +1 -1
  62. package/dist/cjs/MergeState.js.map +1 -1
  63. package/dist/cjs/MergeStrategy.js.map +1 -1
  64. package/dist/cjs/Metric.js.map +1 -1
  65. package/dist/cjs/MetricHook.js.map +1 -1
  66. package/dist/cjs/MetricKey.js.map +1 -1
  67. package/dist/cjs/MetricPolling.js.map +1 -1
  68. package/dist/cjs/MetricState.js.map +1 -1
  69. package/dist/cjs/Micro.js +6 -0
  70. package/dist/cjs/Micro.js.map +1 -1
  71. package/dist/cjs/MutableHashMap.js +3 -0
  72. package/dist/cjs/MutableHashMap.js.map +1 -1
  73. package/dist/cjs/MutableHashSet.js +3 -0
  74. package/dist/cjs/MutableHashSet.js.map +1 -1
  75. package/dist/cjs/MutableList.js +3 -0
  76. package/dist/cjs/MutableList.js.map +1 -1
  77. package/dist/cjs/MutableQueue.js +3 -0
  78. package/dist/cjs/MutableQueue.js.map +1 -1
  79. package/dist/cjs/MutableRef.js +3 -0
  80. package/dist/cjs/MutableRef.js.map +1 -1
  81. package/dist/cjs/Number.js.map +1 -1
  82. package/dist/cjs/Option.js.map +1 -1
  83. package/dist/cjs/Order.js.map +1 -1
  84. package/dist/cjs/Ordering.js.map +1 -1
  85. package/dist/cjs/Pipeable.js.map +1 -1
  86. package/dist/cjs/Pool.js.map +1 -1
  87. package/dist/cjs/Predicate.js +18 -2
  88. package/dist/cjs/Predicate.js.map +1 -1
  89. package/dist/cjs/PubSub.js.map +1 -1
  90. package/dist/cjs/Queue.js.map +1 -1
  91. package/dist/cjs/RcMap.js.map +1 -1
  92. package/dist/cjs/Readable.js.map +1 -1
  93. package/dist/cjs/Record.js.map +1 -1
  94. package/dist/cjs/RedBlackTree.js.map +1 -1
  95. package/dist/cjs/Ref.js.map +1 -1
  96. package/dist/cjs/RegExp.js +20 -1
  97. package/dist/cjs/RegExp.js.map +1 -1
  98. package/dist/cjs/Request.js.map +1 -1
  99. package/dist/cjs/RequestResolver.js.map +1 -1
  100. package/dist/cjs/Resource.js.map +1 -1
  101. package/dist/cjs/Runtime.js.map +1 -1
  102. package/dist/cjs/RuntimeFlags.js.map +1 -1
  103. package/dist/cjs/RuntimeFlagsPatch.js.map +1 -1
  104. package/dist/cjs/STM.js.map +1 -1
  105. package/dist/cjs/Schedule.js.map +1 -1
  106. package/dist/cjs/ScheduleInterval.js.map +1 -1
  107. package/dist/cjs/ScheduleIntervals.js.map +1 -1
  108. package/dist/cjs/Scheduler.js.map +1 -1
  109. package/dist/cjs/Scope.js.map +1 -1
  110. package/dist/cjs/ScopedRef.js.map +1 -1
  111. package/dist/cjs/Sink.js.map +1 -1
  112. package/dist/cjs/SortedMap.js +3 -0
  113. package/dist/cjs/SortedMap.js.map +1 -1
  114. package/dist/cjs/SortedSet.js +3 -0
  115. package/dist/cjs/SortedSet.js.map +1 -1
  116. package/dist/cjs/Stream.js +17 -3
  117. package/dist/cjs/Stream.js.map +1 -1
  118. package/dist/cjs/StreamHaltStrategy.js.map +1 -1
  119. package/dist/cjs/String.js.map +1 -1
  120. package/dist/cjs/Struct.js.map +1 -1
  121. package/dist/cjs/Subscribable.js.map +1 -1
  122. package/dist/cjs/SubscriptionRef.js.map +1 -1
  123. package/dist/cjs/SynchronizedRef.js.map +1 -1
  124. package/dist/cjs/TArray.js.map +1 -1
  125. package/dist/cjs/TDeferred.js.map +1 -1
  126. package/dist/cjs/TMap.js.map +1 -1
  127. package/dist/cjs/TPriorityQueue.js.map +1 -1
  128. package/dist/cjs/TPubSub.js.map +1 -1
  129. package/dist/cjs/TQueue.js.map +1 -1
  130. package/dist/cjs/TReentrantLock.js.map +1 -1
  131. package/dist/cjs/TRef.js.map +1 -1
  132. package/dist/cjs/TSemaphore.js.map +1 -1
  133. package/dist/cjs/TSet.js.map +1 -1
  134. package/dist/cjs/Take.js.map +1 -1
  135. package/dist/cjs/TestAnnotationMap.js.map +1 -1
  136. package/dist/cjs/TestClock.js.map +1 -1
  137. package/dist/cjs/TestServices.js.map +1 -1
  138. package/dist/cjs/Trie.js.map +1 -1
  139. package/dist/cjs/Tuple.js +21 -2
  140. package/dist/cjs/Tuple.js.map +1 -1
  141. package/dist/cjs/Unify.js.map +1 -1
  142. package/dist/cjs/UpstreamPullRequest.js.map +1 -1
  143. package/dist/cjs/UpstreamPullStrategy.js.map +1 -1
  144. package/dist/cjs/Utils.js +1 -14
  145. package/dist/cjs/Utils.js.map +1 -1
  146. package/dist/cjs/internal/cause.js +3 -0
  147. package/dist/cjs/internal/cause.js.map +1 -1
  148. package/dist/cjs/internal/context.js +6 -1
  149. package/dist/cjs/internal/context.js.map +1 -1
  150. package/dist/cjs/internal/core-effect.js.map +1 -1
  151. package/dist/cjs/internal/core.js +16 -3
  152. package/dist/cjs/internal/core.js.map +1 -1
  153. package/dist/cjs/internal/effect/circular.js +5 -1
  154. package/dist/cjs/internal/effect/circular.js.map +1 -1
  155. package/dist/cjs/internal/fiberId.js +9 -0
  156. package/dist/cjs/internal/fiberId.js.map +1 -1
  157. package/dist/cjs/internal/hashMap.js +3 -0
  158. package/dist/cjs/internal/hashMap.js.map +1 -1
  159. package/dist/cjs/internal/hashSet.js +3 -0
  160. package/dist/cjs/internal/hashSet.js.map +1 -1
  161. package/dist/cjs/internal/layer.js +33 -19
  162. package/dist/cjs/internal/layer.js.map +1 -1
  163. package/dist/cjs/internal/mailbox.js +3 -0
  164. package/dist/cjs/internal/mailbox.js.map +1 -1
  165. package/dist/cjs/internal/managedRuntime/circular.js +10 -0
  166. package/dist/cjs/internal/managedRuntime/circular.js.map +1 -0
  167. package/dist/cjs/internal/managedRuntime.js +23 -9
  168. package/dist/cjs/internal/managedRuntime.js.map +1 -1
  169. package/dist/cjs/internal/option.js +3 -0
  170. package/dist/cjs/internal/option.js.map +1 -1
  171. package/dist/cjs/internal/pool.js +6 -1
  172. package/dist/cjs/internal/pool.js.map +1 -1
  173. package/dist/cjs/internal/redBlackTree.js +3 -0
  174. package/dist/cjs/internal/redBlackTree.js.map +1 -1
  175. package/dist/cjs/internal/resource.js +15 -5
  176. package/dist/cjs/internal/resource.js.map +1 -1
  177. package/dist/cjs/internal/runtime.js +4 -1
  178. package/dist/cjs/internal/runtime.js.map +1 -1
  179. package/dist/cjs/internal/scopedRef.js +11 -8
  180. package/dist/cjs/internal/scopedRef.js.map +1 -1
  181. package/dist/cjs/internal/stm/core.js +1 -2
  182. package/dist/cjs/internal/stm/core.js.map +1 -1
  183. package/dist/cjs/internal/stream.js +12 -3
  184. package/dist/cjs/internal/stream.js.map +1 -1
  185. package/dist/cjs/internal/trie.js +3 -0
  186. package/dist/cjs/internal/trie.js.map +1 -1
  187. package/dist/cjs/internal/version.js +1 -1
  188. package/dist/dts/Array.d.ts +2735 -2
  189. package/dist/dts/Array.d.ts.map +1 -1
  190. package/dist/dts/BigDecimal.d.ts +558 -1
  191. package/dist/dts/BigDecimal.d.ts.map +1 -1
  192. package/dist/dts/BigInt.d.ts +490 -0
  193. package/dist/dts/BigInt.d.ts.map +1 -1
  194. package/dist/dts/Boolean.d.ts +228 -0
  195. package/dist/dts/Boolean.d.ts.map +1 -1
  196. package/dist/dts/Cause.d.ts +172 -0
  197. package/dist/dts/Cause.d.ts.map +1 -1
  198. package/dist/dts/Channel.d.ts +750 -0
  199. package/dist/dts/Channel.d.ts.map +1 -1
  200. package/dist/dts/ChildExecutorDecision.d.ts +12 -0
  201. package/dist/dts/ChildExecutorDecision.d.ts.map +1 -1
  202. package/dist/dts/Chunk.d.ts +791 -0
  203. package/dist/dts/Chunk.d.ts.map +1 -1
  204. package/dist/dts/Config.d.ts +174 -0
  205. package/dist/dts/Config.d.ts.map +1 -1
  206. package/dist/dts/ConfigError.d.ts +16 -0
  207. package/dist/dts/ConfigError.d.ts.map +1 -1
  208. package/dist/dts/ConfigProvider.d.ts +84 -0
  209. package/dist/dts/ConfigProvider.d.ts.map +1 -1
  210. package/dist/dts/ConfigProviderPathPatch.d.ts +32 -0
  211. package/dist/dts/ConfigProviderPathPatch.d.ts.map +1 -1
  212. package/dist/dts/Console.d.ts +24 -0
  213. package/dist/dts/Console.d.ts.map +1 -1
  214. package/dist/dts/Context.d.ts +234 -3
  215. package/dist/dts/Context.d.ts.map +1 -1
  216. package/dist/dts/Cron.d.ts +12 -0
  217. package/dist/dts/Cron.d.ts.map +1 -1
  218. package/dist/dts/Data.d.ts +165 -0
  219. package/dist/dts/Data.d.ts.map +1 -1
  220. package/dist/dts/DateTime.d.ts +878 -0
  221. package/dist/dts/DateTime.d.ts.map +1 -1
  222. package/dist/dts/Deferred.d.ts +171 -1
  223. package/dist/dts/Deferred.d.ts.map +1 -1
  224. package/dist/dts/Differ.d.ts +78 -0
  225. package/dist/dts/Differ.d.ts.map +1 -1
  226. package/dist/dts/Duration.d.ts +130 -0
  227. package/dist/dts/Duration.d.ts.map +1 -1
  228. package/dist/dts/Effect.d.ts +4350 -13
  229. package/dist/dts/Effect.d.ts.map +1 -1
  230. package/dist/dts/Either.d.ts +620 -0
  231. package/dist/dts/Either.d.ts.map +1 -1
  232. package/dist/dts/Equivalence.d.ts +24 -0
  233. package/dist/dts/Equivalence.d.ts.map +1 -1
  234. package/dist/dts/ExecutionStrategy.d.ts +14 -0
  235. package/dist/dts/ExecutionStrategy.d.ts.map +1 -1
  236. package/dist/dts/Exit.d.ts +252 -0
  237. package/dist/dts/Exit.d.ts.map +1 -1
  238. package/dist/dts/Fiber.d.ts +182 -0
  239. package/dist/dts/Fiber.d.ts.map +1 -1
  240. package/dist/dts/FiberHandle.d.ts +42 -0
  241. package/dist/dts/FiberHandle.d.ts.map +1 -1
  242. package/dist/dts/FiberId.d.ts +24 -0
  243. package/dist/dts/FiberId.d.ts.map +1 -1
  244. package/dist/dts/FiberMap.d.ts +102 -0
  245. package/dist/dts/FiberMap.d.ts.map +1 -1
  246. package/dist/dts/FiberRef.d.ts +80 -0
  247. package/dist/dts/FiberRef.d.ts.map +1 -1
  248. package/dist/dts/FiberRefs.d.ts +84 -0
  249. package/dist/dts/FiberRefs.d.ts.map +1 -1
  250. package/dist/dts/FiberRefsPatch.d.ts +30 -0
  251. package/dist/dts/FiberRefsPatch.d.ts.map +1 -1
  252. package/dist/dts/FiberSet.d.ts +38 -0
  253. package/dist/dts/FiberSet.d.ts.map +1 -1
  254. package/dist/dts/Function.d.ts +144 -28
  255. package/dist/dts/Function.d.ts.map +1 -1
  256. package/dist/dts/GroupBy.d.ts +38 -0
  257. package/dist/dts/GroupBy.d.ts.map +1 -1
  258. package/dist/dts/Hash.d.ts +8 -0
  259. package/dist/dts/Hash.d.ts.map +1 -1
  260. package/dist/dts/HashMap.d.ts +315 -0
  261. package/dist/dts/HashMap.d.ts.map +1 -1
  262. package/dist/dts/HashSet.d.ts +284 -0
  263. package/dist/dts/HashSet.d.ts.map +1 -1
  264. package/dist/dts/Inspectable.d.ts +15 -0
  265. package/dist/dts/Inspectable.d.ts.map +1 -1
  266. package/dist/dts/Iterable.d.ts +454 -0
  267. package/dist/dts/Iterable.d.ts.map +1 -1
  268. package/dist/dts/KeyedPool.d.ts +34 -0
  269. package/dist/dts/KeyedPool.d.ts.map +1 -1
  270. package/dist/dts/Layer.d.ts +460 -5
  271. package/dist/dts/Layer.d.ts.map +1 -1
  272. package/dist/dts/List.d.ts +430 -0
  273. package/dist/dts/List.d.ts.map +1 -1
  274. package/dist/dts/LogLevel.d.ts +46 -0
  275. package/dist/dts/LogLevel.d.ts.map +1 -1
  276. package/dist/dts/Logger.d.ts +194 -0
  277. package/dist/dts/Logger.d.ts.map +1 -1
  278. package/dist/dts/Mailbox.d.ts +16 -0
  279. package/dist/dts/Mailbox.d.ts.map +1 -1
  280. package/dist/dts/ManagedRuntime.d.ts +41 -2
  281. package/dist/dts/ManagedRuntime.d.ts.map +1 -1
  282. package/dist/dts/MergeDecision.d.ts +8 -0
  283. package/dist/dts/MergeDecision.d.ts.map +1 -1
  284. package/dist/dts/MergeState.d.ts +8 -0
  285. package/dist/dts/MergeState.d.ts.map +1 -1
  286. package/dist/dts/MergeStrategy.d.ts +12 -0
  287. package/dist/dts/MergeStrategy.d.ts.map +1 -1
  288. package/dist/dts/Metric.d.ts +410 -0
  289. package/dist/dts/Metric.d.ts.map +1 -1
  290. package/dist/dts/MetricHook.d.ts +24 -0
  291. package/dist/dts/MetricHook.d.ts.map +1 -1
  292. package/dist/dts/MetricKey.d.ts +48 -0
  293. package/dist/dts/MetricKey.d.ts.map +1 -1
  294. package/dist/dts/MetricPolling.d.ts +40 -0
  295. package/dist/dts/MetricPolling.d.ts.map +1 -1
  296. package/dist/dts/MetricState.d.ts +16 -0
  297. package/dist/dts/MetricState.d.ts.map +1 -1
  298. package/dist/dts/Micro.d.ts +1110 -0
  299. package/dist/dts/Micro.d.ts.map +1 -1
  300. package/dist/dts/MutableHashMap.d.ts +50 -0
  301. package/dist/dts/MutableHashMap.d.ts.map +1 -1
  302. package/dist/dts/MutableHashSet.d.ts +24 -0
  303. package/dist/dts/MutableHashSet.d.ts.map +1 -1
  304. package/dist/dts/MutableList.d.ts +36 -0
  305. package/dist/dts/MutableList.d.ts.map +1 -1
  306. package/dist/dts/MutableQueue.d.ts +62 -0
  307. package/dist/dts/MutableQueue.d.ts.map +1 -1
  308. package/dist/dts/MutableRef.d.ts +56 -0
  309. package/dist/dts/MutableRef.d.ts.map +1 -1
  310. package/dist/dts/Number.d.ts +474 -0
  311. package/dist/dts/Number.d.ts.map +1 -1
  312. package/dist/dts/Option.d.ts +1019 -0
  313. package/dist/dts/Option.d.ts.map +1 -1
  314. package/dist/dts/Order.d.ts +24 -0
  315. package/dist/dts/Order.d.ts.map +1 -1
  316. package/dist/dts/Ordering.d.ts +66 -0
  317. package/dist/dts/Ordering.d.ts.map +1 -1
  318. package/dist/dts/Pipeable.d.ts +21 -21
  319. package/dist/dts/Pipeable.d.ts.map +1 -1
  320. package/dist/dts/Pool.d.ts +37 -1
  321. package/dist/dts/Pool.d.ts.map +1 -1
  322. package/dist/dts/Predicate.d.ts +513 -0
  323. package/dist/dts/Predicate.d.ts.map +1 -1
  324. package/dist/dts/PubSub.d.ts +28 -0
  325. package/dist/dts/PubSub.d.ts.map +1 -1
  326. package/dist/dts/Queue.d.ts +106 -2
  327. package/dist/dts/Queue.d.ts.map +1 -1
  328. package/dist/dts/RcMap.d.ts +70 -0
  329. package/dist/dts/RcMap.d.ts.map +1 -1
  330. package/dist/dts/Readable.d.ts +16 -0
  331. package/dist/dts/Readable.d.ts.map +1 -1
  332. package/dist/dts/Record.d.ts +800 -0
  333. package/dist/dts/Record.d.ts.map +1 -1
  334. package/dist/dts/RedBlackTree.d.ts +300 -0
  335. package/dist/dts/RedBlackTree.d.ts.map +1 -1
  336. package/dist/dts/Ref.d.ts +88 -0
  337. package/dist/dts/Ref.d.ts.map +1 -1
  338. package/dist/dts/RegExp.d.ts +12 -2
  339. package/dist/dts/RegExp.d.ts.map +1 -1
  340. package/dist/dts/Request.d.ts +76 -0
  341. package/dist/dts/Request.d.ts.map +1 -1
  342. package/dist/dts/RequestResolver.d.ts +144 -0
  343. package/dist/dts/RequestResolver.d.ts.map +1 -1
  344. package/dist/dts/Resource.d.ts +21 -1
  345. package/dist/dts/Resource.d.ts.map +1 -1
  346. package/dist/dts/Runtime.d.ts +126 -0
  347. package/dist/dts/Runtime.d.ts.map +1 -1
  348. package/dist/dts/RuntimeFlags.d.ts +100 -0
  349. package/dist/dts/RuntimeFlags.d.ts.map +1 -1
  350. package/dist/dts/RuntimeFlagsPatch.d.ts +112 -0
  351. package/dist/dts/RuntimeFlagsPatch.d.ts.map +1 -1
  352. package/dist/dts/STM.d.ts +1090 -0
  353. package/dist/dts/STM.d.ts.map +1 -1
  354. package/dist/dts/Schedule.d.ts +704 -0
  355. package/dist/dts/Schedule.d.ts.map +1 -1
  356. package/dist/dts/ScheduleInterval.d.ts +68 -0
  357. package/dist/dts/ScheduleInterval.d.ts.map +1 -1
  358. package/dist/dts/ScheduleIntervals.d.ts +50 -0
  359. package/dist/dts/ScheduleIntervals.d.ts.map +1 -1
  360. package/dist/dts/Scope.d.ts +36 -0
  361. package/dist/dts/Scope.d.ts.map +1 -1
  362. package/dist/dts/ScopedRef.d.ts +43 -1
  363. package/dist/dts/ScopedRef.d.ts.map +1 -1
  364. package/dist/dts/Sink.d.ts +464 -0
  365. package/dist/dts/Sink.d.ts.map +1 -1
  366. package/dist/dts/SortedMap.d.ts +76 -0
  367. package/dist/dts/SortedMap.d.ts.map +1 -1
  368. package/dist/dts/SortedSet.d.ts +142 -0
  369. package/dist/dts/SortedSet.d.ts.map +1 -1
  370. package/dist/dts/Stream.d.ts +4998 -1
  371. package/dist/dts/Stream.d.ts.map +1 -1
  372. package/dist/dts/StreamHaltStrategy.d.ts +12 -0
  373. package/dist/dts/StreamHaltStrategy.d.ts.map +1 -1
  374. package/dist/dts/String.d.ts +200 -0
  375. package/dist/dts/String.d.ts.map +1 -1
  376. package/dist/dts/Struct.d.ts +84 -0
  377. package/dist/dts/Struct.d.ts.map +1 -1
  378. package/dist/dts/Subscribable.d.ts +16 -0
  379. package/dist/dts/Subscribable.d.ts.map +1 -1
  380. package/dist/dts/SubscriptionRef.d.ts +152 -0
  381. package/dist/dts/SubscriptionRef.d.ts.map +1 -1
  382. package/dist/dts/SynchronizedRef.d.ts +152 -0
  383. package/dist/dts/SynchronizedRef.d.ts.map +1 -1
  384. package/dist/dts/TArray.d.ts +426 -0
  385. package/dist/dts/TArray.d.ts.map +1 -1
  386. package/dist/dts/TDeferred.d.ts +24 -0
  387. package/dist/dts/TDeferred.d.ts.map +1 -1
  388. package/dist/dts/TMap.d.ts +366 -0
  389. package/dist/dts/TMap.d.ts.map +1 -1
  390. package/dist/dts/TPriorityQueue.d.ts +60 -0
  391. package/dist/dts/TPriorityQueue.d.ts.map +1 -1
  392. package/dist/dts/TPubSub.d.ts +28 -0
  393. package/dist/dts/TPubSub.d.ts.map +1 -1
  394. package/dist/dts/TQueue.d.ts +108 -0
  395. package/dist/dts/TQueue.d.ts.map +1 -1
  396. package/dist/dts/TReentrantLock.d.ts +36 -0
  397. package/dist/dts/TReentrantLock.d.ts.map +1 -1
  398. package/dist/dts/TRef.d.ts +88 -0
  399. package/dist/dts/TRef.d.ts.map +1 -1
  400. package/dist/dts/TSemaphore.d.ts +40 -0
  401. package/dist/dts/TSemaphore.d.ts.map +1 -1
  402. package/dist/dts/TSet.d.ts +254 -0
  403. package/dist/dts/TSet.d.ts.map +1 -1
  404. package/dist/dts/Take.d.ts +56 -0
  405. package/dist/dts/Take.d.ts.map +1 -1
  406. package/dist/dts/TestAnnotationMap.d.ts.map +1 -1
  407. package/dist/dts/TestClock.d.ts.map +1 -1
  408. package/dist/dts/TestServices.d.ts.map +1 -1
  409. package/dist/dts/Trie.d.ts +906 -0
  410. package/dist/dts/Trie.d.ts.map +1 -1
  411. package/dist/dts/Tuple.d.ts +203 -0
  412. package/dist/dts/Tuple.d.ts.map +1 -1
  413. package/dist/dts/Types.d.ts +39 -0
  414. package/dist/dts/Types.d.ts.map +1 -1
  415. package/dist/dts/Unify.d.ts +26 -13
  416. package/dist/dts/Unify.d.ts.map +1 -1
  417. package/dist/dts/UpstreamPullRequest.d.ts +12 -0
  418. package/dist/dts/UpstreamPullRequest.d.ts.map +1 -1
  419. package/dist/dts/UpstreamPullStrategy.d.ts +12 -0
  420. package/dist/dts/UpstreamPullStrategy.d.ts.map +1 -1
  421. package/dist/dts/Utils.d.ts.map +1 -1
  422. package/dist/dts/internal/core.d.ts.map +1 -1
  423. package/dist/dts/internal/hashMap.d.ts.map +1 -1
  424. package/dist/dts/internal/layer.d.ts.map +1 -1
  425. package/dist/dts/internal/managedRuntime/circular.d.ts +2 -0
  426. package/dist/dts/internal/managedRuntime/circular.d.ts.map +1 -0
  427. package/dist/dts/internal/stream.d.ts.map +1 -1
  428. package/dist/esm/Array.js +21 -0
  429. package/dist/esm/Array.js.map +1 -1
  430. package/dist/esm/BigDecimal.js +6 -3
  431. package/dist/esm/BigDecimal.js.map +1 -1
  432. package/dist/esm/BigInt.js.map +1 -1
  433. package/dist/esm/Boolean.js.map +1 -1
  434. package/dist/esm/Cause.js.map +1 -1
  435. package/dist/esm/Channel.js.map +1 -1
  436. package/dist/esm/ChildExecutorDecision.js.map +1 -1
  437. package/dist/esm/Chunk.js +4 -1
  438. package/dist/esm/Chunk.js.map +1 -1
  439. package/dist/esm/Config.js.map +1 -1
  440. package/dist/esm/ConfigError.js.map +1 -1
  441. package/dist/esm/ConfigProvider.js.map +1 -1
  442. package/dist/esm/ConfigProviderPathPatch.js.map +1 -1
  443. package/dist/esm/Console.js.map +1 -1
  444. package/dist/esm/Context.js.map +1 -1
  445. package/dist/esm/Cron.js +4 -1
  446. package/dist/esm/Cron.js.map +1 -1
  447. package/dist/esm/Data.js.map +1 -1
  448. package/dist/esm/DateTime.js +6 -0
  449. package/dist/esm/DateTime.js.map +1 -1
  450. package/dist/esm/Deferred.js.map +1 -1
  451. package/dist/esm/Differ.js.map +1 -1
  452. package/dist/esm/Duration.js +4 -1
  453. package/dist/esm/Duration.js.map +1 -1
  454. package/dist/esm/Effect.js +116 -30
  455. package/dist/esm/Effect.js.map +1 -1
  456. package/dist/esm/Either.js.map +1 -1
  457. package/dist/esm/Equivalence.js.map +1 -1
  458. package/dist/esm/ExecutionStrategy.js.map +1 -1
  459. package/dist/esm/Exit.js.map +1 -1
  460. package/dist/esm/Fiber.js.map +1 -1
  461. package/dist/esm/FiberHandle.js +3 -0
  462. package/dist/esm/FiberHandle.js.map +1 -1
  463. package/dist/esm/FiberId.js.map +1 -1
  464. package/dist/esm/FiberMap.js +3 -0
  465. package/dist/esm/FiberMap.js.map +1 -1
  466. package/dist/esm/FiberRef.js.map +1 -1
  467. package/dist/esm/FiberRefs.js.map +1 -1
  468. package/dist/esm/FiberRefsPatch.js.map +1 -1
  469. package/dist/esm/FiberSet.js +3 -0
  470. package/dist/esm/FiberSet.js.map +1 -1
  471. package/dist/esm/Function.js.map +1 -1
  472. package/dist/esm/GroupBy.js.map +1 -1
  473. package/dist/esm/Hash.js.map +1 -1
  474. package/dist/esm/HashMap.js.map +1 -1
  475. package/dist/esm/HashSet.js.map +1 -1
  476. package/dist/esm/Inspectable.js +14 -0
  477. package/dist/esm/Inspectable.js.map +1 -1
  478. package/dist/esm/Iterable.js.map +1 -1
  479. package/dist/esm/KeyedPool.js.map +1 -1
  480. package/dist/esm/Layer.js.map +1 -1
  481. package/dist/esm/List.js +7 -1
  482. package/dist/esm/List.js.map +1 -1
  483. package/dist/esm/LogLevel.js.map +1 -1
  484. package/dist/esm/Logger.js.map +1 -1
  485. package/dist/esm/Mailbox.js.map +1 -1
  486. package/dist/esm/ManagedRuntime.js +15 -0
  487. package/dist/esm/ManagedRuntime.js.map +1 -1
  488. package/dist/esm/MergeDecision.js.map +1 -1
  489. package/dist/esm/MergeState.js.map +1 -1
  490. package/dist/esm/MergeStrategy.js.map +1 -1
  491. package/dist/esm/Metric.js.map +1 -1
  492. package/dist/esm/MetricHook.js.map +1 -1
  493. package/dist/esm/MetricKey.js.map +1 -1
  494. package/dist/esm/MetricPolling.js.map +1 -1
  495. package/dist/esm/MetricState.js.map +1 -1
  496. package/dist/esm/Micro.js +7 -1
  497. package/dist/esm/Micro.js.map +1 -1
  498. package/dist/esm/MutableHashMap.js +4 -1
  499. package/dist/esm/MutableHashMap.js.map +1 -1
  500. package/dist/esm/MutableHashSet.js +4 -1
  501. package/dist/esm/MutableHashSet.js.map +1 -1
  502. package/dist/esm/MutableList.js +4 -1
  503. package/dist/esm/MutableList.js.map +1 -1
  504. package/dist/esm/MutableQueue.js +4 -1
  505. package/dist/esm/MutableQueue.js.map +1 -1
  506. package/dist/esm/MutableRef.js +4 -1
  507. package/dist/esm/MutableRef.js.map +1 -1
  508. package/dist/esm/Number.js.map +1 -1
  509. package/dist/esm/Option.js.map +1 -1
  510. package/dist/esm/Order.js.map +1 -1
  511. package/dist/esm/Ordering.js.map +1 -1
  512. package/dist/esm/Pipeable.js.map +1 -1
  513. package/dist/esm/Pool.js.map +1 -1
  514. package/dist/esm/Predicate.js +15 -0
  515. package/dist/esm/Predicate.js.map +1 -1
  516. package/dist/esm/PubSub.js.map +1 -1
  517. package/dist/esm/Queue.js.map +1 -1
  518. package/dist/esm/RcMap.js.map +1 -1
  519. package/dist/esm/Readable.js.map +1 -1
  520. package/dist/esm/Record.js.map +1 -1
  521. package/dist/esm/RedBlackTree.js.map +1 -1
  522. package/dist/esm/Ref.js.map +1 -1
  523. package/dist/esm/RegExp.js +16 -0
  524. package/dist/esm/RegExp.js.map +1 -1
  525. package/dist/esm/Request.js.map +1 -1
  526. package/dist/esm/RequestResolver.js.map +1 -1
  527. package/dist/esm/Resource.js.map +1 -1
  528. package/dist/esm/Runtime.js.map +1 -1
  529. package/dist/esm/RuntimeFlags.js.map +1 -1
  530. package/dist/esm/RuntimeFlagsPatch.js.map +1 -1
  531. package/dist/esm/STM.js.map +1 -1
  532. package/dist/esm/Schedule.js.map +1 -1
  533. package/dist/esm/ScheduleInterval.js.map +1 -1
  534. package/dist/esm/ScheduleIntervals.js.map +1 -1
  535. package/dist/esm/Scheduler.js.map +1 -1
  536. package/dist/esm/Scope.js.map +1 -1
  537. package/dist/esm/ScopedRef.js.map +1 -1
  538. package/dist/esm/Sink.js.map +1 -1
  539. package/dist/esm/SortedMap.js +4 -1
  540. package/dist/esm/SortedMap.js.map +1 -1
  541. package/dist/esm/SortedSet.js +4 -1
  542. package/dist/esm/SortedSet.js.map +1 -1
  543. package/dist/esm/Stream.js +14 -0
  544. package/dist/esm/Stream.js.map +1 -1
  545. package/dist/esm/StreamHaltStrategy.js.map +1 -1
  546. package/dist/esm/String.js.map +1 -1
  547. package/dist/esm/Struct.js.map +1 -1
  548. package/dist/esm/Subscribable.js.map +1 -1
  549. package/dist/esm/SubscriptionRef.js.map +1 -1
  550. package/dist/esm/SynchronizedRef.js.map +1 -1
  551. package/dist/esm/TArray.js.map +1 -1
  552. package/dist/esm/TDeferred.js.map +1 -1
  553. package/dist/esm/TMap.js.map +1 -1
  554. package/dist/esm/TPriorityQueue.js.map +1 -1
  555. package/dist/esm/TPubSub.js.map +1 -1
  556. package/dist/esm/TQueue.js.map +1 -1
  557. package/dist/esm/TReentrantLock.js.map +1 -1
  558. package/dist/esm/TRef.js.map +1 -1
  559. package/dist/esm/TSemaphore.js.map +1 -1
  560. package/dist/esm/TSet.js.map +1 -1
  561. package/dist/esm/Take.js.map +1 -1
  562. package/dist/esm/TestAnnotationMap.js.map +1 -1
  563. package/dist/esm/TestClock.js.map +1 -1
  564. package/dist/esm/TestServices.js.map +1 -1
  565. package/dist/esm/Trie.js.map +1 -1
  566. package/dist/esm/Tuple.js +19 -0
  567. package/dist/esm/Tuple.js.map +1 -1
  568. package/dist/esm/Unify.js.map +1 -1
  569. package/dist/esm/UpstreamPullRequest.js.map +1 -1
  570. package/dist/esm/UpstreamPullStrategy.js.map +1 -1
  571. package/dist/esm/Utils.js +1 -14
  572. package/dist/esm/Utils.js.map +1 -1
  573. package/dist/esm/internal/cause.js +4 -1
  574. package/dist/esm/internal/cause.js.map +1 -1
  575. package/dist/esm/internal/context.js +7 -2
  576. package/dist/esm/internal/context.js.map +1 -1
  577. package/dist/esm/internal/core-effect.js.map +1 -1
  578. package/dist/esm/internal/core.js +14 -2
  579. package/dist/esm/internal/core.js.map +1 -1
  580. package/dist/esm/internal/effect/circular.js +5 -1
  581. package/dist/esm/internal/effect/circular.js.map +1 -1
  582. package/dist/esm/internal/fiberId.js +10 -1
  583. package/dist/esm/internal/fiberId.js.map +1 -1
  584. package/dist/esm/internal/hashMap.js +4 -1
  585. package/dist/esm/internal/hashMap.js.map +1 -1
  586. package/dist/esm/internal/hashSet.js +4 -1
  587. package/dist/esm/internal/hashSet.js.map +1 -1
  588. package/dist/esm/internal/layer.js +32 -18
  589. package/dist/esm/internal/layer.js.map +1 -1
  590. package/dist/esm/internal/mailbox.js +3 -0
  591. package/dist/esm/internal/mailbox.js.map +1 -1
  592. package/dist/esm/internal/managedRuntime/circular.js +4 -0
  593. package/dist/esm/internal/managedRuntime/circular.js.map +1 -0
  594. package/dist/esm/internal/managedRuntime.js +21 -8
  595. package/dist/esm/internal/managedRuntime.js.map +1 -1
  596. package/dist/esm/internal/option.js +4 -1
  597. package/dist/esm/internal/option.js.map +1 -1
  598. package/dist/esm/internal/pool.js +6 -1
  599. package/dist/esm/internal/pool.js.map +1 -1
  600. package/dist/esm/internal/redBlackTree.js +4 -1
  601. package/dist/esm/internal/redBlackTree.js.map +1 -1
  602. package/dist/esm/internal/resource.js +15 -5
  603. package/dist/esm/internal/resource.js.map +1 -1
  604. package/dist/esm/internal/runtime.js +4 -1
  605. package/dist/esm/internal/runtime.js.map +1 -1
  606. package/dist/esm/internal/scopedRef.js +11 -8
  607. package/dist/esm/internal/scopedRef.js.map +1 -1
  608. package/dist/esm/internal/stm/core.js +1 -2
  609. package/dist/esm/internal/stm/core.js.map +1 -1
  610. package/dist/esm/internal/stream.js +9 -0
  611. package/dist/esm/internal/stream.js.map +1 -1
  612. package/dist/esm/internal/trie.js +4 -1
  613. package/dist/esm/internal/trie.js.map +1 -1
  614. package/dist/esm/internal/version.js +1 -1
  615. package/package.json +1 -1
  616. package/src/Array.ts +2791 -40
  617. package/src/BigDecimal.ts +589 -19
  618. package/src/BigInt.ts +516 -16
  619. package/src/Boolean.ts +241 -8
  620. package/src/Cause.ts +177 -1
  621. package/src/Channel.ts +766 -49
  622. package/src/ChildExecutorDecision.ts +12 -0
  623. package/src/Chunk.ts +822 -5
  624. package/src/Config.ts +187 -8
  625. package/src/ConfigError.ts +16 -0
  626. package/src/ConfigProvider.ts +89 -1
  627. package/src/ConfigProviderPathPatch.ts +32 -0
  628. package/src/Console.ts +37 -8
  629. package/src/Context.ts +234 -3
  630. package/src/Cron.ts +16 -1
  631. package/src/Data.ts +165 -0
  632. package/src/DateTime.ts +1012 -50
  633. package/src/Deferred.ts +171 -1
  634. package/src/Differ.ts +89 -27
  635. package/src/Duration.ts +160 -17
  636. package/src/Effect.ts +4717 -164
  637. package/src/Either.ts +650 -34
  638. package/src/Equivalence.ts +24 -0
  639. package/src/ExecutionStrategy.ts +29 -10
  640. package/src/Exit.ts +252 -0
  641. package/src/Fiber.ts +182 -0
  642. package/src/FiberHandle.ts +45 -0
  643. package/src/FiberId.ts +24 -0
  644. package/src/FiberMap.ts +147 -21
  645. package/src/FiberRef.ts +80 -0
  646. package/src/FiberRefs.ts +84 -0
  647. package/src/FiberRefsPatch.ts +35 -1
  648. package/src/FiberSet.ts +41 -0
  649. package/src/Function.ts +416 -31
  650. package/src/GroupBy.ts +38 -0
  651. package/src/Hash.ts +8 -0
  652. package/src/HashMap.ts +316 -0
  653. package/src/HashSet.ts +284 -0
  654. package/src/Inspectable.ts +22 -0
  655. package/src/Iterable.ts +456 -6
  656. package/src/KeyedPool.ts +34 -0
  657. package/src/Layer.ts +475 -38
  658. package/src/List.ts +483 -4
  659. package/src/LogLevel.ts +46 -0
  660. package/src/Logger.ts +195 -4
  661. package/src/Mailbox.ts +16 -0
  662. package/src/ManagedRuntime.ts +46 -2
  663. package/src/MergeDecision.ts +8 -0
  664. package/src/MergeState.ts +8 -0
  665. package/src/MergeStrategy.ts +25 -8
  666. package/src/Metric.ts +426 -15
  667. package/src/MetricHook.ts +24 -0
  668. package/src/MetricKey.ts +62 -8
  669. package/src/MetricPolling.ts +42 -6
  670. package/src/MetricState.ts +16 -0
  671. package/src/Micro.ts +1223 -61
  672. package/src/MutableHashMap.ts +109 -2
  673. package/src/MutableHashSet.ts +28 -1
  674. package/src/MutableList.ts +40 -1
  675. package/src/MutableQueue.ts +66 -1
  676. package/src/MutableRef.ts +60 -1
  677. package/src/Number.ts +500 -16
  678. package/src/Option.ts +1042 -16
  679. package/src/Order.ts +24 -0
  680. package/src/Ordering.ts +66 -0
  681. package/src/Pipeable.ts +224 -21
  682. package/src/Pool.ts +42 -1
  683. package/src/Predicate.ts +514 -0
  684. package/src/PubSub.ts +28 -0
  685. package/src/Queue.ts +106 -2
  686. package/src/RcMap.ts +70 -0
  687. package/src/Readable.ts +18 -7
  688. package/src/Record.ts +814 -40
  689. package/src/RedBlackTree.ts +305 -1
  690. package/src/Ref.ts +88 -0
  691. package/src/RegExp.ts +17 -0
  692. package/src/Request.ts +76 -0
  693. package/src/RequestResolver.ts +145 -4
  694. package/src/Resource.ts +22 -1
  695. package/src/Runtime.ts +134 -2
  696. package/src/RuntimeFlags.ts +100 -0
  697. package/src/RuntimeFlagsPatch.ts +112 -0
  698. package/src/STM.ts +1107 -11
  699. package/src/Schedule.ts +704 -0
  700. package/src/ScheduleInterval.ts +68 -0
  701. package/src/ScheduleIntervals.ts +50 -0
  702. package/src/Scheduler.ts +2 -0
  703. package/src/Scope.ts +36 -0
  704. package/src/ScopedRef.ts +44 -1
  705. package/src/Sink.ts +464 -0
  706. package/src/SortedMap.ts +80 -1
  707. package/src/SortedSet.ts +147 -4
  708. package/src/Stream.ts +5041 -54
  709. package/src/StreamHaltStrategy.ts +29 -12
  710. package/src/String.ts +200 -0
  711. package/src/Struct.ts +86 -7
  712. package/src/Subscribable.ts +16 -0
  713. package/src/SubscriptionRef.ts +159 -11
  714. package/src/SynchronizedRef.ts +169 -8
  715. package/src/TArray.ts +431 -1
  716. package/src/TDeferred.ts +24 -0
  717. package/src/TMap.ts +381 -12
  718. package/src/TPriorityQueue.ts +60 -0
  719. package/src/TPubSub.ts +28 -0
  720. package/src/TQueue.ts +108 -0
  721. package/src/TReentrantLock.ts +36 -0
  722. package/src/TRef.ts +88 -0
  723. package/src/TSemaphore.ts +40 -0
  724. package/src/TSet.ts +280 -12
  725. package/src/Take.ts +56 -0
  726. package/src/TestAnnotationMap.ts +45 -1
  727. package/src/TestClock.ts +6 -0
  728. package/src/TestServices.ts +66 -0
  729. package/src/Trie.ts +906 -0
  730. package/src/Tuple.ts +223 -8
  731. package/src/Types.ts +41 -0
  732. package/src/Unify.ts +28 -17
  733. package/src/UpstreamPullRequest.ts +12 -0
  734. package/src/UpstreamPullStrategy.ts +12 -0
  735. package/src/Utils.ts +1 -15
  736. package/src/internal/cause.ts +4 -1
  737. package/src/internal/context.ts +7 -2
  738. package/src/internal/core-effect.ts +7 -7
  739. package/src/internal/core.ts +14 -2
  740. package/src/internal/effect/circular.ts +8 -2
  741. package/src/internal/fiberId.ts +10 -1
  742. package/src/internal/hashMap.ts +4 -1
  743. package/src/internal/hashSet.ts +4 -1
  744. package/src/internal/layer.ts +105 -38
  745. package/src/internal/mailbox.ts +3 -0
  746. package/src/internal/managedRuntime/circular.ts +6 -0
  747. package/src/internal/managedRuntime.ts +36 -22
  748. package/src/internal/option.ts +4 -1
  749. package/src/internal/pool.ts +7 -1
  750. package/src/internal/redBlackTree.ts +4 -1
  751. package/src/internal/resource.ts +16 -5
  752. package/src/internal/runtime.ts +4 -1
  753. package/src/internal/scopedRef.ts +12 -8
  754. package/src/internal/stm/core.ts +2 -3
  755. package/src/internal/stream.ts +27 -0
  756. package/src/internal/trie.ts +4 -1
  757. package/src/internal/version.ts +1 -1
package/src/Channel.ts CHANGED
@@ -215,9 +215,17 @@ export const acquireUseRelease: <Acquired, OutErr, Env, OutElem1, InElem, InErr,
215
215
  * @category constructors
216
216
  */
217
217
  export const acquireReleaseOut: {
218
+ /**
219
+ * @since 2.0.0
220
+ * @category constructors
221
+ */
218
222
  <Z, R2>(
219
223
  release: (z: Z, e: Exit.Exit<unknown, unknown>) => Effect.Effect<unknown, never, R2>
220
224
  ): <E, R>(self: Effect.Effect<Z, E, R>) => Channel<Z, unknown, E, unknown, void, unknown, R2 | R>
225
+ /**
226
+ * @since 2.0.0
227
+ * @category constructors
228
+ */
221
229
  <Z, E, R, R2>(
222
230
  self: Effect.Effect<Z, E, R>,
223
231
  release: (z: Z, e: Exit.Exit<unknown, unknown>) => Effect.Effect<unknown, never, R2>
@@ -235,11 +243,29 @@ export const acquireReleaseOut: {
235
243
  * @category mapping
236
244
  */
237
245
  export const as: {
238
- <OutDone2>(
239
- value: OutDone2
240
- ): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
246
+ /**
247
+ * Returns a new channel that is the same as this one, except the terminal
248
+ * value of the channel is the specified constant value.
249
+ *
250
+ * This method produces the same result as mapping this channel to the
251
+ * specified constant value.
252
+ *
253
+ * @since 2.0.0
254
+ * @category mapping
255
+ */
256
+ <OutDone2>(value: OutDone2): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
241
257
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
242
258
  ) => Channel<OutElem, InElem, OutErr, InErr, OutDone2, InDone, Env>
259
+ /**
260
+ * Returns a new channel that is the same as this one, except the terminal
261
+ * value of the channel is the specified constant value.
262
+ *
263
+ * This method produces the same result as mapping this channel to the
264
+ * specified constant value.
265
+ *
266
+ * @since 2.0.0
267
+ * @category mapping
268
+ */
243
269
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutDone2>(
244
270
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
245
271
  value: OutDone2
@@ -283,6 +309,14 @@ export const bufferChunk: <InElem, InErr, InDone>(
283
309
  * @category error handling
284
310
  */
285
311
  export const catchAll: {
312
+ /**
313
+ * Returns a new channel that is the same as this one, except if this channel
314
+ * errors for any typed error, then the returned channel will switch over to
315
+ * using the fallback channel returned by the specified error handler.
316
+ *
317
+ * @since 2.0.0
318
+ * @category error handling
319
+ */
286
320
  <OutErr, OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
287
321
  f: (error: OutErr) => Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>
288
322
  ): <OutElem, InElem, InErr, OutDone, InDone, Env>(
@@ -296,6 +330,14 @@ export const catchAll: {
296
330
  InDone & InDone1,
297
331
  Env1 | Env
298
332
  >
333
+ /**
334
+ * Returns a new channel that is the same as this one, except if this channel
335
+ * errors for any typed error, then the returned channel will switch over to
336
+ * using the fallback channel returned by the specified error handler.
337
+ *
338
+ * @since 2.0.0
339
+ * @category error handling
340
+ */
299
341
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
300
342
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
301
343
  f: (error: OutErr) => Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>
@@ -319,6 +361,14 @@ export const catchAll: {
319
361
  * @category error handling
320
362
  */
321
363
  export const catchAllCause: {
364
+ /**
365
+ * Returns a new channel that is the same as this one, except if this channel
366
+ * errors for any typed error, then the returned channel will switch over to
367
+ * using the fallback channel returned by the specified error handler.
368
+ *
369
+ * @since 2.0.0
370
+ * @category error handling
371
+ */
322
372
  <OutErr, OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
323
373
  f: (cause: Cause.Cause<OutErr>) => Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>
324
374
  ): <OutElem, InElem, InErr, OutDone, InDone, Env>(
@@ -332,6 +382,14 @@ export const catchAllCause: {
332
382
  InDone & InDone1,
333
383
  Env1 | Env
334
384
  >
385
+ /**
386
+ * Returns a new channel that is the same as this one, except if this channel
387
+ * errors for any typed error, then the returned channel will switch over to
388
+ * using the fallback channel returned by the specified error handler.
389
+ *
390
+ * @since 2.0.0
391
+ * @category error handling
392
+ */
335
393
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
336
394
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
337
395
  f: (cause: Cause.Cause<OutErr>) => Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>
@@ -402,11 +460,29 @@ export const concatAllWith: <
402
460
  * @category utils
403
461
  */
404
462
  export const concatMap: {
463
+ /**
464
+ * Returns a new channel whose outputs are fed to the specified factory
465
+ * function, which creates new channels in response. These new channels are
466
+ * sequentially concatenated together, and all their outputs appear as outputs
467
+ * of the newly returned channel.
468
+ *
469
+ * @since 2.0.0
470
+ * @category utils
471
+ */
405
472
  <OutElem, OutElem2, InElem2, OutErr2, InErr2, X, InDone2, Env2>(
406
473
  f: (o: OutElem) => Channel<OutElem2, InElem2, OutErr2, InErr2, X, InDone2, Env2>
407
474
  ): <Env, InErr, InElem, InDone, OutErr, OutDone>(
408
475
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
409
476
  ) => Channel<OutElem2, InElem & InElem2, OutErr2 | OutErr, InErr & InErr2, unknown, InDone & InDone2, Env2 | Env>
477
+ /**
478
+ * Returns a new channel whose outputs are fed to the specified factory
479
+ * function, which creates new channels in response. These new channels are
480
+ * sequentially concatenated together, and all their outputs appear as outputs
481
+ * of the newly returned channel.
482
+ *
483
+ * @since 2.0.0
484
+ * @category utils
485
+ */
410
486
  <Env, InErr, InElem, InDone, OutErr, OutDone, OutElem, OutElem2, Env2, InErr2, InElem2, InDone2, OutErr2, X>(
411
487
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
412
488
  f: (o: OutElem) => Channel<OutElem2, InElem2, OutErr2, InErr2, X, InDone2, Env2>
@@ -425,6 +501,17 @@ export const concatMap: {
425
501
  * @category utils
426
502
  */
427
503
  export const concatMapWith: {
504
+ /**
505
+ * Returns a new channel whose outputs are fed to the specified factory
506
+ * function, which creates new channels in response. These new channels are
507
+ * sequentially concatenated together, and all their outputs appear as outputs
508
+ * of the newly returned channel. The provided merging function is used to
509
+ * merge the terminal values of all channels into the single terminal value of
510
+ * the returned channel.
511
+ *
512
+ * @since 2.0.0
513
+ * @category utils
514
+ */
428
515
  <OutElem, OutElem2, InElem2, OutErr2, InErr2, OutDone, InDone2, Env2, OutDone2, OutDone3>(
429
516
  f: (o: OutElem) => Channel<OutElem2, InElem2, OutErr2, InErr2, OutDone, InDone2, Env2>,
430
517
  g: (o: OutDone, o1: OutDone) => OutDone,
@@ -432,6 +519,17 @@ export const concatMapWith: {
432
519
  ): <Env, InErr, InElem, InDone, OutErr>(
433
520
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone2, InDone, Env>
434
521
  ) => Channel<OutElem2, InElem & InElem2, OutErr2 | OutErr, InErr & InErr2, OutDone3, InDone & InDone2, Env2 | Env>
522
+ /**
523
+ * Returns a new channel whose outputs are fed to the specified factory
524
+ * function, which creates new channels in response. These new channels are
525
+ * sequentially concatenated together, and all their outputs appear as outputs
526
+ * of the newly returned channel. The provided merging function is used to
527
+ * merge the terminal values of all channels into the single terminal value of
528
+ * the returned channel.
529
+ *
530
+ * @since 2.0.0
531
+ * @category utils
532
+ */
435
533
  <
436
534
  OutElem,
437
535
  InElem,
@@ -468,6 +566,17 @@ export const concatMapWith: {
468
566
  * @category utils
469
567
  */
470
568
  export const concatMapWithCustom: {
569
+ /**
570
+ * Returns a new channel whose outputs are fed to the specified factory
571
+ * function, which creates new channels in response. These new channels are
572
+ * sequentially concatenated together, and all their outputs appear as outputs
573
+ * of the newly returned channel. The provided merging function is used to
574
+ * merge the terminal values of all channels into the single terminal value of
575
+ * the returned channel.
576
+ *
577
+ * @since 2.0.0
578
+ * @category utils
579
+ */
471
580
  <OutElem, OutElem2, InElem2, OutErr2, InErr2, OutDone, InDone2, Env2, OutDone2, OutDone3>(
472
581
  f: (o: OutElem) => Channel<OutElem2, InElem2, OutErr2, InErr2, OutDone, InDone2, Env2>,
473
582
  g: (o: OutDone, o1: OutDone) => OutDone,
@@ -479,6 +588,17 @@ export const concatMapWithCustom: {
479
588
  ): <Env, InErr, InElem, InDone, OutErr>(
480
589
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone2, InDone, Env>
481
590
  ) => Channel<OutElem2, InElem & InElem2, OutErr2 | OutErr, InErr & InErr2, OutDone3, InDone & InDone2, Env2 | Env>
591
+ /**
592
+ * Returns a new channel whose outputs are fed to the specified factory
593
+ * function, which creates new channels in response. These new channels are
594
+ * sequentially concatenated together, and all their outputs appear as outputs
595
+ * of the newly returned channel. The provided merging function is used to
596
+ * merge the terminal values of all channels into the single terminal value of
597
+ * the returned channel.
598
+ *
599
+ * @since 2.0.0
600
+ * @category utils
601
+ */
482
602
  <
483
603
  OutElem,
484
604
  InElem,
@@ -515,11 +635,23 @@ export const concatMapWithCustom: {
515
635
  * @category utils
516
636
  */
517
637
  export const collect: {
518
- <OutElem, OutElem2>(
519
- pf: (o: OutElem) => Option.Option<OutElem2>
520
- ): <InElem, OutErr, InErr, OutDone, InDone, Env>(
638
+ /**
639
+ * Returns a new channel, which is the same as this one, except its outputs
640
+ * are filtered and transformed by the specified partial function.
641
+ *
642
+ * @since 2.0.0
643
+ * @category utils
644
+ */
645
+ <OutElem, OutElem2>(pf: (o: OutElem) => Option.Option<OutElem2>): <InElem, OutErr, InErr, OutDone, InDone, Env>(
521
646
  self: Channel<OutElem, unknown, never, unknown, void, unknown, never>
522
647
  ) => Channel<OutElem2, InElem, OutErr, InErr, OutDone, InDone, Env>
648
+ /**
649
+ * Returns a new channel, which is the same as this one, except its outputs
650
+ * are filtered and transformed by the specified partial function.
651
+ *
652
+ * @since 2.0.0
653
+ * @category utils
654
+ */
523
655
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem2>(
524
656
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
525
657
  pf: (o: OutElem) => Option.Option<OutElem2>
@@ -554,11 +686,23 @@ export const concatOut: <OutElem, InElem, OutErr, InErr, InDone, Env, OutDone>(
554
686
  * @category utils
555
687
  */
556
688
  export const mapInput: {
557
- <InDone0, InDone>(
558
- f: (a: InDone0) => InDone
559
- ): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
689
+ /**
690
+ * Returns a new channel which is the same as this one but applies the given
691
+ * function to the input channel's done value.
692
+ *
693
+ * @since 2.0.0
694
+ * @category utils
695
+ */
696
+ <InDone0, InDone>(f: (a: InDone0) => InDone): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
560
697
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
561
698
  ) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone0, Env>
699
+ /**
700
+ * Returns a new channel which is the same as this one but applies the given
701
+ * function to the input channel's done value.
702
+ *
703
+ * @since 2.0.0
704
+ * @category utils
705
+ */
562
706
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, InDone0>(
563
707
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
564
708
  f: (a: InDone0) => InDone
@@ -573,11 +717,25 @@ export const mapInput: {
573
717
  * @category utils
574
718
  */
575
719
  export const mapInputEffect: {
720
+ /**
721
+ * Returns a new channel which is the same as this one but applies the given
722
+ * effectual function to the input channel's done value.
723
+ *
724
+ * @since 2.0.0
725
+ * @category utils
726
+ */
576
727
  <InDone0, InDone, InErr, Env1>(
577
728
  f: (i: InDone0) => Effect.Effect<InDone, InErr, Env1>
578
729
  ): <OutElem, InElem, OutErr, OutDone, Env>(
579
730
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
580
731
  ) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone0, Env1 | Env>
732
+ /**
733
+ * Returns a new channel which is the same as this one but applies the given
734
+ * effectual function to the input channel's done value.
735
+ *
736
+ * @since 2.0.0
737
+ * @category utils
738
+ */
581
739
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, InDone0, Env1>(
582
740
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
583
741
  f: (i: InDone0) => Effect.Effect<InDone, InErr, Env1>
@@ -592,11 +750,23 @@ export const mapInputEffect: {
592
750
  * @category utils
593
751
  */
594
752
  export const mapInputError: {
595
- <InErr0, InErr>(
596
- f: (a: InErr0) => InErr
597
- ): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
753
+ /**
754
+ * Returns a new channel which is the same as this one but applies the given
755
+ * function to the input channel's error value.
756
+ *
757
+ * @since 2.0.0
758
+ * @category utils
759
+ */
760
+ <InErr0, InErr>(f: (a: InErr0) => InErr): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
598
761
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
599
762
  ) => Channel<OutElem, InElem, OutErr, InErr0, OutDone, InDone, Env>
763
+ /**
764
+ * Returns a new channel which is the same as this one but applies the given
765
+ * function to the input channel's error value.
766
+ *
767
+ * @since 2.0.0
768
+ * @category utils
769
+ */
600
770
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, InErr0>(
601
771
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
602
772
  f: (a: InErr0) => InErr
@@ -611,11 +781,25 @@ export const mapInputError: {
611
781
  * @category utils
612
782
  */
613
783
  export const mapInputErrorEffect: {
784
+ /**
785
+ * Returns a new channel which is the same as this one but applies the given
786
+ * effectual function to the input channel's error value.
787
+ *
788
+ * @since 2.0.0
789
+ * @category utils
790
+ */
614
791
  <InErr0, InDone, InErr, Env1>(
615
792
  f: (error: InErr0) => Effect.Effect<InDone, InErr, Env1>
616
793
  ): <OutElem, InElem, OutErr, OutDone, Env>(
617
794
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
618
795
  ) => Channel<OutElem, InElem, OutErr, InErr0, OutDone, InDone, Env1 | Env>
796
+ /**
797
+ * Returns a new channel which is the same as this one but applies the given
798
+ * effectual function to the input channel's error value.
799
+ *
800
+ * @since 2.0.0
801
+ * @category utils
802
+ */
619
803
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, InErr0, Env1>(
620
804
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
621
805
  f: (error: InErr0) => Effect.Effect<InDone, InErr, Env1>
@@ -630,11 +814,23 @@ export const mapInputErrorEffect: {
630
814
  * @category utils
631
815
  */
632
816
  export const mapInputIn: {
633
- <InElem0, InElem>(
634
- f: (a: InElem0) => InElem
635
- ): <OutElem, OutErr, InErr, OutDone, InDone, Env>(
817
+ /**
818
+ * Returns a new channel which is the same as this one but applies the given
819
+ * function to the input channel's output elements.
820
+ *
821
+ * @since 2.0.0
822
+ * @category utils
823
+ */
824
+ <InElem0, InElem>(f: (a: InElem0) => InElem): <OutElem, OutErr, InErr, OutDone, InDone, Env>(
636
825
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
637
826
  ) => Channel<OutElem, InElem0, OutErr, InErr, OutDone, InDone, Env>
827
+ /**
828
+ * Returns a new channel which is the same as this one but applies the given
829
+ * function to the input channel's output elements.
830
+ *
831
+ * @since 2.0.0
832
+ * @category utils
833
+ */
638
834
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, InElem0>(
639
835
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
640
836
  f: (a: InElem0) => InElem
@@ -649,11 +845,25 @@ export const mapInputIn: {
649
845
  * @category utils
650
846
  */
651
847
  export const mapInputInEffect: {
848
+ /**
849
+ * Returns a new channel which is the same as this one but applies the given
850
+ * effectual function to the input channel's output elements.
851
+ *
852
+ * @since 2.0.0
853
+ * @category utils
854
+ */
652
855
  <InElem0, InElem, InErr, Env1>(
653
856
  f: (a: InElem0) => Effect.Effect<InElem, InErr, Env1>
654
857
  ): <OutElem, OutErr, OutDone, InDone, Env>(
655
858
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
656
859
  ) => Channel<OutElem, InElem0, OutErr, InErr, OutDone, InDone, Env1 | Env>
860
+ /**
861
+ * Returns a new channel which is the same as this one but applies the given
862
+ * effectual function to the input channel's output elements.
863
+ *
864
+ * @since 2.0.0
865
+ * @category utils
866
+ */
657
867
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, InElem0, Env1>(
658
868
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
659
869
  f: (a: InElem0) => Effect.Effect<InElem, InErr, Env1>
@@ -695,11 +905,25 @@ export const drain: <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
695
905
  * @category utils
696
906
  */
697
907
  export const embedInput: {
908
+ /**
909
+ * Returns a new channel which connects the given `AsyncInputProducer` as
910
+ * this channel's input.
911
+ *
912
+ * @since 2.0.0
913
+ * @category utils
914
+ */
698
915
  <InErr, InElem, InDone>(
699
916
  input: SingleProducerAsyncInput.AsyncInputProducer<InErr, InElem, InDone>
700
917
  ): <OutElem, OutErr, OutDone, Env>(
701
918
  self: Channel<OutElem, unknown, OutErr, unknown, OutDone, unknown, Env>
702
919
  ) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
920
+ /**
921
+ * Returns a new channel which connects the given `AsyncInputProducer` as
922
+ * this channel's input.
923
+ *
924
+ * @since 2.0.0
925
+ * @category utils
926
+ */
703
927
  <OutElem, OutErr, OutDone, Env, InErr, InElem, InDone>(
704
928
  self: Channel<OutElem, unknown, OutErr, unknown, OutDone, unknown, Env>,
705
929
  input: SingleProducerAsyncInput.AsyncInputProducer<InErr, InElem, InDone>
@@ -726,11 +950,25 @@ export const emitCollect: <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
726
950
  * @category utils
727
951
  */
728
952
  export const ensuring: {
729
- <Z, Env1>(
730
- finalizer: Effect.Effect<Z, never, Env1>
731
- ): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
953
+ /**
954
+ * Returns a new channel with an attached finalizer. The finalizer is
955
+ * guaranteed to be executed so long as the channel begins execution (and
956
+ * regardless of whether or not it completes).
957
+ *
958
+ * @since 2.0.0
959
+ * @category utils
960
+ */
961
+ <Z, Env1>(finalizer: Effect.Effect<Z, never, Env1>): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
732
962
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
733
963
  ) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env1 | Env>
964
+ /**
965
+ * Returns a new channel with an attached finalizer. The finalizer is
966
+ * guaranteed to be executed so long as the channel begins execution (and
967
+ * regardless of whether or not it completes).
968
+ *
969
+ * @since 2.0.0
970
+ * @category utils
971
+ */
734
972
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, Z, Env1>(
735
973
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
736
974
  finalizer: Effect.Effect<Z, never, Env1>
@@ -746,11 +984,27 @@ export const ensuring: {
746
984
  * @category utils
747
985
  */
748
986
  export const ensuringWith: {
987
+ /**
988
+ * Returns a new channel with an attached finalizer. The finalizer is
989
+ * guaranteed to be executed so long as the channel begins execution (and
990
+ * regardless of whether or not it completes).
991
+ *
992
+ * @since 2.0.0
993
+ * @category utils
994
+ */
749
995
  <OutDone, OutErr, Env2>(
750
996
  finalizer: (e: Exit.Exit<OutDone, OutErr>) => Effect.Effect<unknown, never, Env2>
751
997
  ): <OutElem, InElem, InErr, InDone, Env>(
752
998
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
753
999
  ) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env2 | Env>
1000
+ /**
1001
+ * Returns a new channel with an attached finalizer. The finalizer is
1002
+ * guaranteed to be executed so long as the channel begins execution (and
1003
+ * regardless of whether or not it completes).
1004
+ *
1005
+ * @since 2.0.0
1006
+ * @category utils
1007
+ */
754
1008
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, Env2>(
755
1009
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
756
1010
  finalizer: (e: Exit.Exit<OutDone, OutErr>) => Effect.Effect<unknown, never, Env2>
@@ -844,6 +1098,16 @@ export const failCauseSync: <E>(
844
1098
  * @category sequencing
845
1099
  */
846
1100
  export const flatMap: {
1101
+ /**
1102
+ * Returns a new channel, which sequentially combines this channel, together
1103
+ * with the provided factory function, which creates a second channel based on
1104
+ * the terminal value of this channel. The result is a channel that will first
1105
+ * perform the functions of this channel, before performing the functions of
1106
+ * the created channel (including yielding its terminal value).
1107
+ *
1108
+ * @since 2.0.0
1109
+ * @category sequencing
1110
+ */
847
1111
  <OutDone, OutElem1, InElem1, OutErr1, InErr1, OutDone2, InDone1, Env1>(
848
1112
  f: (d: OutDone) => Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone2, InDone1, Env1>
849
1113
  ): <OutElem, InElem, OutErr, InErr, InDone, Env>(
@@ -857,6 +1121,16 @@ export const flatMap: {
857
1121
  InDone & InDone1,
858
1122
  Env1 | Env
859
1123
  >
1124
+ /**
1125
+ * Returns a new channel, which sequentially combines this channel, together
1126
+ * with the provided factory function, which creates a second channel based on
1127
+ * the terminal value of this channel. The result is a channel that will first
1128
+ * perform the functions of this channel, before performing the functions of
1129
+ * the created channel (including yielding its terminal value).
1130
+ *
1131
+ * @since 2.0.0
1132
+ * @category sequencing
1133
+ */
860
1134
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, InElem1, OutErr1, InErr1, OutDone2, InDone1, Env1>(
861
1135
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
862
1136
  f: (d: OutDone) => Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone2, InDone1, Env1>
@@ -920,6 +1194,12 @@ export const flatten: <
920
1194
  * @category utils
921
1195
  */
922
1196
  export const foldChannel: {
1197
+ /**
1198
+ * Folds over the result of this channel.
1199
+ *
1200
+ * @since 2.0.0
1201
+ * @category utils
1202
+ */
923
1203
  <
924
1204
  OutErr,
925
1205
  OutElem1,
@@ -953,6 +1233,12 @@ export const foldChannel: {
953
1233
  InDone & InDone1 & InDone2,
954
1234
  Env1 | Env2 | Env
955
1235
  >
1236
+ /**
1237
+ * Folds over the result of this channel.
1238
+ *
1239
+ * @since 2.0.0
1240
+ * @category utils
1241
+ */
956
1242
  <
957
1243
  OutElem,
958
1244
  InElem,
@@ -999,6 +1285,12 @@ export const foldChannel: {
999
1285
  * @category utils
1000
1286
  */
1001
1287
  export const foldCauseChannel: {
1288
+ /**
1289
+ * Folds over the result of this channel including any cause of termination.
1290
+ *
1291
+ * @since 2.0.0
1292
+ * @category utils
1293
+ */
1002
1294
  <
1003
1295
  OutErr,
1004
1296
  OutElem1,
@@ -1034,6 +1326,12 @@ export const foldCauseChannel: {
1034
1326
  InDone & InDone1 & InDone2,
1035
1327
  Env1 | Env2 | Env
1036
1328
  >
1329
+ /**
1330
+ * Folds over the result of this channel including any cause of termination.
1331
+ *
1332
+ * @since 2.0.0
1333
+ * @category utils
1334
+ */
1037
1335
  <
1038
1336
  OutElem,
1039
1337
  InElem,
@@ -1163,11 +1461,35 @@ export const identity: <Elem, Err, Done>() => Channel<Elem, Elem, Err, Err, Done
1163
1461
  * @category utils
1164
1462
  */
1165
1463
  export const interruptWhen: {
1464
+ /**
1465
+ * Returns a new channel, which is the same as this one, except it will be
1466
+ * interrupted when the specified effect completes. If the effect completes
1467
+ * successfully before the underlying channel is done, then the returned
1468
+ * channel will yield the success value of the effect as its terminal value.
1469
+ * On the other hand, if the underlying channel finishes first, then the
1470
+ * returned channel will yield the success value of the underlying channel as
1471
+ * its terminal value.
1472
+ *
1473
+ * @since 2.0.0
1474
+ * @category utils
1475
+ */
1166
1476
  <OutDone1, OutErr1, Env1>(
1167
1477
  effect: Effect.Effect<OutDone1, OutErr1, Env1>
1168
1478
  ): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
1169
1479
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1170
1480
  ) => Channel<OutElem, InElem, OutErr1 | OutErr, InErr, OutDone1 | OutDone, InDone, Env1 | Env>
1481
+ /**
1482
+ * Returns a new channel, which is the same as this one, except it will be
1483
+ * interrupted when the specified effect completes. If the effect completes
1484
+ * successfully before the underlying channel is done, then the returned
1485
+ * channel will yield the success value of the effect as its terminal value.
1486
+ * On the other hand, if the underlying channel finishes first, then the
1487
+ * returned channel will yield the success value of the underlying channel as
1488
+ * its terminal value.
1489
+ *
1490
+ * @since 2.0.0
1491
+ * @category utils
1492
+ */
1171
1493
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutDone1, OutErr1, Env1>(
1172
1494
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1173
1495
  effect: Effect.Effect<OutDone1, OutErr1, Env1>
@@ -1186,11 +1508,33 @@ export const interruptWhen: {
1186
1508
  * @category utils
1187
1509
  */
1188
1510
  export const interruptWhenDeferred: {
1511
+ /**
1512
+ * Returns a new channel, which is the same as this one, except it will be
1513
+ * interrupted when the specified deferred is completed. If the deferred is
1514
+ * completed before the underlying channel is done, then the returned channel
1515
+ * will yield the value of the deferred. Otherwise, if the underlying channel
1516
+ * finishes first, then the returned channel will yield the value of the
1517
+ * underlying channel.
1518
+ *
1519
+ * @since 2.0.0
1520
+ * @category utils
1521
+ */
1189
1522
  <OutDone1, OutErr1>(
1190
1523
  deferred: Deferred.Deferred<OutDone1, OutErr1>
1191
1524
  ): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
1192
1525
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1193
1526
  ) => Channel<OutElem, InElem, OutErr1 | OutErr, InErr, OutDone1 | OutDone, InDone, Env>
1527
+ /**
1528
+ * Returns a new channel, which is the same as this one, except it will be
1529
+ * interrupted when the specified deferred is completed. If the deferred is
1530
+ * completed before the underlying channel is done, then the returned channel
1531
+ * will yield the value of the deferred. Otherwise, if the underlying channel
1532
+ * finishes first, then the returned channel will yield the value of the
1533
+ * underlying channel.
1534
+ *
1535
+ * @since 2.0.0
1536
+ * @category utils
1537
+ */
1194
1538
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutDone1, OutErr1>(
1195
1539
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1196
1540
  deferred: Deferred.Deferred<OutDone1, OutErr1>
@@ -1206,11 +1550,25 @@ export const interruptWhenDeferred: {
1206
1550
  * @category mapping
1207
1551
  */
1208
1552
  export const map: {
1209
- <OutDone, OutDone2>(
1210
- f: (out: OutDone) => OutDone2
1211
- ): <OutElem, InElem, OutErr, InErr, InDone, Env>(
1553
+ /**
1554
+ * Returns a new channel, which is the same as this one, except the terminal
1555
+ * value of the returned channel is created by applying the specified function
1556
+ * to the terminal value of this channel.
1557
+ *
1558
+ * @since 2.0.0
1559
+ * @category mapping
1560
+ */
1561
+ <OutDone, OutDone2>(f: (out: OutDone) => OutDone2): <OutElem, InElem, OutErr, InErr, InDone, Env>(
1212
1562
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1213
1563
  ) => Channel<OutElem, InElem, OutErr, InErr, OutDone2, InDone, Env>
1564
+ /**
1565
+ * Returns a new channel, which is the same as this one, except the terminal
1566
+ * value of the returned channel is created by applying the specified function
1567
+ * to the terminal value of this channel.
1568
+ *
1569
+ * @since 2.0.0
1570
+ * @category mapping
1571
+ */
1214
1572
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutDone2>(
1215
1573
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1216
1574
  f: (out: OutDone) => OutDone2
@@ -1226,11 +1584,27 @@ export const map: {
1226
1584
  * @category mapping
1227
1585
  */
1228
1586
  export const mapEffect: {
1587
+ /**
1588
+ * Returns a new channel, which is the same as this one, except the terminal
1589
+ * value of the returned channel is created by applying the specified
1590
+ * effectful function to the terminal value of this channel.
1591
+ *
1592
+ * @since 2.0.0
1593
+ * @category mapping
1594
+ */
1229
1595
  <OutDone, OutDone1, OutErr1, Env1>(
1230
1596
  f: (o: OutDone) => Effect.Effect<OutDone1, OutErr1, Env1>
1231
1597
  ): <OutElem, InElem, OutErr, InErr, InDone, Env>(
1232
1598
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1233
1599
  ) => Channel<OutElem, InElem, OutErr1 | OutErr, InErr, OutDone1, InDone, Env1 | Env>
1600
+ /**
1601
+ * Returns a new channel, which is the same as this one, except the terminal
1602
+ * value of the returned channel is created by applying the specified
1603
+ * effectful function to the terminal value of this channel.
1604
+ *
1605
+ * @since 2.0.0
1606
+ * @category mapping
1607
+ */
1234
1608
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutDone1, OutErr1, Env1>(
1235
1609
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1236
1610
  f: (o: OutDone) => Effect.Effect<OutDone1, OutErr1, Env1>
@@ -1246,11 +1620,25 @@ export const mapEffect: {
1246
1620
  * @category mapping
1247
1621
  */
1248
1622
  export const mapError: {
1249
- <OutErr, OutErr2>(
1250
- f: (err: OutErr) => OutErr2
1251
- ): <OutElem, InElem, InErr, OutDone, InDone, Env>(
1623
+ /**
1624
+ * Returns a new channel, which is the same as this one, except the failure
1625
+ * value of the returned channel is created by applying the specified function
1626
+ * to the failure value of this channel.
1627
+ *
1628
+ * @since 2.0.0
1629
+ * @category mapping
1630
+ */
1631
+ <OutErr, OutErr2>(f: (err: OutErr) => OutErr2): <OutElem, InElem, InErr, OutDone, InDone, Env>(
1252
1632
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1253
1633
  ) => Channel<OutElem, InElem, OutErr2, InErr, OutDone, InDone, Env>
1634
+ /**
1635
+ * Returns a new channel, which is the same as this one, except the failure
1636
+ * value of the returned channel is created by applying the specified function
1637
+ * to the failure value of this channel.
1638
+ *
1639
+ * @since 2.0.0
1640
+ * @category mapping
1641
+ */
1254
1642
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutErr2>(
1255
1643
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1256
1644
  f: (err: OutErr) => OutErr2
@@ -1265,11 +1653,25 @@ export const mapError: {
1265
1653
  * @category mapping
1266
1654
  */
1267
1655
  export const mapErrorCause: {
1656
+ /**
1657
+ * A more powerful version of `mapError` which also surfaces the `Cause`
1658
+ * of the channel failure.
1659
+ *
1660
+ * @since 2.0.0
1661
+ * @category mapping
1662
+ */
1268
1663
  <OutErr, OutErr2>(
1269
1664
  f: (cause: Cause.Cause<OutErr>) => Cause.Cause<OutErr2>
1270
1665
  ): <OutElem, InElem, InErr, OutDone, InDone, Env>(
1271
1666
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1272
1667
  ) => Channel<OutElem, InElem, OutErr2, InErr, OutDone, InDone, Env>
1668
+ /**
1669
+ * A more powerful version of `mapError` which also surfaces the `Cause`
1670
+ * of the channel failure.
1671
+ *
1672
+ * @since 2.0.0
1673
+ * @category mapping
1674
+ */
1273
1675
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutErr2>(
1274
1676
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1275
1677
  f: (cause: Cause.Cause<OutErr>) => Cause.Cause<OutErr2>
@@ -1283,11 +1685,21 @@ export const mapErrorCause: {
1283
1685
  * @category mapping
1284
1686
  */
1285
1687
  export const mapOut: {
1286
- <OutElem, OutElem2>(
1287
- f: (o: OutElem) => OutElem2
1288
- ): <InElem, OutErr, InErr, OutDone, InDone, Env>(
1688
+ /**
1689
+ * Maps the output of this channel using the specified function.
1690
+ *
1691
+ * @since 2.0.0
1692
+ * @category mapping
1693
+ */
1694
+ <OutElem, OutElem2>(f: (o: OutElem) => OutElem2): <InElem, OutErr, InErr, OutDone, InDone, Env>(
1289
1695
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1290
1696
  ) => Channel<OutElem2, InElem, OutErr, InErr, OutDone, InDone, Env>
1697
+ /**
1698
+ * Maps the output of this channel using the specified function.
1699
+ *
1700
+ * @since 2.0.0
1701
+ * @category mapping
1702
+ */
1291
1703
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem2>(
1292
1704
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1293
1705
  f: (o: OutElem) => OutElem2
@@ -1302,11 +1714,25 @@ export const mapOut: {
1302
1714
  * @category mapping
1303
1715
  */
1304
1716
  export const mapOutEffect: {
1717
+ /**
1718
+ * Creates a channel that is like this channel but the given effectful function
1719
+ * gets applied to each emitted output element.
1720
+ *
1721
+ * @since 2.0.0
1722
+ * @category mapping
1723
+ */
1305
1724
  <OutElem, OutElem1, OutErr1, Env1>(
1306
1725
  f: (o: OutElem) => Effect.Effect<OutElem1, OutErr1, Env1>
1307
1726
  ): <InElem, OutErr, InErr, OutDone, InDone, Env>(
1308
1727
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1309
1728
  ) => Channel<OutElem1, InElem, OutErr1 | OutErr, InErr, OutDone, InDone, Env1 | Env>
1729
+ /**
1730
+ * Creates a channel that is like this channel but the given effectful function
1731
+ * gets applied to each emitted output element.
1732
+ *
1733
+ * @since 2.0.0
1734
+ * @category mapping
1735
+ */
1310
1736
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, OutErr1, Env1>(
1311
1737
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1312
1738
  f: (o: OutElem) => Effect.Effect<OutElem1, OutErr1, Env1>
@@ -1322,12 +1748,28 @@ export const mapOutEffect: {
1322
1748
  * @category mapping
1323
1749
  */
1324
1750
  export const mapOutEffectPar: {
1751
+ /**
1752
+ * Creates a channel that is like this channel but the given ZIO function gets
1753
+ * applied to each emitted output element, taking `n` elements at once and
1754
+ * mapping them in parallel.
1755
+ *
1756
+ * @since 2.0.0
1757
+ * @category mapping
1758
+ */
1325
1759
  <OutElem, OutElem1, OutErr1, Env1>(
1326
1760
  f: (o: OutElem) => Effect.Effect<OutElem1, OutErr1, Env1>,
1327
1761
  n: number
1328
1762
  ): <InElem, OutErr, InErr, OutDone, InDone, Env>(
1329
1763
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1330
1764
  ) => Channel<OutElem1, InElem, OutErr1 | OutErr, InErr, OutDone, InDone, Env1 | Env>
1765
+ /**
1766
+ * Creates a channel that is like this channel but the given ZIO function gets
1767
+ * applied to each emitted output element, taking `n` elements at once and
1768
+ * mapping them in parallel.
1769
+ *
1770
+ * @since 2.0.0
1771
+ * @category mapping
1772
+ */
1331
1773
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, OutErr1, Env1>(
1332
1774
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1333
1775
  f: (o: OutElem) => Effect.Effect<OutElem1, OutErr1, Env1>,
@@ -1442,6 +1884,17 @@ export const mergeAllWith: (
1442
1884
  * @category mapping
1443
1885
  */
1444
1886
  export const mergeMap: {
1887
+ /**
1888
+ * Returns a new channel which creates a new channel for each emitted element
1889
+ * and merges some of them together. Different merge strategies control what
1890
+ * happens if there are more than the given maximum number of channels gets
1891
+ * created. See `Channel.mergeAll`.
1892
+ *
1893
+ * @param n The maximum number of channels to merge.
1894
+ * @param f The function that creates a new channel from each emitted element.
1895
+ * @since 2.0.0
1896
+ * @category mapping
1897
+ */
1445
1898
  <OutElem, OutElem1, InElem1, OutErr1, InErr1, Z, InDone1, Env1>(
1446
1899
  f: (outElem: OutElem) => Channel<OutElem1, InElem1, OutErr1, InErr1, Z, InDone1, Env1>,
1447
1900
  options: {
@@ -1452,6 +1905,17 @@ export const mergeMap: {
1452
1905
  ): <InElem, OutErr, InErr, OutDone, InDone, Env>(
1453
1906
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1454
1907
  ) => Channel<OutElem1, InElem & InElem1, OutErr1 | OutErr, InErr & InErr1, unknown, InDone & InDone1, Env1 | Env>
1908
+ /**
1909
+ * Returns a new channel which creates a new channel for each emitted element
1910
+ * and merges some of them together. Different merge strategies control what
1911
+ * happens if there are more than the given maximum number of channels gets
1912
+ * created. See `Channel.mergeAll`.
1913
+ *
1914
+ * @param n The maximum number of channels to merge.
1915
+ * @param f The function that creates a new channel from each emitted element.
1916
+ * @since 2.0.0
1917
+ * @category mapping
1918
+ */
1455
1919
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, InElem1, OutErr1, InErr1, Z, InDone1, Env1>(
1456
1920
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1457
1921
  f: (outElem: OutElem) => Channel<OutElem1, InElem1, OutErr1, InErr1, Z, InDone1, Env1>,
@@ -1471,9 +1935,14 @@ export const mergeMap: {
1471
1935
  * @category utils
1472
1936
  */
1473
1937
  export const mergeOut: {
1474
- (
1475
- n: number
1476
- ): <OutElem1, InElem1, OutErr1, InErr1, Z, InDone1, Env1, InElem, OutErr, InErr, OutDone, InDone, Env>(
1938
+ /**
1939
+ * Returns a new channel which merges a number of channels emitted by this
1940
+ * channel using the back pressuring merge strategy. See `Channel.mergeAll`.
1941
+ *
1942
+ * @since 2.0.0
1943
+ * @category utils
1944
+ */
1945
+ (n: number): <OutElem1, InElem1, OutErr1, InErr1, Z, InDone1, Env1, InElem, OutErr, InErr, OutDone, InDone, Env>(
1477
1946
  self: Channel<
1478
1947
  Channel<OutElem1, InElem1, OutErr1, InErr1, Z, InDone1, Env1>,
1479
1948
  InElem,
@@ -1484,6 +1953,13 @@ export const mergeOut: {
1484
1953
  Env
1485
1954
  >
1486
1955
  ) => Channel<OutElem1, InElem & InElem1, OutErr1 | OutErr, InErr & InErr1, unknown, InDone & InDone1, Env1 | Env>
1956
+ /**
1957
+ * Returns a new channel which merges a number of channels emitted by this
1958
+ * channel using the back pressuring merge strategy. See `Channel.mergeAll`.
1959
+ *
1960
+ * @since 2.0.0
1961
+ * @category utils
1962
+ */
1487
1963
  <OutElem1, InElem1, OutErr1, InErr1, Z, InDone1, Env1, InElem, OutErr, InErr, OutDone, InDone, Env>(
1488
1964
  self: Channel<
1489
1965
  Channel<OutElem1, InElem1, OutErr1, InErr1, Z, InDone1, Env1>,
@@ -1508,6 +1984,15 @@ export const mergeOut: {
1508
1984
  * @category utils
1509
1985
  */
1510
1986
  export const mergeOutWith: {
1987
+ /**
1988
+ * Returns a new channel which merges a number of channels emitted by this
1989
+ * channel using the back pressuring merge strategy and uses a given function
1990
+ * to merge each completed subchannel's result value. See
1991
+ * `Channel.mergeAll`.
1992
+ *
1993
+ * @since 2.0.0
1994
+ * @category utils
1995
+ */
1511
1996
  <OutDone1>(
1512
1997
  n: number,
1513
1998
  f: (o1: OutDone1, o2: OutDone1) => OutDone1
@@ -1522,6 +2007,15 @@ export const mergeOutWith: {
1522
2007
  Env
1523
2008
  >
1524
2009
  ) => Channel<OutElem1, InElem & InElem1, OutErr1 | OutErr, InErr & InErr1, OutDone1, InDone & InDone1, Env1 | Env>
2010
+ /**
2011
+ * Returns a new channel which merges a number of channels emitted by this
2012
+ * channel using the back pressuring merge strategy and uses a given function
2013
+ * to merge each completed subchannel's result value. See
2014
+ * `Channel.mergeAll`.
2015
+ *
2016
+ * @since 2.0.0
2017
+ * @category utils
2018
+ */
1525
2019
  <OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1, InElem, OutErr, InErr, InDone, Env>(
1526
2020
  self: Channel<
1527
2021
  Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>,
@@ -1547,6 +2041,15 @@ export const mergeOutWith: {
1547
2041
  * @category utils
1548
2042
  */
1549
2043
  export const mergeWith: {
2044
+ /**
2045
+ * Returns a new channel, which is the merge of this channel and the specified
2046
+ * channel, where the behavior of the returned channel on left or right early
2047
+ * termination is decided by the specified `leftDone` and `rightDone` merge
2048
+ * decisions.
2049
+ *
2050
+ * @since 2.0.0
2051
+ * @category utils
2052
+ */
1550
2053
  <OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1, OutDone, OutErr, OutErr2, OutDone2, OutErr3, OutDone3>(
1551
2054
  options: {
1552
2055
  readonly other: Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>
@@ -1568,6 +2071,15 @@ export const mergeWith: {
1568
2071
  InDone & InDone1,
1569
2072
  Env1 | Env
1570
2073
  >
2074
+ /**
2075
+ * Returns a new channel, which is the merge of this channel and the specified
2076
+ * channel, where the behavior of the returned channel on left or right early
2077
+ * termination is decided by the specified `leftDone` and `rightDone` merge
2078
+ * decisions.
2079
+ *
2080
+ * @since 2.0.0
2081
+ * @category utils
2082
+ */
1571
2083
  <
1572
2084
  OutElem,
1573
2085
  InElem,
@@ -1625,11 +2137,23 @@ export const never: Channel<never, unknown, never, unknown, never, unknown> = ch
1625
2137
  * @category error handling
1626
2138
  */
1627
2139
  export const orDie: {
1628
- <E>(
1629
- error: LazyArg<E>
1630
- ): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
2140
+ /**
2141
+ * Translates channel failure into death of the fiber, making all failures
2142
+ * unchecked and not a part of the type of the channel.
2143
+ *
2144
+ * @since 2.0.0
2145
+ * @category error handling
2146
+ */
2147
+ <E>(error: LazyArg<E>): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
1631
2148
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1632
2149
  ) => Channel<OutElem, InElem, never, InErr, OutDone, InDone, Env>
2150
+ /**
2151
+ * Translates channel failure into death of the fiber, making all failures
2152
+ * unchecked and not a part of the type of the channel.
2153
+ *
2154
+ * @since 2.0.0
2155
+ * @category error handling
2156
+ */
1633
2157
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, E>(
1634
2158
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1635
2159
  error: LazyArg<E>
@@ -1644,11 +2168,23 @@ export const orDie: {
1644
2168
  * @category error handling
1645
2169
  */
1646
2170
  export const orDieWith: {
1647
- <OutErr>(
1648
- f: (e: OutErr) => unknown
1649
- ): <OutElem, InElem, InErr, OutDone, InDone, Env>(
2171
+ /**
2172
+ * Keeps none of the errors, and terminates the fiber with them, using the
2173
+ * specified function to convert the `OutErr` into a defect.
2174
+ *
2175
+ * @since 2.0.0
2176
+ * @category error handling
2177
+ */
2178
+ <OutErr>(f: (e: OutErr) => unknown): <OutElem, InElem, InErr, OutDone, InDone, Env>(
1650
2179
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1651
2180
  ) => Channel<OutElem, InElem, never, InErr, OutDone, InDone, Env>
2181
+ /**
2182
+ * Keeps none of the errors, and terminates the fiber with them, using the
2183
+ * specified function to convert the `OutErr` into a defect.
2184
+ *
2185
+ * @since 2.0.0
2186
+ * @category error handling
2187
+ */
1652
2188
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
1653
2189
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1654
2190
  f: (e: OutErr) => unknown
@@ -1664,6 +2200,14 @@ export const orDieWith: {
1664
2200
  * @category error handling
1665
2201
  */
1666
2202
  export const orElse: {
2203
+ /**
2204
+ * Returns a new channel that will perform the operations of this one, until
2205
+ * failure, and then it will switch over to the operations of the specified
2206
+ * fallback channel.
2207
+ *
2208
+ * @since 2.0.0
2209
+ * @category error handling
2210
+ */
1667
2211
  <OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
1668
2212
  that: LazyArg<Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>>
1669
2213
  ): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
@@ -1677,6 +2221,14 @@ export const orElse: {
1677
2221
  InDone & InDone1,
1678
2222
  Env1 | Env
1679
2223
  >
2224
+ /**
2225
+ * Returns a new channel that will perform the operations of this one, until
2226
+ * failure, and then it will switch over to the operations of the specified
2227
+ * fallback channel.
2228
+ *
2229
+ * @since 2.0.0
2230
+ * @category error handling
2231
+ */
1680
2232
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
1681
2233
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1682
2234
  that: LazyArg<Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>>
@@ -1701,11 +2253,29 @@ export const orElse: {
1701
2253
  * @category utils
1702
2254
  */
1703
2255
  export const pipeTo: {
2256
+ /**
2257
+ * Returns a new channel that pipes the output of this channel into the
2258
+ * specified channel. The returned channel has the input type of this channel,
2259
+ * and the output type of the specified channel, terminating with the value of
2260
+ * the specified channel.
2261
+ *
2262
+ * @since 2.0.0
2263
+ * @category utils
2264
+ */
1704
2265
  <OutElem2, OutElem, OutErr2, OutErr, OutDone2, OutDone, Env2>(
1705
2266
  that: Channel<OutElem2, OutElem, OutErr2, OutErr, OutDone2, OutDone, Env2>
1706
2267
  ): <InElem, InErr, InDone, Env>(
1707
2268
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1708
2269
  ) => Channel<OutElem2, InElem, OutErr2, InErr, OutDone2, InDone, Env2 | Env>
2270
+ /**
2271
+ * Returns a new channel that pipes the output of this channel into the
2272
+ * specified channel. The returned channel has the input type of this channel,
2273
+ * and the output type of the specified channel, terminating with the value of
2274
+ * the specified channel.
2275
+ *
2276
+ * @since 2.0.0
2277
+ * @category utils
2278
+ */
1709
2279
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem2, OutErr2, OutDone2, Env2>(
1710
2280
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1711
2281
  that: Channel<OutElem2, OutElem, OutErr2, OutErr, OutDone2, OutDone, Env2>
@@ -1721,11 +2291,27 @@ export const pipeTo: {
1721
2291
  * @category utils
1722
2292
  */
1723
2293
  export const pipeToOrFail: {
2294
+ /**
2295
+ * Returns a new channel that pipes the output of this channel into the
2296
+ * specified channel and preserves this channel's failures without providing
2297
+ * them to the other channel for observation.
2298
+ *
2299
+ * @since 2.0.0
2300
+ * @category utils
2301
+ */
1724
2302
  <OutElem2, OutElem, OutErr2, OutDone2, OutDone, Env2>(
1725
2303
  that: Channel<OutElem2, OutElem, OutErr2, never, OutDone2, OutDone, Env2>
1726
2304
  ): <InElem, OutErr, InErr, InDone, Env>(
1727
2305
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1728
2306
  ) => Channel<OutElem2, InElem, OutErr2 | OutErr, InErr, OutDone2, InDone, Env2 | Env>
2307
+ /**
2308
+ * Returns a new channel that pipes the output of this channel into the
2309
+ * specified channel and preserves this channel's failures without providing
2310
+ * them to the other channel for observation.
2311
+ *
2312
+ * @since 2.0.0
2313
+ * @category utils
2314
+ */
1729
2315
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem2, OutErr2, OutDone2, Env2>(
1730
2316
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1731
2317
  that: Channel<OutElem2, OutElem, OutErr2, never, OutDone2, OutDone, Env2>
@@ -1740,11 +2326,23 @@ export const pipeToOrFail: {
1740
2326
  * @category context
1741
2327
  */
1742
2328
  export const provideContext: {
1743
- <Env>(
1744
- env: Context.Context<Env>
1745
- ): <OutElem, InElem, OutErr, InErr, OutDone, InDone>(
2329
+ /**
2330
+ * Provides the channel with its required context, which eliminates its
2331
+ * dependency on `Env`.
2332
+ *
2333
+ * @since 2.0.0
2334
+ * @category context
2335
+ */
2336
+ <Env>(env: Context.Context<Env>): <OutElem, InElem, OutErr, InErr, OutDone, InDone>(
1746
2337
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1747
2338
  ) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, never>
2339
+ /**
2340
+ * Provides the channel with its required context, which eliminates its
2341
+ * dependency on `Env`.
2342
+ *
2343
+ * @since 2.0.0
2344
+ * @category context
2345
+ */
1748
2346
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
1749
2347
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1750
2348
  env: Context.Context<Env>
@@ -1758,11 +2356,21 @@ export const provideContext: {
1758
2356
  * @category context
1759
2357
  */
1760
2358
  export const provideLayer: {
1761
- <Env, OutErr2, Env0>(
1762
- layer: Layer.Layer<Env, OutErr2, Env0>
1763
- ): <OutElem, InElem, OutErr, InErr, OutDone, InDone>(
2359
+ /**
2360
+ * Provides a layer to the channel, which translates it to another level.
2361
+ *
2362
+ * @since 2.0.0
2363
+ * @category context
2364
+ */
2365
+ <Env, OutErr2, Env0>(layer: Layer.Layer<Env, OutErr2, Env0>): <OutElem, InElem, OutErr, InErr, OutDone, InDone>(
1764
2366
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1765
2367
  ) => Channel<OutElem, InElem, OutErr2 | OutErr, InErr, OutDone, InDone, Env0>
2368
+ /**
2369
+ * Provides a layer to the channel, which translates it to another level.
2370
+ *
2371
+ * @since 2.0.0
2372
+ * @category context
2373
+ */
1766
2374
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutErr2, Env0>(
1767
2375
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1768
2376
  layer: Layer.Layer<Env, OutErr2, Env0>
@@ -1777,11 +2385,25 @@ export const provideLayer: {
1777
2385
  * @category context
1778
2386
  */
1779
2387
  export const mapInputContext: {
2388
+ /**
2389
+ * Transforms the context being provided to the channel with the specified
2390
+ * function.
2391
+ *
2392
+ * @since 2.0.0
2393
+ * @category context
2394
+ */
1780
2395
  <Env0, Env>(
1781
2396
  f: (env: Context.Context<Env0>) => Context.Context<Env>
1782
2397
  ): <OutElem, InElem, OutErr, InErr, OutDone, InDone>(
1783
2398
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1784
2399
  ) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env0>
2400
+ /**
2401
+ * Transforms the context being provided to the channel with the specified
2402
+ * function.
2403
+ *
2404
+ * @since 2.0.0
2405
+ * @category context
2406
+ */
1785
2407
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, Env0>(
1786
2408
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1787
2409
  f: (env: Context.Context<Env0>) => Context.Context<Env>
@@ -1796,11 +2418,23 @@ export const mapInputContext: {
1796
2418
  * @category context
1797
2419
  */
1798
2420
  export const provideSomeLayer: {
1799
- <R2, OutErr2, Env0>(
1800
- layer: Layer.Layer<R2, OutErr2, Env0>
1801
- ): <OutElem, InElem, OutErr, InErr, OutDone, InDone, R>(
2421
+ /**
2422
+ * Splits the context into two parts, providing one part using the
2423
+ * specified layer and leaving the remainder `Env0`.
2424
+ *
2425
+ * @since 2.0.0
2426
+ * @category context
2427
+ */
2428
+ <R2, OutErr2, Env0>(layer: Layer.Layer<R2, OutErr2, Env0>): <OutElem, InElem, OutErr, InErr, OutDone, InDone, R>(
1802
2429
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, R>
1803
2430
  ) => Channel<OutElem, InElem, OutErr2 | OutErr, InErr, OutDone, InDone, Env0 | Exclude<R, R2>>
2431
+ /**
2432
+ * Splits the context into two parts, providing one part using the
2433
+ * specified layer and leaving the remainder `Env0`.
2434
+ *
2435
+ * @since 2.0.0
2436
+ * @category context
2437
+ */
1804
2438
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, R, R2, OutErr2, Env0>(
1805
2439
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, R>,
1806
2440
  layer: Layer.Layer<R2, OutErr2, Env0>
@@ -1815,12 +2449,26 @@ export const provideSomeLayer: {
1815
2449
  * @category context
1816
2450
  */
1817
2451
  export const provideService: {
2452
+ /**
2453
+ * Provides the effect with the single service it requires. If the effect
2454
+ * requires more than one service use `provideContext` instead.
2455
+ *
2456
+ * @since 2.0.0
2457
+ * @category context
2458
+ */
1818
2459
  <T extends Context.Tag<any, any>>(
1819
2460
  tag: T,
1820
2461
  service: Context.Tag.Service<T>
1821
2462
  ): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
1822
2463
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
1823
2464
  ) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Exclude<Env, Context.Tag.Identifier<T>>>
2465
+ /**
2466
+ * Provides the effect with the single service it requires. If the effect
2467
+ * requires more than one service use `provideContext` instead.
2468
+ *
2469
+ * @since 2.0.0
2470
+ * @category context
2471
+ */
1824
2472
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, T extends Context.Tag<any, any>>(
1825
2473
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
1826
2474
  tag: T,
@@ -2099,12 +2747,24 @@ export const unwrapScoped: <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env
2099
2747
  * @category context
2100
2748
  */
2101
2749
  export const updateService: {
2750
+ /**
2751
+ * Updates a service in the context of this channel.
2752
+ *
2753
+ * @since 2.0.0
2754
+ * @category context
2755
+ */
2102
2756
  <T extends Context.Tag<any, any>>(
2103
2757
  tag: T,
2104
2758
  f: (resource: Context.Tag.Service<T>) => Context.Tag.Service<T>
2105
2759
  ): <OutElem, OutErr, InErr, OutDone, InDone, R>(
2106
2760
  self: Channel<OutElem, unknown, OutErr, InErr, OutDone, InDone, R>
2107
2761
  ) => Channel<OutElem, unknown, OutErr, InErr, OutDone, InDone, T | R>
2762
+ /**
2763
+ * Updates a service in the context of this channel.
2764
+ *
2765
+ * @since 2.0.0
2766
+ * @category context
2767
+ */
2108
2768
  <OutElem, OutErr, InErr, OutDone, InDone, R, T extends Context.Tag<any, any>>(
2109
2769
  self: Channel<OutElem, unknown, OutErr, InErr, OutDone, InDone, R>,
2110
2770
  tag: T,
@@ -2119,12 +2779,21 @@ export const updateService: {
2119
2779
  * @category tracing
2120
2780
  */
2121
2781
  export const withSpan: {
2122
- (
2123
- name: string,
2124
- options?: Tracer.SpanOptions | undefined
2125
- ): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
2782
+ /**
2783
+ * Wraps the channel with a new span for tracing.
2784
+ *
2785
+ * @since 2.0.0
2786
+ * @category tracing
2787
+ */
2788
+ (name: string, options?: Tracer.SpanOptions | undefined): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
2126
2789
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
2127
2790
  ) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Exclude<Env, Tracer.ParentSpan>>
2791
+ /**
2792
+ * Wraps the channel with a new span for tracing.
2793
+ *
2794
+ * @since 2.0.0
2795
+ * @category tracing
2796
+ */
2128
2797
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
2129
2798
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
2130
2799
  name: string,
@@ -2169,6 +2838,14 @@ export const writeChunk: <OutElem>(
2169
2838
  * @category zipping
2170
2839
  */
2171
2840
  export const zip: {
2841
+ /**
2842
+ * Returns a new channel that is the sequential composition of this channel
2843
+ * and the specified channel. The returned channel terminates with a tuple of
2844
+ * the terminal values of both channels.
2845
+ *
2846
+ * @since 2.0.0
2847
+ * @category zipping
2848
+ */
2172
2849
  <OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
2173
2850
  that: Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>,
2174
2851
  options?: { readonly concurrent?: boolean | undefined } | undefined
@@ -2183,6 +2860,14 @@ export const zip: {
2183
2860
  InDone & InDone1,
2184
2861
  Env1 | Env
2185
2862
  >
2863
+ /**
2864
+ * Returns a new channel that is the sequential composition of this channel
2865
+ * and the specified channel. The returned channel terminates with a tuple of
2866
+ * the terminal values of both channels.
2867
+ *
2868
+ * @since 2.0.0
2869
+ * @category zipping
2870
+ */
2186
2871
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
2187
2872
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
2188
2873
  that: Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>,
@@ -2207,6 +2892,14 @@ export const zip: {
2207
2892
  * @category zipping
2208
2893
  */
2209
2894
  export const zipLeft: {
2895
+ /**
2896
+ * Returns a new channel that is the sequential composition of this channel
2897
+ * and the specified channel. The returned channel terminates with the
2898
+ * terminal value of this channel.
2899
+ *
2900
+ * @since 2.0.0
2901
+ * @category zipping
2902
+ */
2210
2903
  <OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
2211
2904
  that: Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>,
2212
2905
  options?: { readonly concurrent?: boolean | undefined } | undefined
@@ -2221,6 +2914,14 @@ export const zipLeft: {
2221
2914
  InDone & InDone1,
2222
2915
  Env1 | Env
2223
2916
  >
2917
+ /**
2918
+ * Returns a new channel that is the sequential composition of this channel
2919
+ * and the specified channel. The returned channel terminates with the
2920
+ * terminal value of this channel.
2921
+ *
2922
+ * @since 2.0.0
2923
+ * @category zipping
2924
+ */
2224
2925
  <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
2225
2926
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
2226
2927
  that: Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>,
@@ -2245,6 +2946,14 @@ export const zipLeft: {
2245
2946
  * @category zipping
2246
2947
  */
2247
2948
  export const zipRight: {
2949
+ /**
2950
+ * Returns a new channel that is the sequential composition of this channel
2951
+ * and the specified channel. The returned channel terminates with the
2952
+ * terminal value of that channel.
2953
+ *
2954
+ * @since 2.0.0
2955
+ * @category zipping
2956
+ */
2248
2957
  <Env1, InErr1, InElem1, InDone1, OutErr1, OutElem1, OutDone1>(
2249
2958
  that: Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>,
2250
2959
  options?: {
@@ -2261,6 +2970,14 @@ export const zipRight: {
2261
2970
  InDone & InDone1,
2262
2971
  Env1 | Env
2263
2972
  >
2973
+ /**
2974
+ * Returns a new channel that is the sequential composition of this channel
2975
+ * and the specified channel. The returned channel terminates with the
2976
+ * terminal value of that channel.
2977
+ *
2978
+ * @since 2.0.0
2979
+ * @category zipping
2980
+ */
2264
2981
  <Env, InErr, InElem, InDone, OutErr, OutElem, OutDone, Env1, InErr1, InElem1, InDone1, OutErr1, OutElem1, OutDone1>(
2265
2982
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
2266
2983
  that: Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>,