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/dist/dts/STM.d.ts CHANGED
@@ -155,7 +155,25 @@ export declare const isSTM: (u: unknown) => u is STM<unknown, unknown, unknown>;
155
155
  * @category constructors
156
156
  */
157
157
  export declare const acquireUseRelease: {
158
+ /**
159
+ * Treats the specified `acquire` transaction as the acquisition of a
160
+ * resource. The `acquire` transaction will be executed interruptibly. If it
161
+ * is a success and is committed the specified `release` workflow will be
162
+ * executed uninterruptibly as soon as the `use` workflow completes execution.
163
+ *
164
+ * @since 2.0.0
165
+ * @category constructors
166
+ */
158
167
  <A, A2, E2, R2, A3, E3, R3>(use: (resource: A) => STM<A2, E2, R2>, release: (resource: A) => STM<A3, E3, R3>): <E, R>(acquire: STM<A, E, R>) => Effect.Effect<A2, E2 | E3 | E, R2 | R3 | R>;
168
+ /**
169
+ * Treats the specified `acquire` transaction as the acquisition of a
170
+ * resource. The `acquire` transaction will be executed interruptibly. If it
171
+ * is a success and is committed the specified `release` workflow will be
172
+ * executed uninterruptibly as soon as the `use` workflow completes execution.
173
+ *
174
+ * @since 2.0.0
175
+ * @category constructors
176
+ */
159
177
  <A, E, R, A2, E2, R2, A3, E3, R3>(acquire: STM<A, E, R>, use: (resource: A) => STM<A2, E2, R2>, release: (resource: A) => STM<A3, E3, R3>): Effect.Effect<A2, E | E2 | E3, R | R2 | R3>;
160
178
  };
161
179
  /**
@@ -226,7 +244,19 @@ export declare const all: All.Signature;
226
244
  * @category mapping
227
245
  */
228
246
  export declare const as: {
247
+ /**
248
+ * Maps the success value of this effect to the specified constant value.
249
+ *
250
+ * @since 2.0.0
251
+ * @category mapping
252
+ */
229
253
  <A2>(value: A2): <A, E, R>(self: STM<A, E, R>) => STM<A2, E, R>;
254
+ /**
255
+ * Maps the success value of this effect to the specified constant value.
256
+ *
257
+ * @since 2.0.0
258
+ * @category mapping
259
+ */
230
260
  <A, E, R, A2>(self: STM<A, E, R>, value: A2): STM<A2, E, R>;
231
261
  };
232
262
  /**
@@ -266,7 +296,19 @@ export declare const attempt: <A>(evaluate: LazyArg<A>) => STM<A, unknown>;
266
296
  * @category error handling
267
297
  */
268
298
  export declare const catchAll: {
299
+ /**
300
+ * Recovers from all errors.
301
+ *
302
+ * @since 2.0.0
303
+ * @category error handling
304
+ */
269
305
  <E, B, E1, R1>(f: (e: E) => STM<B, E1, R1>): <A, R>(self: STM<A, E, R>) => STM<B | A, E1, R1 | R>;
306
+ /**
307
+ * Recovers from all errors.
308
+ *
309
+ * @since 2.0.0
310
+ * @category error handling
311
+ */
270
312
  <A, E, R, B, E1, R1>(self: STM<A, E, R>, f: (e: E) => STM<B, E1, R1>): STM<A | B, E1, R | R1>;
271
313
  };
272
314
  /**
@@ -276,7 +318,19 @@ export declare const catchAll: {
276
318
  * @category error handling
277
319
  */
278
320
  export declare const catchSome: {
321
+ /**
322
+ * Recovers from some or all of the error cases.
323
+ *
324
+ * @since 2.0.0
325
+ * @category error handling
326
+ */
279
327
  <E, A2, E2, R2>(pf: (error: E) => Option.Option<STM<A2, E2, R2>>): <A, R>(self: STM<A, E, R>) => STM<A2 | A, E | E2, R2 | R>;
328
+ /**
329
+ * Recovers from some or all of the error cases.
330
+ *
331
+ * @since 2.0.0
332
+ * @category error handling
333
+ */
280
334
  <A, E, R, A2, E2, R2>(self: STM<A, E, R>, pf: (error: E) => Option.Option<STM<A2, E2, R2>>): STM<A | A2, E | E2, R | R2>;
281
335
  };
282
336
  /**
@@ -286,6 +340,12 @@ export declare const catchSome: {
286
340
  * @category error handling
287
341
  */
288
342
  export declare const catchTag: {
343
+ /**
344
+ * Recovers from the specified tagged error.
345
+ *
346
+ * @since 2.0.0
347
+ * @category error handling
348
+ */
289
349
  <K extends E["_tag"] & string, E extends {
290
350
  _tag: string;
291
351
  }, A1, E1, R1>(k: K, f: (e: Extract<E, {
@@ -293,6 +353,12 @@ export declare const catchTag: {
293
353
  }>) => STM<A1, E1, R1>): <A, R>(self: STM<A, E, R>) => STM<A1 | A, E1 | Exclude<E, {
294
354
  _tag: K;
295
355
  }>, R1 | R>;
356
+ /**
357
+ * Recovers from the specified tagged error.
358
+ *
359
+ * @since 2.0.0
360
+ * @category error handling
361
+ */
296
362
  <A, E extends {
297
363
  _tag: string;
298
364
  }, R, K extends E["_tag"] & string, A1, E1, R1>(self: STM<A, E, R>, k: K, f: (e: Extract<E, {
@@ -308,6 +374,12 @@ export declare const catchTag: {
308
374
  * @category error handling
309
375
  */
310
376
  export declare const catchTags: {
377
+ /**
378
+ * Recovers from multiple tagged errors.
379
+ *
380
+ * @since 2.0.0
381
+ * @category error handling
382
+ */
311
383
  <E extends {
312
384
  _tag: string;
313
385
  }, Cases extends {
@@ -323,6 +395,12 @@ export declare const catchTags: {
323
395
  }[keyof Cases], R | {
324
396
  [K in keyof Cases]: Cases[K] extends (...args: Array<any>) => STM<any, any, infer R> ? R : never;
325
397
  }[keyof Cases]>;
398
+ /**
399
+ * Recovers from multiple tagged errors.
400
+ *
401
+ * @since 2.0.0
402
+ * @category error handling
403
+ */
326
404
  <R, E extends {
327
405
  _tag: string;
328
406
  }, A, Cases extends {
@@ -353,7 +431,19 @@ export declare const check: (predicate: LazyArg<boolean>) => STM<void>;
353
431
  * @category mutations
354
432
  */
355
433
  export declare const collect: {
434
+ /**
435
+ * Simultaneously filters and maps the value produced by this effect.
436
+ *
437
+ * @since 2.0.0
438
+ * @category mutations
439
+ */
356
440
  <A, A2>(pf: (a: A) => Option.Option<A2>): <E, R>(self: STM<A, E, R>) => STM<A2, E, R>;
441
+ /**
442
+ * Simultaneously filters and maps the value produced by this effect.
443
+ *
444
+ * @since 2.0.0
445
+ * @category mutations
446
+ */
357
447
  <A, E, R, A2>(self: STM<A, E, R>, pf: (a: A) => Option.Option<A2>): STM<A2, E, R>;
358
448
  };
359
449
  /**
@@ -363,7 +453,19 @@ export declare const collect: {
363
453
  * @category mutations
364
454
  */
365
455
  export declare const collectSTM: {
456
+ /**
457
+ * Simultaneously filters and maps the value produced by this effect.
458
+ *
459
+ * @since 2.0.0
460
+ * @category mutations
461
+ */
366
462
  <A, A2, E2, R2>(pf: (a: A) => Option.Option<STM<A2, E2, R2>>): <E, R>(self: STM<A, E, R>) => STM<A2, E2 | E, R2 | R>;
463
+ /**
464
+ * Simultaneously filters and maps the value produced by this effect.
465
+ *
466
+ * @since 2.0.0
467
+ * @category mutations
468
+ */
367
469
  <A, E, R, A2, E2, R2>(self: STM<A, E, R>, pf: (a: A) => Option.Option<STM<A2, E2, R2>>): STM<A2, E | E2, R | R2>;
368
470
  };
369
471
  /**
@@ -418,7 +520,21 @@ export declare const contextWithSTM: <R0, A, E, R>(f: (environment: Context.Cont
418
520
  * @category context
419
521
  */
420
522
  export declare const mapInputContext: {
523
+ /**
524
+ * Transforms the environment being provided to this effect with the specified
525
+ * function.
526
+ *
527
+ * @since 2.0.0
528
+ * @category context
529
+ */
421
530
  <R0, R>(f: (context: Context.Context<R0>) => Context.Context<R>): <A, E>(self: STM<A, E, R>) => STM<A, E, R0>;
531
+ /**
532
+ * Transforms the environment being provided to this effect with the specified
533
+ * function.
534
+ *
535
+ * @since 2.0.0
536
+ * @category context
537
+ */
422
538
  <A, E, R0, R>(self: STM<A, E, R>, f: (context: Context.Context<R0>) => Context.Context<R>): STM<A, E, R0>;
423
539
  };
424
540
  /**
@@ -459,7 +575,23 @@ export declare const either: <A, E, R>(self: STM<A, E, R>) => STM<Either.Either<
459
575
  * @category finalization
460
576
  */
461
577
  export declare const ensuring: {
578
+ /**
579
+ * Executes the specified finalization transaction whether or not this effect
580
+ * succeeds. Note that as with all STM transactions, if the full transaction
581
+ * fails, everything will be rolled back.
582
+ *
583
+ * @since 2.0.0
584
+ * @category finalization
585
+ */
462
586
  <R1, B>(finalizer: STM<B, never, R1>): <A, E, R>(self: STM<A, E, R>) => STM<A, E, R1 | R>;
587
+ /**
588
+ * Executes the specified finalization transaction whether or not this effect
589
+ * succeeds. Note that as with all STM transactions, if the full transaction
590
+ * fails, everything will be rolled back.
591
+ *
592
+ * @since 2.0.0
593
+ * @category finalization
594
+ */
463
595
  <A, E, R, R1, B>(self: STM<A, E, R>, finalizer: STM<B, never, R1>): STM<A, E, R | R1>;
464
596
  };
465
597
  /**
@@ -478,7 +610,21 @@ export declare const eventually: <A, E, R>(self: STM<A, E, R>) => STM<A, E, R>;
478
610
  * @category constructors
479
611
  */
480
612
  export declare const every: {
613
+ /**
614
+ * Determines whether all elements of the `Iterable<A>` satisfy the effectual
615
+ * predicate.
616
+ *
617
+ * @since 2.0.0
618
+ * @category constructors
619
+ */
481
620
  <A, R, E>(predicate: (a: NoInfer<A>) => STM<boolean, E, R>): (iterable: Iterable<A>) => STM<boolean, E, R>;
621
+ /**
622
+ * Determines whether all elements of the `Iterable<A>` satisfy the effectual
623
+ * predicate.
624
+ *
625
+ * @since 2.0.0
626
+ * @category constructors
627
+ */
482
628
  <A, R, E>(iterable: Iterable<A>, predicate: (a: A) => STM<boolean, E, R>): STM<boolean, E, R>;
483
629
  };
484
630
  /**
@@ -489,7 +635,21 @@ export declare const every: {
489
635
  * @category constructors
490
636
  */
491
637
  export declare const exists: {
638
+ /**
639
+ * Determines whether any element of the `Iterable[A]` satisfies the effectual
640
+ * predicate `f`.
641
+ *
642
+ * @since 2.0.0
643
+ * @category constructors
644
+ */
492
645
  <A, R, E>(predicate: (a: NoInfer<A>) => STM<boolean, E, R>): (iterable: Iterable<A>) => STM<boolean, E, R>;
646
+ /**
647
+ * Determines whether any element of the `Iterable[A]` satisfies the effectual
648
+ * predicate `f`.
649
+ *
650
+ * @since 2.0.0
651
+ * @category constructors
652
+ */
493
653
  <A, R, E>(iterable: Iterable<A>, predicate: (a: A) => STM<boolean, E, R>): STM<boolean, E, R>;
494
654
  };
495
655
  /**
@@ -520,7 +680,19 @@ export declare const fiberId: STM<FiberId.FiberId>;
520
680
  * @category constructors
521
681
  */
522
682
  export declare const filter: {
683
+ /**
684
+ * Filters the collection using the specified effectual predicate.
685
+ *
686
+ * @since 2.0.0
687
+ * @category constructors
688
+ */
523
689
  <A, R, E>(predicate: (a: NoInfer<A>) => STM<boolean, E, R>): (iterable: Iterable<A>) => STM<Array<A>, E, R>;
690
+ /**
691
+ * Filters the collection using the specified effectual predicate.
692
+ *
693
+ * @since 2.0.0
694
+ * @category constructors
695
+ */
524
696
  <A, R, E>(iterable: Iterable<A>, predicate: (a: A) => STM<boolean, E, R>): STM<Array<A>, E, R>;
525
697
  };
526
698
  /**
@@ -531,7 +703,21 @@ export declare const filter: {
531
703
  * @category constructors
532
704
  */
533
705
  export declare const filterNot: {
706
+ /**
707
+ * Filters the collection using the specified effectual predicate, removing
708
+ * all elements that satisfy the predicate.
709
+ *
710
+ * @since 2.0.0
711
+ * @category constructors
712
+ */
534
713
  <A, R, E>(predicate: (a: NoInfer<A>) => STM<boolean, E, R>): (iterable: Iterable<A>) => STM<Array<A>, E, R>;
714
+ /**
715
+ * Filters the collection using the specified effectual predicate, removing
716
+ * all elements that satisfy the predicate.
717
+ *
718
+ * @since 2.0.0
719
+ * @category constructors
720
+ */
535
721
  <A, R, E>(iterable: Iterable<A>, predicate: (a: A) => STM<boolean, E, R>): STM<Array<A>, E, R>;
536
722
  };
537
723
  /**
@@ -541,9 +727,33 @@ export declare const filterNot: {
541
727
  * @category filtering
542
728
  */
543
729
  export declare const filterOrDie: {
730
+ /**
731
+ * Dies with specified defect if the predicate fails.
732
+ *
733
+ * @since 2.0.0
734
+ * @category filtering
735
+ */
544
736
  <A, B extends A>(refinement: Refinement<NoInfer<A>, B>, defect: LazyArg<unknown>): <E, R>(self: STM<A, E, R>) => STM<B, E, R>;
737
+ /**
738
+ * Dies with specified defect if the predicate fails.
739
+ *
740
+ * @since 2.0.0
741
+ * @category filtering
742
+ */
545
743
  <A>(predicate: Predicate<NoInfer<A>>, defect: LazyArg<unknown>): <E, R>(self: STM<A, E, R>) => STM<A, E, R>;
744
+ /**
745
+ * Dies with specified defect if the predicate fails.
746
+ *
747
+ * @since 2.0.0
748
+ * @category filtering
749
+ */
546
750
  <A, E, R, B extends A>(self: STM<A, E, R>, refinement: Refinement<A, B>, defect: LazyArg<unknown>): STM<B, E, R>;
751
+ /**
752
+ * Dies with specified defect if the predicate fails.
753
+ *
754
+ * @since 2.0.0
755
+ * @category filtering
756
+ */
547
757
  <A, E, R>(self: STM<A, E, R>, predicate: Predicate<A>, defect: LazyArg<unknown>): STM<A, E, R>;
548
758
  };
549
759
  /**
@@ -554,9 +764,37 @@ export declare const filterOrDie: {
554
764
  * @category filtering
555
765
  */
556
766
  export declare const filterOrDieMessage: {
767
+ /**
768
+ * Dies with a `Cause.RuntimeException` having the specified message if the
769
+ * predicate fails.
770
+ *
771
+ * @since 2.0.0
772
+ * @category filtering
773
+ */
557
774
  <A, B extends A>(refinement: Refinement<NoInfer<A>, B>, message: string): <E, R>(self: STM<A, E, R>) => STM<B, E, R>;
775
+ /**
776
+ * Dies with a `Cause.RuntimeException` having the specified message if the
777
+ * predicate fails.
778
+ *
779
+ * @since 2.0.0
780
+ * @category filtering
781
+ */
558
782
  <A>(predicate: Predicate<NoInfer<A>>, message: string): <E, R>(self: STM<A, E, R>) => STM<A, E, R>;
783
+ /**
784
+ * Dies with a `Cause.RuntimeException` having the specified message if the
785
+ * predicate fails.
786
+ *
787
+ * @since 2.0.0
788
+ * @category filtering
789
+ */
559
790
  <A, E, R, B extends A>(self: STM<A, E, R>, refinement: Refinement<A, B>, message: string): STM<B, E, R>;
791
+ /**
792
+ * Dies with a `Cause.RuntimeException` having the specified message if the
793
+ * predicate fails.
794
+ *
795
+ * @since 2.0.0
796
+ * @category filtering
797
+ */
560
798
  <A, E, R>(self: STM<A, E, R>, predicate: Predicate<A>, message: string): STM<A, E, R>;
561
799
  };
562
800
  /**
@@ -566,9 +804,33 @@ export declare const filterOrDieMessage: {
566
804
  * @category filtering
567
805
  */
568
806
  export declare const filterOrElse: {
807
+ /**
808
+ * Supplies `orElse` if the predicate fails.
809
+ *
810
+ * @since 2.0.0
811
+ * @category filtering
812
+ */
569
813
  <A, B extends A, C, E2, R2>(refinement: Refinement<NoInfer<A>, B>, orElse: (a: NoInfer<A>) => STM<C, E2, R2>): <E, R>(self: STM<A, E, R>) => STM<B | C, E2 | E, R2 | R>;
814
+ /**
815
+ * Supplies `orElse` if the predicate fails.
816
+ *
817
+ * @since 2.0.0
818
+ * @category filtering
819
+ */
570
820
  <A, B, E2, R2>(predicate: Predicate<NoInfer<A>>, orElse: (a: NoInfer<A>) => STM<B, E2, R2>): <E, R>(self: STM<A, E, R>) => STM<A | B, E2 | E, R2 | R>;
821
+ /**
822
+ * Supplies `orElse` if the predicate fails.
823
+ *
824
+ * @since 2.0.0
825
+ * @category filtering
826
+ */
571
827
  <A, E, R, B extends A, C, E2, R2>(self: STM<A, E, R>, refinement: Refinement<A, B>, orElse: (a: A) => STM<C, E2, R2>): STM<B | C, E | E2, R | R2>;
828
+ /**
829
+ * Supplies `orElse` if the predicate fails.
830
+ *
831
+ * @since 2.0.0
832
+ * @category filtering
833
+ */
572
834
  <A, E, R, B, E2, R2>(self: STM<A, E, R>, predicate: Predicate<A>, orElse: (a: A) => STM<B, E2, R2>): STM<A | B, E | E2, R | R2>;
573
835
  };
574
836
  /**
@@ -578,9 +840,33 @@ export declare const filterOrElse: {
578
840
  * @category filtering
579
841
  */
580
842
  export declare const filterOrFail: {
843
+ /**
844
+ * Fails with the specified error if the predicate fails.
845
+ *
846
+ * @since 2.0.0
847
+ * @category filtering
848
+ */
581
849
  <A, B extends A, E2>(refinement: Refinement<NoInfer<A>, B>, orFailWith: (a: NoInfer<A>) => E2): <E, R>(self: STM<A, E, R>) => STM<B, E2 | E, R>;
850
+ /**
851
+ * Fails with the specified error if the predicate fails.
852
+ *
853
+ * @since 2.0.0
854
+ * @category filtering
855
+ */
582
856
  <A, E2>(predicate: Predicate<NoInfer<A>>, orFailWith: (a: NoInfer<A>) => E2): <E, R>(self: STM<A, E, R>) => STM<A, E2 | E, R>;
857
+ /**
858
+ * Fails with the specified error if the predicate fails.
859
+ *
860
+ * @since 2.0.0
861
+ * @category filtering
862
+ */
583
863
  <A, E, R, B extends A, E2>(self: STM<A, E, R>, refinement: Refinement<A, B>, orFailWith: (a: A) => E2): STM<B, E | E2, R>;
864
+ /**
865
+ * Fails with the specified error if the predicate fails.
866
+ *
867
+ * @since 2.0.0
868
+ * @category filtering
869
+ */
584
870
  <A, E, R, E2>(self: STM<A, E, R>, predicate: Predicate<A>, orFailWith: (a: A) => E2): STM<A, E | E2, R>;
585
871
  };
586
872
  /**
@@ -591,7 +877,21 @@ export declare const filterOrFail: {
591
877
  * @category sequencing
592
878
  */
593
879
  export declare const flatMap: {
880
+ /**
881
+ * Feeds the value produced by this effect to the specified function, and then
882
+ * runs the returned effect as well to produce its results.
883
+ *
884
+ * @since 2.0.0
885
+ * @category sequencing
886
+ */
594
887
  <A, A2, E1, R1>(f: (a: A) => STM<A2, E1, R1>): <E, R>(self: STM<A, E, R>) => STM<A2, E1 | E, R1 | R>;
888
+ /**
889
+ * Feeds the value produced by this effect to the specified function, and then
890
+ * runs the returned effect as well to produce its results.
891
+ *
892
+ * @since 2.0.0
893
+ * @category sequencing
894
+ */
595
895
  <A, E, R, A2, E1, R1>(self: STM<A, E, R>, f: (a: A) => STM<A2, E1, R1>): STM<A2, E | E1, R | R1>;
596
896
  };
597
897
  /**
@@ -618,7 +918,21 @@ export declare const flip: <A, E, R>(self: STM<A, E, R>) => STM<E, A, R>;
618
918
  * @category mutations
619
919
  */
620
920
  export declare const flipWith: {
921
+ /**
922
+ * Swaps the error/value parameters, applies the function `f` and flips the
923
+ * parameters back
924
+ *
925
+ * @since 2.0.0
926
+ * @category mutations
927
+ */
621
928
  <E, A, R, E2, A2, R2>(f: (stm: STM<E, A, R>) => STM<E2, A2, R2>): (self: STM<A, E, R>) => STM<A | A2, E | E2, R | R2>;
929
+ /**
930
+ * Swaps the error/value parameters, applies the function `f` and flips the
931
+ * parameters back
932
+ *
933
+ * @since 2.0.0
934
+ * @category mutations
935
+ */
622
936
  <A, E, R, E2, A2, R2>(self: STM<A, E, R>, f: (stm: STM<E, A, R>) => STM<E2, A2, R2>): STM<A | A2, E | E2, R | R2>;
623
937
  };
624
938
  /**
@@ -629,10 +943,24 @@ export declare const flipWith: {
629
943
  * @category folding
630
944
  */
631
945
  export declare const match: {
946
+ /**
947
+ * Folds over the `STM` effect, handling both failure and success, but not
948
+ * retry.
949
+ *
950
+ * @since 2.0.0
951
+ * @category folding
952
+ */
632
953
  <E, A2, A, A3>(options: {
633
954
  readonly onFailure: (error: E) => A2;
634
955
  readonly onSuccess: (value: A) => A3;
635
956
  }): <R>(self: STM<A, E, R>) => STM<A2 | A3, never, R>;
957
+ /**
958
+ * Folds over the `STM` effect, handling both failure and success, but not
959
+ * retry.
960
+ *
961
+ * @since 2.0.0
962
+ * @category folding
963
+ */
636
964
  <A, E, R, A2, A3>(self: STM<A, E, R>, options: {
637
965
  readonly onFailure: (error: E) => A2;
638
966
  readonly onSuccess: (value: A) => A3;
@@ -645,10 +973,22 @@ export declare const match: {
645
973
  * @category folding
646
974
  */
647
975
  export declare const matchSTM: {
976
+ /**
977
+ * Effectfully folds over the `STM` effect, handling both failure and success.
978
+ *
979
+ * @since 2.0.0
980
+ * @category folding
981
+ */
648
982
  <E, A1, E1, R1, A, A2, E2, R2>(options: {
649
983
  readonly onFailure: (e: E) => STM<A1, E1, R1>;
650
984
  readonly onSuccess: (a: A) => STM<A2, E2, R2>;
651
985
  }): <R>(self: STM<A, E, R>) => STM<A1 | A2, E1 | E2, R1 | R2 | R>;
986
+ /**
987
+ * Effectfully folds over the `STM` effect, handling both failure and success.
988
+ *
989
+ * @since 2.0.0
990
+ * @category folding
991
+ */
652
992
  <A, E, R, A1, E1, R1, A2, E2, R2>(self: STM<A, E, R>, options: {
653
993
  readonly onFailure: (e: E) => STM<A1, E1, R1>;
654
994
  readonly onSuccess: (a: A) => STM<A2, E2, R2>;
@@ -662,15 +1002,43 @@ export declare const matchSTM: {
662
1002
  * @category traversing
663
1003
  */
664
1004
  export declare const forEach: {
1005
+ /**
1006
+ * Applies the function `f` to each element of the `Iterable<A>` and returns
1007
+ * a transactional effect that produces a new `Chunk<A2>`.
1008
+ *
1009
+ * @since 2.0.0
1010
+ * @category traversing
1011
+ */
665
1012
  <A, A2, E, R>(f: (a: A) => STM<A2, E, R>, options?: {
666
1013
  readonly discard?: false | undefined;
667
1014
  } | undefined): (elements: Iterable<A>) => STM<Array<A2>, E, R>;
1015
+ /**
1016
+ * Applies the function `f` to each element of the `Iterable<A>` and returns
1017
+ * a transactional effect that produces a new `Chunk<A2>`.
1018
+ *
1019
+ * @since 2.0.0
1020
+ * @category traversing
1021
+ */
668
1022
  <A, A2, E, R>(f: (a: A) => STM<A2, E, R>, options: {
669
1023
  readonly discard: true;
670
1024
  }): (elements: Iterable<A>) => STM<void, E, R>;
1025
+ /**
1026
+ * Applies the function `f` to each element of the `Iterable<A>` and returns
1027
+ * a transactional effect that produces a new `Chunk<A2>`.
1028
+ *
1029
+ * @since 2.0.0
1030
+ * @category traversing
1031
+ */
671
1032
  <A, A2, E, R>(elements: Iterable<A>, f: (a: A) => STM<A2, E, R>, options?: {
672
1033
  readonly discard?: false | undefined;
673
1034
  } | undefined): STM<Array<A2>, E, R>;
1035
+ /**
1036
+ * Applies the function `f` to each element of the `Iterable<A>` and returns
1037
+ * a transactional effect that produces a new `Chunk<A2>`.
1038
+ *
1039
+ * @since 2.0.0
1040
+ * @category traversing
1041
+ */
674
1042
  <A, A2, E, R>(elements: Iterable<A>, f: (a: A) => STM<A2, E, R>, options: {
675
1043
  readonly discard: true;
676
1044
  }): STM<void, E, R>;
@@ -839,12 +1207,50 @@ export declare const iterate: <Z, E, R>(initial: Z, options: {
839
1207
  * @category constructors
840
1208
  */
841
1209
  export declare const loop: {
1210
+ /**
1211
+ * Loops with the specified transactional function, collecting the results
1212
+ * into a list. The moral equivalent of:
1213
+ *
1214
+ * ```ts
1215
+ * const as = []
1216
+ * let s = initial
1217
+ *
1218
+ * while (cont(s)) {
1219
+ * as.push(body(s))
1220
+ * s = inc(s)
1221
+ * }
1222
+ *
1223
+ * return as
1224
+ * ```
1225
+ *
1226
+ * @since 2.0.0
1227
+ * @category constructors
1228
+ */
842
1229
  <Z, A, E, R>(initial: Z, options: {
843
1230
  readonly while: (z: Z) => boolean;
844
1231
  readonly step: (z: Z) => Z;
845
1232
  readonly body: (z: Z) => STM<A, E, R>;
846
1233
  readonly discard?: false | undefined;
847
1234
  }): STM<Array<A>, E, R>;
1235
+ /**
1236
+ * Loops with the specified transactional function, collecting the results
1237
+ * into a list. The moral equivalent of:
1238
+ *
1239
+ * ```ts
1240
+ * const as = []
1241
+ * let s = initial
1242
+ *
1243
+ * while (cont(s)) {
1244
+ * as.push(body(s))
1245
+ * s = inc(s)
1246
+ * }
1247
+ *
1248
+ * return as
1249
+ * ```
1250
+ *
1251
+ * @since 2.0.0
1252
+ * @category constructors
1253
+ */
848
1254
  <Z, A, E, R>(initial: Z, options: {
849
1255
  readonly while: (z: Z) => boolean;
850
1256
  readonly step: (z: Z) => Z;
@@ -859,7 +1265,19 @@ export declare const loop: {
859
1265
  * @category mapping
860
1266
  */
861
1267
  export declare const map: {
1268
+ /**
1269
+ * Maps the value produced by the effect.
1270
+ *
1271
+ * @since 2.0.0
1272
+ * @category mapping
1273
+ */
862
1274
  <A, B>(f: (a: A) => B): <E, R>(self: STM<A, E, R>) => STM<B, E, R>;
1275
+ /**
1276
+ * Maps the value produced by the effect.
1277
+ *
1278
+ * @since 2.0.0
1279
+ * @category mapping
1280
+ */
863
1281
  <A, E, R, B>(self: STM<A, E, R>, f: (a: A) => B): STM<B, E, R>;
864
1282
  };
865
1283
  /**
@@ -871,7 +1289,23 @@ export declare const map: {
871
1289
  * @category mapping
872
1290
  */
873
1291
  export declare const mapAttempt: {
1292
+ /**
1293
+ * Maps the value produced by the effect with the specified function that may
1294
+ * throw exceptions but is otherwise pure, translating any thrown exceptions
1295
+ * into typed failed effects.
1296
+ *
1297
+ * @since 2.0.0
1298
+ * @category mapping
1299
+ */
874
1300
  <A, B>(f: (a: A) => B): <E, R>(self: STM<A, E, R>) => STM<B, unknown, R>;
1301
+ /**
1302
+ * Maps the value produced by the effect with the specified function that may
1303
+ * throw exceptions but is otherwise pure, translating any thrown exceptions
1304
+ * into typed failed effects.
1305
+ *
1306
+ * @since 2.0.0
1307
+ * @category mapping
1308
+ */
875
1309
  <A, E, R, B>(self: STM<A, E, R>, f: (a: A) => B): STM<B, unknown, R>;
876
1310
  };
877
1311
  /**
@@ -882,10 +1316,24 @@ export declare const mapAttempt: {
882
1316
  * @category mapping
883
1317
  */
884
1318
  export declare const mapBoth: {
1319
+ /**
1320
+ * Returns an `STM` effect whose failure and success channels have been mapped
1321
+ * by the specified pair of functions, `f` and `g`.
1322
+ *
1323
+ * @since 2.0.0
1324
+ * @category mapping
1325
+ */
885
1326
  <E, E2, A, A2>(options: {
886
1327
  readonly onFailure: (error: E) => E2;
887
1328
  readonly onSuccess: (value: A) => A2;
888
1329
  }): <R>(self: STM<A, E, R>) => STM<A2, E2, R>;
1330
+ /**
1331
+ * Returns an `STM` effect whose failure and success channels have been mapped
1332
+ * by the specified pair of functions, `f` and `g`.
1333
+ *
1334
+ * @since 2.0.0
1335
+ * @category mapping
1336
+ */
889
1337
  <A, E, R, E2, A2>(self: STM<A, E, R>, options: {
890
1338
  readonly onFailure: (error: E) => E2;
891
1339
  readonly onSuccess: (value: A) => A2;
@@ -898,7 +1346,19 @@ export declare const mapBoth: {
898
1346
  * @category mapping
899
1347
  */
900
1348
  export declare const mapError: {
1349
+ /**
1350
+ * Maps from one error type to another.
1351
+ *
1352
+ * @since 2.0.0
1353
+ * @category mapping
1354
+ */
901
1355
  <E, E2>(f: (error: E) => E2): <A, R>(self: STM<A, E, R>) => STM<A, E2, R>;
1356
+ /**
1357
+ * Maps from one error type to another.
1358
+ *
1359
+ * @since 2.0.0
1360
+ * @category mapping
1361
+ */
902
1362
  <A, E, R, E2>(self: STM<A, E, R>, f: (error: E) => E2): STM<A, E2, R>;
903
1363
  };
904
1364
  /**
@@ -916,7 +1376,19 @@ export declare const merge: <A, E, R>(self: STM<A, E, R>) => STM<E | A, never, R
916
1376
  * @category constructors
917
1377
  */
918
1378
  export declare const mergeAll: {
1379
+ /**
1380
+ * Merges an `Iterable<STM>` to a single `STM`, working sequentially.
1381
+ *
1382
+ * @since 2.0.0
1383
+ * @category constructors
1384
+ */
919
1385
  <A2, A>(zero: A2, f: (a2: A2, a: A) => A2): <E, R>(iterable: Iterable<STM<A, E, R>>) => STM<A2, E, R>;
1386
+ /**
1387
+ * Merges an `Iterable<STM>` to a single `STM`, working sequentially.
1388
+ *
1389
+ * @since 2.0.0
1390
+ * @category constructors
1391
+ */
920
1392
  <A, E, R, A2>(iterable: Iterable<STM<A, E, R>>, zero: A2, f: (a2: A2, a: A) => A2): STM<A2, E, R>;
921
1393
  };
922
1394
  /**
@@ -956,7 +1428,21 @@ export declare const orDie: <A, E, R>(self: STM<A, E, R>) => STM<A, never, R>;
956
1428
  * @category error handling
957
1429
  */
958
1430
  export declare const orDieWith: {
1431
+ /**
1432
+ * Keeps none of the errors, and terminates the fiber running the `STM` effect
1433
+ * with them, using the specified function to convert the `E` into a defect.
1434
+ *
1435
+ * @since 2.0.0
1436
+ * @category error handling
1437
+ */
959
1438
  <E>(f: (error: E) => unknown): <A, R>(self: STM<A, E, R>) => STM<A, never, R>;
1439
+ /**
1440
+ * Keeps none of the errors, and terminates the fiber running the `STM` effect
1441
+ * with them, using the specified function to convert the `E` into a defect.
1442
+ *
1443
+ * @since 2.0.0
1444
+ * @category error handling
1445
+ */
960
1446
  <A, E, R>(self: STM<A, E, R>, f: (error: E) => unknown): STM<A, never, R>;
961
1447
  };
962
1448
  /**
@@ -967,7 +1453,21 @@ export declare const orDieWith: {
967
1453
  * @category error handling
968
1454
  */
969
1455
  export declare const orElse: {
1456
+ /**
1457
+ * Tries this effect first, and if it fails or retries, tries the other
1458
+ * effect.
1459
+ *
1460
+ * @since 2.0.0
1461
+ * @category error handling
1462
+ */
970
1463
  <A2, E2, R2>(that: LazyArg<STM<A2, E2, R2>>): <A, E, R>(self: STM<A, E, R>) => STM<A2 | A, E2, R2 | R>;
1464
+ /**
1465
+ * Tries this effect first, and if it fails or retries, tries the other
1466
+ * effect.
1467
+ *
1468
+ * @since 2.0.0
1469
+ * @category error handling
1470
+ */
971
1471
  <A, E, R, A2, E2, R2>(self: STM<A, E, R>, that: LazyArg<STM<A2, E2, R2>>): STM<A | A2, E2, R | R2>;
972
1472
  };
973
1473
  /**
@@ -979,7 +1479,23 @@ export declare const orElse: {
979
1479
  * @category error handling
980
1480
  */
981
1481
  export declare const orElseEither: {
1482
+ /**
1483
+ * Returns a transactional effect that will produce the value of this effect
1484
+ * in left side, unless it fails or retries, in which case, it will produce
1485
+ * the value of the specified effect in right side.
1486
+ *
1487
+ * @since 2.0.0
1488
+ * @category error handling
1489
+ */
982
1490
  <A2, E2, R2>(that: LazyArg<STM<A2, E2, R2>>): <A, E, R>(self: STM<A, E, R>) => STM<Either.Either<A2, A>, E2, R2 | R>;
1491
+ /**
1492
+ * Returns a transactional effect that will produce the value of this effect
1493
+ * in left side, unless it fails or retries, in which case, it will produce
1494
+ * the value of the specified effect in right side.
1495
+ *
1496
+ * @since 2.0.0
1497
+ * @category error handling
1498
+ */
983
1499
  <A, E, R, A2, E2, R2>(self: STM<A, E, R>, that: LazyArg<STM<A2, E2, R2>>): STM<Either.Either<A2, A>, E2, R | R2>;
984
1500
  };
985
1501
  /**
@@ -990,7 +1506,21 @@ export declare const orElseEither: {
990
1506
  * @category error handling
991
1507
  */
992
1508
  export declare const orElseFail: {
1509
+ /**
1510
+ * Tries this effect first, and if it fails or retries, fails with the
1511
+ * specified error.
1512
+ *
1513
+ * @since 2.0.0
1514
+ * @category error handling
1515
+ */
993
1516
  <E2>(error: LazyArg<E2>): <A, E, R>(self: STM<A, E, R>) => STM<A, E2, R>;
1517
+ /**
1518
+ * Tries this effect first, and if it fails or retries, fails with the
1519
+ * specified error.
1520
+ *
1521
+ * @since 2.0.0
1522
+ * @category error handling
1523
+ */
994
1524
  <A, E, R, E2>(self: STM<A, E, R>, error: LazyArg<E2>): STM<A, E2, R>;
995
1525
  };
996
1526
  /**
@@ -1002,7 +1532,23 @@ export declare const orElseFail: {
1002
1532
  * @category error handling
1003
1533
  */
1004
1534
  export declare const orElseOptional: {
1535
+ /**
1536
+ * Returns an effect that will produce the value of this effect, unless it
1537
+ * fails with the `None` value, in which case it will produce the value of the
1538
+ * specified effect.
1539
+ *
1540
+ * @since 2.0.0
1541
+ * @category error handling
1542
+ */
1005
1543
  <A2, E2, R2>(that: LazyArg<STM<A2, Option.Option<E2>, R2>>): <A, E, R>(self: STM<A, Option.Option<E>, R>) => STM<A2 | A, Option.Option<E2 | E>, R2 | R>;
1544
+ /**
1545
+ * Returns an effect that will produce the value of this effect, unless it
1546
+ * fails with the `None` value, in which case it will produce the value of the
1547
+ * specified effect.
1548
+ *
1549
+ * @since 2.0.0
1550
+ * @category error handling
1551
+ */
1006
1552
  <A, E, R, A2, E2, R2>(self: STM<A, Option.Option<E>, R>, that: LazyArg<STM<A2, Option.Option<E2>, R2>>): STM<A | A2, Option.Option<E | E2>, R | R2>;
1007
1553
  };
1008
1554
  /**
@@ -1013,7 +1559,21 @@ export declare const orElseOptional: {
1013
1559
  * @category error handling
1014
1560
  */
1015
1561
  export declare const orElseSucceed: {
1562
+ /**
1563
+ * Tries this effect first, and if it fails or retries, succeeds with the
1564
+ * specified value.
1565
+ *
1566
+ * @since 2.0.0
1567
+ * @category error handling
1568
+ */
1016
1569
  <A2>(value: LazyArg<A2>): <A, E, R>(self: STM<A, E, R>) => STM<A2 | A, never, R>;
1570
+ /**
1571
+ * Tries this effect first, and if it fails or retries, succeeds with the
1572
+ * specified value.
1573
+ *
1574
+ * @since 2.0.0
1575
+ * @category error handling
1576
+ */
1017
1577
  <A, E, R, A2>(self: STM<A, E, R>, value: LazyArg<A2>): STM<A | A2, never, R>;
1018
1578
  };
1019
1579
  /**
@@ -1024,7 +1584,21 @@ export declare const orElseSucceed: {
1024
1584
  * @category error handling
1025
1585
  */
1026
1586
  export declare const orTry: {
1587
+ /**
1588
+ * Tries this effect first, and if it enters retry, then it tries the other
1589
+ * effect. This is an equivalent of Haskell's orElse.
1590
+ *
1591
+ * @since 2.0.0
1592
+ * @category error handling
1593
+ */
1027
1594
  <A1, E1, R1>(that: LazyArg<STM<A1, E1, R1>>): <A, E, R>(self: STM<A, E, R>) => STM<A1 | A, E1 | E, R1 | R>;
1595
+ /**
1596
+ * Tries this effect first, and if it enters retry, then it tries the other
1597
+ * effect. This is an equivalent of Haskell's orElse.
1598
+ *
1599
+ * @since 2.0.0
1600
+ * @category error handling
1601
+ */
1028
1602
  <A, E, R, A1, E1, R1>(self: STM<A, E, R>, that: LazyArg<STM<A1, E1, R1>>): STM<A | A1, E | E1, R | R1>;
1029
1603
  };
1030
1604
  /**
@@ -1035,7 +1609,21 @@ export declare const orTry: {
1035
1609
  * @category traversing
1036
1610
  */
1037
1611
  export declare const partition: {
1612
+ /**
1613
+ * Feeds elements of type `A` to a function `f` that returns an effect.
1614
+ * Collects all successes and failures in a tupled fashion.
1615
+ *
1616
+ * @since 2.0.0
1617
+ * @category traversing
1618
+ */
1038
1619
  <A, A2, E, R>(f: (a: A) => STM<A2, E, R>): (elements: Iterable<A>) => STM<[excluded: Array<E>, satisfying: Array<A2>], never, R>;
1620
+ /**
1621
+ * Feeds elements of type `A` to a function `f` that returns an effect.
1622
+ * Collects all successes and failures in a tupled fashion.
1623
+ *
1624
+ * @since 2.0.0
1625
+ * @category traversing
1626
+ */
1039
1627
  <A, A2, E, R>(elements: Iterable<A>, f: (a: A) => STM<A2, E, R>): STM<[excluded: Array<E>, satisfying: Array<A2>], never, R>;
1040
1628
  };
1041
1629
  /**
@@ -1046,7 +1634,21 @@ export declare const partition: {
1046
1634
  * @category context
1047
1635
  */
1048
1636
  export declare const provideContext: {
1637
+ /**
1638
+ * Provides the transaction its required environment, which eliminates its
1639
+ * dependency on `R`.
1640
+ *
1641
+ * @since 2.0.0
1642
+ * @category context
1643
+ */
1049
1644
  <R>(env: Context.Context<R>): <A, E>(self: STM<A, E, R>) => STM<A, E>;
1645
+ /**
1646
+ * Provides the transaction its required environment, which eliminates its
1647
+ * dependency on `R`.
1648
+ *
1649
+ * @since 2.0.0
1650
+ * @category context
1651
+ */
1050
1652
  <A, E, R>(self: STM<A, E, R>, env: Context.Context<R>): STM<A, E>;
1051
1653
  };
1052
1654
  /**
@@ -1057,7 +1659,21 @@ export declare const provideContext: {
1057
1659
  * @category context
1058
1660
  */
1059
1661
  export declare const provideSomeContext: {
1662
+ /**
1663
+ * Splits the context into two parts, providing one part using the
1664
+ * specified layer and leaving the remainder `R0`.
1665
+ *
1666
+ * @since 2.0.0
1667
+ * @category context
1668
+ */
1060
1669
  <R>(context: Context.Context<R>): <R1, E, A>(self: STM<A, E, R1>) => STM<A, E, Exclude<R1, R>>;
1670
+ /**
1671
+ * Splits the context into two parts, providing one part using the
1672
+ * specified layer and leaving the remainder `R0`.
1673
+ *
1674
+ * @since 2.0.0
1675
+ * @category context
1676
+ */
1061
1677
  <R, R1, E, A>(self: STM<A, E, R1>, context: Context.Context<R>): STM<A, E, Exclude<R1, R>>;
1062
1678
  };
1063
1679
  /**
@@ -1068,7 +1684,21 @@ export declare const provideSomeContext: {
1068
1684
  * @category context
1069
1685
  */
1070
1686
  export declare const provideService: {
1687
+ /**
1688
+ * Provides the effect with the single service it requires. If the transactional
1689
+ * effect requires more than one service use `provideEnvironment` instead.
1690
+ *
1691
+ * @since 2.0.0
1692
+ * @category context
1693
+ */
1071
1694
  <T extends Context.Tag<any, any>>(tag: T, resource: Context.Tag.Service<T>): <A, E, R>(self: STM<A, E, R>) => STM<A, E, Exclude<R, Context.Tag.Identifier<T>>>;
1695
+ /**
1696
+ * Provides the effect with the single service it requires. If the transactional
1697
+ * effect requires more than one service use `provideEnvironment` instead.
1698
+ *
1699
+ * @since 2.0.0
1700
+ * @category context
1701
+ */
1072
1702
  <A, E, R, T extends Context.Tag<any, any>>(self: STM<A, E, R>, tag: T, resource: Context.Tag.Service<T>): STM<A, E, Exclude<R, Context.Tag.Identifier<T>>>;
1073
1703
  };
1074
1704
  /**
@@ -1079,7 +1709,21 @@ export declare const provideService: {
1079
1709
  * @category context
1080
1710
  */
1081
1711
  export declare const provideServiceSTM: {
1712
+ /**
1713
+ * Provides the effect with the single service it requires. If the transactional
1714
+ * effect requires more than one service use `provideEnvironment` instead.
1715
+ *
1716
+ * @since 2.0.0
1717
+ * @category context
1718
+ */
1082
1719
  <T extends Context.Tag<any, any>, E1, R1>(tag: T, stm: STM<Context.Tag.Service<T>, E1, R1>): <A, E, R>(self: STM<A, E, R>) => STM<A, E1 | E, R1 | Exclude<R, Context.Tag.Identifier<T>>>;
1720
+ /**
1721
+ * Provides the effect with the single service it requires. If the transactional
1722
+ * effect requires more than one service use `provideEnvironment` instead.
1723
+ *
1724
+ * @since 2.0.0
1725
+ * @category context
1726
+ */
1083
1727
  <A, E, R, T extends Context.Tag<any, any>, E1, R1>(self: STM<A, E, R>, tag: T, stm: STM<Context.Tag.Service<T>, E1, R1>): STM<A, E | E1, R1 | Exclude<R, Context.Tag.Identifier<T>>>;
1084
1728
  };
1085
1729
  /**
@@ -1090,7 +1734,21 @@ export declare const provideServiceSTM: {
1090
1734
  * @category constructors
1091
1735
  */
1092
1736
  export declare const reduce: {
1737
+ /**
1738
+ * Folds an `Iterable<A>` using an effectual function f, working sequentially
1739
+ * from left to right.
1740
+ *
1741
+ * @since 2.0.0
1742
+ * @category constructors
1743
+ */
1093
1744
  <S, A, E, R>(zero: S, f: (s: S, a: A) => STM<S, E, R>): (iterable: Iterable<A>) => STM<S, E, R>;
1745
+ /**
1746
+ * Folds an `Iterable<A>` using an effectual function f, working sequentially
1747
+ * from left to right.
1748
+ *
1749
+ * @since 2.0.0
1750
+ * @category constructors
1751
+ */
1094
1752
  <S, A, E, R>(iterable: Iterable<A>, zero: S, f: (s: S, a: A) => STM<S, E, R>): STM<S, E, R>;
1095
1753
  };
1096
1754
  /**
@@ -1100,7 +1758,19 @@ export declare const reduce: {
1100
1758
  * @category constructors
1101
1759
  */
1102
1760
  export declare const reduceAll: {
1761
+ /**
1762
+ * Reduces an `Iterable<STM>` to a single `STM`, working sequentially.
1763
+ *
1764
+ * @since 2.0.0
1765
+ * @category constructors
1766
+ */
1103
1767
  <A, E2, R2>(initial: STM<A, E2, R2>, f: (x: A, y: A) => A): <E, R>(iterable: Iterable<STM<A, E, R>>) => STM<A, E2 | E, R2 | R>;
1768
+ /**
1769
+ * Reduces an `Iterable<STM>` to a single `STM`, working sequentially.
1770
+ *
1771
+ * @since 2.0.0
1772
+ * @category constructors
1773
+ */
1104
1774
  <A, E, R, E2, R2>(iterable: Iterable<STM<A, E, R>>, initial: STM<A, E2, R2>, f: (x: A, y: A) => A): STM<A, E | E2, R | R2>;
1105
1775
  };
1106
1776
  /**
@@ -1111,7 +1781,21 @@ export declare const reduceAll: {
1111
1781
  * @category constructors
1112
1782
  */
1113
1783
  export declare const reduceRight: {
1784
+ /**
1785
+ * Folds an `Iterable<A>` using an effectual function f, working sequentially
1786
+ * from right to left.
1787
+ *
1788
+ * @since 2.0.0
1789
+ * @category constructors
1790
+ */
1114
1791
  <S, A, R, E>(zero: S, f: (s: S, a: A) => STM<S, E, R>): (iterable: Iterable<A>) => STM<S, E, R>;
1792
+ /**
1793
+ * Folds an `Iterable<A>` using an effectual function f, working sequentially
1794
+ * from right to left.
1795
+ *
1796
+ * @since 2.0.0
1797
+ * @category constructors
1798
+ */
1115
1799
  <S, A, R, E>(iterable: Iterable<A>, zero: S, f: (s: S, a: A) => STM<S, E, R>): STM<S, E, R>;
1116
1800
  };
1117
1801
  /**
@@ -1121,7 +1805,19 @@ export declare const reduceRight: {
1121
1805
  * @category mutations
1122
1806
  */
1123
1807
  export declare const refineOrDie: {
1808
+ /**
1809
+ * Keeps some of the errors, and terminates the fiber with the rest.
1810
+ *
1811
+ * @since 2.0.0
1812
+ * @category mutations
1813
+ */
1124
1814
  <E, E2>(pf: (error: E) => Option.Option<E2>): <A, R>(self: STM<A, E, R>) => STM<A, E2, R>;
1815
+ /**
1816
+ * Keeps some of the errors, and terminates the fiber with the rest.
1817
+ *
1818
+ * @since 2.0.0
1819
+ * @category mutations
1820
+ */
1125
1821
  <A, E, R, E2>(self: STM<A, E, R>, pf: (error: E) => Option.Option<E2>): STM<A, E2, R>;
1126
1822
  };
1127
1823
  /**
@@ -1132,7 +1828,21 @@ export declare const refineOrDie: {
1132
1828
  * @category mutations
1133
1829
  */
1134
1830
  export declare const refineOrDieWith: {
1831
+ /**
1832
+ * Keeps some of the errors, and terminates the fiber with the rest, using the
1833
+ * specified function to convert the `E` into a `Throwable`.
1834
+ *
1835
+ * @since 2.0.0
1836
+ * @category mutations
1837
+ */
1135
1838
  <E, E2>(pf: (error: E) => Option.Option<E2>, f: (error: E) => unknown): <A, R>(self: STM<A, E, R>) => STM<A, E2, R>;
1839
+ /**
1840
+ * Keeps some of the errors, and terminates the fiber with the rest, using the
1841
+ * specified function to convert the `E` into a `Throwable`.
1842
+ *
1843
+ * @since 2.0.0
1844
+ * @category mutations
1845
+ */
1136
1846
  <A, E, R, E2>(self: STM<A, E, R>, pf: (error: E) => Option.Option<E2>, f: (error: E) => unknown): STM<A, E2, R>;
1137
1847
  };
1138
1848
  /**
@@ -1143,7 +1853,21 @@ export declare const refineOrDieWith: {
1143
1853
  * @category mutations
1144
1854
  */
1145
1855
  export declare const reject: {
1856
+ /**
1857
+ * Fail with the returned value if the `PartialFunction` matches, otherwise
1858
+ * continue with our held value.
1859
+ *
1860
+ * @since 2.0.0
1861
+ * @category mutations
1862
+ */
1146
1863
  <A, E2>(pf: (a: A) => Option.Option<E2>): <E, R>(self: STM<A, E, R>) => STM<A, E2 | E, R>;
1864
+ /**
1865
+ * Fail with the returned value if the `PartialFunction` matches, otherwise
1866
+ * continue with our held value.
1867
+ *
1868
+ * @since 2.0.0
1869
+ * @category mutations
1870
+ */
1147
1871
  <A, E, R, E2>(self: STM<A, E, R>, pf: (a: A) => Option.Option<E2>): STM<A, E | E2, R>;
1148
1872
  };
1149
1873
  /**
@@ -1155,7 +1879,23 @@ export declare const reject: {
1155
1879
  * @category mutations
1156
1880
  */
1157
1881
  export declare const rejectSTM: {
1882
+ /**
1883
+ * Continue with the returned computation if the specified partial function
1884
+ * matches, translating the successful match into a failure, otherwise continue
1885
+ * with our held value.
1886
+ *
1887
+ * @since 2.0.0
1888
+ * @category mutations
1889
+ */
1158
1890
  <A, E2, R2>(pf: (a: A) => Option.Option<STM<E2, E2, R2>>): <E, R>(self: STM<A, E, R>) => STM<A, E2 | E, R2 | R>;
1891
+ /**
1892
+ * Continue with the returned computation if the specified partial function
1893
+ * matches, translating the successful match into a failure, otherwise continue
1894
+ * with our held value.
1895
+ *
1896
+ * @since 2.0.0
1897
+ * @category mutations
1898
+ */
1159
1899
  <A, E, R, E2, R2>(self: STM<A, E, R>, pf: (a: A) => Option.Option<STM<E2, E2, R2>>): STM<A, E | E2, R | R2>;
1160
1900
  };
1161
1901
  /**
@@ -1174,7 +1914,37 @@ export declare const rejectSTM: {
1174
1914
  * @category mutations
1175
1915
  */
1176
1916
  export declare const repeatUntil: {
1917
+ /**
1918
+ * Repeats this `STM` effect until its result satisfies the specified
1919
+ * predicate.
1920
+ *
1921
+ * **WARNING**: `repeatUntil` uses a busy loop to repeat the effect and will
1922
+ * consume a thread until it completes (it cannot yield). This is because STM
1923
+ * describes a single atomic transaction which must either complete, retry or
1924
+ * fail a transaction before yielding back to the Effect runtime.
1925
+ * - Use `retryUntil` instead if you don't need to maintain transaction
1926
+ * state for repeats.
1927
+ * - Ensure repeating the STM effect will eventually satisfy the predicate.
1928
+ *
1929
+ * @since 2.0.0
1930
+ * @category mutations
1931
+ */
1177
1932
  <A>(predicate: Predicate<A>): <E, R>(self: STM<A, E, R>) => STM<A, E, R>;
1933
+ /**
1934
+ * Repeats this `STM` effect until its result satisfies the specified
1935
+ * predicate.
1936
+ *
1937
+ * **WARNING**: `repeatUntil` uses a busy loop to repeat the effect and will
1938
+ * consume a thread until it completes (it cannot yield). This is because STM
1939
+ * describes a single atomic transaction which must either complete, retry or
1940
+ * fail a transaction before yielding back to the Effect runtime.
1941
+ * - Use `retryUntil` instead if you don't need to maintain transaction
1942
+ * state for repeats.
1943
+ * - Ensure repeating the STM effect will eventually satisfy the predicate.
1944
+ *
1945
+ * @since 2.0.0
1946
+ * @category mutations
1947
+ */
1178
1948
  <A, E, R>(self: STM<A, E, R>, predicate: Predicate<A>): STM<A, E, R>;
1179
1949
  };
1180
1950
  /**
@@ -1194,7 +1964,39 @@ export declare const repeatUntil: {
1194
1964
  * @category mutations
1195
1965
  */
1196
1966
  export declare const repeatWhile: {
1967
+ /**
1968
+ * Repeats this `STM` effect while its result satisfies the specified
1969
+ * predicate.
1970
+ *
1971
+ * **WARNING**: `repeatWhile` uses a busy loop to repeat the effect and will
1972
+ * consume a thread until it completes (it cannot yield). This is because STM
1973
+ * describes a single atomic transaction which must either complete, retry or
1974
+ * fail a transaction before yielding back to the Effect runtime.
1975
+ * - Use `retryWhile` instead if you don't need to maintain transaction
1976
+ * state for repeats.
1977
+ * - Ensure repeating the STM effect will eventually not satisfy the
1978
+ * predicate.
1979
+ *
1980
+ * @since 2.0.0
1981
+ * @category mutations
1982
+ */
1197
1983
  <A>(predicate: Predicate<A>): <E, R>(self: STM<A, E, R>) => STM<A, E, R>;
1984
+ /**
1985
+ * Repeats this `STM` effect while its result satisfies the specified
1986
+ * predicate.
1987
+ *
1988
+ * **WARNING**: `repeatWhile` uses a busy loop to repeat the effect and will
1989
+ * consume a thread until it completes (it cannot yield). This is because STM
1990
+ * describes a single atomic transaction which must either complete, retry or
1991
+ * fail a transaction before yielding back to the Effect runtime.
1992
+ * - Use `retryWhile` instead if you don't need to maintain transaction
1993
+ * state for repeats.
1994
+ * - Ensure repeating the STM effect will eventually not satisfy the
1995
+ * predicate.
1996
+ *
1997
+ * @since 2.0.0
1998
+ * @category mutations
1999
+ */
1198
2000
  <A, E, R>(self: STM<A, E, R>, predicate: Predicate<A>): STM<A, E, R>;
1199
2001
  };
1200
2002
  /**
@@ -1205,7 +2007,21 @@ export declare const repeatWhile: {
1205
2007
  * @category constructors
1206
2008
  */
1207
2009
  export declare const replicate: {
2010
+ /**
2011
+ * Replicates the given effect n times. If 0 or negative numbers are given, an
2012
+ * empty `Chunk` will be returned.
2013
+ *
2014
+ * @since 2.0.0
2015
+ * @category constructors
2016
+ */
1208
2017
  (n: number): <A, E, R>(self: STM<A, E, R>) => Array<STM<A, E, R>>;
2018
+ /**
2019
+ * Replicates the given effect n times. If 0 or negative numbers are given, an
2020
+ * empty `Chunk` will be returned.
2021
+ *
2022
+ * @since 2.0.0
2023
+ * @category constructors
2024
+ */
1209
2025
  <A, E, R>(self: STM<A, E, R>, n: number): Array<STM<A, E, R>>;
1210
2026
  };
1211
2027
  /**
@@ -1216,7 +2032,21 @@ export declare const replicate: {
1216
2032
  * @category constructors
1217
2033
  */
1218
2034
  export declare const replicateSTM: {
2035
+ /**
2036
+ * Performs this transaction the specified number of times and collects the
2037
+ * results.
2038
+ *
2039
+ * @since 2.0.0
2040
+ * @category constructors
2041
+ */
1219
2042
  (n: number): <A, E, R>(self: STM<A, E, R>) => STM<Array<A>, E, R>;
2043
+ /**
2044
+ * Performs this transaction the specified number of times and collects the
2045
+ * results.
2046
+ *
2047
+ * @since 2.0.0
2048
+ * @category constructors
2049
+ */
1220
2050
  <A, E, R>(self: STM<A, E, R>, n: number): STM<Array<A>, E, R>;
1221
2051
  };
1222
2052
  /**
@@ -1227,7 +2057,21 @@ export declare const replicateSTM: {
1227
2057
  * @category constructors
1228
2058
  */
1229
2059
  export declare const replicateSTMDiscard: {
2060
+ /**
2061
+ * Performs this transaction the specified number of times, discarding the
2062
+ * results.
2063
+ *
2064
+ * @since 2.0.0
2065
+ * @category constructors
2066
+ */
1230
2067
  (n: number): <A, E, R>(self: STM<A, E, R>) => STM<void, E, R>;
2068
+ /**
2069
+ * Performs this transaction the specified number of times, discarding the
2070
+ * results.
2071
+ *
2072
+ * @since 2.0.0
2073
+ * @category constructors
2074
+ */
1231
2075
  <A, E, R>(self: STM<A, E, R>, n: number): STM<void, E, R>;
1232
2076
  };
1233
2077
  /**
@@ -1246,9 +2090,37 @@ export declare const retry: STM<never>;
1246
2090
  * @category mutations
1247
2091
  */
1248
2092
  export declare const retryUntil: {
2093
+ /**
2094
+ * Filters the value produced by this effect, retrying the transaction until
2095
+ * the predicate returns `true` for the value.
2096
+ *
2097
+ * @since 2.0.0
2098
+ * @category mutations
2099
+ */
1249
2100
  <A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <E, R>(self: STM<A, E, R>) => STM<B, E, R>;
2101
+ /**
2102
+ * Filters the value produced by this effect, retrying the transaction until
2103
+ * the predicate returns `true` for the value.
2104
+ *
2105
+ * @since 2.0.0
2106
+ * @category mutations
2107
+ */
1250
2108
  <A>(predicate: Predicate<A>): <E, R>(self: STM<A, E, R>) => STM<A, E, R>;
2109
+ /**
2110
+ * Filters the value produced by this effect, retrying the transaction until
2111
+ * the predicate returns `true` for the value.
2112
+ *
2113
+ * @since 2.0.0
2114
+ * @category mutations
2115
+ */
1251
2116
  <A, E, R, B extends A>(self: STM<A, E, R>, refinement: Refinement<A, B>): STM<B, E, R>;
2117
+ /**
2118
+ * Filters the value produced by this effect, retrying the transaction until
2119
+ * the predicate returns `true` for the value.
2120
+ *
2121
+ * @since 2.0.0
2122
+ * @category mutations
2123
+ */
1252
2124
  <A, E, R>(self: STM<A, E, R>, predicate: Predicate<A>): STM<A, E, R>;
1253
2125
  };
1254
2126
  /**
@@ -1259,7 +2131,21 @@ export declare const retryUntil: {
1259
2131
  * @category mutations
1260
2132
  */
1261
2133
  export declare const retryWhile: {
2134
+ /**
2135
+ * Filters the value produced by this effect, retrying the transaction while
2136
+ * the predicate returns `true` for the value.
2137
+ *
2138
+ * @since 2.0.0
2139
+ * @category mutations
2140
+ */
1262
2141
  <A>(predicate: Predicate<A>): <E, R>(self: STM<A, E, R>) => STM<A, E, R>;
2142
+ /**
2143
+ * Filters the value produced by this effect, retrying the transaction while
2144
+ * the predicate returns `true` for the value.
2145
+ *
2146
+ * @since 2.0.0
2147
+ * @category mutations
2148
+ */
1263
2149
  <A, E, R>(self: STM<A, E, R>, predicate: Predicate<A>): STM<A, E, R>;
1264
2150
  };
1265
2151
  /**
@@ -1299,7 +2185,23 @@ export declare const succeedSome: <A>(value: A) => STM<Option.Option<A>>;
1299
2185
  * @category mutations
1300
2186
  */
1301
2187
  export declare const summarized: {
2188
+ /**
2189
+ * Summarizes a `STM` effect by computing a provided value before and after
2190
+ * execution, and then combining the values to produce a summary, together
2191
+ * with the result of execution.
2192
+ *
2193
+ * @since 2.0.0
2194
+ * @category mutations
2195
+ */
1302
2196
  <A2, E2, R2, A3>(summary: STM<A2, E2, R2>, f: (before: A2, after: A2) => A3): <A, E, R>(self: STM<A, E, R>) => STM<[A3, A], E2 | E, R2 | R>;
2197
+ /**
2198
+ * Summarizes a `STM` effect by computing a provided value before and after
2199
+ * execution, and then combining the values to produce a summary, together
2200
+ * with the result of execution.
2201
+ *
2202
+ * @since 2.0.0
2203
+ * @category mutations
2204
+ */
1303
2205
  <A, E, R, A2, E2, R2, A3>(self: STM<A, E, R>, summary: STM<A2, E2, R2>, f: (before: A2, after: A2) => A3): STM<[A3, A], E | E2, R | R2>;
1304
2206
  };
1305
2207
  /**
@@ -1324,7 +2226,19 @@ export declare const sync: <A>(evaluate: () => A) => STM<A>;
1324
2226
  * @category sequencing
1325
2227
  */
1326
2228
  export declare const tap: {
2229
+ /**
2230
+ * "Peeks" at the success of transactional effect.
2231
+ *
2232
+ * @since 2.0.0
2233
+ * @category sequencing
2234
+ */
1327
2235
  <A, X, E2, R2>(f: (a: A) => STM<X, E2, R2>): <E, R>(self: STM<A, E, R>) => STM<A, E2 | E, R2 | R>;
2236
+ /**
2237
+ * "Peeks" at the success of transactional effect.
2238
+ *
2239
+ * @since 2.0.0
2240
+ * @category sequencing
2241
+ */
1328
2242
  <A, E, R, X, E2, R2>(self: STM<A, E, R>, f: (a: A) => STM<X, E2, R2>): STM<A, E | E2, R | R2>;
1329
2243
  };
1330
2244
  /**
@@ -1334,10 +2248,22 @@ export declare const tap: {
1334
2248
  * @category sequencing
1335
2249
  */
1336
2250
  export declare const tapBoth: {
2251
+ /**
2252
+ * "Peeks" at both sides of an transactional effect.
2253
+ *
2254
+ * @since 2.0.0
2255
+ * @category sequencing
2256
+ */
1337
2257
  <XE extends E, A2, E2, R2, XA extends A, A3, E3, R3, A, E>(options: {
1338
2258
  readonly onFailure: (error: XE) => STM<A2, E2, R2>;
1339
2259
  readonly onSuccess: (value: XA) => STM<A3, E3, R3>;
1340
2260
  }): <R>(self: STM<A, E, R>) => STM<A, E | E2 | E3, R2 | R3 | R>;
2261
+ /**
2262
+ * "Peeks" at both sides of an transactional effect.
2263
+ *
2264
+ * @since 2.0.0
2265
+ * @category sequencing
2266
+ */
1341
2267
  <A, E, R, XE extends E, A2, E2, R2, XA extends A, A3, E3, R3>(self: STM<A, E, R>, options: {
1342
2268
  readonly onFailure: (error: XE) => STM<A2, E2, R2>;
1343
2269
  readonly onSuccess: (value: XA) => STM<A3, E3, R3>;
@@ -1350,7 +2276,19 @@ export declare const tapBoth: {
1350
2276
  * @category sequencing
1351
2277
  */
1352
2278
  export declare const tapError: {
2279
+ /**
2280
+ * "Peeks" at the error of the transactional effect.
2281
+ *
2282
+ * @since 2.0.0
2283
+ * @category sequencing
2284
+ */
1353
2285
  <E, X, E2, R2>(f: (error: NoInfer<E>) => STM<X, E2, R2>): <A, R>(self: STM<A, E, R>) => STM<A, E | E2, R2 | R>;
2286
+ /**
2287
+ * "Peeks" at the error of the transactional effect.
2288
+ *
2289
+ * @since 2.0.0
2290
+ * @category sequencing
2291
+ */
1354
2292
  <A, E, R, X, E2, R2>(self: STM<A, E, R>, f: (error: E) => STM<X, E2, R2>): STM<A, E | E2, R | R2>;
1355
2293
  };
1356
2294
  declare const try_: {
@@ -1376,7 +2314,19 @@ try_ as try };
1376
2314
  * @category mutations
1377
2315
  */
1378
2316
  export declare const unless: {
2317
+ /**
2318
+ * The moral equivalent of `if (!p) exp`
2319
+ *
2320
+ * @since 2.0.0
2321
+ * @category mutations
2322
+ */
1379
2323
  (predicate: LazyArg<boolean>): <A, E, R>(self: STM<A, E, R>) => STM<Option.Option<A>, E, R>;
2324
+ /**
2325
+ * The moral equivalent of `if (!p) exp`
2326
+ *
2327
+ * @since 2.0.0
2328
+ * @category mutations
2329
+ */
1380
2330
  <A, E, R>(self: STM<A, E, R>, predicate: LazyArg<boolean>): STM<Option.Option<A>, E, R>;
1381
2331
  };
1382
2332
  /**
@@ -1386,7 +2336,19 @@ export declare const unless: {
1386
2336
  * @category mutations
1387
2337
  */
1388
2338
  export declare const unlessSTM: {
2339
+ /**
2340
+ * The moral equivalent of `if (!p) exp` when `p` has side-effects
2341
+ *
2342
+ * @since 2.0.0
2343
+ * @category mutations
2344
+ */
1389
2345
  <E2, R2>(predicate: STM<boolean, E2, R2>): <A, E, R>(self: STM<A, E, R>) => STM<Option.Option<A>, E2 | E, R2 | R>;
2346
+ /**
2347
+ * The moral equivalent of `if (!p) exp` when `p` has side-effects
2348
+ *
2349
+ * @since 2.0.0
2350
+ * @category mutations
2351
+ */
1390
2352
  <A, E, R, E2, R2>(self: STM<A, E, R>, predicate: STM<boolean, E2, R2>): STM<Option.Option<A>, E | E2, R | R2>;
1391
2353
  };
1392
2354
  /**
@@ -1416,7 +2378,27 @@ void_ as void };
1416
2378
  * @category mutations
1417
2379
  */
1418
2380
  export declare const validateAll: {
2381
+ /**
2382
+ * Feeds elements of type `A` to `f` and accumulates all errors in error
2383
+ * channel or successes in success channel.
2384
+ *
2385
+ * This combinator is lossy meaning that if there are errors all successes
2386
+ * will be lost. To retain all information please use `STM.partition`.
2387
+ *
2388
+ * @since 2.0.0
2389
+ * @category mutations
2390
+ */
1419
2391
  <A, B, E, R>(f: (a: A) => STM<B, E, R>): (elements: Iterable<A>) => STM<Array<B>, [E, ...Array<E>], R>;
2392
+ /**
2393
+ * Feeds elements of type `A` to `f` and accumulates all errors in error
2394
+ * channel or successes in success channel.
2395
+ *
2396
+ * This combinator is lossy meaning that if there are errors all successes
2397
+ * will be lost. To retain all information please use `STM.partition`.
2398
+ *
2399
+ * @since 2.0.0
2400
+ * @category mutations
2401
+ */
1420
2402
  <A, B, E, R>(elements: Iterable<A>, f: (a: A) => STM<B, E, R>): STM<Array<B>, [E, ...Array<E>], R>;
1421
2403
  };
1422
2404
  /**
@@ -1427,7 +2409,21 @@ export declare const validateAll: {
1427
2409
  * @category mutations
1428
2410
  */
1429
2411
  export declare const validateFirst: {
2412
+ /**
2413
+ * Feeds elements of type `A` to `f` until it succeeds. Returns first success
2414
+ * or the accumulation of all errors.
2415
+ *
2416
+ * @since 2.0.0
2417
+ * @category mutations
2418
+ */
1430
2419
  <A, B, E, R>(f: (a: A) => STM<B, E, R>): (elements: Iterable<A>) => STM<B, Array<E>, R>;
2420
+ /**
2421
+ * Feeds elements of type `A` to `f` until it succeeds. Returns first success
2422
+ * or the accumulation of all errors.
2423
+ *
2424
+ * @since 2.0.0
2425
+ * @category mutations
2426
+ */
1431
2427
  <A, B, E, R>(elements: Iterable<A>, f: (a: A) => STM<B, E, R>): STM<B, Array<E>, R>;
1432
2428
  };
1433
2429
  /**
@@ -1437,7 +2433,19 @@ export declare const validateFirst: {
1437
2433
  * @category mutations
1438
2434
  */
1439
2435
  export declare const when: {
2436
+ /**
2437
+ * The moral equivalent of `if (p) exp`.
2438
+ *
2439
+ * @since 2.0.0
2440
+ * @category mutations
2441
+ */
1440
2442
  (predicate: LazyArg<boolean>): <A, E, R>(self: STM<A, E, R>) => STM<Option.Option<A>, E, R>;
2443
+ /**
2444
+ * The moral equivalent of `if (p) exp`.
2445
+ *
2446
+ * @since 2.0.0
2447
+ * @category mutations
2448
+ */
1441
2449
  <A, E, R>(self: STM<A, E, R>, predicate: LazyArg<boolean>): STM<Option.Option<A>, E, R>;
1442
2450
  };
1443
2451
  /**
@@ -1447,7 +2455,19 @@ export declare const when: {
1447
2455
  * @category mutations
1448
2456
  */
1449
2457
  export declare const whenSTM: {
2458
+ /**
2459
+ * The moral equivalent of `if (p) exp` when `p` has side-effects.
2460
+ *
2461
+ * @since 2.0.0
2462
+ * @category mutations
2463
+ */
1450
2464
  <E2, R2>(predicate: STM<boolean, E2, R2>): <A, E, R>(self: STM<A, E, R>) => STM<Option.Option<A>, E2 | E, R2 | R>;
2465
+ /**
2466
+ * The moral equivalent of `if (p) exp` when `p` has side-effects.
2467
+ *
2468
+ * @since 2.0.0
2469
+ * @category mutations
2470
+ */
1451
2471
  <A, E, R, E2, R2>(self: STM<A, E, R>, predicate: STM<boolean, E2, R2>): STM<Option.Option<A>, E | E2, R | R2>;
1452
2472
  };
1453
2473
  /**
@@ -1457,7 +2477,19 @@ export declare const whenSTM: {
1457
2477
  * @category zipping
1458
2478
  */
1459
2479
  export declare const zip: {
2480
+ /**
2481
+ * Sequentially zips this value with the specified one.
2482
+ *
2483
+ * @since 2.0.0
2484
+ * @category zipping
2485
+ */
1460
2486
  <A1, E1, R1>(that: STM<A1, E1, R1>): <A, E, R>(self: STM<A, E, R>) => STM<[A, A1], E1 | E, R1 | R>;
2487
+ /**
2488
+ * Sequentially zips this value with the specified one.
2489
+ *
2490
+ * @since 2.0.0
2491
+ * @category zipping
2492
+ */
1461
2493
  <A, E, R, A1, E1, R1>(self: STM<A, E, R>, that: STM<A1, E1, R1>): STM<[A, A1], E | E1, R | R1>;
1462
2494
  };
1463
2495
  /**
@@ -1468,7 +2500,21 @@ export declare const zip: {
1468
2500
  * @category zipping
1469
2501
  */
1470
2502
  export declare const zipLeft: {
2503
+ /**
2504
+ * Sequentially zips this value with the specified one, discarding the second
2505
+ * element of the tuple.
2506
+ *
2507
+ * @since 2.0.0
2508
+ * @category zipping
2509
+ */
1471
2510
  <A1, E1, R1>(that: STM<A1, E1, R1>): <A, E, R>(self: STM<A, E, R>) => STM<A, E1 | E, R1 | R>;
2511
+ /**
2512
+ * Sequentially zips this value with the specified one, discarding the second
2513
+ * element of the tuple.
2514
+ *
2515
+ * @since 2.0.0
2516
+ * @category zipping
2517
+ */
1472
2518
  <A, E, R, A1, E1, R1>(self: STM<A, E, R>, that: STM<A1, E1, R1>): STM<A, E | E1, R | R1>;
1473
2519
  };
1474
2520
  /**
@@ -1479,7 +2525,21 @@ export declare const zipLeft: {
1479
2525
  * @category zipping
1480
2526
  */
1481
2527
  export declare const zipRight: {
2528
+ /**
2529
+ * Sequentially zips this value with the specified one, discarding the first
2530
+ * element of the tuple.
2531
+ *
2532
+ * @since 2.0.0
2533
+ * @category zipping
2534
+ */
1482
2535
  <A1, E1, R1>(that: STM<A1, E1, R1>): <A, E, R>(self: STM<A, E, R>) => STM<A1, E1 | E, R1 | R>;
2536
+ /**
2537
+ * Sequentially zips this value with the specified one, discarding the first
2538
+ * element of the tuple.
2539
+ *
2540
+ * @since 2.0.0
2541
+ * @category zipping
2542
+ */
1483
2543
  <A, E, R, A1, E1, R1>(self: STM<A, E, R>, that: STM<A1, E1, R1>): STM<A1, E | E1, R | R1>;
1484
2544
  };
1485
2545
  /**
@@ -1490,7 +2550,21 @@ export declare const zipRight: {
1490
2550
  * @category zipping
1491
2551
  */
1492
2552
  export declare const zipWith: {
2553
+ /**
2554
+ * Sequentially zips this value with the specified one, combining the values
2555
+ * using the specified combiner function.
2556
+ *
2557
+ * @since 2.0.0
2558
+ * @category zipping
2559
+ */
1493
2560
  <A1, E1, R1, A, A2>(that: STM<A1, E1, R1>, f: (a: A, b: A1) => A2): <E, R>(self: STM<A, E, R>) => STM<A2, E1 | E, R1 | R>;
2561
+ /**
2562
+ * Sequentially zips this value with the specified one, combining the values
2563
+ * using the specified combiner function.
2564
+ *
2565
+ * @since 2.0.0
2566
+ * @category zipping
2567
+ */
1494
2568
  <A, E, R, A1, E1, R1, A2>(self: STM<A, E, R>, that: STM<A1, E1, R1>, f: (a: A, b: A1) => A2): STM<A2, E | E1, R | R1>;
1495
2569
  };
1496
2570
  /**
@@ -1523,9 +2597,17 @@ export declare const Do: STM<{}>;
1523
2597
  * @since 2.0.0
1524
2598
  */
1525
2599
  export declare const bind: {
2600
+ /**
2601
+ * @category do notation
2602
+ * @since 2.0.0
2603
+ */
1526
2604
  <N extends string, K, A, E2, R2>(tag: Exclude<N, keyof K>, f: (_: K) => STM<A, E2, R2>): <E, R>(self: STM<K, E, R>) => STM<MergeRecord<K, {
1527
2605
  [k in N]: A;
1528
2606
  }>, E2 | E, R2 | R>;
2607
+ /**
2608
+ * @category do notation
2609
+ * @since 2.0.0
2610
+ */
1529
2611
  <K, E, R, N extends string, A, E2, R2>(self: STM<K, E, R>, tag: Exclude<N, keyof K>, f: (_: K) => STM<A, E2, R2>): STM<MergeRecord<K, {
1530
2612
  [k in N]: A;
1531
2613
  }>, E | E2, R | R2>;
@@ -1549,7 +2631,15 @@ let_ as let };
1549
2631
  * @since 2.0.0
1550
2632
  */
1551
2633
  export declare const bindTo: {
2634
+ /**
2635
+ * @category do notation
2636
+ * @since 2.0.0
2637
+ */
1552
2638
  <N extends string>(tag: N): <A, E, R>(self: STM<A, E, R>) => STM<Record<N, A>, E, R>;
2639
+ /**
2640
+ * @category do notation
2641
+ * @since 2.0.0
2642
+ */
1553
2643
  <A, E, R, N extends string>(self: STM<A, E, R>, tag: N): STM<Record<N, A>, E, R>;
1554
2644
  };
1555
2645
  //# sourceMappingURL=STM.d.ts.map