effect 2.2.5 → 2.3.1

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 (693) hide show
  1. package/RateLimiter/package.json +6 -0
  2. package/dist/cjs/Cause.js +14 -1
  3. package/dist/cjs/Cause.js.map +1 -1
  4. package/dist/cjs/Channel.js.map +1 -1
  5. package/dist/cjs/Clock.js.map +1 -1
  6. package/dist/cjs/Console.js.map +1 -1
  7. package/dist/cjs/Context.js +23 -25
  8. package/dist/cjs/Context.js.map +1 -1
  9. package/dist/cjs/Data.js +3 -3
  10. package/dist/cjs/Data.js.map +1 -1
  11. package/dist/cjs/Deferred.js +1 -1
  12. package/dist/cjs/Deferred.js.map +1 -1
  13. package/dist/cjs/Effect.js +9 -9
  14. package/dist/cjs/Effect.js.map +1 -1
  15. package/dist/cjs/Effectable.js.map +1 -1
  16. package/dist/cjs/Either.js.map +1 -1
  17. package/dist/cjs/Exit.js +2 -2
  18. package/dist/cjs/Exit.js.map +1 -1
  19. package/dist/cjs/Fiber.js.map +1 -1
  20. package/dist/cjs/FiberMap.js +3 -3
  21. package/dist/cjs/FiberRef.js.map +1 -1
  22. package/dist/cjs/FiberRefs.js.map +1 -1
  23. package/dist/cjs/FiberSet.js +3 -3
  24. package/dist/cjs/FiberSet.js.map +1 -1
  25. package/dist/cjs/GroupBy.js.map +1 -1
  26. package/dist/cjs/Layer.js.map +1 -1
  27. package/dist/cjs/LogLevel.js.map +1 -1
  28. package/dist/cjs/Logger.js.map +1 -1
  29. package/dist/cjs/Metric.js.map +1 -1
  30. package/dist/cjs/Number.js +20 -1
  31. package/dist/cjs/Number.js.map +1 -1
  32. package/dist/cjs/Option.js.map +1 -1
  33. package/dist/cjs/Pool.js.map +1 -1
  34. package/dist/cjs/PubSub.js.map +1 -1
  35. package/dist/cjs/Queue.js.map +1 -1
  36. package/dist/cjs/Random.js.map +1 -1
  37. package/dist/cjs/RateLimiter.js +38 -0
  38. package/dist/cjs/RateLimiter.js.map +1 -0
  39. package/dist/cjs/ReadonlyRecord.js +45 -9
  40. package/dist/cjs/ReadonlyRecord.js.map +1 -1
  41. package/dist/cjs/Ref.js.map +1 -1
  42. package/dist/cjs/Request.js.map +1 -1
  43. package/dist/cjs/RequestResolver.js.map +1 -1
  44. package/dist/cjs/Resource.js.map +1 -1
  45. package/dist/cjs/Runtime.js +1 -4
  46. package/dist/cjs/Runtime.js.map +1 -1
  47. package/dist/cjs/RuntimeFlags.js.map +1 -1
  48. package/dist/cjs/STM.js.map +1 -1
  49. package/dist/cjs/Schedule.js.map +1 -1
  50. package/dist/cjs/Scope.js.map +1 -1
  51. package/dist/cjs/ScopedRef.js.map +1 -1
  52. package/dist/cjs/SingleProducerAsyncInput.js.map +1 -1
  53. package/dist/cjs/Sink.js.map +1 -1
  54. package/dist/cjs/Stream.js.map +1 -1
  55. package/dist/cjs/SubscriptionRef.js.map +1 -1
  56. package/dist/cjs/Supervisor.js.map +1 -1
  57. package/dist/cjs/SynchronizedRef.js.map +1 -1
  58. package/dist/cjs/TArray.js.map +1 -1
  59. package/dist/cjs/TDeferred.js.map +1 -1
  60. package/dist/cjs/TMap.js.map +1 -1
  61. package/dist/cjs/TPriorityQueue.js.map +1 -1
  62. package/dist/cjs/TPubSub.js.map +1 -1
  63. package/dist/cjs/TQueue.js.map +1 -1
  64. package/dist/cjs/TRandom.js.map +1 -1
  65. package/dist/cjs/TReentrantLock.js.map +1 -1
  66. package/dist/cjs/TRef.js.map +1 -1
  67. package/dist/cjs/TSemaphore.js.map +1 -1
  68. package/dist/cjs/TSet.js.map +1 -1
  69. package/dist/cjs/Take.js +6 -6
  70. package/dist/cjs/Take.js.map +1 -1
  71. package/dist/cjs/TestAnnotation.js +10 -13
  72. package/dist/cjs/TestAnnotation.js.map +1 -1
  73. package/dist/cjs/TestAnnotations.js +1 -1
  74. package/dist/cjs/TestAnnotations.js.map +1 -1
  75. package/dist/cjs/TestClock.js +1 -1
  76. package/dist/cjs/TestClock.js.map +1 -1
  77. package/dist/cjs/TestConfig.js +1 -1
  78. package/dist/cjs/TestConfig.js.map +1 -1
  79. package/dist/cjs/TestContext.js.map +1 -1
  80. package/dist/cjs/TestLive.js +1 -1
  81. package/dist/cjs/TestLive.js.map +1 -1
  82. package/dist/cjs/TestServices.js.map +1 -1
  83. package/dist/cjs/TestSized.js +1 -1
  84. package/dist/cjs/TestSized.js.map +1 -1
  85. package/dist/cjs/Utils.js +0 -1
  86. package/dist/cjs/Utils.js.map +1 -1
  87. package/dist/cjs/index.js +4 -2
  88. package/dist/cjs/index.js.map +1 -1
  89. package/dist/cjs/internal/cache.js.map +1 -1
  90. package/dist/cjs/internal/channel/channelExecutor.js.map +1 -1
  91. package/dist/cjs/internal/channel/mergeDecision.js +2 -6
  92. package/dist/cjs/internal/channel/mergeDecision.js.map +1 -1
  93. package/dist/cjs/internal/channel/singleProducerAsyncInput.js.map +1 -1
  94. package/dist/cjs/internal/channel.js +1 -1
  95. package/dist/cjs/internal/channel.js.map +1 -1
  96. package/dist/cjs/internal/clock.js +1 -1
  97. package/dist/cjs/internal/clock.js.map +1 -1
  98. package/dist/cjs/internal/configProvider.js +2 -4
  99. package/dist/cjs/internal/configProvider.js.map +1 -1
  100. package/dist/cjs/internal/console.js.map +1 -1
  101. package/dist/cjs/internal/context.js +31 -22
  102. package/dist/cjs/internal/context.js.map +1 -1
  103. package/dist/cjs/internal/core-effect.js +13 -27
  104. package/dist/cjs/internal/core-effect.js.map +1 -1
  105. package/dist/cjs/internal/core-stream.js.map +1 -1
  106. package/dist/cjs/internal/core.js +61 -130
  107. package/dist/cjs/internal/core.js.map +1 -1
  108. package/dist/cjs/internal/data.js.map +1 -1
  109. package/dist/cjs/internal/defaultServices/console.js +1 -1
  110. package/dist/cjs/internal/defaultServices/console.js.map +1 -1
  111. package/dist/cjs/internal/defaultServices.js.map +1 -1
  112. package/dist/cjs/internal/deferred.js.map +1 -1
  113. package/dist/cjs/internal/differ/contextPatch.js +9 -9
  114. package/dist/cjs/internal/differ/contextPatch.js.map +1 -1
  115. package/dist/cjs/internal/effect/circular.js +7 -10
  116. package/dist/cjs/internal/effect/circular.js.map +1 -1
  117. package/dist/cjs/internal/effectable.js +4 -4
  118. package/dist/cjs/internal/effectable.js.map +1 -1
  119. package/dist/cjs/internal/fiber.js +2 -6
  120. package/dist/cjs/internal/fiber.js.map +1 -1
  121. package/dist/cjs/internal/fiberRuntime.js +10 -19
  122. package/dist/cjs/internal/fiberRuntime.js.map +1 -1
  123. package/dist/cjs/internal/groupBy.js.map +1 -1
  124. package/dist/cjs/internal/keyedPool.js.map +1 -1
  125. package/dist/cjs/internal/layer/circular.js.map +1 -1
  126. package/dist/cjs/internal/layer.js +3 -3
  127. package/dist/cjs/internal/layer.js.map +1 -1
  128. package/dist/cjs/internal/logSpan.js +3 -5
  129. package/dist/cjs/internal/logSpan.js.map +1 -1
  130. package/dist/cjs/internal/metric.js.map +1 -1
  131. package/dist/cjs/internal/pool.js.map +1 -1
  132. package/dist/cjs/internal/pubsub.js +2 -6
  133. package/dist/cjs/internal/pubsub.js.map +1 -1
  134. package/dist/cjs/internal/query.js.map +1 -1
  135. package/dist/cjs/internal/queue.js.map +1 -1
  136. package/dist/cjs/internal/random.js +1 -1
  137. package/dist/cjs/internal/random.js.map +1 -1
  138. package/dist/cjs/internal/rateLimiter.js +44 -0
  139. package/dist/cjs/internal/rateLimiter.js.map +1 -0
  140. package/dist/cjs/internal/ref.js.map +1 -1
  141. package/dist/cjs/internal/reloadable.js +1 -9
  142. package/dist/cjs/internal/reloadable.js.map +1 -1
  143. package/dist/cjs/internal/runtime.js +0 -1
  144. package/dist/cjs/internal/runtime.js.map +1 -1
  145. package/dist/cjs/internal/schedule.js.map +1 -1
  146. package/dist/cjs/internal/scopedCache.js.map +1 -1
  147. package/dist/cjs/internal/scopedRef.js.map +1 -1
  148. package/dist/cjs/internal/sink.js +7 -7
  149. package/dist/cjs/internal/sink.js.map +1 -1
  150. package/dist/cjs/internal/stm/core.js.map +1 -1
  151. package/dist/cjs/internal/stm/stm/stmState.js.map +1 -1
  152. package/dist/cjs/internal/stm/stm/tExit.js +2 -2
  153. package/dist/cjs/internal/stm/stm/tExit.js.map +1 -1
  154. package/dist/cjs/internal/stm/stm/tryCommit.js.map +1 -1
  155. package/dist/cjs/internal/stm/stm.js.map +1 -1
  156. package/dist/cjs/internal/stm/tArray.js.map +1 -1
  157. package/dist/cjs/internal/stm/tDeferred.js +4 -2
  158. package/dist/cjs/internal/stm/tDeferred.js.map +1 -1
  159. package/dist/cjs/internal/stm/tMap.js.map +1 -1
  160. package/dist/cjs/internal/stm/tPriorityQueue.js.map +1 -1
  161. package/dist/cjs/internal/stm/tPubSub.js.map +1 -1
  162. package/dist/cjs/internal/stm/tQueue.js.map +1 -1
  163. package/dist/cjs/internal/stm/tRandom.js +1 -1
  164. package/dist/cjs/internal/stm/tRandom.js.map +1 -1
  165. package/dist/cjs/internal/stm/tReentrantLock.js.map +1 -1
  166. package/dist/cjs/internal/stm/tRef.js.map +1 -1
  167. package/dist/cjs/internal/stm/tSemaphore.js.map +1 -1
  168. package/dist/cjs/internal/stm/tSet.js.map +1 -1
  169. package/dist/cjs/internal/stream/debounceState.js.map +1 -1
  170. package/dist/cjs/internal/stream/handoff.js.map +1 -1
  171. package/dist/cjs/internal/stream/handoffSignal.js.map +1 -1
  172. package/dist/cjs/internal/stream/pull.js.map +1 -1
  173. package/dist/cjs/internal/stream.js +0 -2
  174. package/dist/cjs/internal/stream.js.map +1 -1
  175. package/dist/cjs/internal/subscriptionRef.js.map +1 -1
  176. package/dist/cjs/internal/supervisor.js.map +1 -1
  177. package/dist/cjs/internal/take.js +2 -2
  178. package/dist/cjs/internal/take.js.map +1 -1
  179. package/dist/cjs/internal/testing/sleep.js.map +1 -1
  180. package/dist/cjs/internal/tracer.js +2 -2
  181. package/dist/cjs/internal/tracer.js.map +1 -1
  182. package/dist/cjs/internal/version.js +1 -1
  183. package/dist/dts/Cache.d.ts +20 -20
  184. package/dist/dts/Cache.d.ts.map +1 -1
  185. package/dist/dts/Cause.d.ts +33 -5
  186. package/dist/dts/Cause.d.ts.map +1 -1
  187. package/dist/dts/Channel.d.ts +197 -194
  188. package/dist/dts/Channel.d.ts.map +1 -1
  189. package/dist/dts/Clock.d.ts +7 -7
  190. package/dist/dts/Clock.d.ts.map +1 -1
  191. package/dist/dts/Config.d.ts +1 -1
  192. package/dist/dts/Config.d.ts.map +1 -1
  193. package/dist/dts/ConfigProvider.d.ts +6 -6
  194. package/dist/dts/ConfigProvider.d.ts.map +1 -1
  195. package/dist/dts/Console.d.ts +43 -43
  196. package/dist/dts/Console.d.ts.map +1 -1
  197. package/dist/dts/Context.d.ts +44 -29
  198. package/dist/dts/Context.d.ts.map +1 -1
  199. package/dist/dts/Data.d.ts +38 -57
  200. package/dist/dts/Data.d.ts.map +1 -1
  201. package/dist/dts/Deferred.d.ts +36 -36
  202. package/dist/dts/Deferred.d.ts.map +1 -1
  203. package/dist/dts/Effect.d.ts +732 -729
  204. package/dist/dts/Effect.d.ts.map +1 -1
  205. package/dist/dts/Effectable.d.ts +8 -8
  206. package/dist/dts/Effectable.d.ts.map +1 -1
  207. package/dist/dts/Either.d.ts +2 -3
  208. package/dist/dts/Either.d.ts.map +1 -1
  209. package/dist/dts/Exit.d.ts +74 -74
  210. package/dist/dts/Exit.d.ts.map +1 -1
  211. package/dist/dts/Fiber.d.ts +75 -75
  212. package/dist/dts/Fiber.d.ts.map +1 -1
  213. package/dist/dts/FiberMap.d.ts +22 -22
  214. package/dist/dts/FiberMap.d.ts.map +1 -1
  215. package/dist/dts/FiberRef.d.ts +28 -28
  216. package/dist/dts/FiberRef.d.ts.map +1 -1
  217. package/dist/dts/FiberRefs.d.ts +1 -1
  218. package/dist/dts/FiberRefs.d.ts.map +1 -1
  219. package/dist/dts/FiberSet.d.ts +16 -16
  220. package/dist/dts/FiberSet.d.ts.map +1 -1
  221. package/dist/dts/GroupBy.d.ts +6 -6
  222. package/dist/dts/GroupBy.d.ts.map +1 -1
  223. package/dist/dts/KeyedPool.d.ts +22 -22
  224. package/dist/dts/KeyedPool.d.ts.map +1 -1
  225. package/dist/dts/Layer.d.ts +126 -126
  226. package/dist/dts/Layer.d.ts.map +1 -1
  227. package/dist/dts/LogLevel.d.ts +2 -2
  228. package/dist/dts/LogLevel.d.ts.map +1 -1
  229. package/dist/dts/Logger.d.ts +14 -14
  230. package/dist/dts/Logger.d.ts.map +1 -1
  231. package/dist/dts/MergeDecision.d.ts +7 -7
  232. package/dist/dts/MergeState.d.ts +13 -13
  233. package/dist/dts/MergeState.d.ts.map +1 -1
  234. package/dist/dts/Metric.d.ts +32 -32
  235. package/dist/dts/Metric.d.ts.map +1 -1
  236. package/dist/dts/MetricPolling.d.ts +6 -6
  237. package/dist/dts/MetricPolling.d.ts.map +1 -1
  238. package/dist/dts/Number.d.ts +15 -0
  239. package/dist/dts/Number.d.ts.map +1 -1
  240. package/dist/dts/Option.d.ts +2 -3
  241. package/dist/dts/Option.d.ts.map +1 -1
  242. package/dist/dts/Pool.d.ts +15 -16
  243. package/dist/dts/Pool.d.ts.map +1 -1
  244. package/dist/dts/PubSub.d.ts +18 -18
  245. package/dist/dts/PubSub.d.ts.map +1 -1
  246. package/dist/dts/Queue.d.ts +40 -40
  247. package/dist/dts/Queue.d.ts.map +1 -1
  248. package/dist/dts/Random.d.ts +13 -13
  249. package/dist/dts/Random.d.ts.map +1 -1
  250. package/dist/dts/RateLimiter.d.ts +31 -0
  251. package/dist/dts/RateLimiter.d.ts.map +1 -0
  252. package/dist/dts/ReadonlyArray.d.ts +3 -3
  253. package/dist/dts/ReadonlyRecord.d.ts +37 -8
  254. package/dist/dts/ReadonlyRecord.d.ts.map +1 -1
  255. package/dist/dts/Ref.d.ts +25 -25
  256. package/dist/dts/Ref.d.ts.map +1 -1
  257. package/dist/dts/Reloadable.d.ts +9 -9
  258. package/dist/dts/Reloadable.d.ts.map +1 -1
  259. package/dist/dts/Request.d.ts +27 -28
  260. package/dist/dts/Request.d.ts.map +1 -1
  261. package/dist/dts/RequestBlock.d.ts +3 -3
  262. package/dist/dts/RequestBlock.d.ts.map +1 -1
  263. package/dist/dts/RequestResolver.d.ts +16 -16
  264. package/dist/dts/RequestResolver.d.ts.map +1 -1
  265. package/dist/dts/Resource.d.ts +7 -7
  266. package/dist/dts/Resource.d.ts.map +1 -1
  267. package/dist/dts/Runtime.d.ts +13 -16
  268. package/dist/dts/Runtime.d.ts.map +1 -1
  269. package/dist/dts/RuntimeFlags.d.ts +10 -10
  270. package/dist/dts/RuntimeFlags.d.ts.map +1 -1
  271. package/dist/dts/STM.d.ts +303 -303
  272. package/dist/dts/STM.d.ts.map +1 -1
  273. package/dist/dts/Schedule.d.ts +47 -47
  274. package/dist/dts/Schedule.d.ts.map +1 -1
  275. package/dist/dts/Scope.d.ts +10 -10
  276. package/dist/dts/Scope.d.ts.map +1 -1
  277. package/dist/dts/ScopedCache.d.ts +14 -14
  278. package/dist/dts/ScopedCache.d.ts.map +1 -1
  279. package/dist/dts/ScopedRef.d.ts +5 -5
  280. package/dist/dts/ScopedRef.d.ts.map +1 -1
  281. package/dist/dts/SingleProducerAsyncInput.d.ts +8 -8
  282. package/dist/dts/SingleProducerAsyncInput.d.ts.map +1 -1
  283. package/dist/dts/Sink.d.ts +214 -205
  284. package/dist/dts/Sink.d.ts.map +1 -1
  285. package/dist/dts/Stream.d.ts +595 -592
  286. package/dist/dts/Stream.d.ts.map +1 -1
  287. package/dist/dts/StreamEmit.d.ts +5 -5
  288. package/dist/dts/StreamEmit.d.ts.map +1 -1
  289. package/dist/dts/Streamable.d.ts +2 -2
  290. package/dist/dts/Streamable.d.ts.map +1 -1
  291. package/dist/dts/SubscriptionRef.d.ts +41 -41
  292. package/dist/dts/SubscriptionRef.d.ts.map +1 -1
  293. package/dist/dts/Supervisor.d.ts +17 -17
  294. package/dist/dts/Supervisor.d.ts.map +1 -1
  295. package/dist/dts/SynchronizedRef.d.ts +41 -41
  296. package/dist/dts/SynchronizedRef.d.ts.map +1 -1
  297. package/dist/dts/TArray.d.ts +72 -72
  298. package/dist/dts/TArray.d.ts.map +1 -1
  299. package/dist/dts/TDeferred.d.ts +12 -12
  300. package/dist/dts/TDeferred.d.ts.map +1 -1
  301. package/dist/dts/TMap.d.ts +67 -67
  302. package/dist/dts/TMap.d.ts.map +1 -1
  303. package/dist/dts/TPriorityQueue.d.ts +23 -23
  304. package/dist/dts/TPriorityQueue.d.ts.map +1 -1
  305. package/dist/dts/TPubSub.d.ts +15 -15
  306. package/dist/dts/TPubSub.d.ts.map +1 -1
  307. package/dist/dts/TQueue.d.ts +40 -40
  308. package/dist/dts/TQueue.d.ts.map +1 -1
  309. package/dist/dts/TRandom.d.ts +13 -13
  310. package/dist/dts/TRandom.d.ts.map +1 -1
  311. package/dist/dts/TReentrantLock.d.ts +21 -21
  312. package/dist/dts/TReentrantLock.d.ts.map +1 -1
  313. package/dist/dts/TRef.d.ts +25 -25
  314. package/dist/dts/TRef.d.ts.map +1 -1
  315. package/dist/dts/TSemaphore.d.ts +15 -15
  316. package/dist/dts/TSemaphore.d.ts.map +1 -1
  317. package/dist/dts/TSet.d.ts +49 -49
  318. package/dist/dts/TSet.d.ts.map +1 -1
  319. package/dist/dts/Take.d.ts +41 -41
  320. package/dist/dts/Take.d.ts.map +1 -1
  321. package/dist/dts/TestAnnotation.d.ts +1 -3
  322. package/dist/dts/TestAnnotation.d.ts.map +1 -1
  323. package/dist/dts/TestAnnotations.d.ts +3 -3
  324. package/dist/dts/TestAnnotations.d.ts.map +1 -1
  325. package/dist/dts/TestClock.d.ts +18 -18
  326. package/dist/dts/TestClock.d.ts.map +1 -1
  327. package/dist/dts/TestConfig.d.ts.map +1 -1
  328. package/dist/dts/TestContext.d.ts +2 -2
  329. package/dist/dts/TestContext.d.ts.map +1 -1
  330. package/dist/dts/TestLive.d.ts +1 -1
  331. package/dist/dts/TestLive.d.ts.map +1 -1
  332. package/dist/dts/TestServices.d.ts +31 -31
  333. package/dist/dts/TestServices.d.ts.map +1 -1
  334. package/dist/dts/TestSized.d.ts +2 -2
  335. package/dist/dts/TestSized.d.ts.map +1 -1
  336. package/dist/dts/Tracer.d.ts +1 -1
  337. package/dist/dts/Utils.d.ts.map +1 -1
  338. package/dist/dts/index.d.ts +12 -2
  339. package/dist/dts/index.d.ts.map +1 -1
  340. package/dist/dts/internal/channel/channelExecutor.d.ts +1 -1
  341. package/dist/dts/internal/channel/channelExecutor.d.ts.map +1 -1
  342. package/dist/dts/internal/core-stream.d.ts +1 -1
  343. package/dist/dts/internal/core-stream.d.ts.map +1 -1
  344. package/dist/dts/internal/rateLimiter.d.ts +2 -0
  345. package/dist/dts/internal/rateLimiter.d.ts.map +1 -0
  346. package/dist/dts/internal/stm/stm.d.ts +6 -6
  347. package/dist/dts/internal/stm/stm.d.ts.map +1 -1
  348. package/dist/dts/internal/version.d.ts +1 -1
  349. package/dist/esm/Cause.js +13 -0
  350. package/dist/esm/Cause.js.map +1 -1
  351. package/dist/esm/Channel.js.map +1 -1
  352. package/dist/esm/Clock.js.map +1 -1
  353. package/dist/esm/Console.js.map +1 -1
  354. package/dist/esm/Context.js +22 -24
  355. package/dist/esm/Context.js.map +1 -1
  356. package/dist/esm/Data.js +4 -5
  357. package/dist/esm/Data.js.map +1 -1
  358. package/dist/esm/Deferred.js +1 -1
  359. package/dist/esm/Deferred.js.map +1 -1
  360. package/dist/esm/Effect.js +9 -9
  361. package/dist/esm/Effect.js.map +1 -1
  362. package/dist/esm/Effectable.js.map +1 -1
  363. package/dist/esm/Either.js.map +1 -1
  364. package/dist/esm/Exit.js +2 -2
  365. package/dist/esm/Exit.js.map +1 -1
  366. package/dist/esm/Fiber.js.map +1 -1
  367. package/dist/esm/FiberMap.js +3 -3
  368. package/dist/esm/FiberRef.js.map +1 -1
  369. package/dist/esm/FiberRefs.js.map +1 -1
  370. package/dist/esm/FiberSet.js +3 -3
  371. package/dist/esm/FiberSet.js.map +1 -1
  372. package/dist/esm/GroupBy.js.map +1 -1
  373. package/dist/esm/Layer.js.map +1 -1
  374. package/dist/esm/LogLevel.js.map +1 -1
  375. package/dist/esm/Logger.js.map +1 -1
  376. package/dist/esm/Metric.js.map +1 -1
  377. package/dist/esm/Number.js +18 -0
  378. package/dist/esm/Number.js.map +1 -1
  379. package/dist/esm/Option.js.map +1 -1
  380. package/dist/esm/Pool.js.map +1 -1
  381. package/dist/esm/PubSub.js.map +1 -1
  382. package/dist/esm/Queue.js.map +1 -1
  383. package/dist/esm/Random.js.map +1 -1
  384. package/dist/esm/RateLimiter.js +7 -0
  385. package/dist/esm/RateLimiter.js.map +1 -0
  386. package/dist/esm/ReadonlyRecord.js +44 -8
  387. package/dist/esm/ReadonlyRecord.js.map +1 -1
  388. package/dist/esm/Ref.js.map +1 -1
  389. package/dist/esm/Request.js.map +1 -1
  390. package/dist/esm/RequestResolver.js.map +1 -1
  391. package/dist/esm/Resource.js.map +1 -1
  392. package/dist/esm/Runtime.js +1 -4
  393. package/dist/esm/Runtime.js.map +1 -1
  394. package/dist/esm/RuntimeFlags.js.map +1 -1
  395. package/dist/esm/STM.js.map +1 -1
  396. package/dist/esm/Schedule.js.map +1 -1
  397. package/dist/esm/Scope.js.map +1 -1
  398. package/dist/esm/ScopedRef.js.map +1 -1
  399. package/dist/esm/SingleProducerAsyncInput.js.map +1 -1
  400. package/dist/esm/Sink.js.map +1 -1
  401. package/dist/esm/Stream.js.map +1 -1
  402. package/dist/esm/SubscriptionRef.js.map +1 -1
  403. package/dist/esm/Supervisor.js.map +1 -1
  404. package/dist/esm/SynchronizedRef.js.map +1 -1
  405. package/dist/esm/TArray.js.map +1 -1
  406. package/dist/esm/TDeferred.js.map +1 -1
  407. package/dist/esm/TMap.js.map +1 -1
  408. package/dist/esm/TPriorityQueue.js.map +1 -1
  409. package/dist/esm/TPubSub.js.map +1 -1
  410. package/dist/esm/TQueue.js.map +1 -1
  411. package/dist/esm/TRandom.js.map +1 -1
  412. package/dist/esm/TReentrantLock.js.map +1 -1
  413. package/dist/esm/TRef.js.map +1 -1
  414. package/dist/esm/TSemaphore.js.map +1 -1
  415. package/dist/esm/TSet.js.map +1 -1
  416. package/dist/esm/Take.js +6 -6
  417. package/dist/esm/Take.js.map +1 -1
  418. package/dist/esm/TestAnnotation.js +10 -13
  419. package/dist/esm/TestAnnotation.js.map +1 -1
  420. package/dist/esm/TestAnnotations.js +1 -1
  421. package/dist/esm/TestAnnotations.js.map +1 -1
  422. package/dist/esm/TestClock.js +1 -1
  423. package/dist/esm/TestClock.js.map +1 -1
  424. package/dist/esm/TestConfig.js +1 -1
  425. package/dist/esm/TestConfig.js.map +1 -1
  426. package/dist/esm/TestContext.js.map +1 -1
  427. package/dist/esm/TestLive.js +1 -1
  428. package/dist/esm/TestLive.js.map +1 -1
  429. package/dist/esm/TestServices.js.map +1 -1
  430. package/dist/esm/TestSized.js +1 -1
  431. package/dist/esm/TestSized.js.map +1 -1
  432. package/dist/esm/Utils.js +1 -1
  433. package/dist/esm/Utils.js.map +1 -1
  434. package/dist/esm/index.js +12 -2
  435. package/dist/esm/index.js.map +1 -1
  436. package/dist/esm/internal/cache.js.map +1 -1
  437. package/dist/esm/internal/channel/channelExecutor.js.map +1 -1
  438. package/dist/esm/internal/channel/mergeDecision.js +2 -6
  439. package/dist/esm/internal/channel/mergeDecision.js.map +1 -1
  440. package/dist/esm/internal/channel/singleProducerAsyncInput.js.map +1 -1
  441. package/dist/esm/internal/channel.js +1 -1
  442. package/dist/esm/internal/channel.js.map +1 -1
  443. package/dist/esm/internal/clock.js +1 -1
  444. package/dist/esm/internal/clock.js.map +1 -1
  445. package/dist/esm/internal/configProvider.js +2 -4
  446. package/dist/esm/internal/configProvider.js.map +1 -1
  447. package/dist/esm/internal/console.js.map +1 -1
  448. package/dist/esm/internal/context.js +28 -20
  449. package/dist/esm/internal/context.js.map +1 -1
  450. package/dist/esm/internal/core-effect.js +12 -26
  451. package/dist/esm/internal/core-effect.js.map +1 -1
  452. package/dist/esm/internal/core-stream.js.map +1 -1
  453. package/dist/esm/internal/core.js +57 -127
  454. package/dist/esm/internal/core.js.map +1 -1
  455. package/dist/esm/internal/data.js.map +1 -1
  456. package/dist/esm/internal/defaultServices/console.js +1 -1
  457. package/dist/esm/internal/defaultServices/console.js.map +1 -1
  458. package/dist/esm/internal/defaultServices.js.map +1 -1
  459. package/dist/esm/internal/deferred.js.map +1 -1
  460. package/dist/esm/internal/differ/contextPatch.js +9 -9
  461. package/dist/esm/internal/differ/contextPatch.js.map +1 -1
  462. package/dist/esm/internal/effect/circular.js +5 -8
  463. package/dist/esm/internal/effect/circular.js.map +1 -1
  464. package/dist/esm/internal/effectable.js +4 -4
  465. package/dist/esm/internal/effectable.js.map +1 -1
  466. package/dist/esm/internal/fiber.js +2 -6
  467. package/dist/esm/internal/fiber.js.map +1 -1
  468. package/dist/esm/internal/fiberRuntime.js +10 -19
  469. package/dist/esm/internal/fiberRuntime.js.map +1 -1
  470. package/dist/esm/internal/groupBy.js.map +1 -1
  471. package/dist/esm/internal/keyedPool.js.map +1 -1
  472. package/dist/esm/internal/layer/circular.js.map +1 -1
  473. package/dist/esm/internal/layer.js +3 -3
  474. package/dist/esm/internal/layer.js.map +1 -1
  475. package/dist/esm/internal/logSpan.js +3 -5
  476. package/dist/esm/internal/logSpan.js.map +1 -1
  477. package/dist/esm/internal/metric.js.map +1 -1
  478. package/dist/esm/internal/pool.js.map +1 -1
  479. package/dist/esm/internal/pubsub.js +1 -5
  480. package/dist/esm/internal/pubsub.js.map +1 -1
  481. package/dist/esm/internal/query.js.map +1 -1
  482. package/dist/esm/internal/queue.js.map +1 -1
  483. package/dist/esm/internal/random.js +1 -1
  484. package/dist/esm/internal/random.js.map +1 -1
  485. package/dist/esm/internal/rateLimiter.js +12 -0
  486. package/dist/esm/internal/rateLimiter.js.map +1 -0
  487. package/dist/esm/internal/ref.js.map +1 -1
  488. package/dist/esm/internal/reloadable.js +1 -9
  489. package/dist/esm/internal/reloadable.js.map +1 -1
  490. package/dist/esm/internal/runtime.js +0 -1
  491. package/dist/esm/internal/runtime.js.map +1 -1
  492. package/dist/esm/internal/schedule.js.map +1 -1
  493. package/dist/esm/internal/scopedCache.js.map +1 -1
  494. package/dist/esm/internal/scopedRef.js.map +1 -1
  495. package/dist/esm/internal/sink.js +7 -7
  496. package/dist/esm/internal/sink.js.map +1 -1
  497. package/dist/esm/internal/stm/core.js.map +1 -1
  498. package/dist/esm/internal/stm/stm/stmState.js.map +1 -1
  499. package/dist/esm/internal/stm/stm/tExit.js +2 -2
  500. package/dist/esm/internal/stm/stm/tExit.js.map +1 -1
  501. package/dist/esm/internal/stm/stm/tryCommit.js.map +1 -1
  502. package/dist/esm/internal/stm/stm.js.map +1 -1
  503. package/dist/esm/internal/stm/tArray.js.map +1 -1
  504. package/dist/esm/internal/stm/tDeferred.js +4 -2
  505. package/dist/esm/internal/stm/tDeferred.js.map +1 -1
  506. package/dist/esm/internal/stm/tMap.js.map +1 -1
  507. package/dist/esm/internal/stm/tPriorityQueue.js.map +1 -1
  508. package/dist/esm/internal/stm/tPubSub.js.map +1 -1
  509. package/dist/esm/internal/stm/tQueue.js.map +1 -1
  510. package/dist/esm/internal/stm/tRandom.js +1 -1
  511. package/dist/esm/internal/stm/tRandom.js.map +1 -1
  512. package/dist/esm/internal/stm/tReentrantLock.js.map +1 -1
  513. package/dist/esm/internal/stm/tRef.js.map +1 -1
  514. package/dist/esm/internal/stm/tSemaphore.js.map +1 -1
  515. package/dist/esm/internal/stm/tSet.js.map +1 -1
  516. package/dist/esm/internal/stream/debounceState.js.map +1 -1
  517. package/dist/esm/internal/stream/handoff.js.map +1 -1
  518. package/dist/esm/internal/stream/handoffSignal.js.map +1 -1
  519. package/dist/esm/internal/stream/pull.js.map +1 -1
  520. package/dist/esm/internal/stream.js +0 -2
  521. package/dist/esm/internal/stream.js.map +1 -1
  522. package/dist/esm/internal/subscriptionRef.js.map +1 -1
  523. package/dist/esm/internal/supervisor.js.map +1 -1
  524. package/dist/esm/internal/take.js +2 -2
  525. package/dist/esm/internal/take.js.map +1 -1
  526. package/dist/esm/internal/testing/sleep.js.map +1 -1
  527. package/dist/esm/internal/tracer.js +2 -2
  528. package/dist/esm/internal/tracer.js.map +1 -1
  529. package/dist/esm/internal/version.js +1 -1
  530. package/package.json +9 -1
  531. package/src/Cache.ts +20 -20
  532. package/src/Cause.ts +37 -13
  533. package/src/Channel.ts +802 -794
  534. package/src/Clock.ts +7 -7
  535. package/src/Config.ts +1 -1
  536. package/src/ConfigProvider.ts +6 -6
  537. package/src/Console.ts +44 -48
  538. package/src/Context.ts +52 -30
  539. package/src/Data.ts +38 -61
  540. package/src/Deferred.ts +39 -41
  541. package/src/Effect.ts +1187 -1206
  542. package/src/Effectable.ts +8 -8
  543. package/src/Either.ts +2 -3
  544. package/src/Exit.ts +88 -105
  545. package/src/Fiber.ts +77 -83
  546. package/src/FiberMap.ts +77 -77
  547. package/src/FiberRef.ts +28 -28
  548. package/src/FiberRefs.ts +1 -1
  549. package/src/FiberSet.ts +61 -62
  550. package/src/GroupBy.ts +8 -12
  551. package/src/KeyedPool.ts +22 -22
  552. package/src/Layer.ts +187 -181
  553. package/src/LogLevel.ts +7 -6
  554. package/src/Logger.ts +18 -18
  555. package/src/MergeDecision.ts +7 -7
  556. package/src/MergeState.ts +16 -16
  557. package/src/Metric.ts +39 -39
  558. package/src/MetricPolling.ts +6 -6
  559. package/src/Number.ts +19 -0
  560. package/src/Option.ts +2 -3
  561. package/src/Pool.ts +15 -16
  562. package/src/PubSub.ts +18 -18
  563. package/src/Queue.ts +43 -46
  564. package/src/Random.ts +13 -15
  565. package/src/RateLimiter.ts +37 -0
  566. package/src/ReadonlyRecord.ts +49 -8
  567. package/src/Ref.ts +25 -25
  568. package/src/Reloadable.ts +10 -10
  569. package/src/Request.ts +31 -31
  570. package/src/RequestBlock.ts +3 -3
  571. package/src/RequestResolver.ts +21 -21
  572. package/src/Resource.ts +13 -13
  573. package/src/Runtime.ts +16 -19
  574. package/src/RuntimeFlags.ts +10 -10
  575. package/src/STM.ts +361 -362
  576. package/src/Schedule.ts +47 -47
  577. package/src/Scheduler.ts +2 -2
  578. package/src/Scope.ts +14 -15
  579. package/src/ScopedCache.ts +14 -14
  580. package/src/ScopedRef.ts +7 -7
  581. package/src/SingleProducerAsyncInput.ts +8 -9
  582. package/src/Sink.ts +357 -381
  583. package/src/Stream.ts +935 -1033
  584. package/src/StreamEmit.ts +5 -5
  585. package/src/Streamable.ts +2 -2
  586. package/src/SubscriptionRef.ts +51 -51
  587. package/src/Supervisor.ts +26 -26
  588. package/src/SynchronizedRef.ts +44 -44
  589. package/src/TArray.ts +74 -74
  590. package/src/TDeferred.ts +14 -14
  591. package/src/TMap.ts +72 -72
  592. package/src/TPriorityQueue.ts +23 -24
  593. package/src/TPubSub.ts +15 -15
  594. package/src/TQueue.ts +40 -40
  595. package/src/TRandom.ts +13 -13
  596. package/src/TReentrantLock.ts +21 -21
  597. package/src/TRef.ts +25 -25
  598. package/src/TSemaphore.ts +15 -15
  599. package/src/TSet.ts +49 -49
  600. package/src/Take.ts +51 -51
  601. package/src/TestAnnotation.ts +6 -17
  602. package/src/TestAnnotations.ts +7 -9
  603. package/src/TestClock.ts +39 -45
  604. package/src/TestConfig.ts +1 -3
  605. package/src/TestContext.ts +3 -3
  606. package/src/TestLive.ts +3 -5
  607. package/src/TestServices.ts +45 -47
  608. package/src/TestSized.ts +5 -5
  609. package/src/Tracer.ts +1 -1
  610. package/src/Utils.ts +8 -10
  611. package/src/index.ts +13 -2
  612. package/src/internal/blockedRequests.ts +2 -2
  613. package/src/internal/cache.ts +38 -38
  614. package/src/internal/channel/channelExecutor.ts +65 -73
  615. package/src/internal/channel/channelState.ts +11 -11
  616. package/src/internal/channel/continuation.ts +10 -10
  617. package/src/internal/channel/mergeDecision.ts +14 -16
  618. package/src/internal/channel/mergeState.ts +12 -12
  619. package/src/internal/channel/singleProducerAsyncInput.ts +15 -17
  620. package/src/internal/channel/subexecutor.ts +7 -7
  621. package/src/internal/channel.ts +901 -980
  622. package/src/internal/clock.ts +6 -6
  623. package/src/internal/concurrency.ts +9 -9
  624. package/src/internal/configProvider.ts +29 -36
  625. package/src/internal/console.ts +12 -12
  626. package/src/internal/context.ts +32 -23
  627. package/src/internal/core-effect.ts +655 -616
  628. package/src/internal/core-stream.ts +317 -325
  629. package/src/internal/core.ts +856 -790
  630. package/src/internal/data.ts +2 -3
  631. package/src/internal/dataSource.ts +14 -14
  632. package/src/internal/defaultServices/console.ts +3 -1
  633. package/src/internal/defaultServices.ts +21 -21
  634. package/src/internal/deferred.ts +9 -9
  635. package/src/internal/differ/contextPatch.ts +17 -17
  636. package/src/internal/effect/circular.ts +154 -159
  637. package/src/internal/effectable.ts +7 -7
  638. package/src/internal/fiber.ts +55 -59
  639. package/src/internal/fiberRefs.ts +1 -1
  640. package/src/internal/fiberRuntime.ts +426 -463
  641. package/src/internal/groupBy.ts +59 -62
  642. package/src/internal/keyedPool.ts +37 -37
  643. package/src/internal/layer/circular.ts +37 -37
  644. package/src/internal/layer.ts +235 -240
  645. package/src/internal/logSpan.ts +3 -5
  646. package/src/internal/metric/polling.ts +5 -5
  647. package/src/internal/metric.ts +54 -55
  648. package/src/internal/pool.ts +72 -72
  649. package/src/internal/pubsub.ts +75 -84
  650. package/src/internal/query.ts +25 -27
  651. package/src/internal/queue.ts +65 -70
  652. package/src/internal/random.ts +9 -9
  653. package/src/internal/rateLimiter.ts +30 -0
  654. package/src/internal/ref.ts +24 -24
  655. package/src/internal/reloadable.ts +11 -31
  656. package/src/internal/request.ts +14 -14
  657. package/src/internal/resource.ts +8 -8
  658. package/src/internal/runtime.ts +21 -22
  659. package/src/internal/schedule.ts +131 -134
  660. package/src/internal/scopedCache.ts +35 -32
  661. package/src/internal/scopedRef.ts +14 -14
  662. package/src/internal/sink.ts +507 -565
  663. package/src/internal/stm/core.ts +101 -102
  664. package/src/internal/stm/stm/stmState.ts +10 -10
  665. package/src/internal/stm/stm/tExit.ts +18 -18
  666. package/src/internal/stm/stm/tryCommit.ts +5 -5
  667. package/src/internal/stm/stm.ts +363 -374
  668. package/src/internal/stm/tArray.ts +92 -92
  669. package/src/internal/stm/tDeferred.ts +16 -14
  670. package/src/internal/stm/tMap.ts +83 -84
  671. package/src/internal/stm/tPriorityQueue.ts +24 -25
  672. package/src/internal/stm/tPubSub.ts +37 -38
  673. package/src/internal/stm/tQueue.ts +44 -48
  674. package/src/internal/stm/tRandom.ts +18 -18
  675. package/src/internal/stm/tReentrantLock.ts +28 -28
  676. package/src/internal/stm/tRef.ts +25 -25
  677. package/src/internal/stm/tSemaphore.ts +16 -16
  678. package/src/internal/stm/tSet.ts +51 -52
  679. package/src/internal/stream/debounceState.ts +7 -7
  680. package/src/internal/stream/emit.ts +4 -4
  681. package/src/internal/stream/handoff.ts +19 -19
  682. package/src/internal/stream/handoffSignal.ts +4 -4
  683. package/src/internal/stream/pull.ts +10 -11
  684. package/src/internal/stream.ts +1770 -1788
  685. package/src/internal/subscriptionRef.ts +17 -17
  686. package/src/internal/supervisor.ts +49 -56
  687. package/src/internal/synchronizedRef.ts +27 -27
  688. package/src/internal/take.ts +61 -61
  689. package/src/internal/testing/sleep.ts +2 -2
  690. package/src/internal/testing/suspendedWarningData.ts +2 -2
  691. package/src/internal/testing/warningData.ts +2 -2
  692. package/src/internal/tracer.ts +2 -6
  693. package/src/internal/version.ts +1 -1
@@ -10,7 +10,6 @@ import type * as Context from "./Context.js";
10
10
  import type * as Deferred from "./Deferred.js";
11
11
  import type * as Duration from "./Duration.js";
12
12
  import type * as Either from "./Either.js";
13
- import type * as Equal from "./Equal.js";
14
13
  import type { Equivalence } from "./Equivalence.js";
15
14
  import type { ExecutionStrategy } from "./ExecutionStrategy.js";
16
15
  import type * as Exit from "./Exit.js";
@@ -77,7 +76,7 @@ export type EffectTypeId = typeof EffectTypeId;
77
76
  * @since 2.0.0
78
77
  * @category models
79
78
  */
80
- export interface Effect<out R, out E, out A> extends Effect.Variance<R, E, A>, Equal.Equal, Pipeable {
79
+ export interface Effect<out A, out E = never, out R = never> extends Effect.Variance<A, E, R>, Pipeable {
81
80
  readonly [Unify.typeSymbol]?: unknown;
82
81
  readonly [Unify.unifySymbol]?: EffectUnify<this>;
83
82
  readonly [Unify.ignoreSymbol]?: EffectUnifyIgnore;
@@ -89,7 +88,7 @@ export interface Effect<out R, out E, out A> extends Effect.Variance<R, E, A>, E
89
88
  export interface EffectUnify<A extends {
90
89
  [Unify.typeSymbol]?: any;
91
90
  }> extends Either.EitherUnify<A>, Option.OptionUnify<A>, Context.TagUnify<A> {
92
- Effect?: () => A[Unify.typeSymbol] extends Effect<infer R0, infer E0, infer A0> | infer _ ? Effect<R0, E0, A0> : never;
91
+ Effect?: () => A[Unify.typeSymbol] extends Effect<infer A0, infer E0, infer R0> | infer _ ? Effect<A0, E0, R0> : never;
93
92
  }
94
93
  /**
95
94
  * @category models
@@ -105,23 +104,23 @@ export interface EffectUnifyIgnore {
105
104
  * @since 2.0.0
106
105
  */
107
106
  export interface EffectTypeLambda extends TypeLambda {
108
- readonly type: Effect<this["Out2"], this["Out1"], this["Target"]>;
107
+ readonly type: Effect<this["Target"], this["Out1"], this["Out2"]>;
109
108
  }
110
109
  /**
111
110
  * @since 2.0.0
112
111
  * @category models
113
112
  */
114
- export interface Blocked<out E, out A> extends Effect<never, E, A> {
113
+ export interface Blocked<out A, out E> extends Effect<A, E> {
115
114
  readonly _op: "Blocked";
116
115
  readonly i0: RequestBlock;
117
- readonly i1: Effect<never, E, A>;
116
+ readonly i1: Effect<A, E>;
118
117
  }
119
118
  /**
120
119
  * @since 2.0.0
121
120
  * @category models
122
121
  */
123
122
  declare module "./Context.js" {
124
- interface Tag<Identifier, Service> extends Effect<Identifier, never, Service> {
123
+ interface Tag<Identifier, Service> extends Effect<Service, never, Identifier> {
125
124
  }
126
125
  interface TagUnifyIgnore {
127
126
  Effect?: true;
@@ -134,10 +133,10 @@ declare module "./Context.js" {
134
133
  * @category models
135
134
  */
136
135
  declare module "./Either.js" {
137
- interface Left<E, A> extends Effect<never, E, A> {
136
+ interface Left<E, A> extends Effect<A, E> {
138
137
  readonly _tag: "Left";
139
138
  }
140
- interface Right<E, A> extends Effect<never, E, A> {
139
+ interface Right<E, A> extends Effect<A, E> {
141
140
  readonly _tag: "Right";
142
141
  }
143
142
  interface EitherUnifyIgnore {
@@ -151,10 +150,10 @@ declare module "./Either.js" {
151
150
  * @category models
152
151
  */
153
152
  declare module "./Option.js" {
154
- interface None<A> extends Effect<never, Cause.NoSuchElementException, A> {
153
+ interface None<A> extends Effect<A, Cause.NoSuchElementException> {
155
154
  readonly _tag: "None";
156
155
  }
157
- interface Some<A> extends Effect<never, Cause.NoSuchElementException, A> {
156
+ interface Some<A> extends Effect<A, Cause.NoSuchElementException> {
158
157
  readonly _tag: "Some";
159
158
  }
160
159
  interface OptionUnifyIgnore {
@@ -171,39 +170,39 @@ export declare namespace Effect {
171
170
  * @since 2.0.0
172
171
  * @category models
173
172
  */
174
- interface Variance<out R, out E, out A> {
175
- readonly [EffectTypeId]: VarianceStruct<R, E, A>;
173
+ interface Variance<out A, out E, out R> {
174
+ readonly [EffectTypeId]: VarianceStruct<A, E, R>;
176
175
  }
177
176
  /**
178
177
  * @since 2.0.0
179
178
  * @category models
180
179
  */
181
- interface VarianceStruct<out R, out E, out A> {
180
+ interface VarianceStruct<out A, out E, out R> {
182
181
  readonly _V: string;
183
- readonly _R: Covariant<R>;
184
- readonly _E: Covariant<E>;
185
182
  readonly _A: Covariant<A>;
183
+ readonly _E: Covariant<E>;
184
+ readonly _R: Covariant<R>;
186
185
  }
187
186
  /**
188
187
  * @since 2.0.0
189
188
  * @category models
190
189
  */
191
- type Unify<Ret extends Effect<any, any, any>> = Effect<Context<Ret>, Error<Ret>, Success<Ret>>;
190
+ type Unify<Ret extends Effect<any, any, any>> = Effect<Success<Ret>, Error<Ret>, Context<Ret>>;
192
191
  /**
193
192
  * @since 2.0.0
194
193
  * @category type-level
195
194
  */
196
- type Context<T extends Effect<any, any, any>> = [T] extends [Effect<infer _R, infer _E, infer _A>] ? _R : never;
195
+ type Context<T extends Effect<any, any, any>> = [T] extends [Effect<infer _A, infer _E, infer _R>] ? _R : never;
197
196
  /**
198
197
  * @since 2.0.0
199
198
  * @category type-level
200
199
  */
201
- type Error<T extends Effect<any, any, any>> = [T] extends [Effect<infer _R, infer _E, infer _A>] ? _E : never;
200
+ type Error<T extends Effect<any, any, any>> = [T] extends [Effect<infer _A, infer _E, infer _R>] ? _E : never;
202
201
  /**
203
202
  * @since 2.0.0
204
203
  * @category type-level
205
204
  */
206
- type Success<T extends Effect<any, any, any>> = [T] extends [Effect<infer _R, infer _E, infer _A>] ? _A : never;
205
+ type Success<T extends Effect<any, any, any>> = [T] extends [Effect<infer _A, infer _E, infer _R>] ? _A : never;
207
206
  }
208
207
  /**
209
208
  * This function returns `true` if the specified value is an `Effect` value,
@@ -231,8 +230,8 @@ export declare const isEffect: (u: unknown) => u is Effect<unknown, unknown, unk
231
230
  * @category caching
232
231
  */
233
232
  export declare const cachedWithTTL: {
234
- (timeToLive: Duration.DurationInput): <R, E, A>(self: Effect<R, E, A>) => Effect<R, never, Effect<never, E, A>>;
235
- <R, E, A>(self: Effect<R, E, A>, timeToLive: Duration.DurationInput): Effect<R, never, Effect<never, E, A>>;
233
+ (timeToLive: Duration.DurationInput): <A, E, R>(self: Effect<A, E, R>) => Effect<Effect<A, E>, never, R>;
234
+ <A, E, R>(self: Effect<A, E, R>, timeToLive: Duration.DurationInput): Effect<Effect<A, E>, never, R>;
236
235
  };
237
236
  /**
238
237
  * Returns an effect that, if evaluated, will return the cached result of this
@@ -244,8 +243,8 @@ export declare const cachedWithTTL: {
244
243
  * @category caching
245
244
  */
246
245
  export declare const cachedInvalidateWithTTL: {
247
- (timeToLive: Duration.DurationInput): <R, E, A>(self: Effect<R, E, A>) => Effect<R, never, [Effect<never, E, A>, Effect<never, never, void>]>;
248
- <R, E, A>(self: Effect<R, E, A>, timeToLive: Duration.DurationInput): Effect<R, never, [Effect<never, E, A>, Effect<never, never, void>]>;
246
+ (timeToLive: Duration.DurationInput): <A, E, R>(self: Effect<A, E, R>) => Effect<[Effect<A, E>, Effect<void>], never, R>;
247
+ <A, E, R>(self: Effect<A, E, R>, timeToLive: Duration.DurationInput): Effect<[Effect<A, E>, Effect<void>], never, R>;
249
248
  };
250
249
  /**
251
250
  * Returns an effect that, if evaluated, will return the lazily computed
@@ -254,14 +253,14 @@ export declare const cachedInvalidateWithTTL: {
254
253
  * @since 2.0.0
255
254
  * @category caching
256
255
  */
257
- export declare const cached: <R, E, A>(self: Effect<R, E, A>) => Effect<never, never, Effect<R, E, A>>;
256
+ export declare const cached: <A, E, R>(self: Effect<A, E, R>) => Effect<Effect<A, E, R>>;
258
257
  /**
259
258
  * Returns a memoized version of the specified effectual function.
260
259
  *
261
260
  * @since 2.0.0
262
261
  * @category caching
263
262
  */
264
- export declare const cachedFunction: <R, E, A, B>(f: (a: A) => Effect<R, E, B>, eq?: Equivalence<A>) => Effect<never, never, (a: A) => Effect<R, E, B>>;
263
+ export declare const cachedFunction: <A, B, E, R>(f: (a: A) => Effect<B, E, R>, eq?: Equivalence<A>) => Effect<(a: A) => Effect<B, E, R>>;
265
264
  /**
266
265
  * Returns an effect that will be executed at most once, even if it is
267
266
  * evaluated multiple times.
@@ -286,7 +285,7 @@ export declare const cachedFunction: <R, E, A, B>(f: (a: A) => Effect<R, E, B>,
286
285
  * @since 2.0.0
287
286
  * @category caching
288
287
  */
289
- export declare const once: <R, E, A>(self: Effect<R, E, A>) => Effect<never, never, Effect<R, E, void>>;
288
+ export declare const once: <A, E, R>(self: Effect<A, E, R>) => Effect<Effect<void, E, R>>;
290
289
  /**
291
290
  * Runs all the provided effects in sequence respecting the structure provided in input.
292
291
  *
@@ -329,46 +328,46 @@ export declare namespace All {
329
328
  * @since 2.0.0
330
329
  */
331
330
  type ReturnIterable<T extends Iterable<EffectAny>, Discard extends boolean, Mode> = [T] extends [
332
- Iterable<Effect.Variance<infer R, infer E, infer A>>
333
- ] ? Effect<R, Mode extends "either" ? never : Mode extends "validate" ? Array<Option.Option<E>> : E, Discard extends true ? void : Mode extends "either" ? Array<Either.Either<E, A>> : Array<A>> : never;
331
+ Iterable<Effect.Variance<infer A, infer E, infer R>>
332
+ ] ? Effect<Discard extends true ? void : Mode extends "either" ? Array<Either.Either<E, A>> : Array<A>, Mode extends "either" ? never : Mode extends "validate" ? Array<Option.Option<E>> : E, R> : never;
334
333
  /**
335
334
  * @since 2.0.0
336
335
  */
337
- type ReturnTuple<T extends ReadonlyArray<unknown>, Discard extends boolean, Mode> = Effect<T[number] extends never ? never : [T[number]] extends [{
338
- [EffectTypeId]: {
339
- _R: (_: never) => infer R;
340
- };
341
- }] ? R : never, Mode extends "either" ? never : T[number] extends never ? never : Mode extends "validate" ? {
342
- -readonly [K in keyof T]: [T[K]] extends [Effect.Variance<infer _R, infer _E, infer _A>] ? Option.Option<_E> : never;
336
+ type ReturnTuple<T extends ReadonlyArray<unknown>, Discard extends boolean, Mode> = Effect<Discard extends true ? void : T[number] extends never ? [] : Mode extends "either" ? {
337
+ -readonly [K in keyof T]: [T[K]] extends [Effect.Variance<infer _A, infer _E, infer _R>] ? Either.Either<_E, _A> : never;
338
+ } : {
339
+ -readonly [K in keyof T]: [T[K]] extends [Effect.Variance<infer _A, infer _E, infer _R>] ? _A : never;
340
+ }, Mode extends "either" ? never : T[number] extends never ? never : Mode extends "validate" ? {
341
+ -readonly [K in keyof T]: [T[K]] extends [Effect.Variance<infer _A, infer _E, infer _R>] ? Option.Option<_E> : never;
343
342
  } : [T[number]] extends [{
344
343
  [EffectTypeId]: {
345
344
  _E: (_: never) => infer E;
346
345
  };
347
- }] ? E : never, Discard extends true ? void : T[number] extends never ? [] : Mode extends "either" ? {
348
- -readonly [K in keyof T]: [T[K]] extends [Effect.Variance<infer _R, infer _E, infer _A>] ? Either.Either<_E, _A> : never;
349
- } : {
350
- -readonly [K in keyof T]: [T[K]] extends [Effect.Variance<infer _R, infer _E, infer _A>] ? _A : never;
351
- }> extends infer X ? X : never;
346
+ }] ? E : never, T[number] extends never ? never : [T[number]] extends [{
347
+ [EffectTypeId]: {
348
+ _R: (_: never) => infer R;
349
+ };
350
+ }] ? R : never> extends infer X ? X : never;
352
351
  /**
353
352
  * @since 2.0.0
354
353
  */
355
354
  type ReturnObject<T, Discard extends boolean, Mode> = [T] extends [{
356
355
  [K: string]: EffectAny;
357
- }] ? Effect<keyof T extends never ? never : [T[keyof T]] extends [{
358
- [EffectTypeId]: {
359
- _R: (_: never) => infer R;
360
- };
361
- }] ? R : never, Mode extends "either" ? never : keyof T extends never ? never : Mode extends "validate" ? {
362
- -readonly [K in keyof T]: [T[K]] extends [Effect.Variance<infer _R, infer _E, infer _A>] ? Option.Option<_E> : never;
356
+ }] ? Effect<Discard extends true ? void : Mode extends "either" ? {
357
+ -readonly [K in keyof T]: [T[K]] extends [Effect.Variance<infer _A, infer _E, infer _R>] ? Either.Either<_E, _A> : never;
358
+ } : {
359
+ -readonly [K in keyof T]: [T[K]] extends [Effect.Variance<infer _A, infer _E, infer _R>] ? _A : never;
360
+ }, Mode extends "either" ? never : keyof T extends never ? never : Mode extends "validate" ? {
361
+ -readonly [K in keyof T]: [T[K]] extends [Effect.Variance<infer _A, infer _E, infer _R>] ? Option.Option<_E> : never;
363
362
  } : [T[keyof T]] extends [{
364
363
  [EffectTypeId]: {
365
364
  _E: (_: never) => infer E;
366
365
  };
367
- }] ? E : never, Discard extends true ? void : Mode extends "either" ? {
368
- -readonly [K in keyof T]: [T[K]] extends [Effect.Variance<infer _R, infer _E, infer _A>] ? Either.Either<_E, _A> : never;
369
- } : {
370
- -readonly [K in keyof T]: [T[K]] extends [Effect.Variance<infer _R, infer _E, infer _A>] ? _A : never;
371
- }> : never;
366
+ }] ? E : never, keyof T extends never ? never : [T[keyof T]] extends [{
367
+ [EffectTypeId]: {
368
+ _R: (_: never) => infer R;
369
+ };
370
+ }] ? R : never> : never;
372
371
  /**
373
372
  * @since 2.0.0
374
373
  */
@@ -398,10 +397,10 @@ export declare namespace All {
398
397
  * @since 2.0.0
399
398
  * @category collecting & elements
400
399
  */
401
- export declare const allSuccesses: <R, E, A>(elements: Iterable<Effect<R, E, A>>, options?: {
400
+ export declare const allSuccesses: <A, E, R>(elements: Iterable<Effect<A, E, R>>, options?: {
402
401
  readonly concurrency?: Concurrency | undefined;
403
402
  readonly batching?: boolean | "inherit" | undefined;
404
- }) => Effect<R, never, Array<A>>;
403
+ } | undefined) => Effect<Array<A>, never, R>;
405
404
  /**
406
405
  * Drops all elements until the effectful predicate returns true.
407
406
  *
@@ -409,8 +408,8 @@ export declare const allSuccesses: <R, E, A>(elements: Iterable<Effect<R, E, A>>
409
408
  * @category collecting & elements
410
409
  */
411
410
  export declare const dropUntil: {
412
- <A, R, E>(predicate: (a: NoInfer<A>, i: number) => Effect<R, E, boolean>): (elements: Iterable<A>) => Effect<R, E, Array<A>>;
413
- <A, R, E>(elements: Iterable<A>, predicate: (a: A, i: number) => Effect<R, E, boolean>): Effect<R, E, Array<A>>;
411
+ <A, E, R>(predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>): (elements: Iterable<A>) => Effect<Array<A>, E, R>;
412
+ <A, E, R>(elements: Iterable<A>, predicate: (a: A, i: number) => Effect<boolean, E, R>): Effect<Array<A>, E, R>;
414
413
  };
415
414
  /**
416
415
  * Drops all elements so long as the predicate returns true.
@@ -419,8 +418,8 @@ export declare const dropUntil: {
419
418
  * @category collecting & elements
420
419
  */
421
420
  export declare const dropWhile: {
422
- <A, R, E>(predicate: (a: NoInfer<A>, i: number) => Effect<R, E, boolean>): (elements: Iterable<A>) => Effect<R, E, Array<A>>;
423
- <A, R, E>(elements: Iterable<A>, predicate: (a: A, i: number) => Effect<R, E, boolean>): Effect<R, E, Array<A>>;
421
+ <A, E, R>(predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>): (elements: Iterable<A>) => Effect<Array<A>, E, R>;
422
+ <A, E, R>(elements: Iterable<A>, predicate: (a: A, i: number) => Effect<boolean, E, R>): Effect<Array<A>, E, R>;
424
423
  };
425
424
  /**
426
425
  * Determines whether all elements of the `Collection<A>` satisfies the effectual
@@ -430,8 +429,8 @@ export declare const dropWhile: {
430
429
  * @category collecting & elements
431
430
  */
432
431
  export declare const every: {
433
- <R, E, A>(f: (a: A, i: number) => Effect<R, E, boolean>): (elements: Iterable<A>) => Effect<R, E, boolean>;
434
- <R, E, A>(elements: Iterable<A>, f: (a: A, i: number) => Effect<R, E, boolean>): Effect<R, E, boolean>;
432
+ <A, E, R>(f: (a: A, i: number) => Effect<boolean, E, R>): (elements: Iterable<A>) => Effect<boolean, E, R>;
433
+ <A, E, R>(elements: Iterable<A>, f: (a: A, i: number) => Effect<boolean, E, R>): Effect<boolean, E, R>;
435
434
  };
436
435
  /**
437
436
  * Determines whether any element of the `Iterable<A>` satisfies the effectual
@@ -441,14 +440,14 @@ export declare const every: {
441
440
  * @category collecting & elements
442
441
  */
443
442
  export declare const exists: {
444
- <R, E, A>(f: (a: A, i: number) => Effect<R, E, boolean>, options?: {
443
+ <A, E, R>(f: (a: A, i: number) => Effect<boolean, E, R>, options?: {
445
444
  readonly concurrency?: Concurrency | undefined;
446
445
  readonly batching?: boolean | "inherit" | undefined;
447
- }): (elements: Iterable<A>) => Effect<R, E, boolean>;
448
- <R, E, A>(elements: Iterable<A>, f: (a: A, i: number) => Effect<R, E, boolean>, options?: {
446
+ } | undefined): (elements: Iterable<A>) => Effect<boolean, E, R>;
447
+ <A, E, R>(elements: Iterable<A>, f: (a: A, i: number) => Effect<boolean, E, R>, options?: {
449
448
  readonly concurrency?: Concurrency | undefined;
450
449
  readonly batching?: boolean | "inherit" | undefined;
451
- }): Effect<R, E, boolean>;
450
+ } | undefined): Effect<boolean, E, R>;
452
451
  };
453
452
  /**
454
453
  * Filters the collection using the specified effectful predicate.
@@ -457,16 +456,16 @@ export declare const exists: {
457
456
  * @category collecting & elements
458
457
  */
459
458
  export declare const filter: {
460
- <A, R, E>(f: (a: A, i: number) => Effect<R, E, boolean>, options?: {
459
+ <A, E, R>(f: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
461
460
  readonly concurrency?: Concurrency | undefined;
462
461
  readonly batching?: boolean | "inherit" | undefined;
463
462
  readonly negate?: boolean | undefined;
464
- }): (elements: Iterable<A>) => Effect<R, E, Array<A>>;
465
- <A, R, E>(elements: Iterable<A>, f: (a: A, i: number) => Effect<R, E, boolean>, options?: {
463
+ } | undefined): (elements: Iterable<A>) => Effect<Array<A>, E, R>;
464
+ <A, E, R>(elements: Iterable<A>, f: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
466
465
  readonly concurrency?: Concurrency | undefined;
467
466
  readonly batching?: boolean | "inherit" | undefined;
468
467
  readonly negate?: boolean | undefined;
469
- }): Effect<R, E, Array<A>>;
468
+ } | undefined): Effect<Array<A>, E, R>;
470
469
  };
471
470
  /**
472
471
  * Returns the first element that satisfies the effectful predicate.
@@ -475,8 +474,8 @@ export declare const filter: {
475
474
  * @category collecting & elements
476
475
  */
477
476
  export declare const findFirst: {
478
- <A, R, E>(f: (a: A, i: number) => Effect<R, E, boolean>): (elements: Iterable<A>) => Effect<R, E, Option.Option<A>>;
479
- <A, R, E>(elements: Iterable<A>, f: (a: A, i: number) => Effect<R, E, boolean>): Effect<R, E, Option.Option<A>>;
477
+ <A, E, R>(f: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>): (elements: Iterable<A>) => Effect<Option.Option<A>, E, R>;
478
+ <A, E, R>(elements: Iterable<A>, f: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>): Effect<Option.Option<A>, E, R>;
480
479
  };
481
480
  /**
482
481
  * This function takes an iterable of `Effect` values and returns a new
@@ -497,32 +496,32 @@ export declare const findFirst: {
497
496
  * @since 2.0.0
498
497
  * @category collecting & elements
499
498
  */
500
- export declare const firstSuccessOf: <R, E, A>(effects: Iterable<Effect<R, E, A>>) => Effect<R, E, A>;
499
+ export declare const firstSuccessOf: <A, E, R>(effects: Iterable<Effect<A, E, R>>) => Effect<A, E, R>;
501
500
  /**
502
501
  * @since 2.0.0
503
502
  * @category collecting & elements
504
503
  */
505
504
  export declare const forEach: {
506
- <A, R, E, B>(f: (a: A, i: number) => Effect<R, E, B>, options?: {
505
+ <A, B, E, R>(f: (a: A, i: number) => Effect<B, E, R>, options?: {
507
506
  readonly concurrency?: Concurrency | undefined;
508
507
  readonly batching?: boolean | "inherit" | undefined;
509
508
  readonly discard?: false | undefined;
510
- }): (self: Iterable<A>) => Effect<R, E, Array<B>>;
511
- <A, R, E, B>(f: (a: A, i: number) => Effect<R, E, B>, options: {
509
+ } | undefined): (self: Iterable<A>) => Effect<Array<B>, E, R>;
510
+ <A, B, E, R>(f: (a: A, i: number) => Effect<B, E, R>, options: {
512
511
  readonly concurrency?: Concurrency | undefined;
513
512
  readonly batching?: boolean | "inherit" | undefined;
514
513
  readonly discard: true;
515
- }): (self: Iterable<A>) => Effect<R, E, void>;
516
- <A, R, E, B>(self: Iterable<A>, f: (a: A, i: number) => Effect<R, E, B>, options?: {
514
+ }): (self: Iterable<A>) => Effect<void, E, R>;
515
+ <A, B, E, R>(self: Iterable<A>, f: (a: A, i: number) => Effect<B, E, R>, options?: {
517
516
  readonly concurrency?: Concurrency | undefined;
518
517
  readonly batching?: boolean | "inherit" | undefined;
519
518
  readonly discard?: false | undefined;
520
- }): Effect<R, E, Array<B>>;
521
- <A, R, E, B>(self: Iterable<A>, f: (a: A, i: number) => Effect<R, E, B>, options: {
519
+ } | undefined): Effect<Array<B>, E, R>;
520
+ <A, B, E, R>(self: Iterable<A>, f: (a: A, i: number) => Effect<B, E, R>, options: {
522
521
  readonly concurrency?: Concurrency | undefined;
523
522
  readonly batching?: boolean | "inherit" | undefined;
524
523
  readonly discard: true;
525
- }): Effect<R, E, void>;
524
+ }): Effect<void, E, R>;
526
525
  };
527
526
  /**
528
527
  * Returns a successful effect with the head of the collection if the collection
@@ -531,9 +530,9 @@ export declare const forEach: {
531
530
  * @since 2.0.0
532
531
  * @category collecting & elements
533
532
  */
534
- export declare const head: <R, E, A>(self: Effect<R, E, Iterable<A>>) => Effect<R, E | Cause.NoSuchElementException, A>;
533
+ export declare const head: <A, E, R>(self: Effect<Iterable<A>, E, R>) => Effect<A, Cause.NoSuchElementException | E, R>;
535
534
  /**
536
- * Merges an `Iterable<Effect<R, E, A>>` to a single effect, working
535
+ * Merges an `Iterable<Effect<A, E, R>>` to a single effect, working
537
536
  * sequentially.
538
537
  *
539
538
  * @since 2.0.0
@@ -543,11 +542,11 @@ export declare const mergeAll: {
543
542
  <Z, A>(zero: Z, f: (z: Z, a: A, i: number) => Z, options?: {
544
543
  readonly concurrency?: Concurrency | undefined;
545
544
  readonly batching?: boolean | "inherit" | undefined;
546
- }): <R, E>(elements: Iterable<Effect<R, E, A>>) => Effect<R, E, Z>;
547
- <R, E, A, Z>(elements: Iterable<Effect<R, E, A>>, zero: Z, f: (z: Z, a: A, i: number) => Z, options?: {
545
+ } | undefined): <E, R>(elements: Iterable<Effect<A, E, R>>) => Effect<Z, E, R>;
546
+ <A, E, R, Z>(elements: Iterable<Effect<A, E, R>>, zero: Z, f: (z: Z, a: A, i: number) => Z, options?: {
548
547
  readonly concurrency?: Concurrency | undefined;
549
548
  readonly batching?: boolean | "inherit" | undefined;
550
- }): Effect<R, E, Z>;
549
+ } | undefined): Effect<Z, E, R>;
551
550
  };
552
551
  /**
553
552
  * Feeds elements of type `A` to a function `f` that returns an effect.
@@ -557,14 +556,14 @@ export declare const mergeAll: {
557
556
  * @category collecting & elements
558
557
  */
559
558
  export declare const partition: {
560
- <R, E, A, B>(f: (a: A) => Effect<R, E, B>, options?: {
559
+ <A, B, E, R>(f: (a: A, i: number) => Effect<B, E, R>, options?: {
561
560
  readonly concurrency?: Concurrency | undefined;
562
561
  readonly batching?: boolean | "inherit" | undefined;
563
- }): (elements: Iterable<A>) => Effect<R, never, [excluded: Array<E>, satisfying: Array<B>]>;
564
- <R, E, A, B>(elements: Iterable<A>, f: (a: A) => Effect<R, E, B>, options?: {
562
+ } | undefined): (elements: Iterable<A>) => Effect<[excluded: Array<E>, satisfying: Array<B>], never, R>;
563
+ <A, B, E, R>(elements: Iterable<A>, f: (a: A, i: number) => Effect<B, E, R>, options?: {
565
564
  readonly concurrency?: Concurrency | undefined;
566
565
  readonly batching?: boolean | "inherit" | undefined;
567
- }): Effect<R, never, [excluded: Array<E>, satisfying: Array<B>]>;
566
+ } | undefined): Effect<[excluded: Array<E>, satisfying: Array<B>], never, R>;
568
567
  };
569
568
  /**
570
569
  * Folds an `Iterable<A>` using an effectual function f, working sequentially
@@ -574,24 +573,24 @@ export declare const partition: {
574
573
  * @category collecting & elements
575
574
  */
576
575
  export declare const reduce: {
577
- <Z, A, R, E>(zero: Z, f: (z: Z, a: A, i: number) => Effect<R, E, Z>): (elements: Iterable<A>) => Effect<R, E, Z>;
578
- <Z, A, R, E>(elements: Iterable<A>, zero: Z, f: (z: Z, a: A, i: number) => Effect<R, E, Z>): Effect<R, E, Z>;
576
+ <Z, A, E, R>(zero: Z, f: (z: Z, a: A, i: number) => Effect<Z, E, R>): (elements: Iterable<A>) => Effect<Z, E, R>;
577
+ <A, Z, E, R>(elements: Iterable<A>, zero: Z, f: (z: Z, a: A, i: number) => Effect<Z, E, R>): Effect<Z, E, R>;
579
578
  };
580
579
  /**
581
- * Reduces an `Iterable<Effect<R, E, A>>` to a single effect.
580
+ * Reduces an `Iterable<Effect<A, E, R>>` to a single effect.
582
581
  *
583
582
  * @since 2.0.0
584
583
  * @category collecting & elements
585
584
  */
586
585
  export declare const reduceEffect: {
587
- <R, E, A>(zero: Effect<R, E, A>, f: (acc: A, a: A, i: number) => A, options?: {
586
+ <A, E, R>(zero: Effect<A, E, R>, f: (acc: NoInfer<A>, a: NoInfer<A>, i: number) => A, options?: {
588
587
  readonly concurrency?: Concurrency | undefined;
589
588
  readonly batching?: boolean | "inherit" | undefined;
590
- }): (elements: Iterable<Effect<R, E, A>>) => Effect<R, E, A>;
591
- <R, E, A>(elements: Iterable<Effect<R, E, A>>, zero: Effect<R, E, A>, f: (acc: A, a: A, i: number) => A, options?: {
589
+ }): (elements: Iterable<Effect<A, E, R>>) => Effect<A, E, R>;
590
+ <A, E, R>(elements: Iterable<Effect<A, E, R>>, zero: Effect<A, E, R>, f: (acc: NoInfer<A>, a: NoInfer<A>, i: number) => A, options?: {
592
591
  readonly concurrency?: Concurrency | undefined;
593
592
  readonly batching?: boolean | "inherit" | undefined;
594
- }): Effect<R, E, A>;
593
+ }): Effect<A, E, R>;
595
594
  };
596
595
  /**
597
596
  * Folds an `Iterable<A>` using an effectual function f, working sequentially from left to right.
@@ -600,8 +599,8 @@ export declare const reduceEffect: {
600
599
  * @category collecting & elements
601
600
  */
602
601
  export declare const reduceRight: {
603
- <A, Z, R, E>(zero: Z, f: (a: A, z: Z, i: number) => Effect<R, E, Z>): (elements: Iterable<A>) => Effect<R, E, Z>;
604
- <A, Z, R, E>(elements: Iterable<A>, zero: Z, f: (a: A, z: Z, i: number) => Effect<R, E, Z>): Effect<R, E, Z>;
602
+ <A, Z, R, E>(zero: Z, f: (a: A, z: Z, i: number) => Effect<Z, E, R>): (elements: Iterable<A>) => Effect<Z, E, R>;
603
+ <A, Z, R, E>(elements: Iterable<A>, zero: Z, f: (a: A, z: Z, i: number) => Effect<Z, E, R>): Effect<Z, E, R>;
605
604
  };
606
605
  /**
607
606
  * Folds over the elements in this chunk from the left, stopping the fold early
@@ -613,12 +612,12 @@ export declare const reduceRight: {
613
612
  export declare const reduceWhile: {
614
613
  <A, R, E, Z>(zero: Z, options: {
615
614
  readonly while: Predicate<Z>;
616
- readonly body: (s: Z, a: A, i: number) => Effect<R, E, Z>;
617
- }): (elements: Iterable<A>) => Effect<R, E, Z>;
615
+ readonly body: (s: Z, a: A, i: number) => Effect<Z, E, R>;
616
+ }): (elements: Iterable<A>) => Effect<Z, E, R>;
618
617
  <A, R, E, Z>(elements: Iterable<A>, zero: Z, options: {
619
618
  readonly while: Predicate<Z>;
620
- readonly body: (s: Z, a: A, i: number) => Effect<R, E, Z>;
621
- }): Effect<R, E, Z>;
619
+ readonly body: (s: Z, a: A, i: number) => Effect<Z, E, R>;
620
+ }): Effect<Z, E, R>;
622
621
  };
623
622
  /**
624
623
  * Replicates the given effect `n` times.
@@ -627,8 +626,8 @@ export declare const reduceWhile: {
627
626
  * @category collecting & elements
628
627
  */
629
628
  export declare const replicate: {
630
- (n: number): <R, E, A>(self: Effect<R, E, A>) => Array<Effect<R, E, A>>;
631
- <R, E, A>(self: Effect<R, E, A>, n: number): Array<Effect<R, E, A>>;
629
+ (n: number): <A, E, R>(self: Effect<A, E, R>) => Array<Effect<A, E, R>>;
630
+ <A, E, R>(self: Effect<A, E, R>, n: number): Array<Effect<A, E, R>>;
632
631
  };
633
632
  /**
634
633
  * Performs this effect the specified number of times and collects the
@@ -642,22 +641,22 @@ export declare const replicateEffect: {
642
641
  readonly concurrency?: Concurrency | undefined;
643
642
  readonly batching?: boolean | "inherit" | undefined;
644
643
  readonly discard?: false | undefined;
645
- }): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, Array<A>>;
644
+ }): <A, E, R>(self: Effect<A, E, R>) => Effect<Array<A>, E, R>;
646
645
  (n: number, options: {
647
646
  readonly concurrency?: Concurrency | undefined;
648
647
  readonly batching?: boolean | "inherit" | undefined;
649
648
  readonly discard: true;
650
- }): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, void>;
651
- <R, E, A>(self: Effect<R, E, A>, n: number, options?: {
649
+ }): <A, E, R>(self: Effect<A, E, R>) => Effect<void, E, R>;
650
+ <A, E, R>(self: Effect<A, E, R>, n: number, options?: {
652
651
  readonly concurrency?: Concurrency | undefined;
653
652
  readonly batching?: boolean | "inherit" | undefined;
654
653
  readonly discard?: false | undefined;
655
- }): Effect<R, E, Array<A>>;
656
- <R, E, A>(self: Effect<R, E, A>, n: number, options: {
654
+ }): Effect<Array<A>, E, R>;
655
+ <A, E, R>(self: Effect<A, E, R>, n: number, options: {
657
656
  readonly concurrency?: Concurrency | undefined;
658
657
  readonly batching?: boolean | "inherit" | undefined;
659
658
  readonly discard: true;
660
- }): Effect<R, E, void>;
659
+ }): Effect<void, E, R>;
661
660
  };
662
661
  /**
663
662
  * Takes elements until the effectual predicate returns true.
@@ -666,8 +665,8 @@ export declare const replicateEffect: {
666
665
  * @category collecting & elements
667
666
  */
668
667
  export declare const takeUntil: {
669
- <A, R, E>(predicate: (a: NoInfer<A>, i: number) => Effect<R, E, boolean>): (elements: Iterable<A>) => Effect<R, E, Array<A>>;
670
- <R, E, A>(elements: Iterable<A>, predicate: (a: A, i: number) => Effect<R, E, boolean>): Effect<R, E, Array<A>>;
668
+ <A, R, E>(predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>): (elements: Iterable<A>) => Effect<Array<A>, E, R>;
669
+ <A, E, R>(elements: Iterable<A>, predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>): Effect<Array<A>, E, R>;
671
670
  };
672
671
  /**
673
672
  * Takes all elements so long as the effectual predicate returns true.
@@ -676,8 +675,8 @@ export declare const takeUntil: {
676
675
  * @category collecting & elements
677
676
  */
678
677
  export declare const takeWhile: {
679
- <R, E, A>(predicate: (a: NoInfer<A>, i: number) => Effect<R, E, boolean>): (elements: Iterable<A>) => Effect<R, E, Array<A>>;
680
- <R, E, A>(elements: Iterable<A>, predicate: (a: A, i: number) => Effect<R, E, boolean>): Effect<R, E, Array<A>>;
678
+ <A, E, R>(predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>): (elements: Iterable<A>) => Effect<Array<A>, E, R>;
679
+ <A, E, R>(elements: Iterable<A>, predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>): Effect<Array<A>, E, R>;
681
680
  };
682
681
  /**
683
682
  * Feeds elements of type `A` to `f` and accumulates all errors in error
@@ -690,26 +689,26 @@ export declare const takeWhile: {
690
689
  * @category collecting & elements
691
690
  */
692
691
  export declare const validateAll: {
693
- <R, E, A, B>(f: (a: A, i: number) => Effect<R, E, B>, options?: {
692
+ <A, B, E, R>(f: (a: A, i: number) => Effect<B, E, R>, options?: {
694
693
  readonly concurrency?: Concurrency | undefined;
695
694
  readonly batching?: boolean | "inherit" | undefined;
696
695
  readonly discard?: false | undefined;
697
- }): (elements: Iterable<A>) => Effect<R, Array<E>, Array<B>>;
698
- <R, E, A, B>(f: (a: A, i: number) => Effect<R, E, B>, options: {
696
+ } | undefined): (elements: Iterable<A>) => Effect<Array<B>, Array<E>, R>;
697
+ <A, B, E, R>(f: (a: A, i: number) => Effect<B, E, R>, options: {
699
698
  readonly concurrency?: Concurrency | undefined;
700
699
  readonly batching?: boolean | "inherit" | undefined;
701
700
  readonly discard: true;
702
- }): (elements: Iterable<A>) => Effect<R, Array<E>, void>;
703
- <R, E, A, B>(elements: Iterable<A>, f: (a: A, i: number) => Effect<R, E, B>, options?: {
701
+ }): (elements: Iterable<A>) => Effect<void, Array<E>, R>;
702
+ <A, B, E, R>(elements: Iterable<A>, f: (a: A, i: number) => Effect<B, E, R>, options?: {
704
703
  readonly concurrency?: Concurrency | undefined;
705
704
  readonly batching?: boolean | "inherit" | undefined;
706
705
  readonly discard?: false | undefined;
707
- }): Effect<R, Array<E>, Array<B>>;
708
- <R, E, A, B>(elements: Iterable<A>, f: (a: A, i: number) => Effect<R, E, B>, options: {
706
+ } | undefined): Effect<Array<B>, Array<E>, R>;
707
+ <A, B, E, R>(elements: Iterable<A>, f: (a: A, i: number) => Effect<B, E, R>, options: {
709
708
  readonly concurrency?: Concurrency | undefined;
710
709
  readonly batching?: boolean | "inherit" | undefined;
711
710
  readonly discard: true;
712
- }): Effect<R, Array<E>, void>;
711
+ }): Effect<void, Array<E>, R>;
713
712
  };
714
713
  /**
715
714
  * Feeds elements of type `A` to `f` until it succeeds. Returns first success
@@ -733,18 +732,18 @@ export declare const validateAll: {
733
732
  * @category collecting & elements
734
733
  */
735
734
  export declare const validateFirst: {
736
- <R, E, A, B>(f: (a: A, i: number) => Effect<R, E, B>, options?: {
735
+ <A, B, E, R>(f: (a: A, i: number) => Effect<B, E, R>, options?: {
737
736
  readonly concurrency?: Concurrency | undefined;
738
737
  readonly batching?: boolean | "inherit" | undefined;
739
- }): (elements: Iterable<A>) => Effect<R, Array<E>, B>;
740
- <R, E, A, B>(elements: Iterable<A>, f: (a: A, i: number) => Effect<R, E, B>, options?: {
738
+ } | undefined): (elements: Iterable<A>) => Effect<B, Array<E>, R>;
739
+ <A, B, E, R>(elements: Iterable<A>, f: (a: A, i: number) => Effect<B, E, R>, options?: {
741
740
  readonly concurrency?: Concurrency | undefined;
742
741
  readonly batching?: boolean | "inherit" | undefined;
743
- }): Effect<R, Array<E>, B>;
742
+ } | undefined): Effect<B, Array<E>, R>;
744
743
  };
745
744
  /**
746
745
  * Imports an asynchronous side-effect into a pure `Effect` value.
747
- * The callback function `Effect<R, E, A> => void` must be called at most once.
746
+ * The callback function `Effect<A, E, R> => void` must be called at most once.
748
747
  *
749
748
  * If an Effect is returned by the registration function, it will be executed
750
749
  * if the fiber executing the effect is interrupted.
@@ -758,7 +757,7 @@ export declare const validateFirst: {
758
757
  * @since 2.0.0
759
758
  * @category constructors
760
759
  */
761
- export declare const async: <R, E, A>(register: (callback: (_: Effect<R, E, A>) => void, signal: AbortSignal) => void | Effect<R, never, void>, blockingOn?: FiberId.FiberId) => Effect<R, E, A>;
760
+ export declare const async: <A, E = never, R = never>(register: (callback: (_: Effect<A, E, R>) => void, signal: AbortSignal) => void | Effect<void, never, R>, blockingOn?: FiberId.FiberId) => Effect<A, E, R>;
762
761
  /**
763
762
  * Converts an asynchronous, callback-style API into an `Effect`, which will
764
763
  * be executed asynchronously.
@@ -768,13 +767,13 @@ export declare const async: <R, E, A>(register: (callback: (_: Effect<R, E, A>)
768
767
  * @since 2.0.0
769
768
  * @category constructors
770
769
  */
771
- export declare const asyncEffect: <R, E, A, R2, E2, X>(register: (callback: (_: Effect<R, E, A>) => void) => Effect<R2, E2, X>) => Effect<R | R2, E | E2, A>;
770
+ export declare const asyncEffect: <A, E, R, X, E2, R2>(register: (callback: (_: Effect<A, E, R>) => void) => Effect<X, E2, R2>) => Effect<A, E | E2, R | R2>;
772
771
  /**
773
772
  * Imports an asynchronous effect into a pure `Effect` value, possibly returning
774
773
  * the value synchronously.
775
774
  *
776
775
  * If the register function returns a value synchronously, then the callback
777
- * function `Effect<R, E, A> => void` must not be called. Otherwise the callback
776
+ * function `Effect<A, E, R> => void` must not be called. Otherwise the callback
778
777
  * function must be called at most once.
779
778
  *
780
779
  * The `FiberId` of the fiber that may complete the async callback may be
@@ -783,7 +782,7 @@ export declare const asyncEffect: <R, E, A, R2, E2, X>(register: (callback: (_:
783
782
  * @since 2.0.0
784
783
  * @category constructors
785
784
  */
786
- export declare const asyncOption: <R, E, A>(register: (callback: (_: Effect<R, E, A>) => void) => Option.Option<Effect<R, E, A>>, blockingOn?: FiberId.FiberId) => Effect<R, E, A>;
785
+ export declare const asyncOption: <A, E = never, R = never>(register: (callback: (_: Effect<A, E, R>) => void) => Option.Option<Effect<A, E, R>>, blockingOn?: FiberId.FiberId) => Effect<A, E, R>;
787
786
  /**
788
787
  * Imports an asynchronous side-effect into an effect. It has the option of
789
788
  * returning the value synchronously, which is useful in cases where it cannot
@@ -793,7 +792,7 @@ export declare const asyncOption: <R, E, A>(register: (callback: (_: Effect<R, E
793
792
  * executing the effect is interrupted.
794
793
  *
795
794
  * If the register function returns a value synchronously, then the callback
796
- * function `Effect<R, E, A> => void` must not be called. Otherwise the callback
795
+ * function `Effect<A, E, R> => void` must not be called. Otherwise the callback
797
796
  * function must be called at most once.
798
797
  *
799
798
  * The `FiberId` of the fiber that may complete the async callback may be
@@ -802,32 +801,32 @@ export declare const asyncOption: <R, E, A>(register: (callback: (_: Effect<R, E
802
801
  * @since 2.0.0
803
802
  * @category constructors
804
803
  */
805
- export declare const asyncEither: <R, E, A>(register: (callback: (effect: Effect<R, E, A>) => void) => Either.Either<Effect<R, never, void>, Effect<R, E, A>>, blockingOn?: FiberId.FiberId) => Effect<R, E, A>;
804
+ export declare const asyncEither: <A, E = never, R = never>(register: (callback: (effect: Effect<A, E, R>) => void) => Either.Either<Effect<void, never, R>, Effect<A, E, R>>, blockingOn?: FiberId.FiberId) => Effect<A, E, R>;
806
805
  /**
807
806
  * @since 2.0.0
808
807
  * @category constructors
809
808
  */
810
- export declare const fail: <E>(error: E) => Effect<never, E, never>;
809
+ export declare const fail: <E>(error: E) => Effect<never, E>;
811
810
  /**
812
811
  * @since 2.0.0
813
812
  * @category constructors
814
813
  */
815
- export declare const failSync: <E>(evaluate: LazyArg<E>) => Effect<never, E, never>;
814
+ export declare const failSync: <E>(evaluate: LazyArg<E>) => Effect<never, E>;
816
815
  /**
817
816
  * @since 2.0.0
818
817
  * @category constructors
819
818
  */
820
- export declare const failCause: <E>(cause: Cause.Cause<E>) => Effect<never, E, never>;
819
+ export declare const failCause: <E>(cause: Cause.Cause<E>) => Effect<never, E>;
821
820
  /**
822
821
  * @since 2.0.0
823
822
  * @category constructors
824
823
  */
825
- export declare const failCauseSync: <E>(evaluate: LazyArg<Cause.Cause<E>>) => Effect<never, E, never>;
824
+ export declare const failCauseSync: <E>(evaluate: LazyArg<Cause.Cause<E>>) => Effect<never, E>;
826
825
  /**
827
826
  * @since 2.0.0
828
827
  * @category constructors
829
828
  */
830
- export declare const die: (defect: unknown) => Effect<never, never, never>;
829
+ export declare const die: (defect: unknown) => Effect<never>;
831
830
  /**
832
831
  * Returns an effect that dies with a `RuntimeException` having the specified
833
832
  * text message. This method can be used for terminating a fiber because a
@@ -836,65 +835,65 @@ export declare const die: (defect: unknown) => Effect<never, never, never>;
836
835
  * @since 2.0.0
837
836
  * @category constructors
838
837
  */
839
- export declare const dieMessage: (message: string) => Effect<never, never, never>;
838
+ export declare const dieMessage: (message: string) => Effect<never>;
840
839
  /**
841
840
  * @since 2.0.0
842
841
  * @category constructors
843
842
  */
844
- export declare const dieSync: (evaluate: LazyArg<unknown>) => Effect<never, never, never>;
843
+ export declare const dieSync: (evaluate: LazyArg<unknown>) => Effect<never>;
845
844
  /**
846
845
  * @since 2.0.0
847
846
  * @category constructors
848
847
  */
849
848
  export declare const gen: {
850
- <Eff extends EffectGen<any, any, any>, AEff>(f: (resume: Adapter) => Generator<Eff, AEff, any>): Effect<[
849
+ <Eff extends EffectGen<any, any, any>, AEff>(f: (resume: Adapter) => Generator<Eff, AEff, any>): Effect<AEff, [
851
850
  Eff
852
- ] extends [never] ? never : [Eff] extends [EffectGen<infer R, any, any>] ? R : never, [
851
+ ] extends [never] ? never : [Eff] extends [EffectGen<any, infer E, any>] ? E : never, [
853
852
  Eff
854
- ] extends [never] ? never : [Eff] extends [EffectGen<any, infer E, any>] ? E : never, AEff>;
855
- <Self, Eff extends EffectGen<any, any, any>, AEff>(self: Self, f: (this: Self, resume: Adapter) => Generator<Eff, AEff, any>): Effect<[
853
+ ] extends [never] ? never : [Eff] extends [EffectGen<any, any, infer R>] ? R : never>;
854
+ <Self, Eff extends EffectGen<any, any, any>, AEff>(self: Self, f: (this: Self, resume: Adapter) => Generator<Eff, AEff, any>): Effect<AEff, [
856
855
  Eff
857
- ] extends [never] ? never : [Eff] extends [EffectGen<infer R, any, any>] ? R : never, [
856
+ ] extends [never] ? never : [Eff] extends [EffectGen<any, infer E, any>] ? E : never, [
858
857
  Eff
859
- ] extends [never] ? never : [Eff] extends [EffectGen<any, infer E, any>] ? E : never, AEff>;
858
+ ] extends [never] ? never : [Eff] extends [EffectGen<any, any, infer R>] ? R : never>;
860
859
  };
861
860
  /**
862
861
  * @category models
863
862
  * @since 2.0.0
864
863
  */
865
- export interface EffectGen<out R, out E, out A> {
866
- readonly _R: () => R;
867
- readonly _E: () => E;
864
+ export interface EffectGen<out A, out E, out R> {
868
865
  readonly _A: () => A;
869
- readonly value: Effect<R, E, A>;
870
- [Symbol.iterator](): Generator<EffectGen<R, E, A>, A>;
866
+ readonly _E: () => E;
867
+ readonly _R: () => R;
868
+ readonly value: Effect<A, E, R>;
869
+ [Symbol.iterator](): Generator<EffectGen<A, E, R>, A>;
871
870
  }
872
871
  /**
873
872
  * @since 2.0.0
874
873
  * @category models
875
874
  */
876
875
  export interface Adapter {
877
- <R, E, A>(self: Effect<R, E, A>): EffectGen<R, E, A>;
878
- <A, _R, _E, _A>(a: A, ab: (a: A) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
879
- <A, B, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
880
- <A, B, C, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
881
- <A, B, C, D, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
882
- <A, B, C, D, E, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
883
- <A, B, C, D, E, F, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
884
- <A, B, C, D, E, F, G, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
885
- <A, B, C, D, E, F, G, H, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (g: H) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
886
- <A, B, C, D, E, F, G, H, I, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
887
- <A, B, C, D, E, F, G, H, I, J, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
888
- <A, B, C, D, E, F, G, H, I, J, K, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
889
- <A, B, C, D, E, F, G, H, I, J, K, L, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
890
- <A, B, C, D, E, F, G, H, I, J, K, L, M, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
891
- <A, B, C, D, E, F, G, H, I, J, K, L, M, N, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
892
- <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
893
- <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
894
- <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
895
- <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
896
- <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => S, st: (s: S) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
897
- <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, _R, _E, _A>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => S, st: (s: S) => T, tu: (s: T) => Effect<_R, _E, _A>): EffectGen<_R, _E, _A>;
876
+ <A, E, R>(self: Effect<A, E, R>): EffectGen<A, E, R>;
877
+ <A, _A, _E, _R>(a: A, ab: (a: A) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
878
+ <A, B, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
879
+ <A, B, C, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
880
+ <A, B, C, D, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
881
+ <A, B, C, D, E, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
882
+ <A, B, C, D, E, F, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
883
+ <A, B, C, D, E, F, G, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
884
+ <A, B, C, D, E, F, G, H, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (g: H) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
885
+ <A, B, C, D, E, F, G, H, I, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
886
+ <A, B, C, D, E, F, G, H, I, J, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
887
+ <A, B, C, D, E, F, G, H, I, J, K, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
888
+ <A, B, C, D, E, F, G, H, I, J, K, L, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
889
+ <A, B, C, D, E, F, G, H, I, J, K, L, M, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
890
+ <A, B, C, D, E, F, G, H, I, J, K, L, M, N, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
891
+ <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
892
+ <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
893
+ <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
894
+ <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
895
+ <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => S, st: (s: S) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
896
+ <A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, _A, _E, _R>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => S, st: (s: S) => T, tu: (s: T) => Effect<_A, _E, _R>): EffectGen<_A, _E, _R>;
898
897
  }
899
898
  /**
900
899
  * Returns a effect that will never produce anything. The moral equivalent of
@@ -903,14 +902,14 @@ export interface Adapter {
903
902
  * @since 2.0.0
904
903
  * @category constructors
905
904
  */
906
- export declare const never: Effect<never, never, never>;
905
+ export declare const never: Effect<never>;
907
906
  /**
908
907
  * Requires the option produced by this value to be `None`.
909
908
  *
910
909
  * @since 2.0.0
911
910
  * @category constructors
912
911
  */
913
- export declare const none: <R, E, A>(self: Effect<R, E, Option.Option<A>>) => Effect<R, E | Cause.NoSuchElementException, void>;
912
+ export declare const none: <A, E, R>(self: Effect<Option.Option<A>, E, R>) => Effect<void, E | Cause.NoSuchElementException, R>;
914
913
  /**
915
914
  * Like `tryPromise` but produces a defect in case of errors.
916
915
  *
@@ -920,65 +919,65 @@ export declare const none: <R, E, A>(self: Effect<R, E, Option.Option<A>>) => Ef
920
919
  * @since 2.0.0
921
920
  * @category constructors
922
921
  */
923
- export declare const promise: <A>(evaluate: (signal: AbortSignal) => Promise<A>) => Effect<never, never, A>;
922
+ export declare const promise: <A>(evaluate: (signal: AbortSignal) => Promise<A>) => Effect<A>;
924
923
  /**
925
924
  * @since 2.0.0
926
925
  * @category constructors
927
926
  */
928
- export declare const succeed: <A>(value: A) => Effect<never, never, A>;
927
+ export declare const succeed: <A>(value: A) => Effect<A>;
929
928
  /**
930
929
  * Returns an effect which succeeds with `None`.
931
930
  *
932
931
  * @since 2.0.0
933
932
  * @category constructors
934
933
  */
935
- export declare const succeedNone: Effect<never, never, Option.Option<never>>;
934
+ export declare const succeedNone: Effect<Option.Option<never>>;
936
935
  /**
937
936
  * Returns an effect which succeeds with the value wrapped in a `Some`.
938
937
  *
939
938
  * @since 2.0.0
940
939
  * @category constructors
941
940
  */
942
- export declare const succeedSome: <A>(value: A) => Effect<never, never, Option.Option<A>>;
941
+ export declare const succeedSome: <A>(value: A) => Effect<Option.Option<A>>;
943
942
  /**
944
943
  * @since 2.0.0
945
944
  * @category constructors
946
945
  */
947
- export declare const suspend: <R, E, A>(effect: LazyArg<Effect<R, E, A>>) => Effect<R, E, A>;
946
+ export declare const suspend: <A, E, R>(effect: LazyArg<Effect<A, E, R>>) => Effect<A, E, R>;
948
947
  /**
949
948
  * @since 2.0.0
950
949
  * @category constructors
951
950
  */
952
- export declare const sync: <A>(evaluate: LazyArg<A>) => Effect<never, never, A>;
951
+ export declare const sync: <A>(evaluate: LazyArg<A>) => Effect<A>;
953
952
  /**
954
953
  * @since 2.0.0
955
954
  * @category constructors
956
955
  */
957
- export declare const unit: Effect<never, never, void>;
956
+ export declare const unit: Effect<void>;
958
957
  /**
959
958
  * @since 2.0.0
960
959
  * @category constructors
961
960
  */
962
961
  export declare const yieldNow: (options?: {
963
962
  readonly priority?: number | undefined;
964
- }) => Effect<never, never, void>;
963
+ }) => Effect<void>;
965
964
  declare const _catch: {
966
- <N extends keyof E, K extends E[N] & string, E, R1, E1, A1>(discriminator: N, options: {
965
+ <N extends keyof E, K extends E[N] & string, E, A1, E1, R1>(discriminator: N, options: {
967
966
  readonly failure: K;
968
967
  readonly onFailure: (error: Extract<E, {
969
968
  [n in N]: K;
970
- }>) => Effect<R1, E1, A1>;
971
- }): <R, A>(self: Effect<R, E, A>) => Effect<R1 | R, E1 | Exclude<E, {
969
+ }>) => Effect<A1, E1, R1>;
970
+ }): <A, R>(self: Effect<A, E, R>) => Effect<A1 | A, E1 | Exclude<E, {
972
971
  [n in N]: K;
973
- }>, A1 | A>;
974
- <R, E, A, N extends keyof E, K extends E[N] & string, R1, E1, A1>(self: Effect<R, E, A>, discriminator: N, options: {
972
+ }>, R1 | R>;
973
+ <A, E, R, N extends keyof E, K extends E[N] & string, A1, E1, R1>(self: Effect<A, E, R>, discriminator: N, options: {
975
974
  readonly failure: K;
976
975
  readonly onFailure: (error: Extract<E, {
977
976
  [n in N]: K;
978
- }>) => Effect<R1, E1, A1>;
979
- }): Effect<R | R1, E1 | Exclude<E, {
977
+ }>) => Effect<A1, E1, R1>;
978
+ }): Effect<A | A1, E1 | Exclude<E, {
980
979
  [n in N]: K;
981
- }>, A | A1>;
980
+ }>, R | R1>;
982
981
  };
983
982
  export {
984
983
  /**
@@ -999,8 +998,8 @@ _catch as catch };
999
998
  * @category error handling
1000
999
  */
1001
1000
  export declare const catchAll: {
1002
- <E, R2, E2, A2>(f: (e: E) => Effect<R2, E2, A2>): <R, A>(self: Effect<R, E, A>) => Effect<R2 | R, E2, A2 | A>;
1003
- <R, A, E, R2, E2, A2>(self: Effect<R, E, A>, f: (e: E) => Effect<R2, E2, A2>): Effect<R | R2, E2, A | A2>;
1001
+ <E, A2, E2, R2>(f: (e: E) => Effect<A2, E2, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A2 | A, E2, R2 | R>;
1002
+ <A, E, R, A2, E2, R2>(self: Effect<A, E, R>, f: (e: E) => Effect<A2, E2, R2>): Effect<A2 | A, E2, R2 | R>;
1004
1003
  };
1005
1004
  /**
1006
1005
  * Recovers from both recoverable and unrecoverable errors.
@@ -1012,8 +1011,8 @@ export declare const catchAll: {
1012
1011
  * @category error handling
1013
1012
  */
1014
1013
  export declare const catchAllCause: {
1015
- <E, R2, E2, A2>(f: (cause: Cause.Cause<E>) => Effect<R2, E2, A2>): <R, A>(self: Effect<R, E, A>) => Effect<R2 | R, E2, A2 | A>;
1016
- <R, A, E, R2, E2, A2>(self: Effect<R, E, A>, f: (cause: Cause.Cause<E>) => Effect<R2, E2, A2>): Effect<R | R2, E2, A | A2>;
1014
+ <E, A2, E2, R2>(f: (cause: Cause.Cause<E>) => Effect<A2, E2, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A2 | A, E2, R2 | R>;
1015
+ <A, E, R, A2, E2, R2>(self: Effect<A, E, R>, f: (cause: Cause.Cause<E>) => Effect<A2, E2, R2>): Effect<A | A2, E2, R | R2>;
1017
1016
  };
1018
1017
  /**
1019
1018
  * Recovers from all defects with provided function.
@@ -1027,8 +1026,8 @@ export declare const catchAllCause: {
1027
1026
  * @category error handling
1028
1027
  */
1029
1028
  export declare const catchAllDefect: {
1030
- <R2, E2, A2>(f: (defect: unknown) => Effect<R2, E2, A2>): <R, E, A>(self: Effect<R, E, A>) => Effect<R2 | R, E2 | E, A2 | A>;
1031
- <R, E, A, R2, E2, A2>(self: Effect<R, E, A>, f: (defect: unknown) => Effect<R2, E2, A2>): Effect<R | R2, E | E2, A | A2>;
1029
+ <A2, E2, R2>(f: (defect: unknown) => Effect<A2, E2, R2>): <A, E, R>(self: Effect<A, E, R>) => Effect<A2 | A, E2 | E, R2 | R>;
1030
+ <A, E, R, A2, E2, R2>(self: Effect<A, E, R>, f: (defect: unknown) => Effect<A2, E2, R2>): Effect<A | A2, E | E2, R | R2>;
1032
1031
  };
1033
1032
  /**
1034
1033
  * Recovers from errors that match the given predicate.
@@ -1037,10 +1036,10 @@ export declare const catchAllDefect: {
1037
1036
  * @category error handling
1038
1037
  */
1039
1038
  export declare const catchIf: {
1040
- <E, EB extends E, R2, E2, A2>(refinement: Refinement<NoInfer<E>, EB>, f: (e: EB) => Effect<R2, E2, A2>): <R, A>(self: Effect<R, E, A>) => Effect<R2 | R, E2 | Exclude<E, EB>, A2 | A>;
1041
- <E, R2, E2, A2>(predicate: Predicate<NoInfer<E>>, f: (e: NoInfer<E>) => Effect<R2, E2, A2>): <R, A>(self: Effect<R, E, A>) => Effect<R2 | R, E | E2, A2 | A>;
1042
- <R, E, A, EA extends E, EB extends EA, R2, E2, A2>(self: Effect<R, E, A>, refinement: Refinement<EA, EB>, f: (e: EB) => Effect<R2, E2, A2>): Effect<R | R2, E2 | Exclude<E, EB>, A | A2>;
1043
- <R, E, A, R2, E2, A2>(self: Effect<R, E, A>, predicate: Predicate<E>, f: (e: E) => Effect<R2, E2, A2>): Effect<R | R2, E | E2, A | A2>;
1039
+ <E, EB extends E, A2, E2, R2>(refinement: Refinement<NoInfer<E>, EB>, f: (e: EB) => Effect<A2, E2, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A2 | A, E2 | Exclude<E, EB>, R2 | R>;
1040
+ <E, A2, E2, R2>(predicate: Predicate<NoInfer<E>>, f: (e: NoInfer<E>) => Effect<A2, E2, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A2 | A, E | E2, R2 | R>;
1041
+ <A, E, R, EB extends E, A2, E2, R2>(self: Effect<A, E, R>, refinement: Refinement<E, EB>, f: (e: EB) => Effect<A2, E2, R2>): Effect<A | A2, E2 | Exclude<E, EB>, R | R2>;
1042
+ <A, E, R, A2, E2, R2>(self: Effect<A, E, R>, predicate: Predicate<E>, f: (e: E) => Effect<A2, E2, R2>): Effect<A | A2, E | E2, R | R2>;
1044
1043
  };
1045
1044
  /**
1046
1045
  * Recovers from some or all of the error cases.
@@ -1049,8 +1048,8 @@ export declare const catchIf: {
1049
1048
  * @category error handling
1050
1049
  */
1051
1050
  export declare const catchSome: {
1052
- <E, R2, E2, A2>(pf: (e: E) => Option.Option<Effect<R2, E2, A2>>): <R, A>(self: Effect<R, E, A>) => Effect<R2 | R, E | E2, A2 | A>;
1053
- <R, A, E, R2, E2, A2>(self: Effect<R, E, A>, pf: (e: E) => Option.Option<Effect<R2, E2, A2>>): Effect<R | R2, E | E2, A | A2>;
1051
+ <E, A2, E2, R2>(pf: (e: NoInfer<E>) => Option.Option<Effect<A2, E2, R2>>): <A, R>(self: Effect<A, E, R>) => Effect<A2 | A, E | E2, R2 | R>;
1052
+ <A, E, R, A2, E2, R2>(self: Effect<A, E, R>, pf: (e: NoInfer<E>) => Option.Option<Effect<A2, E2, R2>>): Effect<A | A2, E | E2, R | R2>;
1054
1053
  };
1055
1054
  /**
1056
1055
  * Recovers from some or all of the error cases with provided cause.
@@ -1059,8 +1058,8 @@ export declare const catchSome: {
1059
1058
  * @category error handling
1060
1059
  */
1061
1060
  export declare const catchSomeCause: {
1062
- <E, R2, E2, A2>(f: (cause: Cause.Cause<E>) => Option.Option<Effect<R2, E2, A2>>): <R, A>(self: Effect<R, E, A>) => Effect<R2 | R, E | E2, A2 | A>;
1063
- <R, E, A, R2, E2, A2>(self: Effect<R, E, A>, f: (cause: Cause.Cause<E>) => Option.Option<Effect<R2, E2, A2>>): Effect<R | R2, E | E2, A | A2>;
1061
+ <E, A2, E2, R2>(f: (cause: Cause.Cause<NoInfer<E>>) => Option.Option<Effect<A2, E2, R2>>): <A, R>(self: Effect<A, E, R>) => Effect<A2 | A, E | E2, R2 | R>;
1062
+ <A, E, R, A2, E2, R2>(self: Effect<A, E, R>, f: (cause: Cause.Cause<NoInfer<E>>) => Option.Option<Effect<A2, E2, R2>>): Effect<A2 | A, E | E2, R2 | R>;
1064
1063
  };
1065
1064
  /**
1066
1065
  * Recovers from some or all of the defects with provided partial function.
@@ -1074,8 +1073,8 @@ export declare const catchSomeCause: {
1074
1073
  * @category error handling
1075
1074
  */
1076
1075
  export declare const catchSomeDefect: {
1077
- <R2, E2, A2>(pf: (defect: unknown) => Option.Option<Effect<R2, E2, A2>>): <R, E, A>(self: Effect<R, E, A>) => Effect<R2 | R, E2 | E, A2 | A>;
1078
- <R, E, A, R2, E2, A2>(self: Effect<R, E, A>, pf: (defect: unknown) => Option.Option<Effect<R2, E2, A2>>): Effect<R | R2, E | E2, A | A2>;
1076
+ <A2, E2, R2>(pf: (defect: unknown) => Option.Option<Effect<A2, E2, R2>>): <A, E, R>(self: Effect<A, E, R>) => Effect<A2 | A, E2 | E, R2 | R>;
1077
+ <A, E, R, A2, E2, R2>(self: Effect<A, E, R>, pf: (defect: unknown) => Option.Option<Effect<A2, E2, R2>>): Effect<A | A2, E | E2, R | R2>;
1079
1078
  };
1080
1079
  /**
1081
1080
  * Recovers from the specified tagged error.
@@ -1084,20 +1083,20 @@ export declare const catchSomeDefect: {
1084
1083
  * @category error handling
1085
1084
  */
1086
1085
  export declare const catchTag: {
1087
- <K extends (E extends {
1086
+ <K extends E extends {
1088
1087
  _tag: string;
1089
- } ? E["_tag"] : never), E, R1, E1, A1>(k: K, f: (e: Extract<E, {
1088
+ } ? E["_tag"] : never, E, A1, E1, R1>(k: K, f: (e: Extract<E, {
1090
1089
  _tag: K;
1091
- }>) => Effect<R1, E1, A1>): <R, A>(self: Effect<R, E, A>) => Effect<R1 | R, E1 | Exclude<E, {
1090
+ }>) => Effect<A1, E1, R1>): <A, R>(self: Effect<A, E, R>) => Effect<A1 | A, E1 | Exclude<E, {
1092
1091
  _tag: K;
1093
- }>, A1 | A>;
1094
- <R, E, A, K extends (E extends {
1092
+ }>, R1 | R>;
1093
+ <A, E, R, K extends E extends {
1095
1094
  _tag: string;
1096
- } ? E["_tag"] : never), R1, E1, A1>(self: Effect<R, E, A>, k: K, f: (e: Extract<E, {
1095
+ } ? E["_tag"] : never, R1, E1, A1>(self: Effect<A, E, R>, k: K, f: (e: Extract<E, {
1097
1096
  _tag: K;
1098
- }>) => Effect<R1, E1, A1>): Effect<R | R1, E1 | Exclude<E, {
1097
+ }>) => Effect<A1, E1, R1>): Effect<A | A1, E1 | Exclude<E, {
1099
1098
  _tag: K;
1100
- }>, A | A1>;
1099
+ }>, R | R1>;
1101
1100
  };
1102
1101
  /**
1103
1102
  * Recovers from the specified tagged errors.
@@ -1116,14 +1115,14 @@ export declare const catchTags: {
1116
1115
  [K in Exclude<keyof Cases, Extract<E, {
1117
1116
  _tag: string;
1118
1117
  }>["_tag"]>]: never;
1119
- })>(cases: Cases): <R, A>(self: Effect<R, E, A>) => Effect<R | {
1120
- [K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Effect<infer R, any, any> ? R : never;
1118
+ })>(cases: Cases): <A, R>(self: Effect<A, E, R>) => Effect<A | {
1119
+ [K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Effect<infer A, any, any> ? A : never;
1121
1120
  }[keyof Cases], Exclude<E, {
1122
1121
  _tag: keyof Cases;
1123
1122
  }> | {
1124
1123
  [K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Effect<any, infer E, any> ? E : never;
1125
- }[keyof Cases], A | {
1126
- [K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Effect<any, any, infer A> ? A : never;
1124
+ }[keyof Cases], R | {
1125
+ [K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Effect<any, any, infer R> ? R : never;
1127
1126
  }[keyof Cases]>;
1128
1127
  <R, E, A, Cases extends {
1129
1128
  [K in Extract<E, {
@@ -1135,14 +1134,14 @@ export declare const catchTags: {
1135
1134
  [K in Exclude<keyof Cases, Extract<E, {
1136
1135
  _tag: string;
1137
1136
  }>["_tag"]>]: never;
1138
- })>(self: Effect<R, E, A>, cases: Cases): Effect<R | {
1139
- [K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Effect<infer R, any, any> ? R : never;
1137
+ })>(self: Effect<A, E, R>, cases: Cases): Effect<A | {
1138
+ [K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Effect<infer A, any, any> ? A : never;
1140
1139
  }[keyof Cases], Exclude<E, {
1141
1140
  _tag: keyof Cases;
1142
1141
  }> | {
1143
1142
  [K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Effect<any, infer E, any> ? E : never;
1144
- }[keyof Cases], A | {
1145
- [K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Effect<any, any, infer A> ? A : never;
1143
+ }[keyof Cases], R | {
1144
+ [K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Effect<any, any, infer R> ? R : never;
1146
1145
  }[keyof Cases]>;
1147
1146
  };
1148
1147
  /**
@@ -1152,7 +1151,7 @@ export declare const catchTags: {
1152
1151
  * @since 2.0.0
1153
1152
  * @category error handling
1154
1153
  */
1155
- export declare const cause: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never, Cause.Cause<E>>;
1154
+ export declare const cause: <A, E, R>(self: Effect<A, E, R>) => Effect<Cause.Cause<E>, never, R>;
1156
1155
  /**
1157
1156
  * Returns an effect that ignores errors and runs repeatedly until it
1158
1157
  * eventually succeeds.
@@ -1160,14 +1159,14 @@ export declare const cause: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never,
1160
1159
  * @since 2.0.0
1161
1160
  * @category error handling
1162
1161
  */
1163
- export declare const eventually: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never, A>;
1162
+ export declare const eventually: <A, E, R>(self: Effect<A, E, R>) => Effect<A, never, R>;
1164
1163
  /**
1165
1164
  * Returns a new effect that ignores the success or failure of this effect.
1166
1165
  *
1167
1166
  * @since 2.0.0
1168
1167
  * @category error handling
1169
1168
  */
1170
- export declare const ignore: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never, void>;
1169
+ export declare const ignore: <A, E, R>(self: Effect<A, E, R>) => Effect<void, never, R>;
1171
1170
  /**
1172
1171
  * Returns a new effect that ignores the success or failure of this effect,
1173
1172
  * but which also logs failures at the Debug level, just in case the failure
@@ -1176,21 +1175,21 @@ export declare const ignore: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never
1176
1175
  * @since 2.0.0
1177
1176
  * @category error handling
1178
1177
  */
1179
- export declare const ignoreLogged: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never, void>;
1178
+ export declare const ignoreLogged: <A, E, R>(self: Effect<A, E, R>) => Effect<void, never, R>;
1180
1179
  /**
1181
1180
  * Exposes all parallel errors in a single call.
1182
1181
  *
1183
1182
  * @since 2.0.0
1184
1183
  * @category error handling
1185
1184
  */
1186
- export declare const parallelErrors: <R, E, A>(self: Effect<R, E, A>) => Effect<R, Array<E>, A>;
1185
+ export declare const parallelErrors: <A, E, R>(self: Effect<A, E, R>) => Effect<A, Array<E>, R>;
1187
1186
  /**
1188
1187
  * Exposes the full `Cause` of failure for the specified effect.
1189
1188
  *
1190
1189
  * @since 2.0.0
1191
1190
  * @category error handling
1192
1191
  */
1193
- export declare const sandbox: <R, E, A>(self: Effect<R, E, A>) => Effect<R, Cause.Cause<E>, A>;
1192
+ export declare const sandbox: <A, E, R>(self: Effect<A, E, R>) => Effect<A, Cause.Cause<E>, R>;
1194
1193
  /**
1195
1194
  * @since 2.0.0
1196
1195
  * @category error handling
@@ -1200,30 +1199,30 @@ export declare namespace Retry {
1200
1199
  * @since 2.0.0
1201
1200
  * @category error handling
1202
1201
  */
1203
- type Return<R, E, A, O extends Options<E>> = Effect<R | (O extends {
1204
- schedule: Schedule.Schedule<infer X, infer _I, infer _O>;
1205
- } ? X : never) | (O extends {
1206
- while: (...args: Array<any>) => Effect<infer X, infer _E, infer _A>;
1207
- } ? X : never) | (O extends {
1208
- until: (...args: Array<any>) => Effect<infer X, infer _E, infer _A>;
1209
- } ? X : never), (O extends {
1202
+ type Return<R, E, A, O extends Options<E>> = Effect<A, (O extends {
1210
1203
  schedule: Schedule.Schedule<infer _R, infer _I, infer _O>;
1211
1204
  } ? E : O extends {
1212
1205
  until: Refinement<E, infer E2>;
1213
1206
  } ? E2 : E) | (O extends {
1214
- while: (...args: Array<any>) => Effect<infer _R, infer X, infer _A>;
1215
- } ? X : never) | (O extends {
1216
- until: (...args: Array<any>) => Effect<infer _R, infer X, infer _A>;
1217
- } ? X : never), A> extends infer Z ? Z : never;
1207
+ while: (...args: Array<any>) => Effect<infer _A, infer E, infer _R>;
1208
+ } ? E : never) | (O extends {
1209
+ until: (...args: Array<any>) => Effect<infer _A, infer E, infer _R>;
1210
+ } ? E : never), R | (O extends {
1211
+ schedule: Schedule.Schedule<infer R, infer _I, infer _O>;
1212
+ } ? R : never) | (O extends {
1213
+ while: (...args: Array<any>) => Effect<infer _A, infer _E, infer R>;
1214
+ } ? R : never) | (O extends {
1215
+ until: (...args: Array<any>) => Effect<infer _A, infer _E, infer R>;
1216
+ } ? R : never)> extends infer Z ? Z : never;
1218
1217
  /**
1219
1218
  * @since 2.0.0
1220
1219
  * @category error handling
1221
1220
  */
1222
1221
  interface Options<E> {
1223
- while?: (error: E) => boolean | Effect<any, any, boolean>;
1224
- until?: (error: E) => boolean | Effect<any, any, boolean>;
1225
- times?: number;
1226
- schedule?: Schedule.Schedule<any, E, any>;
1222
+ while?: ((error: E) => boolean | Effect<boolean, any, any>) | undefined;
1223
+ until?: ((error: E) => boolean | Effect<boolean, any, any>) | undefined;
1224
+ times?: number | undefined;
1225
+ schedule?: Schedule.Schedule<any, E, any> | undefined;
1227
1226
  }
1228
1227
  }
1229
1228
  /**
@@ -1233,10 +1232,10 @@ export declare namespace Retry {
1233
1232
  * @category error handling
1234
1233
  */
1235
1234
  export declare const retry: {
1236
- <E, O extends Retry.Options<E>>(options: O): <R, A>(self: Effect<R, E, A>) => Retry.Return<R, E, A, O>;
1237
- <R1, E extends E0, E0, B>(policy: Schedule.Schedule<R1, E0, B>): <R, A>(self: Effect<R, E, A>) => Effect<R1 | R, E, A>;
1238
- <R, A, E, O extends Retry.Options<E>>(self: Effect<R, E, A>, options: O): Retry.Return<R, E, A, O>;
1239
- <R, E extends E0, E0, A, R1, B>(self: Effect<R, E, A>, policy: Schedule.Schedule<R1, E0, B>): Effect<R | R1, E, A>;
1235
+ <E, O extends Retry.Options<E>>(options: O): <A, R>(self: Effect<A, E, R>) => Retry.Return<R, E, A, O>;
1236
+ <R1, E, B>(policy: Schedule.Schedule<R1, NoInfer<E>, B>): <A, R>(self: Effect<A, E, R>) => Effect<A, E, R1 | R>;
1237
+ <A, E, R, O extends Retry.Options<E>>(self: Effect<A, E, R>, options: O): Retry.Return<R, E, A, O>;
1238
+ <R, E, A, R1, B>(self: Effect<A, E, R>, policy: Schedule.Schedule<R1, E, B>): Effect<A, E, R1 | R>;
1240
1239
  };
1241
1240
  /**
1242
1241
  * Retries with the specified schedule, until it fails, and then both the
@@ -1247,15 +1246,15 @@ export declare const retry: {
1247
1246
  * @category error handling
1248
1247
  */
1249
1248
  export declare const retryOrElse: {
1250
- <R1, E extends E3, A1, R2, E2, A2, E3>(policy: Schedule.Schedule<R1, E3, A1>, orElse: (e: E, out: A1) => Effect<R2, E2, A2>): <R, A>(self: Effect<R, E, A>) => Effect<R1 | R2 | R, E | E2, A2 | A>;
1251
- <R, E extends E3, A, R1, A1, R2, E2, A2, E3>(self: Effect<R, E, A>, policy: Schedule.Schedule<R1, E3, A1>, orElse: (e: E, out: A1) => Effect<R2, E2, A2>): Effect<R | R1 | R2, E | E2, A | A2>;
1249
+ <R1, E, A1, A2, E2, R2>(policy: Schedule.Schedule<R1, NoInfer<E>, A1>, orElse: (e: NoInfer<E>, out: A1) => Effect<A2, E2, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A2 | A, E | E2, R1 | R2 | R>;
1250
+ <A, E, R, A1, R1, A2, E2, R2>(self: Effect<A, E, R>, policy: Schedule.Schedule<R1, NoInfer<E>, A1>, orElse: (e: NoInfer<E>, out: A1) => Effect<A2, E2, R2>): Effect<A | A2, E | E2, R | R1 | R2>;
1252
1251
  };
1253
1252
  declare const try_: {
1254
1253
  <A, E>(options: {
1255
1254
  readonly try: LazyArg<A>;
1256
1255
  readonly catch: (error: unknown) => E;
1257
- }): Effect<never, E, A>;
1258
- <A>(evaluate: LazyArg<A>): Effect<never, Cause.UnknownException, A>;
1256
+ }): Effect<A, E>;
1257
+ <A>(evaluate: LazyArg<A>): Effect<A, Cause.UnknownException>;
1259
1258
  };
1260
1259
  export {
1261
1260
  /**
@@ -1278,11 +1277,11 @@ export declare const tryMap: {
1278
1277
  <A, B, E1>(options: {
1279
1278
  readonly try: (a: A) => B;
1280
1279
  readonly catch: (error: unknown) => E1;
1281
- }): <R, E>(self: Effect<R, E, A>) => Effect<R, E1 | E, B>;
1282
- <R, E, A, B, E1>(self: Effect<R, E, A>, options: {
1280
+ }): <E, R>(self: Effect<A, E, R>) => Effect<B, E1 | E, R>;
1281
+ <A, E, R, B, E1>(self: Effect<A, E, R>, options: {
1283
1282
  readonly try: (a: A) => B;
1284
1283
  readonly catch: (error: unknown) => E1;
1285
- }): Effect<R, E | E1, B>;
1284
+ }): Effect<B, E | E1, R>;
1286
1285
  };
1287
1286
  /**
1288
1287
  * Returns an effect whose success is mapped by the specified side effecting
@@ -1299,11 +1298,11 @@ export declare const tryMapPromise: {
1299
1298
  <A, B, E1>(options: {
1300
1299
  readonly try: (a: A, signal: AbortSignal) => Promise<B>;
1301
1300
  readonly catch: (error: unknown) => E1;
1302
- }): <R, E>(self: Effect<R, E, A>) => Effect<R, E1 | E, B>;
1303
- <R, E, A, B, E1>(self: Effect<R, E, A>, options: {
1301
+ }): <E, R>(self: Effect<A, E, R>) => Effect<B, E1 | E, R>;
1302
+ <A, E, R, B, E1>(self: Effect<A, E, R>, options: {
1304
1303
  readonly try: (a: A, signal: AbortSignal) => Promise<B>;
1305
1304
  readonly catch: (error: unknown) => E1;
1306
- }): Effect<R, E | E1, B>;
1305
+ }): Effect<B, E | E1, R>;
1307
1306
  };
1308
1307
  /**
1309
1308
  * Create an `Effect` that when executed will construct `promise` and wait for
@@ -1319,19 +1318,19 @@ export declare const tryPromise: {
1319
1318
  <A, E>(options: {
1320
1319
  readonly try: (signal: AbortSignal) => Promise<A>;
1321
1320
  readonly catch: (error: unknown) => E;
1322
- }): Effect<never, E, A>;
1323
- <A>(try_: (signal: AbortSignal) => Promise<A>): Effect<never, Cause.UnknownException, A>;
1321
+ }): Effect<A, E>;
1322
+ <A>(try_: (signal: AbortSignal) => Promise<A>): Effect<A, Cause.UnknownException>;
1324
1323
  };
1325
1324
  /**
1326
1325
  * The inverse operation `sandbox(effect)`
1327
1326
  *
1328
1327
  * Terminates with exceptions on the `Left` side of the `Either` error, if it
1329
- * exists. Otherwise extracts the contained `Effect<R, E, A>`
1328
+ * exists. Otherwise extracts the contained `Effect<A, E, R>`
1330
1329
  *
1331
1330
  * @since 2.0.0
1332
1331
  * @category error handling
1333
1332
  */
1334
- export declare const unsandbox: <R, E, A>(self: Effect<R, Cause.Cause<E>, A>) => Effect<R, E, A>;
1333
+ export declare const unsandbox: <A, E, R>(self: Effect<A, Cause.Cause<E>, R>) => Effect<A, E, R>;
1335
1334
  /**
1336
1335
  * This function checks if any fibers are attempting to interrupt the current
1337
1336
  * fiber, and if so, performs self-interruption.
@@ -1344,7 +1343,7 @@ export declare const unsandbox: <R, E, A>(self: Effect<R, Cause.Cause<E>, A>) =>
1344
1343
  * @since 2.0.0
1345
1344
  * @category interruption
1346
1345
  */
1347
- export declare const allowInterrupt: Effect<never, never, void>;
1346
+ export declare const allowInterrupt: Effect<void>;
1348
1347
  /**
1349
1348
  * Checks the interrupt status, and produces the effect returned by the
1350
1349
  * specified callback.
@@ -1352,7 +1351,7 @@ export declare const allowInterrupt: Effect<never, never, void>;
1352
1351
  * @since 2.0.0
1353
1352
  * @category interruption
1354
1353
  */
1355
- export declare const checkInterruptible: <R, E, A>(f: (isInterruptible: boolean) => Effect<R, E, A>) => Effect<R, E, A>;
1354
+ export declare const checkInterruptible: <A, E, R>(f: (isInterruptible: boolean) => Effect<A, E, R>) => Effect<A, E, R>;
1356
1355
  /**
1357
1356
  * Returns an effect whose interruption will be disconnected from the
1358
1357
  * fiber's own interruption, being performed in the background without
@@ -1369,45 +1368,45 @@ export declare const checkInterruptible: <R, E, A>(f: (isInterruptible: boolean)
1369
1368
  * @since 2.0.0
1370
1369
  * @category interruption
1371
1370
  */
1372
- export declare const disconnect: <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
1371
+ export declare const disconnect: <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
1373
1372
  /**
1374
1373
  * @since 2.0.0
1375
1374
  * @category interruption
1376
1375
  */
1377
- export declare const interrupt: Effect<never, never, never>;
1376
+ export declare const interrupt: Effect<never>;
1378
1377
  /**
1379
1378
  * @since 2.0.0
1380
1379
  * @category interruption
1381
1380
  */
1382
- export declare const interruptWith: (fiberId: FiberId.FiberId) => Effect<never, never, never>;
1381
+ export declare const interruptWith: (fiberId: FiberId.FiberId) => Effect<never>;
1383
1382
  /**
1384
1383
  * @since 2.0.0
1385
1384
  * @category interruption
1386
1385
  */
1387
- export declare const interruptible: <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
1386
+ export declare const interruptible: <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
1388
1387
  /**
1389
1388
  * @since 2.0.0
1390
1389
  * @category interruption
1391
1390
  */
1392
- export declare const interruptibleMask: <R, E, A>(f: (restore: <RX, EX, AX>(effect: Effect<RX, EX, AX>) => Effect<RX, EX, AX>) => Effect<R, E, A>) => Effect<R, E, A>;
1391
+ export declare const interruptibleMask: <A, E, R>(f: (restore: <AX, EX, RX>(effect: Effect<AX, EX, RX>) => Effect<AX, EX, RX>) => Effect<A, E, R>) => Effect<A, E, R>;
1393
1392
  /**
1394
1393
  * @since 2.0.0
1395
1394
  * @category interruption
1396
1395
  */
1397
1396
  export declare const onInterrupt: {
1398
- <R2, X>(cleanup: (interruptors: HashSet.HashSet<FiberId.FiberId>) => Effect<R2, never, X>): <R, E, A>(self: Effect<R, E, A>) => Effect<R2 | R, E, A>;
1399
- <R, E, A, R2, X>(self: Effect<R, E, A>, cleanup: (interruptors: HashSet.HashSet<FiberId.FiberId>) => Effect<R2, never, X>): Effect<R | R2, E, A>;
1397
+ <X, R2>(cleanup: (interruptors: HashSet.HashSet<FiberId.FiberId>) => Effect<X, never, R2>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R2 | R>;
1398
+ <A, E, R, X, R2>(self: Effect<A, E, R>, cleanup: (interruptors: HashSet.HashSet<FiberId.FiberId>) => Effect<X, never, R2>): Effect<A, E, R | R2>;
1400
1399
  };
1401
1400
  /**
1402
1401
  * @since 2.0.0
1403
1402
  * @category interruption
1404
1403
  */
1405
- export declare const uninterruptible: <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
1404
+ export declare const uninterruptible: <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
1406
1405
  /**
1407
1406
  * @since 2.0.0
1408
1407
  * @category interruption
1409
1408
  */
1410
- export declare const uninterruptibleMask: <R, E, A>(f: (restore: <RX, EX, AX>(effect: Effect<RX, EX, AX>) => Effect<RX, EX, AX>) => Effect<R, E, A>) => Effect<R, E, A>;
1409
+ export declare const uninterruptibleMask: <A, E, R>(f: (restore: <AX, EX, RX>(effect: Effect<AX, EX, RX>) => Effect<AX, EX, RX>) => Effect<A, E, R>) => Effect<A, E, R>;
1411
1410
  /**
1412
1411
  * This function maps the success value of an `Effect` value to a specified
1413
1412
  * constant value.
@@ -1424,8 +1423,8 @@ export declare const uninterruptibleMask: <R, E, A>(f: (restore: <RX, EX, AX>(ef
1424
1423
  * @category mapping
1425
1424
  */
1426
1425
  export declare const as: {
1427
- <B>(value: B): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, B>;
1428
- <R, E, A, B>(self: Effect<R, E, A>, value: B): Effect<R, E, B>;
1426
+ <B>(value: B): <A, E, R>(self: Effect<A, E, R>) => Effect<B, E, R>;
1427
+ <A, E, R, B>(self: Effect<A, E, R>, value: B): Effect<B, E, R>;
1429
1428
  };
1430
1429
  /**
1431
1430
  * This function maps the success value of an `Effect` value to a `Some` value
@@ -1443,7 +1442,7 @@ export declare const as: {
1443
1442
  * @category mapping
1444
1443
  * @since 2.0.0
1445
1444
  */
1446
- export declare const asSome: <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, Option.Option<A>>;
1445
+ export declare const asSome: <A, E, R>(self: Effect<A, E, R>) => Effect<Option.Option<A>, E, R>;
1447
1446
  /**
1448
1447
  * This function maps the error value of an `Effect` value to a `Some` value
1449
1448
  * in an `Option` value. If the original `Effect` value succeeds, the returned
@@ -1460,7 +1459,7 @@ export declare const asSome: <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, Op
1460
1459
  * @category mapping
1461
1460
  * @since 2.0.0
1462
1461
  */
1463
- export declare const asSomeError: <R, E, A>(self: Effect<R, E, A>) => Effect<R, Option.Option<E>, A>;
1462
+ export declare const asSomeError: <A, E, R>(self: Effect<A, E, R>) => Effect<A, Option.Option<E>, R>;
1464
1463
  /**
1465
1464
  * This function maps the success value of an `Effect` value to `void`. If the
1466
1465
  * original `Effect` value succeeds, the returned `Effect` value will also
@@ -1475,7 +1474,7 @@ export declare const asSomeError: <R, E, A>(self: Effect<R, E, A>) => Effect<R,
1475
1474
  * @since 2.0.0
1476
1475
  * @category mapping
1477
1476
  */
1478
- export declare const asUnit: <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, void>;
1477
+ export declare const asUnit: <A, E, R>(self: Effect<A, E, R>) => Effect<void, E, R>;
1479
1478
  /**
1480
1479
  * Returns an effect that swaps the error/success cases. This allows you to
1481
1480
  * use all methods on the error channel, possibly before flipping back.
@@ -1483,7 +1482,7 @@ export declare const asUnit: <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, vo
1483
1482
  * @since 2.0.0
1484
1483
  * @category mapping
1485
1484
  */
1486
- export declare const flip: <R, E, A>(self: Effect<R, E, A>) => Effect<R, A, E>;
1485
+ export declare const flip: <A, E, R>(self: Effect<A, E, R>) => Effect<E, A, R>;
1487
1486
  /**
1488
1487
  * Swaps the error/value parameters, applies the function `f` and flips the
1489
1488
  * parameters back
@@ -1492,16 +1491,16 @@ export declare const flip: <R, E, A>(self: Effect<R, E, A>) => Effect<R, A, E>;
1492
1491
  * @category mapping
1493
1492
  */
1494
1493
  export declare const flipWith: {
1495
- <R, A, E, R2, A2, E2>(f: (effect: Effect<R, A, E>) => Effect<R2, A2, E2>): (self: Effect<R, E, A>) => Effect<R2, E2, A2>;
1496
- <R, A, E, R2, A2, E2>(self: Effect<R, E, A>, f: (effect: Effect<R, A, E>) => Effect<R2, A2, E2>): Effect<R2, E2, A2>;
1494
+ <E, A, R, E2, A2, R2>(f: (effect: Effect<E, A, R>) => Effect<E2, A2, R2>): (self: Effect<A, E, R>) => Effect<A2, E2, R2>;
1495
+ <A, E, R, E2, A2, R2>(self: Effect<A, E, R>, f: (effect: Effect<E, A, R>) => Effect<E2, A2, R2>): Effect<A2, E2, R2>;
1497
1496
  };
1498
1497
  /**
1499
1498
  * @since 2.0.0
1500
1499
  * @category mapping
1501
1500
  */
1502
1501
  export declare const map: {
1503
- <A, B>(f: (a: A) => B): <R, E>(self: Effect<R, E, A>) => Effect<R, E, B>;
1504
- <R, E, A, B>(self: Effect<R, E, A>, f: (a: A) => B): Effect<R, E, B>;
1502
+ <A, B>(f: (a: A) => B): <E, R>(self: Effect<A, E, R>) => Effect<B, E, R>;
1503
+ <A, E, R, B>(self: Effect<A, E, R>, f: (a: A) => B): Effect<B, E, R>;
1505
1504
  };
1506
1505
  /**
1507
1506
  * Statefully and effectfully maps over the elements of this chunk to produce
@@ -1511,8 +1510,8 @@ export declare const map: {
1511
1510
  * @category mapping
1512
1511
  */
1513
1512
  export declare const mapAccum: {
1514
- <A, B, R, E, Z>(zero: Z, f: (z: Z, a: A, i: number) => Effect<R, E, readonly [Z, B]>): (elements: Iterable<A>) => Effect<R, E, [Z, Array<B>]>;
1515
- <A, B, R, E, Z>(elements: Iterable<A>, zero: Z, f: (z: Z, a: A, i: number) => Effect<R, E, readonly [Z, B]>): Effect<R, E, [Z, Array<B>]>;
1513
+ <S, A, B, E, R>(zero: S, f: (s: S, a: A, i: number) => Effect<readonly [S, B], E, R>): (elements: Iterable<A>) => Effect<[S, Array<B>], E, R>;
1514
+ <A, S, B, E, R>(elements: Iterable<A>, zero: S, f: (s: S, a: A, i: number) => Effect<readonly [S, B], E, R>): Effect<[S, Array<B>], E, R>;
1516
1515
  };
1517
1516
  /**
1518
1517
  * Returns an effect whose failure and success channels have been mapped by
@@ -1522,14 +1521,14 @@ export declare const mapAccum: {
1522
1521
  * @category mapping
1523
1522
  */
1524
1523
  export declare const mapBoth: {
1525
- <E, A, E2, A2>(options: {
1524
+ <E, E2, A, A2>(options: {
1526
1525
  readonly onFailure: (e: E) => E2;
1527
1526
  readonly onSuccess: (a: A) => A2;
1528
- }): <R>(self: Effect<R, E, A>) => Effect<R, E2, A2>;
1529
- <R, E, A, E2, A2>(self: Effect<R, E, A>, options: {
1527
+ }): <R>(self: Effect<A, E, R>) => Effect<A2, E2, R>;
1528
+ <A, E, R, E2, A2>(self: Effect<A, E, R>, options: {
1530
1529
  readonly onFailure: (e: E) => E2;
1531
1530
  readonly onSuccess: (a: A) => A2;
1532
- }): Effect<R, E2, A2>;
1531
+ }): Effect<A2, E2, R>;
1533
1532
  };
1534
1533
  /**
1535
1534
  * Returns an effect with its error channel mapped using the specified function.
@@ -1538,8 +1537,8 @@ export declare const mapBoth: {
1538
1537
  * @category mapping
1539
1538
  */
1540
1539
  export declare const mapError: {
1541
- <E, E2>(f: (e: E) => E2): <R, A>(self: Effect<R, E, A>) => Effect<R, E2, A>;
1542
- <R, A, E, E2>(self: Effect<R, E, A>, f: (e: E) => E2): Effect<R, E2, A>;
1540
+ <E, E2>(f: (e: E) => E2): <A, R>(self: Effect<A, E, R>) => Effect<A, E2, R>;
1541
+ <A, E, R, E2>(self: Effect<A, E, R>, f: (e: E) => E2): Effect<A, E2, R>;
1543
1542
  };
1544
1543
  /**
1545
1544
  * Returns an effect with its full cause of failure mapped using the specified
@@ -1553,8 +1552,8 @@ export declare const mapError: {
1553
1552
  * @category mapping
1554
1553
  */
1555
1554
  export declare const mapErrorCause: {
1556
- <E, E2>(f: (cause: Cause.Cause<E>) => Cause.Cause<E2>): <R, A>(self: Effect<R, E, A>) => Effect<R, E2, A>;
1557
- <R, E, A, E2>(self: Effect<R, E, A>, f: (cause: Cause.Cause<E>) => Cause.Cause<E2>): Effect<R, E2, A>;
1555
+ <E, E2>(f: (cause: Cause.Cause<E>) => Cause.Cause<E2>): <A, R>(self: Effect<A, E, R>) => Effect<A, E2, R>;
1556
+ <A, E, R, E2>(self: Effect<A, E, R>, f: (cause: Cause.Cause<E>) => Cause.Cause<E2>): Effect<A, E2, R>;
1558
1557
  };
1559
1558
  /**
1560
1559
  * Returns a new effect where the error channel has been merged into the
@@ -1563,14 +1562,14 @@ export declare const mapErrorCause: {
1563
1562
  * @since 2.0.0
1564
1563
  * @category mapping
1565
1564
  */
1566
- export declare const merge: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never, E | A>;
1565
+ export declare const merge: <A, E, R>(self: Effect<A, E, R>) => Effect<E | A, never, R>;
1567
1566
  /**
1568
1567
  * Returns a new effect where boolean value of this effect is negated.
1569
1568
  *
1570
1569
  * @since 2.0.0
1571
1570
  * @category mapping
1572
1571
  */
1573
- export declare const negate: <R, E>(self: Effect<R, E, boolean>) => Effect<R, E, boolean>;
1572
+ export declare const negate: <R, E>(self: Effect<boolean, E, R>) => Effect<boolean, E, R>;
1574
1573
  /**
1575
1574
  * This function constructs a scoped resource from an `acquire` and `release`
1576
1575
  * `Effect` value.
@@ -1593,8 +1592,8 @@ export declare const negate: <R, E>(self: Effect<R, E, boolean>) => Effect<R, E,
1593
1592
  * @category scoping, resources & finalization
1594
1593
  */
1595
1594
  export declare const acquireRelease: {
1596
- <A, R2, X>(release: (a: A, exit: Exit.Exit<unknown, unknown>) => Effect<R2, never, X>): <R, E>(acquire: Effect<R, E, A>) => Effect<Scope.Scope | R2 | R, E, A>;
1597
- <R, E, A, R2, X>(acquire: Effect<R, E, A>, release: (a: A, exit: Exit.Exit<unknown, unknown>) => Effect<R2, never, X>): Effect<Scope.Scope | R | R2, E, A>;
1595
+ <A, X, R2>(release: (a: A, exit: Exit.Exit<unknown, unknown>) => Effect<X, never, R2>): <E, R>(acquire: Effect<A, E, R>) => Effect<A, E, Scope.Scope | R2 | R>;
1596
+ <A, E, R, X, R2>(acquire: Effect<A, E, R>, release: (a: A, exit: Exit.Exit<unknown, unknown>) => Effect<X, never, R2>): Effect<A, E, Scope.Scope | R | R2>;
1598
1597
  };
1599
1598
  /**
1600
1599
  * This function constructs a scoped resource from an `acquire` and `release`
@@ -1620,8 +1619,8 @@ export declare const acquireRelease: {
1620
1619
  * @category scoping, resources & finalization
1621
1620
  */
1622
1621
  export declare const acquireReleaseInterruptible: {
1623
- <A, R2, X>(release: (exit: Exit.Exit<unknown, unknown>) => Effect<R2, never, X>): <R, E>(acquire: Effect<R, E, A>) => Effect<Scope.Scope | R2 | R, E, A>;
1624
- <R, E, A, R2, X>(acquire: Effect<R, E, A>, release: (exit: Exit.Exit<unknown, unknown>) => Effect<R2, never, X>): Effect<Scope.Scope | R | R2, E, A>;
1622
+ <X, R2>(release: (exit: Exit.Exit<unknown, unknown>) => Effect<X, never, R2>): <A, E, R>(acquire: Effect<A, E, R>) => Effect<A, E, Scope.Scope | R2 | R>;
1623
+ <A, E, R, X, R2>(acquire: Effect<A, E, R>, release: (exit: Exit.Exit<unknown, unknown>) => Effect<X, never, R2>): Effect<A, E, Scope.Scope | R | R2>;
1625
1624
  };
1626
1625
  /**
1627
1626
  * This function is used to ensure that an `Effect` value that represents the
@@ -1658,8 +1657,8 @@ export declare const acquireReleaseInterruptible: {
1658
1657
  * @category scoping, resources & finalization
1659
1658
  */
1660
1659
  export declare const acquireUseRelease: {
1661
- <A, R2, E2, A2, R3, X>(use: (a: A) => Effect<R2, E2, A2>, release: (a: A, exit: Exit.Exit<E2, A2>) => Effect<R3, never, X>): <R, E>(acquire: Effect<R, E, A>) => Effect<R2 | R3 | R, E2 | E, A2>;
1662
- <R, E, A, R2, E2, A2, R3, X>(acquire: Effect<R, E, A>, use: (a: A) => Effect<R2, E2, A2>, release: (a: A, exit: Exit.Exit<E2, A2>) => Effect<R3, never, X>): Effect<R | R2 | R3, E | E2, A2>;
1660
+ <A2, E2, R2, A, X, R3>(use: (a: A) => Effect<A2, E2, R2>, release: (a: A, exit: Exit.Exit<A2, E2>) => Effect<X, never, R3>): <E, R>(acquire: Effect<A, E, R>) => Effect<A2, E2 | E, R2 | R3 | R>;
1661
+ <A, E, R, A2, E2, R2, X, R3>(acquire: Effect<A, E, R>, use: (a: A) => Effect<A2, E2, R2>, release: (a: A, exit: Exit.Exit<A2, E2>) => Effect<X, never, R3>): Effect<A2, E | E2, R | R2 | R3>;
1663
1662
  };
1664
1663
  /**
1665
1664
  * This function adds a finalizer to the scope of the calling `Effect` value.
@@ -1676,7 +1675,7 @@ export declare const acquireUseRelease: {
1676
1675
  * @since 2.0.0
1677
1676
  * @category scoping, resources & finalization
1678
1677
  */
1679
- export declare const addFinalizer: <R, X>(finalizer: (exit: Exit.Exit<unknown, unknown>) => Effect<R, never, X>) => Effect<R | Scope.Scope, never, void>;
1678
+ export declare const addFinalizer: <X, R>(finalizer: (exit: Exit.Exit<unknown, unknown>) => Effect<X, never, R>) => Effect<void, never, Scope.Scope | R>;
1680
1679
  /**
1681
1680
  * Returns an effect that, if this effect _starts_ execution, then the
1682
1681
  * specified `finalizer` is guaranteed to be executed, whether this effect
@@ -1692,8 +1691,8 @@ export declare const addFinalizer: <R, X>(finalizer: (exit: Exit.Exit<unknown, u
1692
1691
  * @category scoping, resources & finalization
1693
1692
  */
1694
1693
  export declare const ensuring: {
1695
- <R1, X>(finalizer: Effect<R1, never, X>): <R, E, A>(self: Effect<R, E, A>) => Effect<R1 | R, E, A>;
1696
- <R, E, A, R1, X>(self: Effect<R, E, A>, finalizer: Effect<R1, never, X>): Effect<R | R1, E, A>;
1694
+ <X, R1>(finalizer: Effect<X, never, R1>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R1 | R>;
1695
+ <A, E, R, X, R1>(self: Effect<A, E, R>, finalizer: Effect<X, never, R1>): Effect<A, E, R1 | R>;
1697
1696
  };
1698
1697
  /**
1699
1698
  * Runs the specified effect if this effect fails, providing the error to the
@@ -1703,8 +1702,8 @@ export declare const ensuring: {
1703
1702
  * @category scoping, resources & finalization
1704
1703
  */
1705
1704
  export declare const onError: {
1706
- <E, R2, X>(cleanup: (cause: Cause.Cause<E>) => Effect<R2, never, X>): <R, A>(self: Effect<R, E, A>) => Effect<R2 | R, E, A>;
1707
- <R, A, E, R2, X>(self: Effect<R, E, A>, cleanup: (cause: Cause.Cause<E>) => Effect<R2, never, X>): Effect<R | R2, E, A>;
1705
+ <E, X, R2>(cleanup: (cause: Cause.Cause<E>) => Effect<X, never, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A, E, R2 | R>;
1706
+ <A, E, R, X, R2>(self: Effect<A, E, R>, cleanup: (cause: Cause.Cause<E>) => Effect<X, never, R2>): Effect<A, E, R2 | R>;
1708
1707
  };
1709
1708
  /**
1710
1709
  * Ensures that a cleanup functions runs, whether this effect succeeds, fails,
@@ -1714,19 +1713,19 @@ export declare const onError: {
1714
1713
  * @category scoping, resources & finalization
1715
1714
  */
1716
1715
  export declare const onExit: {
1717
- <E, A, R2, X>(cleanup: (exit: Exit.Exit<E, A>) => Effect<R2, never, X>): <R>(self: Effect<R, E, A>) => Effect<R2 | R, E, A>;
1718
- <R, E, A, R2, X>(self: Effect<R, E, A>, cleanup: (exit: Exit.Exit<E, A>) => Effect<R2, never, X>): Effect<R | R2, E, A>;
1716
+ <A, E, X, R2>(cleanup: (exit: Exit.Exit<A, E>) => Effect<X, never, R2>): <R>(self: Effect<A, E, R>) => Effect<A, E, R2 | R>;
1717
+ <A, E, R, X, R2>(self: Effect<A, E, R>, cleanup: (exit: Exit.Exit<A, E>) => Effect<X, never, R2>): Effect<A, E, R | R2>;
1719
1718
  };
1720
1719
  /**
1721
1720
  * @since 2.0.0
1722
1721
  * @category scoping, resources & finalization
1723
1722
  */
1724
- export declare const parallelFinalizers: <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
1723
+ export declare const parallelFinalizers: <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
1725
1724
  /**
1726
1725
  * @since 2.0.0
1727
1726
  * @category scoping, resources & finalization
1728
1727
  */
1729
- export declare const finalizersMask: (strategy: ExecutionStrategy) => <R, E, A>(self: (restore: <R1, E1, A1>(self: Effect<R1, E1, A1>) => Effect<R1, E1, A1>) => Effect<R, E, A>) => Effect<R, E, A>;
1728
+ export declare const finalizersMask: (strategy: ExecutionStrategy) => <A, E, R>(self: (restore: <A1, E1, R1>(self: Effect<A1, E1, R1>) => Effect<A1, E1, R1>) => Effect<A, E, R>) => Effect<A, E, R>;
1730
1729
  /**
1731
1730
  * Returns a new scoped workflow that runs finalizers added to the scope of
1732
1731
  * this workflow sequentially in the reverse of the order in which they were
@@ -1737,7 +1736,7 @@ export declare const finalizersMask: (strategy: ExecutionStrategy) => <R, E, A>(
1737
1736
  * @since 2.0.0
1738
1737
  * @category scoping, resources & finalization
1739
1738
  */
1740
- export declare const sequentialFinalizers: <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
1739
+ export declare const sequentialFinalizers: <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
1741
1740
  /**
1742
1741
  * @since 2.0.0
1743
1742
  * @category scoping, resources & finalization
@@ -1749,7 +1748,7 @@ export declare const scope: Effect<Scope.Scope, never, Scope.Scope>;
1749
1748
  * @since 2.0.0
1750
1749
  * @category scoping, resources & finalization
1751
1750
  */
1752
- export declare const scopeWith: <R, E, A>(f: (scope: Scope.Scope) => Effect<R, E, A>) => Effect<R | Scope.Scope, E, A>;
1751
+ export declare const scopeWith: <A, E, R>(f: (scope: Scope.Scope) => Effect<A, E, R>) => Effect<A, E, R | Scope.Scope>;
1753
1752
  /**
1754
1753
  * Scopes all resources uses in this workflow to the lifetime of the workflow,
1755
1754
  * ensuring that their finalizers are run as soon as this workflow completes
@@ -1758,7 +1757,7 @@ export declare const scopeWith: <R, E, A>(f: (scope: Scope.Scope) => Effect<R, E
1758
1757
  * @since 2.0.0
1759
1758
  * @category scoping, resources & finalization
1760
1759
  */
1761
- export declare const scoped: <R, E, A>(effect: Effect<R, E, A>) => Effect<Exclude<R, Scope.Scope>, E, A>;
1760
+ export declare const scoped: <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, Exclude<R, Scope.Scope>>;
1762
1761
  /**
1763
1762
  * Scopes all resources acquired by `resource` to the lifetime of `use`
1764
1763
  * without effecting the scope of any resources acquired by `use`.
@@ -1767,8 +1766,8 @@ export declare const scoped: <R, E, A>(effect: Effect<R, E, A>) => Effect<Exclud
1767
1766
  * @category scoping, resources & finalization
1768
1767
  */
1769
1768
  export declare const using: {
1770
- <A, R2, E2, A2>(use: (a: A) => Effect<R2, E2, A2>): <R, E>(self: Effect<R, E, A>) => Effect<R2 | Exclude<R, Scope.Scope>, E2 | E, A2>;
1771
- <R, E, A, R2, E2, A2>(self: Effect<R, E, A>, use: (a: A) => Effect<R2, E2, A2>): Effect<R2 | Exclude<R, Scope.Scope>, E | E2, A2>;
1769
+ <A, A2, E2, R2>(use: (a: A) => Effect<A2, E2, R2>): <E, R>(self: Effect<A, E, R>) => Effect<A2, E2 | E, R2 | Exclude<R, Scope.Scope>>;
1770
+ <A, E, R, A2, E2, R2>(self: Effect<A, E, R>, use: (a: A) => Effect<A2, E2, R2>): Effect<A2, E | E2, R2 | Exclude<R, Scope.Scope>>;
1772
1771
  };
1773
1772
  /**
1774
1773
  * Returns a new scoped workflow that returns the result of this workflow as
@@ -1777,7 +1776,7 @@ export declare const using: {
1777
1776
  * @since 2.0.0
1778
1777
  * @category scoping, resources & finalization
1779
1778
  */
1780
- export declare const withEarlyRelease: <R, E, A>(self: Effect<R, E, A>) => Effect<Scope.Scope | R, E, [Effect<never, never, void>, A]>;
1779
+ export declare const withEarlyRelease: <A, E, R>(self: Effect<A, E, R>) => Effect<[Effect<void>, A], E, R | Scope.Scope>;
1781
1780
  /**
1782
1781
  * Returns a new effect that will not succeed with its value before first
1783
1782
  * waiting for the end of all child fibers forked by the effect.
@@ -1785,7 +1784,7 @@ export declare const withEarlyRelease: <R, E, A>(self: Effect<R, E, A>) => Effec
1785
1784
  * @since 2.0.0
1786
1785
  * @category supervision & fibers
1787
1786
  */
1788
- export declare const awaitAllChildren: <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
1787
+ export declare const awaitAllChildren: <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
1789
1788
  /**
1790
1789
  * Returns a new workflow that will not supervise any fibers forked by this
1791
1790
  * workflow.
@@ -1793,21 +1792,21 @@ export declare const awaitAllChildren: <R, E, A>(self: Effect<R, E, A>) => Effec
1793
1792
  * @since 2.0.0
1794
1793
  * @category supervision & fibers
1795
1794
  */
1796
- export declare const daemonChildren: <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
1795
+ export declare const daemonChildren: <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
1797
1796
  /**
1798
1797
  * Constructs an effect with information about the current `Fiber`.
1799
1798
  *
1800
1799
  * @since 2.0.0
1801
1800
  * @category supervision & fibers
1802
1801
  */
1803
- export declare const descriptor: Effect<never, never, Fiber.Fiber.Descriptor>;
1802
+ export declare const descriptor: Effect<Fiber.Fiber.Descriptor>;
1804
1803
  /**
1805
1804
  * Constructs an effect based on information about the current `Fiber`.
1806
1805
  *
1807
1806
  * @since 2.0.0
1808
1807
  * @category supervision & fibers
1809
1808
  */
1810
- export declare const descriptorWith: <R, E, A>(f: (descriptor: Fiber.Fiber.Descriptor) => Effect<R, E, A>) => Effect<R, E, A>;
1809
+ export declare const descriptorWith: <A, E, R>(f: (descriptor: Fiber.Fiber.Descriptor) => Effect<A, E, R>) => Effect<A, E, R>;
1811
1810
  /**
1812
1811
  * Returns a new workflow that executes this one and captures the changes in
1813
1812
  * `FiberRef` values.
@@ -1815,7 +1814,7 @@ export declare const descriptorWith: <R, E, A>(f: (descriptor: Fiber.Fiber.Descr
1815
1814
  * @since 2.0.0
1816
1815
  * @category supervision & fibers
1817
1816
  */
1818
- export declare const diffFiberRefs: <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, [FiberRefsPatch.FiberRefsPatch, A]>;
1817
+ export declare const diffFiberRefs: <A, E, R>(self: Effect<A, E, R>) => Effect<[FiberRefsPatch.FiberRefsPatch, A], E, R>;
1819
1818
  /**
1820
1819
  * Acts on the children of this fiber (collected into a single fiber),
1821
1820
  * guaranteeing the specified callback will be invoked, whether or not this
@@ -1825,8 +1824,8 @@ export declare const diffFiberRefs: <R, E, A>(self: Effect<R, E, A>) => Effect<R
1825
1824
  * @category supervision & fibers
1826
1825
  */
1827
1826
  export declare const ensuringChild: {
1828
- <R2, X>(f: (fiber: Fiber.Fiber<any, ReadonlyArray<unknown>>) => Effect<R2, never, X>): <R, E, A>(self: Effect<R, E, A>) => Effect<R2 | R, E, A>;
1829
- <R, E, A, R2, X>(self: Effect<R, E, A>, f: (fiber: Fiber.Fiber<any, ReadonlyArray<unknown>>) => Effect<R2, never, X>): Effect<R | R2, E, A>;
1827
+ <X, R2>(f: (fiber: Fiber.Fiber<ReadonlyArray<unknown>, any>) => Effect<X, never, R2>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R2 | R>;
1828
+ <A, E, R, X, R2>(self: Effect<A, E, R>, f: (fiber: Fiber.Fiber<ReadonlyArray<unknown>, any>) => Effect<X, never, R2>): Effect<A, E, R | R2>;
1830
1829
  };
1831
1830
  /**
1832
1831
  * Acts on the children of this fiber, guaranteeing the specified callback
@@ -1836,19 +1835,19 @@ export declare const ensuringChild: {
1836
1835
  * @category supervision & fibers
1837
1836
  */
1838
1837
  export declare const ensuringChildren: {
1839
- <R1, X>(children: (fibers: ReadonlyArray<Fiber.RuntimeFiber<any, any>>) => Effect<R1, never, X>): <R, E, A>(self: Effect<R, E, A>) => Effect<R1 | R, E, A>;
1840
- <R, E, A, R1, X>(self: Effect<R, E, A>, children: (fibers: ReadonlyArray<Fiber.RuntimeFiber<any, any>>) => Effect<R1, never, X>): Effect<R | R1, E, A>;
1838
+ <X, R2>(children: (fibers: ReadonlyArray<Fiber.RuntimeFiber<any, any>>) => Effect<X, never, R2>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R2 | R>;
1839
+ <A, E, R, X, R2>(self: Effect<A, E, R>, children: (fibers: ReadonlyArray<Fiber.RuntimeFiber<any, any>>) => Effect<X, never, R2>): Effect<A, E, R | R2>;
1841
1840
  };
1842
1841
  /**
1843
1842
  * @since 2.0.0
1844
1843
  * @category supervision & fibers
1845
1844
  */
1846
- export declare const fiberId: Effect<never, never, FiberId.FiberId>;
1845
+ export declare const fiberId: Effect<FiberId.FiberId>;
1847
1846
  /**
1848
1847
  * @since 2.0.0
1849
1848
  * @category supervision & fibers
1850
1849
  */
1851
- export declare const fiberIdWith: <R, E, A>(f: (descriptor: FiberId.Runtime) => Effect<R, E, A>) => Effect<R, E, A>;
1850
+ export declare const fiberIdWith: <A, E, R>(f: (descriptor: FiberId.Runtime) => Effect<A, E, R>) => Effect<A, E, R>;
1852
1851
  /**
1853
1852
  * Returns an effect that forks this effect into its own separate fiber,
1854
1853
  * returning the fiber immediately, without waiting for it to begin executing
@@ -1873,7 +1872,7 @@ export declare const fiberIdWith: <R, E, A>(f: (descriptor: FiberId.Runtime) =>
1873
1872
  * @since 2.0.0
1874
1873
  * @category supervision & fibers
1875
1874
  */
1876
- export declare const fork: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never, Fiber.RuntimeFiber<E, A>>;
1875
+ export declare const fork: <A, E, R>(self: Effect<A, E, R>) => Effect<Fiber.RuntimeFiber<A, E>, never, R>;
1877
1876
  /**
1878
1877
  * Forks the effect into a new fiber attached to the global scope. Because the
1879
1878
  * new fiber is attached to the global scope, when the fiber executing the
@@ -1882,7 +1881,7 @@ export declare const fork: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never,
1882
1881
  * @since 2.0.0
1883
1882
  * @category supervision & fibers
1884
1883
  */
1885
- export declare const forkDaemon: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never, Fiber.RuntimeFiber<E, A>>;
1884
+ export declare const forkDaemon: <A, E, R>(self: Effect<A, E, R>) => Effect<Fiber.RuntimeFiber<A, E>, never, R>;
1886
1885
  /**
1887
1886
  * Returns an effect that forks all of the specified values, and returns a
1888
1887
  * composite fiber that produces a list of their results, in order.
@@ -1893,16 +1892,16 @@ export declare const forkDaemon: <R, E, A>(self: Effect<R, E, A>) => Effect<R, n
1893
1892
  export declare const forkAll: {
1894
1893
  (options?: {
1895
1894
  readonly discard?: false | undefined;
1896
- }): <R, E, A>(effects: Iterable<Effect<R, E, A>>) => Effect<R, never, Fiber.Fiber<E, Array<A>>>;
1895
+ }): <A, E, R>(effects: Iterable<Effect<A, E, R>>) => Effect<Fiber.Fiber<Array<A>, E>, never, R>;
1897
1896
  (options: {
1898
1897
  readonly discard: true;
1899
- }): <R, E, A>(effects: Iterable<Effect<R, E, A>>) => Effect<R, never, void>;
1900
- <R, E, A>(effects: Iterable<Effect<R, E, A>>, options?: {
1898
+ }): <A, E, R>(effects: Iterable<Effect<A, E, R>>) => Effect<void, never, R>;
1899
+ <A, E, R>(effects: Iterable<Effect<A, E, R>>, options?: {
1901
1900
  readonly discard?: false | undefined;
1902
- }): Effect<R, never, Fiber.Fiber<E, Array<A>>>;
1903
- <R, E, A>(effects: Iterable<Effect<R, E, A>>, options: {
1901
+ }): Effect<Fiber.Fiber<Array<A>, E>, never, R>;
1902
+ <A, E, R>(effects: Iterable<Effect<A, E, R>>, options: {
1904
1903
  readonly discard: true;
1905
- }): Effect<R, never, void>;
1904
+ }): Effect<void, never, R>;
1906
1905
  };
1907
1906
  /**
1908
1907
  * Forks the effect in the specified scope. The fiber will be interrupted
@@ -1912,8 +1911,8 @@ export declare const forkAll: {
1912
1911
  * @category supervision & fibers
1913
1912
  */
1914
1913
  export declare const forkIn: {
1915
- (scope: Scope.Scope): <R, E, A>(self: Effect<R, E, A>) => Effect<R, never, Fiber.RuntimeFiber<E, A>>;
1916
- <R, E, A>(self: Effect<R, E, A>, scope: Scope.Scope): Effect<R, never, Fiber.RuntimeFiber<E, A>>;
1914
+ (scope: Scope.Scope): <A, E, R>(self: Effect<A, E, R>) => Effect<Fiber.RuntimeFiber<A, E>, never, R>;
1915
+ <A, E, R>(self: Effect<A, E, R>, scope: Scope.Scope): Effect<Fiber.RuntimeFiber<A, E>, never, R>;
1917
1916
  };
1918
1917
  /**
1919
1918
  * Forks the fiber in a `Scope`, interrupting it when the scope is closed.
@@ -1921,7 +1920,7 @@ export declare const forkIn: {
1921
1920
  * @since 2.0.0
1922
1921
  * @category supervision & fibers
1923
1922
  */
1924
- export declare const forkScoped: <R, E, A>(self: Effect<R, E, A>) => Effect<Scope.Scope | R, never, Fiber.RuntimeFiber<E, A>>;
1923
+ export declare const forkScoped: <A, E, R>(self: Effect<A, E, R>) => Effect<Fiber.RuntimeFiber<A, E>, never, Scope.Scope | R>;
1925
1924
  /**
1926
1925
  * Like fork but handles an error with the provided handler.
1927
1926
  *
@@ -1929,8 +1928,8 @@ export declare const forkScoped: <R, E, A>(self: Effect<R, E, A>) => Effect<Scop
1929
1928
  * @category supervision & fibers
1930
1929
  */
1931
1930
  export declare const forkWithErrorHandler: {
1932
- <E, X>(handler: (e: E) => Effect<never, never, X>): <R, A>(self: Effect<R, E, A>) => Effect<R, never, Fiber.RuntimeFiber<E, A>>;
1933
- <R, E, A, X>(self: Effect<R, E, A>, handler: (e: E) => Effect<never, never, X>): Effect<R, never, Fiber.RuntimeFiber<E, A>>;
1931
+ <E, X>(handler: (e: E) => Effect<X>): <R, A>(self: Effect<A, E, R>) => Effect<Fiber.RuntimeFiber<A, E>, never, R>;
1932
+ <R, E, A, X>(self: Effect<A, E, R>, handler: (e: E) => Effect<X>): Effect<Fiber.RuntimeFiber<A, E>, never, R>;
1934
1933
  };
1935
1934
  /**
1936
1935
  * Creates an `Effect` value that represents the exit value of the specified
@@ -1939,7 +1938,7 @@ export declare const forkWithErrorHandler: {
1939
1938
  * @since 2.0.0
1940
1939
  * @category supervision & fibers
1941
1940
  */
1942
- export declare const fromFiber: <E, A>(fiber: Fiber.Fiber<E, A>) => Effect<never, E, A>;
1941
+ export declare const fromFiber: <A, E>(fiber: Fiber.Fiber<A, E>) => Effect<A, E>;
1943
1942
  /**
1944
1943
  * Creates an `Effect` value that represents the exit value of the specified
1945
1944
  * fiber.
@@ -1947,7 +1946,7 @@ export declare const fromFiber: <E, A>(fiber: Fiber.Fiber<E, A>) => Effect<never
1947
1946
  * @since 2.0.0
1948
1947
  * @category supervision & fibers
1949
1948
  */
1950
- export declare const fromFiberEffect: <R, E, A>(fiber: Effect<R, E, Fiber.Fiber<E, A>>) => Effect<R, E, A>;
1949
+ export declare const fromFiberEffect: <A, E, R>(fiber: Effect<Fiber.Fiber<A, E>, E, R>) => Effect<A, E, R>;
1951
1950
  /**
1952
1951
  * Returns an effect with the behavior of this one, but where all child fibers
1953
1952
  * forked in the effect are reported to the specified supervisor.
@@ -1956,8 +1955,8 @@ export declare const fromFiberEffect: <R, E, A>(fiber: Effect<R, E, Fiber.Fiber<
1956
1955
  * @category supervision & fibers
1957
1956
  */
1958
1957
  export declare const supervised: {
1959
- <X>(supervisor: Supervisor.Supervisor<X>): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
1960
- <R, E, A, X>(self: Effect<R, E, A>, supervisor: Supervisor.Supervisor<X>): Effect<R, E, A>;
1958
+ <X>(supervisor: Supervisor.Supervisor<X>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
1959
+ <R, E, A, X>(self: Effect<A, E, R>, supervisor: Supervisor.Supervisor<X>): Effect<A, E, R>;
1961
1960
  };
1962
1961
  /**
1963
1962
  * Transplants specified effects so that when those effects fork other
@@ -1970,14 +1969,14 @@ export declare const supervised: {
1970
1969
  * @since 2.0.0
1971
1970
  * @category supervision & fibers
1972
1971
  */
1973
- export declare const transplant: <R, E, A>(f: (grafter: <R2, E2, A2>(effect: Effect<R2, E2, A2>) => Effect<R2, E2, A2>) => Effect<R, E, A>) => Effect<R, E, A>;
1972
+ export declare const transplant: <A, E, R>(f: (grafter: <A2, E2, R2>(effect: Effect<A2, E2, R2>) => Effect<A2, E2, R2>) => Effect<A, E, R>) => Effect<A, E, R>;
1974
1973
  /**
1975
1974
  * @since 2.0.0
1976
1975
  * @category supervision & fibers
1977
1976
  */
1978
1977
  export declare const withConcurrency: {
1979
- (concurrency: number | "unbounded"): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
1980
- <R, E, A>(self: Effect<R, E, A>, concurrency: number | "unbounded"): Effect<R, E, A>;
1978
+ (concurrency: number | "unbounded"): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
1979
+ <A, E, R>(self: Effect<A, E, R>, concurrency: number | "unbounded"): Effect<A, E, R>;
1981
1980
  };
1982
1981
  /**
1983
1982
  * Sets the provided scheduler for usage in the wrapped effect
@@ -1986,8 +1985,8 @@ export declare const withConcurrency: {
1986
1985
  * @category scheduler
1987
1986
  */
1988
1987
  export declare const withScheduler: {
1989
- (scheduler: Scheduler.Scheduler): <R, E, B>(self: Effect<R, E, B>) => Effect<R, E, B>;
1990
- <R, E, B>(self: Effect<R, E, B>, scheduler: Scheduler.Scheduler): Effect<R, E, B>;
1988
+ (scheduler: Scheduler.Scheduler): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
1989
+ <A, E, R>(self: Effect<A, E, R>, scheduler: Scheduler.Scheduler): Effect<A, E, R>;
1991
1990
  };
1992
1991
  /**
1993
1992
  * Sets the scheduling priority used when yielding
@@ -1996,8 +1995,8 @@ export declare const withScheduler: {
1996
1995
  * @category utils
1997
1996
  */
1998
1997
  export declare const withSchedulingPriority: {
1999
- (priority: number): <R, E, B>(self: Effect<R, E, B>) => Effect<R, E, B>;
2000
- <R, E, B>(self: Effect<R, E, B>, priority: number): Effect<R, E, B>;
1998
+ (priority: number): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
1999
+ <A, E, R>(self: Effect<A, E, R>, priority: number): Effect<A, E, R>;
2001
2000
  };
2002
2001
  /**
2003
2002
  * Sets the maximum number of operations before yield by the default schedulers
@@ -2006,8 +2005,8 @@ export declare const withSchedulingPriority: {
2006
2005
  * @category utils
2007
2006
  */
2008
2007
  export declare const withMaxOpsBeforeYield: {
2009
- (priority: number): <R, E, B>(self: Effect<R, E, B>) => Effect<R, E, B>;
2010
- <R, E, B>(self: Effect<R, E, B>, priority: number): Effect<R, E, B>;
2008
+ (priority: number): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
2009
+ <A, E, R>(self: Effect<A, E, R>, priority: number): Effect<A, E, R>;
2011
2010
  };
2012
2011
  /**
2013
2012
  * Retreives the `Clock` service from the context
@@ -2015,7 +2014,7 @@ export declare const withMaxOpsBeforeYield: {
2015
2014
  * @since 2.0.0
2016
2015
  * @category clock
2017
2016
  */
2018
- export declare const clock: Effect<never, never, Clock.Clock>;
2017
+ export declare const clock: Effect<Clock.Clock>;
2019
2018
  /**
2020
2019
  * Retreives the `Clock` service from the context and provides it to the
2021
2020
  * specified effectful function.
@@ -2023,7 +2022,7 @@ export declare const clock: Effect<never, never, Clock.Clock>;
2023
2022
  * @since 2.0.0
2024
2023
  * @category clock
2025
2024
  */
2026
- export declare const clockWith: <R, E, A>(f: (clock: Clock.Clock) => Effect<R, E, A>) => Effect<R, E, A>;
2025
+ export declare const clockWith: <A, E, R>(f: (clock: Clock.Clock) => Effect<A, E, R>) => Effect<A, E, R>;
2027
2026
  /**
2028
2027
  * Sets the implementation of the clock service to the specified value and
2029
2028
  * restores it to its original value when the scope is closed.
@@ -2031,7 +2030,7 @@ export declare const clockWith: <R, E, A>(f: (clock: Clock.Clock) => Effect<R, E
2031
2030
  * @since 2.0.0
2032
2031
  * @category constructors
2033
2032
  */
2034
- export declare const withClockScoped: <A extends Clock.Clock>(value: A) => Effect<Scope.Scope, never, void>;
2033
+ export declare const withClockScoped: <A extends Clock.Clock>(value: A) => Effect<void, never, Scope.Scope>;
2035
2034
  /**
2036
2035
  * Executes the specified workflow with the specified implementation of the
2037
2036
  * clock service.
@@ -2040,8 +2039,8 @@ export declare const withClockScoped: <A extends Clock.Clock>(value: A) => Effec
2040
2039
  * @category clock
2041
2040
  */
2042
2041
  export declare const withClock: {
2043
- <A extends Clock.Clock>(value: A): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>;
2044
- <R, E, A extends Clock.Clock>(effect: Effect<R, E, A>, value: A): Effect<R, E, A>;
2042
+ <A extends Clock.Clock>(value: A): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
2043
+ <R, E, A extends Clock.Clock>(effect: Effect<A, E, R>, value: A): Effect<A, E, R>;
2045
2044
  };
2046
2045
  /**
2047
2046
  * Retreives the `Console` service from the context
@@ -2049,7 +2048,7 @@ export declare const withClock: {
2049
2048
  * @since 2.0.0
2050
2049
  * @category console
2051
2050
  */
2052
- export declare const console: Effect<never, never, Console>;
2051
+ export declare const console: Effect<Console>;
2053
2052
  /**
2054
2053
  * Retreives the `Console` service from the context and provides it to the
2055
2054
  * specified effectful function.
@@ -2057,7 +2056,7 @@ export declare const console: Effect<never, never, Console>;
2057
2056
  * @since 2.0.0
2058
2057
  * @category console
2059
2058
  */
2060
- export declare const consoleWith: <R, E, A>(f: (console: Console) => Effect<R, E, A>) => Effect<R, E, A>;
2059
+ export declare const consoleWith: <A, E, R>(f: (console: Console) => Effect<A, E, R>) => Effect<A, E, R>;
2061
2060
  /**
2062
2061
  * Sets the implementation of the console service to the specified value and
2063
2062
  * restores it to its original value when the scope is closed.
@@ -2065,7 +2064,7 @@ export declare const consoleWith: <R, E, A>(f: (console: Console) => Effect<R, E
2065
2064
  * @since 2.0.0
2066
2065
  * @category constructors
2067
2066
  */
2068
- export declare const withConsoleScoped: <A extends Console>(console: A) => Effect<Scope.Scope, never, void>;
2067
+ export declare const withConsoleScoped: <A extends Console>(console: A) => Effect<void, never, Scope.Scope>;
2069
2068
  /**
2070
2069
  * Executes the specified workflow with the specified implementation of the
2071
2070
  * console service.
@@ -2074,8 +2073,8 @@ export declare const withConsoleScoped: <A extends Console>(console: A) => Effec
2074
2073
  * @category console
2075
2074
  */
2076
2075
  export declare const withConsole: {
2077
- <A extends Console>(console: A): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>;
2078
- <R, E, A extends Console>(effect: Effect<R, E, A>, console: A): Effect<R, E, A>;
2076
+ <C extends Console>(console: C): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
2077
+ <A, E, R, C extends Console>(effect: Effect<A, E, R>, console: C): Effect<A, E, R>;
2079
2078
  };
2080
2079
  /**
2081
2080
  * Returns an effect that is delayed from this effect by the specified
@@ -2085,8 +2084,8 @@ export declare const withConsole: {
2085
2084
  * @category delays & timeouts
2086
2085
  */
2087
2086
  export declare const delay: {
2088
- (duration: Duration.DurationInput): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
2089
- <R, E, A>(self: Effect<R, E, A>, duration: Duration.DurationInput): Effect<R, E, A>;
2087
+ (duration: Duration.DurationInput): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
2088
+ <A, E, R>(self: Effect<A, E, R>, duration: Duration.DurationInput): Effect<A, E, R>;
2090
2089
  };
2091
2090
  /**
2092
2091
  * Returns an effect that suspends for the specified duration. This method is
@@ -2095,14 +2094,14 @@ export declare const delay: {
2095
2094
  * @since 2.0.0
2096
2095
  * @category delays & timeouts
2097
2096
  */
2098
- export declare const sleep: (duration: Duration.DurationInput) => Effect<never, never, void>;
2097
+ export declare const sleep: (duration: Duration.DurationInput) => Effect<void>;
2099
2098
  /**
2100
2099
  * Returns a new effect that executes this one and times the execution.
2101
2100
  *
2102
2101
  * @since 2.0.0
2103
2102
  * @category delays & timeouts
2104
2103
  */
2105
- export declare const timed: <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, [Duration.Duration, A]>;
2104
+ export declare const timed: <A, E, R>(self: Effect<A, E, R>) => Effect<[Duration.Duration, A], E, R>;
2106
2105
  /**
2107
2106
  * A more powerful variation of `timed` that allows specifying the clock.
2108
2107
  *
@@ -2110,8 +2109,8 @@ export declare const timed: <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, [Du
2110
2109
  * @category delays & timeouts
2111
2110
  */
2112
2111
  export declare const timedWith: {
2113
- <R1, E1>(nanoseconds: Effect<R1, E1, bigint>): <R, E, A>(self: Effect<R, E, A>) => Effect<R1 | R, E1 | E, [Duration.Duration, A]>;
2114
- <R, E, A, R1, E1>(self: Effect<R, E, A>, nanoseconds: Effect<R1, E1, bigint>): Effect<R | R1, E | E1, [Duration.Duration, A]>;
2112
+ <E1, R1>(nanoseconds: Effect<bigint, E1, R1>): <A, E, R>(self: Effect<A, E, R>) => Effect<[Duration.Duration, A], E1 | E, R1 | R>;
2113
+ <A, E, R, E1, R1>(self: Effect<A, E, R>, nanoseconds: Effect<bigint, E1, R1>): Effect<[Duration.Duration, A], E | E1, R | R1>;
2115
2114
  };
2116
2115
  /**
2117
2116
  * Returns an effect that will timeout this effect, returning `None` if the
@@ -2133,8 +2132,8 @@ export declare const timedWith: {
2133
2132
  * @category delays & timeouts
2134
2133
  */
2135
2134
  export declare const timeout: {
2136
- (duration: Duration.DurationInput): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E | Cause.NoSuchElementException, A>;
2137
- <R, E, A>(self: Effect<R, E, A>, duration: Duration.DurationInput): Effect<R, Cause.NoSuchElementException | E, A>;
2135
+ (duration: Duration.DurationInput): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E | Cause.TimeoutException, R>;
2136
+ <A, E, R>(self: Effect<A, E, R>, duration: Duration.DurationInput): Effect<A, Cause.TimeoutException | E, R>;
2138
2137
  };
2139
2138
  /**
2140
2139
  * The same as `timeout`, but instead of producing a `None` in the event of
@@ -2147,11 +2146,11 @@ export declare const timeoutFail: {
2147
2146
  <E1>(options: {
2148
2147
  readonly onTimeout: LazyArg<E1>;
2149
2148
  readonly duration: Duration.DurationInput;
2150
- }): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E1 | E, A>;
2151
- <R, E, A, E1>(self: Effect<R, E, A>, options: {
2149
+ }): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E1 | E, R>;
2150
+ <A, E, R, E1>(self: Effect<A, E, R>, options: {
2152
2151
  readonly onTimeout: LazyArg<E1>;
2153
2152
  readonly duration: Duration.DurationInput;
2154
- }): Effect<R, E | E1, A>;
2153
+ }): Effect<A, E | E1, R>;
2155
2154
  };
2156
2155
  /**
2157
2156
  * The same as `timeout`, but instead of producing a `None` in the event of
@@ -2164,11 +2163,11 @@ export declare const timeoutFailCause: {
2164
2163
  <E1>(options: {
2165
2164
  readonly onTimeout: LazyArg<Cause.Cause<E1>>;
2166
2165
  readonly duration: Duration.DurationInput;
2167
- }): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E1 | E, A>;
2168
- <R, E, A, E1>(self: Effect<R, E, A>, options: {
2166
+ }): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E1 | E, R>;
2167
+ <A, E, R, E1>(self: Effect<A, E, R>, options: {
2169
2168
  readonly onTimeout: LazyArg<Cause.Cause<E1>>;
2170
2169
  readonly duration: Duration.DurationInput;
2171
- }): Effect<R, E | E1, A>;
2170
+ }): Effect<A, E | E1, R>;
2172
2171
  };
2173
2172
  /**
2174
2173
  * Returns an effect that will timeout this effect, returning either the
@@ -2187,12 +2186,12 @@ export declare const timeoutTo: {
2187
2186
  readonly onTimeout: LazyArg<B1>;
2188
2187
  readonly onSuccess: (a: A) => B;
2189
2188
  readonly duration: Duration.DurationInput;
2190
- }): <R, E>(self: Effect<R, E, A>) => Effect<R, E, B | B1>;
2191
- <R, E, A, B, B1>(self: Effect<R, E, A>, options: {
2189
+ }): <E, R>(self: Effect<A, E, R>) => Effect<B | B1, E, R>;
2190
+ <A, E, R, B1, B>(self: Effect<A, E, R>, options: {
2192
2191
  readonly onTimeout: LazyArg<B1>;
2193
2192
  readonly onSuccess: (a: A) => B;
2194
2193
  readonly duration: Duration.DurationInput;
2195
- }): Effect<R, E, B | B1>;
2194
+ }): Effect<B1 | B, E, R>;
2196
2195
  };
2197
2196
  /**
2198
2197
  * Retrieves the default config provider, and passes it to the specified
@@ -2202,7 +2201,7 @@ export declare const timeoutTo: {
2202
2201
  * @since 2.0.0
2203
2202
  * @category config
2204
2203
  */
2205
- export declare const configProviderWith: <R, E, A>(f: (configProvider: ConfigProvider) => Effect<R, E, A>) => Effect<R, E, A>;
2204
+ export declare const configProviderWith: <A, E, R>(f: (configProvider: ConfigProvider) => Effect<A, E, R>) => Effect<A, E, R>;
2206
2205
  /**
2207
2206
  * Executes the specified workflow with the specified configuration provider.
2208
2207
  *
@@ -2210,8 +2209,8 @@ export declare const configProviderWith: <R, E, A>(f: (configProvider: ConfigPro
2210
2209
  * @category config
2211
2210
  */
2212
2211
  export declare const withConfigProvider: {
2213
- (value: ConfigProvider): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>;
2214
- <R, E, A>(effect: Effect<R, E, A>, value: ConfigProvider): Effect<R, E, A>;
2212
+ (value: ConfigProvider): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
2213
+ <A, E, R>(effect: Effect<A, E, R>, value: ConfigProvider): Effect<A, E, R>;
2215
2214
  };
2216
2215
  /**
2217
2216
  * Sets the configuration provider to the specified value and restores it to its original value
@@ -2220,26 +2219,26 @@ export declare const withConfigProvider: {
2220
2219
  * @since 2.0.0
2221
2220
  * @category config
2222
2221
  */
2223
- export declare const withConfigProviderScoped: (value: ConfigProvider) => Effect<Scope.Scope, never, void>;
2222
+ export declare const withConfigProviderScoped: (value: ConfigProvider) => Effect<void, never, Scope.Scope>;
2224
2223
  /**
2225
2224
  * @since 2.0.0
2226
2225
  * @category context
2227
2226
  */
2228
- export declare const context: <R>() => Effect<R, never, Context.Context<R>>;
2227
+ export declare const context: <R>() => Effect<Context.Context<R>, never, R>;
2229
2228
  /**
2230
2229
  * Accesses the context of the effect.
2231
2230
  *
2232
2231
  * @since 2.0.0
2233
2232
  * @category context
2234
2233
  */
2235
- export declare const contextWith: <R, A>(f: (context: Context.Context<R>) => A) => Effect<R, never, A>;
2234
+ export declare const contextWith: <R, A>(f: (context: Context.Context<R>) => A) => Effect<A, never, R>;
2236
2235
  /**
2237
2236
  * Effectually accesses the context of the effect.
2238
2237
  *
2239
2238
  * @since 2.0.0
2240
2239
  * @category context
2241
2240
  */
2242
- export declare const contextWithEffect: <R, R0, E, A>(f: (context: Context.Context<R0>) => Effect<R, E, A>) => Effect<R | R0, E, A>;
2241
+ export declare const contextWithEffect: <R0, A, E, R>(f: (context: Context.Context<R0>) => Effect<A, E, R>) => Effect<A, E, R | R0>;
2243
2242
  /**
2244
2243
  * Provides some of the context required to run this effect,
2245
2244
  * leaving the remainder `R0`.
@@ -2248,8 +2247,8 @@ export declare const contextWithEffect: <R, R0, E, A>(f: (context: Context.Conte
2248
2247
  * @category context
2249
2248
  */
2250
2249
  export declare const mapInputContext: {
2251
- <R0, R>(f: (context: Context.Context<R0>) => Context.Context<R>): <E, A>(self: Effect<R, E, A>) => Effect<R0, E, A>;
2252
- <R0, R, E, A>(self: Effect<R, E, A>, f: (context: Context.Context<R0>) => Context.Context<R>): Effect<R0, E, A>;
2250
+ <R0, R>(f: (context: Context.Context<R0>) => Context.Context<R>): <A, E>(self: Effect<A, E, R>) => Effect<A, E, R0>;
2251
+ <A, E, R, R0>(self: Effect<A, E, R>, f: (context: Context.Context<R0>) => Context.Context<R>): Effect<A, E, R0>;
2253
2252
  };
2254
2253
  /**
2255
2254
  * Splits the context into two parts, providing one part using the
@@ -2259,12 +2258,12 @@ export declare const mapInputContext: {
2259
2258
  * @category context
2260
2259
  */
2261
2260
  export declare const provide: {
2262
- <R2, E2, A2>(layer: Layer.Layer<R2, E2, A2>): <R, E, A>(self: Effect<R, E, A>) => Effect<R2 | Exclude<R, A2>, E2 | E, A>;
2263
- <R2>(context: Context.Context<R2>): <R, E, A>(self: Effect<R, E, A>) => Effect<Exclude<R, R2>, E, A>;
2264
- <R2>(runtime: Runtime.Runtime<R2>): <R, E, A>(self: Effect<R, E, A>) => Effect<Exclude<R, R2>, E, A>;
2265
- <R, E, A, R2, E2, A2>(self: Effect<R, E, A>, layer: Layer.Layer<R2, E2, A2>): Effect<R2 | Exclude<R, A2>, E | E2, A>;
2266
- <R, E, A, R2>(self: Effect<R, E, A>, context: Context.Context<R2>): Effect<Exclude<R, R2>, E, A>;
2267
- <R, E, A, R2>(self: Effect<R, E, A>, runtime: Runtime.Runtime<R2>): Effect<Exclude<R, R2>, E, A>;
2261
+ <R2, E2, R3>(layer: Layer.Layer<R3, E2, R2>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E2 | E, R2 | Exclude<R, R3>>;
2262
+ <R2>(context: Context.Context<R2>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, Exclude<R, R2>>;
2263
+ <R2>(runtime: Runtime.Runtime<R2>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, Exclude<R, R2>>;
2264
+ <A, E, R, R2, E2, R3>(self: Effect<A, E, R>, layer: Layer.Layer<R3, E2, R2>): Effect<A, E | E2, R2 | Exclude<R, R3>>;
2265
+ <R, E, A, R2>(self: Effect<A, E, R>, context: Context.Context<R2>): Effect<A, E, Exclude<R, R2>>;
2266
+ <R, E, A, R2>(self: Effect<A, E, R>, runtime: Runtime.Runtime<R2>): Effect<A, E, Exclude<R, R2>>;
2268
2267
  };
2269
2268
  /**
2270
2269
  * Provides the effect with the single service it requires. If the effect
@@ -2274,8 +2273,8 @@ export declare const provide: {
2274
2273
  * @category context
2275
2274
  */
2276
2275
  export declare const provideService: {
2277
- <T extends Context.Tag<any, any>>(tag: T, service: Context.Tag.Service<T>): <R, E, A>(self: Effect<R, E, A>) => Effect<Exclude<R, Context.Tag.Identifier<T>>, E, A>;
2278
- <R, E, A, T extends Context.Tag<any, any>>(self: Effect<R, E, A>, tag: T, service: Context.Tag.Service<T>): Effect<Exclude<R, Context.Tag.Identifier<T>>, E, A>;
2276
+ <T extends Context.Tag<any, any>>(tag: T, service: Context.Tag.Service<T>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, Exclude<R, Context.Tag.Identifier<T>>>;
2277
+ <A, E, R, T extends Context.Tag<any, any>>(self: Effect<A, E, R>, tag: T, service: Context.Tag.Service<T>): Effect<A, E, Exclude<R, Context.Tag.Identifier<T>>>;
2279
2278
  };
2280
2279
  /**
2281
2280
  * Provides the effect with the single service it requires. If the effect
@@ -2285,63 +2284,63 @@ export declare const provideService: {
2285
2284
  * @category context
2286
2285
  */
2287
2286
  export declare const provideServiceEffect: {
2288
- <T extends Context.Tag<any, any>, R1, E1>(tag: T, effect: Effect<R1, E1, Context.Tag.Service<T>>): <R, E, A>(self: Effect<R, E, A>) => Effect<R1 | Exclude<R, Context.Tag.Identifier<T>>, E1 | E, A>;
2289
- <R, E, A, T extends Context.Tag<any, any>, R1, E1>(self: Effect<R, E, A>, tag: T, effect: Effect<R1, E1, Context.Tag.Service<T>>): Effect<R1 | Exclude<R, Context.Tag.Identifier<T>>, E | E1, A>;
2287
+ <T extends Context.Tag<any, any>, E1, R1>(tag: T, effect: Effect<Context.Tag.Service<T>, E1, R1>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E1 | E, R1 | Exclude<R, Context.Tag.Identifier<T>>>;
2288
+ <A, E, R, T extends Context.Tag<any, any>, E1, R1>(self: Effect<A, E, R>, tag: T, effect: Effect<Context.Tag.Service<T>, E1, R1>): Effect<A, E | E1, R1 | Exclude<R, Context.Tag.Identifier<T>>>;
2290
2289
  };
2291
2290
  /**
2292
2291
  * @since 2.0.0
2293
2292
  * @category context
2294
2293
  */
2295
- export declare const serviceFunction: <T extends Effect<any, any, any>, Args extends Array<any>, A>(getService: T, f: (_: Effect.Success<T>) => (...args: Args) => A) => (...args: Args) => Effect<Effect.Context<T>, Effect.Error<T>, A>;
2294
+ export declare const serviceFunction: <T extends Effect<any, any, any>, Args extends Array<any>, A>(getService: T, f: (_: Effect.Success<T>) => (...args: Args) => A) => (...args: Args) => Effect<A, Effect.Error<T>, Effect.Context<T>>;
2296
2295
  /**
2297
2296
  * @since 2.0.0
2298
2297
  * @category context
2299
2298
  */
2300
- export declare const serviceFunctionEffect: <T extends Effect<any, any, any>, Args extends Array<any>, R, E, A>(getService: T, f: (_: Effect.Success<T>) => (...args: Args) => Effect<R, E, A>) => (...args: Args) => Effect<R | Effect.Context<T>, E | Effect.Error<T>, A>;
2299
+ export declare const serviceFunctionEffect: <T extends Effect<any, any, any>, Args extends Array<any>, R, E, A>(getService: T, f: (_: Effect.Success<T>) => (...args: Args) => Effect<A, E, R>) => (...args: Args) => Effect<A, E | Effect.Error<T>, R | Effect.Context<T>>;
2301
2300
  /**
2302
2301
  * @since 2.0.0
2303
2302
  * @category context
2304
2303
  */
2305
- export declare const serviceFunctions: <SR, SE, S>(getService: Effect<SR, SE, S>) => {
2304
+ export declare const serviceFunctions: <S, SE, SR>(getService: Effect<S, SE, SR>) => {
2306
2305
  [k in {
2307
2306
  [k in keyof S]: S[k] extends (...args: Array<any>) => Effect<any, any, any> ? k : never;
2308
- }[keyof S]]: S[k] extends (...args: infer Args) => Effect<infer R, infer E, infer A> ? (...args: Args) => Effect<R | SR, E | SE, A> : never;
2307
+ }[keyof S]]: S[k] extends (...args: infer Args) => Effect<infer A, infer E, infer R> ? (...args: Args) => Effect<A, SE | E, SR | R> : never;
2309
2308
  };
2310
2309
  /**
2311
2310
  * @since 2.0.0
2312
2311
  * @category context
2313
2312
  */
2314
- export declare const serviceConstants: <SR, SE, S>(getService: Effect<SR, SE, S>) => {
2313
+ export declare const serviceConstants: <S, SE, SR>(getService: Effect<S, SE, SR>) => {
2315
2314
  [k in {
2316
- [k in keyof S]: S[k] extends Effect<any, any, any> ? k : never;
2317
- }[keyof S]]: S[k] extends Effect<infer R, infer E, infer A> ? Effect<R | SR, E | SE, A> : never;
2315
+ [k in keyof S]: k;
2316
+ }[keyof S]]: S[k] extends Effect<infer A, infer E, infer R> ? Effect<A, SE | E, SR | R> : Effect<S[k], SE, SR>;
2318
2317
  };
2319
2318
  /**
2320
2319
  * @since 2.0.0
2321
2320
  * @category context
2322
2321
  */
2323
- export declare const serviceMembers: <SR, SE, S>(getService: Effect<SR, SE, S>) => {
2322
+ export declare const serviceMembers: <SR, SE, S>(getService: Effect<S, SE, SR>) => {
2324
2323
  functions: {
2325
2324
  [k in {
2326
2325
  [k in keyof S]: S[k] extends (...args: Array<any>) => Effect<any, any, any> ? k : never;
2327
- }[keyof S]]: S[k] extends (...args: infer Args) => Effect<infer R, infer E, infer A> ? (...args: Args) => Effect<R | SR, E | SE, A> : never;
2326
+ }[keyof S]]: S[k] extends (...args: infer Args) => Effect<infer A, infer E, infer R> ? (...args: Args) => Effect<A, SE | E, SR | R> : never;
2328
2327
  };
2329
2328
  constants: {
2330
2329
  [k in {
2331
- [k in keyof S]: S[k] extends Effect<any, any, any> ? k : never;
2332
- }[keyof S]]: S[k] extends Effect<infer R, infer E, infer A> ? Effect<R | SR, E | SE, A> : never;
2330
+ [k in keyof S]: k;
2331
+ }[keyof S]]: S[k] extends Effect<infer A, infer E, infer R> ? Effect<A, SE | E, SR | R> : Effect<S[k], SE, SR>;
2333
2332
  };
2334
2333
  };
2335
2334
  /**
2336
2335
  * @since 2.0.0
2337
2336
  * @category context
2338
2337
  */
2339
- export declare const serviceOption: <I, S>(tag: Context.Tag<I, S>) => Effect<never, never, Option.Option<S>>;
2338
+ export declare const serviceOption: <I, S>(tag: Context.Tag<I, S>) => Effect<Option.Option<S>>;
2340
2339
  /**
2341
2340
  * @since 2.0.0
2342
2341
  * @category context
2343
2342
  */
2344
- export declare const serviceOptional: <I, S>(tag: Context.Tag<I, S>) => Effect<never, Cause.NoSuchElementException, S>;
2343
+ export declare const serviceOptional: <I, S>(tag: Context.Tag<I, S>) => Effect<S, Cause.NoSuchElementException>;
2345
2344
  /**
2346
2345
  * Updates the service with the required service entry.
2347
2346
  *
@@ -2349,14 +2348,14 @@ export declare const serviceOptional: <I, S>(tag: Context.Tag<I, S>) => Effect<n
2349
2348
  * @category context
2350
2349
  */
2351
2350
  export declare const updateService: {
2352
- <T extends Context.Tag<any, any>>(tag: T, f: (service: Context.Tag.Service<T>) => Context.Tag.Service<T>): <R, E, A>(self: Effect<R, E, A>) => Effect<R | Context.Tag.Identifier<T>, E, A>;
2353
- <R, E, A, T extends Context.Tag<any, any>>(self: Effect<R, E, A>, tag: T, f: (service: Context.Tag.Service<T>) => Context.Tag.Service<T>): Effect<R | Context.Tag.Identifier<T>, E, A>;
2351
+ <T extends Context.Tag<any, any>>(tag: T, f: (service: Context.Tag.Service<T>) => Context.Tag.Service<T>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R | Context.Tag.Identifier<T>>;
2352
+ <A, E, R, T extends Context.Tag<any, any>>(self: Effect<A, E, R>, tag: T, f: (service: Context.Tag.Service<T>) => Context.Tag.Service<T>): Effect<A, E, R | Context.Tag.Identifier<T>>;
2354
2353
  };
2355
2354
  /**
2356
2355
  * @since 2.0.0
2357
2356
  * @category do notation
2358
2357
  */
2359
- export declare const Do: Effect<never, never, {}>;
2358
+ export declare const Do: Effect<{}>;
2360
2359
  /**
2361
2360
  * Binds an effectful value in a `do` scope
2362
2361
  *
@@ -2364,28 +2363,28 @@ export declare const Do: Effect<never, never, {}>;
2364
2363
  * @category do notation
2365
2364
  */
2366
2365
  export declare const bind: {
2367
- <N extends string, K, R2, E2, A>(tag: Exclude<N, keyof K>, f: (_: K) => Effect<R2, E2, A>): <R, E>(self: Effect<R, E, K>) => Effect<R2 | R, E2 | E, MergeRecord<K, {
2366
+ <N extends string, K, A, E2, R2>(tag: Exclude<N, keyof K>, f: (_: K) => Effect<A, E2, R2>): <E, R>(self: Effect<K, E, R>) => Effect<MergeRecord<K, {
2368
2367
  [k in N]: A;
2369
- }>>;
2370
- <R, E, N extends string, K, R2, E2, A>(self: Effect<R, E, K>, tag: Exclude<N, keyof K>, f: (_: K) => Effect<R2, E2, A>): Effect<R | R2, E | E2, MergeRecord<K, {
2368
+ }>, E2 | E, R2 | R>;
2369
+ <K, E, R, N extends string, A, E2, R2>(self: Effect<K, E, R>, tag: Exclude<N, keyof K>, f: (_: K) => Effect<A, E2, R2>): Effect<MergeRecord<K, {
2371
2370
  [k in N]: A;
2372
- }>>;
2371
+ }>, E2 | E, R2 | R>;
2373
2372
  };
2374
2373
  /**
2375
2374
  * @category do notation
2376
2375
  * @since 2.0.0
2377
2376
  */
2378
2377
  export declare const bindTo: {
2379
- <N extends string>(tag: N): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, Record<N, A>>;
2380
- <R, E, A, N extends string>(self: Effect<R, E, A>, tag: N): Effect<R, E, Record<N, A>>;
2378
+ <N extends string>(tag: N): <A, E, R>(self: Effect<A, E, R>) => Effect<Record<N, A>, E, R>;
2379
+ <A, E, R, N extends string>(self: Effect<A, E, R>, tag: N): Effect<Record<N, A>, E, R>;
2381
2380
  };
2382
2381
  declare const let_: {
2383
- <N extends string, K, A>(tag: Exclude<N, keyof K>, f: (_: K) => A): <R, E>(self: Effect<R, E, K>) => Effect<R, E, MergeRecord<K, {
2382
+ <N extends string, K, A>(tag: Exclude<N, keyof K>, f: (_: K) => A): <E, R>(self: Effect<K, E, R>) => Effect<MergeRecord<K, {
2384
2383
  [k in N]: A;
2385
- }>>;
2386
- <R, E, K, N extends string, A>(self: Effect<R, E, K>, tag: Exclude<N, keyof K>, f: (_: K) => A): Effect<R, E, MergeRecord<K, {
2384
+ }>, E, R>;
2385
+ <K, E, R, N extends string, A>(self: Effect<K, E, R>, tag: Exclude<N, keyof K>, f: (_: K) => A): Effect<MergeRecord<K, {
2387
2386
  [k in N]: A;
2388
- }>>;
2387
+ }>, E, R>;
2389
2388
  };
2390
2389
  export {
2391
2390
  /**
@@ -2408,12 +2407,12 @@ let_ as let };
2408
2407
  * @since 2.0.0
2409
2408
  * @category conversions
2410
2409
  */
2411
- export declare const either: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never, Either.Either<E, A>>;
2410
+ export declare const either: <A, E, R>(self: Effect<A, E, R>) => Effect<Either.Either<E, A>, never, R>;
2412
2411
  /**
2413
2412
  * @since 2.0.0
2414
2413
  * @category conversions
2415
2414
  */
2416
- export declare const exit: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never, Exit.Exit<E, A>>;
2415
+ export declare const exit: <A, E, R>(self: Effect<A, E, R>) => Effect<Exit.Exit<A, E>, never, R>;
2417
2416
  /**
2418
2417
  * Returns an effect that will succeed or fail the specified `Deferred` based
2419
2418
  * upon the result of the effect. Also synchronizes interruption, so if the
@@ -2424,8 +2423,8 @@ export declare const exit: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never,
2424
2423
  * @category conversions
2425
2424
  */
2426
2425
  export declare const intoDeferred: {
2427
- <E, A>(deferred: Deferred.Deferred<E, A>): <R>(self: Effect<R, E, A>) => Effect<R, never, boolean>;
2428
- <R, E, A>(self: Effect<R, E, A>, deferred: Deferred.Deferred<E, A>): Effect<R, never, boolean>;
2426
+ <A, E>(deferred: Deferred.Deferred<A, E>): <R>(self: Effect<A, E, R>) => Effect<boolean, never, R>;
2427
+ <A, E, R>(self: Effect<A, E, R>, deferred: Deferred.Deferred<A, E>): Effect<boolean, never, R>;
2429
2428
  };
2430
2429
  /**
2431
2430
  * Executes this effect, skipping the error but returning optionally the
@@ -2434,20 +2433,20 @@ export declare const intoDeferred: {
2434
2433
  * @since 2.0.0
2435
2434
  * @category conversions
2436
2435
  */
2437
- export declare const option: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never, Option.Option<A>>;
2436
+ export declare const option: <A, E, R>(self: Effect<A, E, R>) => Effect<Option.Option<A>, never, R>;
2438
2437
  declare const if_: {
2439
- <R1, R2, E1, E2, A, A1>(options: {
2440
- readonly onTrue: Effect<R1, E1, A>;
2441
- readonly onFalse: Effect<R2, E2, A1>;
2442
- }): <R = never, E = never>(self: boolean | Effect<R, E, boolean>) => Effect<R1 | R2 | R, E1 | E2 | E, A | A1>;
2443
- <R1, R2, E1, E2, A, A1>(self: boolean, options: {
2444
- readonly onTrue: Effect<R1, E1, A>;
2445
- readonly onFalse: Effect<R2, E2, A1>;
2446
- }): Effect<R1 | R2, E1 | E2, A | A1>;
2447
- <R, E, R1, R2, E1, E2, A, A1>(self: Effect<R, E, boolean>, options: {
2448
- readonly onTrue: Effect<R1, E1, A>;
2449
- readonly onFalse: Effect<R2, E2, A1>;
2450
- }): Effect<R | R1 | R2, E | E1 | E2, A | A1>;
2438
+ <A1, E1, R1, A2, E2, R2>(options: {
2439
+ readonly onTrue: Effect<A1, E1, R1>;
2440
+ readonly onFalse: Effect<A2, E2, R2>;
2441
+ }): <E = never, R = never>(self: boolean | Effect<boolean, E, R>) => Effect<A1 | A2, E1 | E2 | E, R1 | R2 | R>;
2442
+ <A1, E1, R1, A2, E2, R2>(self: boolean, options: {
2443
+ readonly onTrue: Effect<A1, E1, R1>;
2444
+ readonly onFalse: Effect<A2, E2, R2>;
2445
+ }): Effect<A1 | A2, E1 | E2, R1 | R2>;
2446
+ <E, R, A1, E1, R1, A2, E2, R2>(self: Effect<boolean, E, R>, options: {
2447
+ readonly onTrue: Effect<A1, E1, R1>;
2448
+ readonly onFalse: Effect<A2, E2, R2>;
2449
+ }): Effect<A1 | A2, E | E1 | E2, R | R1 | R2>;
2451
2450
  };
2452
2451
  export {
2453
2452
  /**
@@ -2465,10 +2464,10 @@ if_ as if };
2465
2464
  * @category filtering & conditionals
2466
2465
  */
2467
2466
  export declare const filterOrDie: {
2468
- <A, B extends A>(refinement: Refinement<NoInfer<A>, B>, orDieWith: (a: NoInfer<A>) => unknown): <R, E>(self: Effect<R, E, A>) => Effect<R, E, B>;
2469
- <A>(predicate: Predicate<NoInfer<A>>, orDieWith: (a: NoInfer<A>) => unknown): <R, E>(self: Effect<R, E, A>) => Effect<R, E, A>;
2470
- <R, E, A, B extends A>(self: Effect<R, E, A>, refinement: Refinement<A, B>, orDieWith: (a: A) => unknown): Effect<R, E, B>;
2471
- <R, E, A>(self: Effect<R, E, A>, filter: Predicate<A>, orDieWith: (a: A) => unknown): Effect<R, E, A>;
2467
+ <A, B extends A>(refinement: Refinement<NoInfer<A>, B>, orDieWith: (a: NoInfer<A>) => unknown): <E, R>(self: Effect<A, E, R>) => Effect<B, E, R>;
2468
+ <A>(predicate: Predicate<NoInfer<A>>, orDieWith: (a: NoInfer<A>) => unknown): <E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
2469
+ <A, E, R, B extends A>(self: Effect<A, E, R>, refinement: Refinement<A, B>, orDieWith: (a: A) => unknown): Effect<B, E, R>;
2470
+ <A, E, R>(self: Effect<A, E, R>, predicate: Predicate<A>, orDieWith: (a: A) => unknown): Effect<A, E, R>;
2472
2471
  };
2473
2472
  /**
2474
2473
  * Filter the specified effect with the provided function, dying with specified
@@ -2478,10 +2477,10 @@ export declare const filterOrDie: {
2478
2477
  * @category filtering & conditionals
2479
2478
  */
2480
2479
  export declare const filterOrDieMessage: {
2481
- <A, B extends A>(refinement: Refinement<NoInfer<A>, B>, message: string): <R, E>(self: Effect<R, E, A>) => Effect<R, E, B>;
2482
- <A>(predicate: Predicate<NoInfer<A>>, message: string): <R, E>(self: Effect<R, E, A>) => Effect<R, E, A>;
2483
- <R, E, A, B extends A>(self: Effect<R, E, A>, refinement: Refinement<A, B>, message: string): Effect<R, E, B>;
2484
- <R, E, A>(self: Effect<R, E, A>, predicate: Predicate<A>, message: string): Effect<R, E, A>;
2480
+ <A, B extends A>(refinement: Refinement<NoInfer<A>, B>, message: string): <E, R>(self: Effect<A, E, R>) => Effect<B, E, R>;
2481
+ <A>(predicate: Predicate<NoInfer<A>>, message: string): <E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
2482
+ <A, E, R, B extends A>(self: Effect<A, E, R>, refinement: Refinement<A, B>, message: string): Effect<B, E, R>;
2483
+ <A, E, R>(self: Effect<A, E, R>, predicate: Predicate<A>, message: string): Effect<A, E, R>;
2485
2484
  };
2486
2485
  /**
2487
2486
  * Filters the specified effect with the provided function returning the value
@@ -2491,10 +2490,10 @@ export declare const filterOrDieMessage: {
2491
2490
  * @category filtering & conditionals
2492
2491
  */
2493
2492
  export declare const filterOrElse: {
2494
- <A, B extends A, R2, E2, C>(refinement: Refinement<NoInfer<A>, B>, orElse: (a: NoInfer<A>) => Effect<R2, E2, C>): <R, E>(self: Effect<R, E, A>) => Effect<R2 | R, E2 | E, B | C>;
2495
- <A, R2, E2, B>(predicate: Predicate<NoInfer<A>>, orElse: (a: NoInfer<A>) => Effect<R2, E2, B>): <R, E>(self: Effect<R, E, A>) => Effect<R2 | R, E2 | E, A | B>;
2496
- <R, E, A, B extends A, R2, E2, C>(self: Effect<R, E, A>, refinement: Refinement<A, B>, orElse: (a: A) => Effect<R2, E2, C>): Effect<R | R2, E | E2, B | C>;
2497
- <R, E, A, R2, E2, B>(self: Effect<R, E, A>, predicate: Predicate<A>, orElse: (a: A) => Effect<R2, E2, B>): Effect<R | R2, E | E2, A | B>;
2493
+ <A, B extends A, C, E2, R2>(refinement: Refinement<NoInfer<A>, B>, orElse: (a: NoInfer<A>) => Effect<C, E2, R2>): <E, R>(self: Effect<A, E, R>) => Effect<B | C, E2 | E, R2 | R>;
2494
+ <A, B, E2, R2>(predicate: Predicate<NoInfer<A>>, orElse: (a: NoInfer<A>) => Effect<B, E2, R2>): <E, R>(self: Effect<A, E, R>) => Effect<A | B, E2 | E, R2 | R>;
2495
+ <A, E, R, B extends A, C, E2, R2>(self: Effect<A, E, R>, refinement: Refinement<A, B>, orElse: (a: A) => Effect<C, E2, R2>): Effect<B | C, E | E2, R | R2>;
2496
+ <A, E, R, B, E2, R2>(self: Effect<A, E, R>, predicate: Predicate<A>, orElse: (a: A) => Effect<B, E2, R2>): Effect<A | B, E | E2, R | R2>;
2498
2497
  };
2499
2498
  /**
2500
2499
  * Filter the specified effect with the provided function, failing with specified
@@ -2530,10 +2529,10 @@ export declare const filterOrElse: {
2530
2529
  * @category filtering & conditionals
2531
2530
  */
2532
2531
  export declare const filterOrFail: {
2533
- <A, B extends A, E2>(refinement: Refinement<NoInfer<A>, B>, orFailWith: (a: NoInfer<A>) => E2): <R, E>(self: Effect<R, E, A>) => Effect<R, E2 | E, B>;
2534
- <A, E2>(predicate: Predicate<NoInfer<A>>, orFailWith: (a: NoInfer<A>) => E2): <R, E>(self: Effect<R, E, A>) => Effect<R, E2 | E, A>;
2535
- <R, E, A, B extends A, E2>(self: Effect<R, E, A>, refinement: Refinement<A, B>, orFailWith: (a: A) => E2): Effect<R, E | E2, B>;
2536
- <R, E, A, E2>(self: Effect<R, E, A>, predicate: Predicate<A>, orFailWith: (a: A) => E2): Effect<R, E | E2, A>;
2532
+ <A, B extends A, E2>(refinement: Refinement<NoInfer<A>, B>, orFailWith: (a: NoInfer<A>) => E2): <E, R>(self: Effect<A, E, R>) => Effect<B, E2 | E, R>;
2533
+ <A, E2>(predicate: Predicate<NoInfer<A>>, orFailWith: (a: NoInfer<A>) => E2): <E, R>(self: Effect<A, E, R>) => Effect<A, E2 | E, R>;
2534
+ <A, E, R, B extends A, E2>(self: Effect<A, E, R>, refinement: Refinement<A, B>, orFailWith: (a: A) => E2): Effect<B, E | E2, R>;
2535
+ <A, E, R, E2>(self: Effect<A, E, R>, predicate: Predicate<A>, orFailWith: (a: A) => E2): Effect<A, E | E2, R>;
2537
2536
  };
2538
2537
  /**
2539
2538
  * The moral equivalent of `if (!p) exp`.
@@ -2542,8 +2541,8 @@ export declare const filterOrFail: {
2542
2541
  * @category filtering & conditionals
2543
2542
  */
2544
2543
  export declare const unless: {
2545
- (condition: LazyArg<boolean>): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, Option.Option<A>>;
2546
- <R, E, A>(self: Effect<R, E, A>, condition: LazyArg<boolean>): Effect<R, E, Option.Option<A>>;
2544
+ (condition: LazyArg<boolean>): <A, E, R>(self: Effect<A, E, R>) => Effect<Option.Option<A>, E, R>;
2545
+ <A, E, R>(self: Effect<A, E, R>, condition: LazyArg<boolean>): Effect<Option.Option<A>, E, R>;
2547
2546
  };
2548
2547
  /**
2549
2548
  * The moral equivalent of `if (!p) exp` when `p` has side-effects.
@@ -2552,8 +2551,8 @@ export declare const unless: {
2552
2551
  * @category filtering & conditionals
2553
2552
  */
2554
2553
  export declare const unlessEffect: {
2555
- <R2, E2>(condition: Effect<R2, E2, boolean>): <R, E, A>(self: Effect<R, E, A>) => Effect<R2 | R, E2 | E, Option.Option<A>>;
2556
- <R, E, A, R2, E2>(self: Effect<R, E, A>, condition: Effect<R2, E2, boolean>): Effect<R | R2, E | E2, Option.Option<A>>;
2554
+ <E2, R2>(condition: Effect<boolean, E2, R2>): <A, E, R>(self: Effect<A, E, R>) => Effect<Option.Option<A>, E2 | E, R2 | R>;
2555
+ <A, E, R, E2, R2>(self: Effect<A, E, R>, condition: Effect<boolean, E2, R2>): Effect<Option.Option<A>, E | E2, R | R2>;
2557
2556
  };
2558
2557
  /**
2559
2558
  * The moral equivalent of `if (p) exp`.
@@ -2562,16 +2561,16 @@ export declare const unlessEffect: {
2562
2561
  * @category filtering & conditionals
2563
2562
  */
2564
2563
  export declare const when: {
2565
- (condition: LazyArg<boolean>): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, Option.Option<A>>;
2566
- <R, E, A>(self: Effect<R, E, A>, condition: LazyArg<boolean>): Effect<R, E, Option.Option<A>>;
2564
+ (condition: LazyArg<boolean>): <A, E, R>(self: Effect<A, E, R>) => Effect<Option.Option<A>, E, R>;
2565
+ <A, E, R>(self: Effect<A, E, R>, condition: LazyArg<boolean>): Effect<Option.Option<A>, E, R>;
2567
2566
  };
2568
2567
  /**
2569
2568
  * @since 2.0.0
2570
2569
  * @category filtering & conditionals
2571
2570
  */
2572
2571
  export declare const whenEffect: {
2573
- <R, E>(condition: Effect<R, E, boolean>): <R2, E2, A>(effect: Effect<R2, E2, A>) => Effect<R | R2, E | E2, Option.Option<A>>;
2574
- <R, E, A, R2, E2>(self: Effect<R2, E2, A>, condition: Effect<R, E, boolean>): Effect<R | R2, E | E2, Option.Option<A>>;
2572
+ <E, R>(condition: Effect<boolean, E, R>): <A, E2, R2>(effect: Effect<A, E2, R2>) => Effect<Option.Option<A>, E | E2, R | R2>;
2573
+ <A, E2, R2, E, R>(self: Effect<A, E2, R2>, condition: Effect<boolean, E, R>): Effect<Option.Option<A>, E2 | E, R2 | R>;
2575
2574
  };
2576
2575
  /**
2577
2576
  * Executes this workflow when value of the specified `FiberRef` satisfies the
@@ -2581,8 +2580,8 @@ export declare const whenEffect: {
2581
2580
  * @category filtering & conditionals
2582
2581
  */
2583
2582
  export declare const whenFiberRef: {
2584
- <S>(fiberRef: FiberRef.FiberRef<S>, predicate: Predicate<S>): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, [S, Option.Option<A>]>;
2585
- <R, E, A, S>(self: Effect<R, E, A>, fiberRef: FiberRef.FiberRef<S>, predicate: Predicate<S>): Effect<R, E, [S, Option.Option<A>]>;
2583
+ <S>(fiberRef: FiberRef.FiberRef<S>, predicate: Predicate<S>): <A, E, R>(self: Effect<A, E, R>) => Effect<[S, Option.Option<A>], E, R>;
2584
+ <A, E, R, S>(self: Effect<A, E, R>, fiberRef: FiberRef.FiberRef<S>, predicate: Predicate<S>): Effect<[S, Option.Option<A>], E, R>;
2586
2585
  };
2587
2586
  /**
2588
2587
  * Executes this workflow when the value of the `Ref` satisfies the predicate.
@@ -2591,8 +2590,8 @@ export declare const whenFiberRef: {
2591
2590
  * @category filtering & conditionals
2592
2591
  */
2593
2592
  export declare const whenRef: {
2594
- <S>(ref: Ref.Ref<S>, predicate: Predicate<S>): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, [S, Option.Option<A>]>;
2595
- <R, E, A, S>(self: Effect<R, E, A>, ref: Ref.Ref<S>, predicate: Predicate<S>): Effect<R, E, [S, Option.Option<A>]>;
2593
+ <S>(ref: Ref.Ref<S>, predicate: Predicate<S>): <A, E, R>(self: Effect<A, E, R>) => Effect<[S, Option.Option<A>], E, R>;
2594
+ <A, E, R, S>(self: Effect<A, E, R>, ref: Ref.Ref<S>, predicate: Predicate<S>): Effect<[S, Option.Option<A>], E, R>;
2596
2595
  };
2597
2596
  /**
2598
2597
  * This function is a pipeable operator that maps over an `Effect` value,
@@ -2608,8 +2607,8 @@ export declare const whenRef: {
2608
2607
  * @category sequencing
2609
2608
  */
2610
2609
  export declare const flatMap: {
2611
- <A, R1, E1, B>(f: (a: A) => Effect<R1, E1, B>): <R, E>(self: Effect<R, E, A>) => Effect<R1 | R, E1 | E, B>;
2612
- <R, E, A, R1, E1, B>(self: Effect<R, E, A>, f: (a: A) => Effect<R1, E1, B>): Effect<R | R1, E | E1, B>;
2610
+ <A, B, E1, R1>(f: (a: A) => Effect<B, E1, R1>): <E, R>(self: Effect<A, E, R>) => Effect<B, E1 | E, R1 | R>;
2611
+ <A, E, R, B, E1, R1>(self: Effect<A, E, R>, f: (a: A) => Effect<B, E1, R1>): Effect<B, E | E1, R | R1>;
2613
2612
  };
2614
2613
  /**
2615
2614
  * Executes a sequence of two actions, typically two `Effect`s, where the second action can depend on the result of the first action.
@@ -2639,16 +2638,16 @@ export declare const flatMap: {
2639
2638
  * @category sequencing
2640
2639
  */
2641
2640
  export declare const andThen: {
2642
- <A, X>(f: (a: NoInfer<A>) => X): <R, E>(self: Effect<R, E, A>) => [X] extends [Effect<infer R1, infer E1, infer A1>] ? Effect<R | R1, E | E1, A1> : [X] extends [Promise<infer A1>] ? Effect<R, E | Cause.UnknownException, A1> : Effect<R, E, X>;
2643
- <X>(f: X): <R, E, A>(self: Effect<R, E, A>) => [X] extends [Effect<infer R1, infer E1, infer A1>] ? Effect<R | R1, E | E1, A1> : [X] extends [Promise<infer A1>] ? Effect<R, Cause.UnknownException | E, A1> : Effect<R, E, X>;
2644
- <A, R, E, X>(self: Effect<R, E, A>, f: (a: NoInfer<A>) => X): [X] extends [Effect<infer R1, infer E1, infer A1>] ? Effect<R | R1, E | E1, A1> : [X] extends [Promise<infer A1>] ? Effect<R, Cause.UnknownException | E, A1> : Effect<R, E, X>;
2645
- <A, R, E, X>(self: Effect<R, E, A>, f: X): [X] extends [Effect<infer R1, infer E1, infer A1>] ? Effect<R | R1, E | E1, A1> : [X] extends [Promise<infer A1>] ? Effect<R, Cause.UnknownException | E, A1> : Effect<R, E, X>;
2641
+ <A, X>(f: (a: NoInfer<A>) => X): <E, R>(self: Effect<A, E, R>) => [X] extends [Effect<infer A1, infer E1, infer R1>] ? Effect<A1, E | E1, R | R1> : [X] extends [Promise<infer A1>] ? Effect<A1, E | Cause.UnknownException, R> : Effect<X, E, R>;
2642
+ <X>(f: X): <A, E, R>(self: Effect<A, E, R>) => [X] extends [Effect<infer A1, infer E1, infer R1>] ? Effect<A1, E | E1, R | R1> : [X] extends [Promise<infer A1>] ? Effect<A1, E | Cause.UnknownException, R> : Effect<X, E, R>;
2643
+ <A, R, E, X>(self: Effect<A, E, R>, f: (a: NoInfer<A>) => X): [X] extends [Effect<infer A1, infer E1, infer R1>] ? Effect<A1, E | E1, R | R1> : [X] extends [Promise<infer A1>] ? Effect<A1, E | Cause.UnknownException, R> : Effect<X, E, R>;
2644
+ <A, R, E, X>(self: Effect<A, E, R>, f: X): [X] extends [Effect<infer A1, infer E1, infer R1>] ? Effect<A1, E | E1, R | R1> : [X] extends [Promise<infer A1>] ? Effect<A1, E | Cause.UnknownException, R> : Effect<X, E, R>;
2646
2645
  };
2647
2646
  /**
2648
2647
  * @since 2.0.0
2649
2648
  * @category sequencing
2650
2649
  */
2651
- export declare const flatten: <R, E, R1, E1, A>(self: Effect<R, E, Effect<R1, E1, A>>) => Effect<R | R1, E | E1, A>;
2650
+ export declare const flatten: <A, E1, R1, E, R>(self: Effect<Effect<A, E1, R1>, E, R>) => Effect<A, E | E1, R | R1>;
2652
2651
  /**
2653
2652
  * Returns an effect that races this effect with all the specified effects,
2654
2653
  * yielding the value of the first effect to succeed with a value. Losers of
@@ -2657,7 +2656,7 @@ export declare const flatten: <R, E, R1, E1, A>(self: Effect<R, E, Effect<R1, E1
2657
2656
  * @since 2.0.0
2658
2657
  * @category sequencing
2659
2658
  */
2660
- export declare const raceAll: <R, E, A>(effects: Iterable<Effect<R, E, A>>) => Effect<R, E, A>;
2659
+ export declare const raceAll: <A, E, R>(effects: Iterable<Effect<A, E, R>>) => Effect<A, E, R>;
2661
2660
  /**
2662
2661
  * Returns an effect that races this effect with the specified effect,
2663
2662
  * returning the first successful `A` from the faster side. If one effect
@@ -2668,8 +2667,8 @@ export declare const raceAll: <R, E, A>(effects: Iterable<Effect<R, E, A>>) => E
2668
2667
  * @category sequencing
2669
2668
  */
2670
2669
  export declare const race: {
2671
- <R2, E2, A2>(that: Effect<R2, E2, A2>): <R, E, A>(self: Effect<R, E, A>) => Effect<R2 | R, E2 | E, A2 | A>;
2672
- <R, E, A, R2, E2, A2>(self: Effect<R, E, A>, that: Effect<R2, E2, A2>): Effect<R | R2, E | E2, A | A2>;
2670
+ <A2, E2, R2>(that: Effect<A2, E2, R2>): <A, E, R>(self: Effect<A, E, R>) => Effect<A2 | A, E2 | E, R2 | R>;
2671
+ <A, E, R, A2, E2, R2>(self: Effect<A, E, R>, that: Effect<A2, E2, R2>): Effect<A | A2, E | E2, R | R2>;
2673
2672
  };
2674
2673
  /**
2675
2674
  * Returns an effect that races this effect with the specified effect,
@@ -2687,8 +2686,8 @@ export declare const race: {
2687
2686
  * @category sequencing
2688
2687
  */
2689
2688
  export declare const raceFirst: {
2690
- <R2, E2, A2>(that: Effect<R2, E2, A2>): <R, E, A>(self: Effect<R, E, A>) => Effect<R2 | R, E2 | E, A2 | A>;
2691
- <R, E, A, R2, E2, A2>(self: Effect<R, E, A>, that: Effect<R2, E2, A2>): Effect<R | R2, E | E2, A | A2>;
2689
+ <A2, E2, R2>(that: Effect<A2, E2, R2>): <A, E, R>(self: Effect<A, E, R>) => Effect<A2 | A, E2 | E, R2 | R>;
2690
+ <A, E, R, A2, E2, R2>(self: Effect<A, E, R>, that: Effect<A2, E2, R2>): Effect<A | A2, E | E2, R | R2>;
2692
2691
  };
2693
2692
  /**
2694
2693
  * Returns an effect that races this effect with the specified effect, calling
@@ -2698,14 +2697,14 @@ export declare const raceFirst: {
2698
2697
  * @category sequencing
2699
2698
  */
2700
2699
  export declare const raceWith: {
2701
- <E, A, R1, E1, A1, R2, E2, A2, R3, E3, A3>(other: Effect<R1, E1, A1>, options: {
2702
- readonly onSelfDone: (exit: Exit.Exit<E, A>, fiber: Fiber.Fiber<E1, A1>) => Effect<R2, E2, A2>;
2703
- readonly onOtherDone: (exit: Exit.Exit<E1, A1>, fiber: Fiber.Fiber<E, A>) => Effect<R3, E3, A3>;
2704
- }): <R>(self: Effect<R, E, A>) => Effect<R1 | R2 | R3 | R, E2 | E3, A2 | A3>;
2705
- <R, E, A, R1, E1, A1, R2, E2, A2, R3, E3, A3>(self: Effect<R, E, A>, other: Effect<R1, E1, A1>, options: {
2706
- readonly onSelfDone: (exit: Exit.Exit<E, A>, fiber: Fiber.Fiber<E1, A1>) => Effect<R2, E2, A2>;
2707
- readonly onOtherDone: (exit: Exit.Exit<E1, A1>, fiber: Fiber.Fiber<E, A>) => Effect<R3, E3, A3>;
2708
- }): Effect<R | R1 | R2 | R3, E2 | E3, A2 | A3>;
2700
+ <A1, E1, R1, E, A, A2, E2, R2, A3, E3, R3>(other: Effect<A1, E1, R1>, options: {
2701
+ readonly onSelfDone: (exit: Exit.Exit<A, E>, fiber: Fiber.Fiber<A1, E1>) => Effect<A2, E2, R2>;
2702
+ readonly onOtherDone: (exit: Exit.Exit<A1, E1>, fiber: Fiber.Fiber<A, E>) => Effect<A3, E3, R3>;
2703
+ }): <R>(self: Effect<A, E, R>) => Effect<A2 | A3, E2 | E3, R1 | R2 | R3 | R>;
2704
+ <A, E, R, A1, E1, R1, A2, E2, R2, A3, E3, R3>(self: Effect<A, E, R>, other: Effect<A1, E1, R1>, options: {
2705
+ readonly onSelfDone: (exit: Exit.Exit<A, E>, fiber: Fiber.Fiber<A1, E1>) => Effect<A2, E2, R2>;
2706
+ readonly onOtherDone: (exit: Exit.Exit<A1, E1>, fiber: Fiber.Fiber<A, E>) => Effect<A3, E3, R3>;
2707
+ }): Effect<A2 | A3, E2 | E3, R | R1 | R2 | R3>;
2709
2708
  };
2710
2709
  /**
2711
2710
  * Summarizes a effect by computing some value before and after execution, and
@@ -2716,18 +2715,18 @@ export declare const raceWith: {
2716
2715
  * @category sequencing
2717
2716
  */
2718
2717
  export declare const summarized: {
2719
- <R2, E2, B, C>(summary: Effect<R2, E2, B>, f: (start: B, end: B) => C): <R, E, A>(self: Effect<R, E, A>) => Effect<R2 | R, E2 | E, [C, A]>;
2720
- <R, E, A, R2, E2, B, C>(self: Effect<R, E, A>, summary: Effect<R2, E2, B>, f: (start: B, end: B) => C): Effect<R | R2, E | E2, [C, A]>;
2718
+ <B, E2, R2, C>(summary: Effect<B, E2, R2>, f: (start: B, end: B) => C): <A, E, R>(self: Effect<A, E, R>) => Effect<[C, A], E2 | E, R2 | R>;
2719
+ <A, E, R, B, E2, R2, C>(self: Effect<A, E, R>, summary: Effect<B, E2, R2>, f: (start: B, end: B) => C): Effect<[C, A], E2 | E, R2 | R>;
2721
2720
  };
2722
2721
  /**
2723
2722
  * @since 2.0.0
2724
2723
  * @category sequencing
2725
2724
  */
2726
2725
  export declare const tap: {
2727
- <A, X>(f: (a: NoInfer<A>) => X): <R, E>(self: Effect<R, E, A>) => [X] extends [Effect<infer R1, infer E1, infer _A1>] ? Effect<R | R1, E | E1, A> : [X] extends [Promise<infer _A1>] ? Effect<R, E | Cause.UnknownException, A> : Effect<R, E, A>;
2728
- <X>(f: X): <R, E, A>(self: Effect<R, E, A>) => [X] extends [Effect<infer R1, infer E1, infer _A1>] ? Effect<R | R1, E | E1, A> : [X] extends [Promise<infer _A1>] ? Effect<R, Cause.UnknownException | E, A> : Effect<R, E, A>;
2729
- <A, R, E, X>(self: Effect<R, E, A>, f: (a: NoInfer<A>) => X): [X] extends [Effect<infer R1, infer E1, infer _A1>] ? Effect<R | R1, E | E1, A> : [X] extends [Promise<infer _A1>] ? Effect<R, Cause.UnknownException | E, A> : Effect<R, E, A>;
2730
- <A, R, E, X>(self: Effect<R, E, A>, f: X): [X] extends [Effect<infer R1, infer E1, infer _A1>] ? Effect<R | R1, E | E1, A> : [X] extends [Promise<infer _A1>] ? Effect<R, Cause.UnknownException | E, A> : Effect<R, E, A>;
2726
+ <A, X>(f: (a: NoInfer<A>) => X): <E, R>(self: Effect<A, E, R>) => [X] extends [Effect<infer _A1, infer E1, infer R1>] ? Effect<A, E | E1, R | R1> : [X] extends [Promise<infer _A1>] ? Effect<A, E | Cause.UnknownException, R> : Effect<A, E, R>;
2727
+ <X>(f: X): <A, E, R>(self: Effect<A, E, R>) => [X] extends [Effect<infer _A1, infer E1, infer R1>] ? Effect<A, E | E1, R | R1> : [X] extends [Promise<infer _A1>] ? Effect<A, E | Cause.UnknownException, R> : Effect<A, E, R>;
2728
+ <A, E, R, X>(self: Effect<A, E, R>, f: (a: NoInfer<A>) => X): [X] extends [Effect<infer _A1, infer E1, infer R1>] ? Effect<A, E | E1, R | R1> : [X] extends [Promise<infer _A1>] ? Effect<A, E | Cause.UnknownException, R> : Effect<A, E, R>;
2729
+ <A, E, R, X>(self: Effect<A, E, R>, f: X): [X] extends [Effect<infer _A1, infer E1, infer R1>] ? Effect<A, E | E1, R | R1> : [X] extends [Promise<infer _A1>] ? Effect<A, E | Cause.UnknownException, R> : Effect<A, E, R>;
2731
2730
  };
2732
2731
  /**
2733
2732
  * Returns an effect that effectfully "peeks" at the failure or success of
@@ -2737,14 +2736,14 @@ export declare const tap: {
2737
2736
  * @category sequencing
2738
2737
  */
2739
2738
  export declare const tapBoth: {
2740
- <E, XE extends E, A, XA extends A, R2, E2, X, R3, E3, X1>(options: {
2741
- readonly onFailure: (e: XE) => Effect<R2, E2, X>;
2742
- readonly onSuccess: (a: XA) => Effect<R3, E3, X1>;
2743
- }): <R>(self: Effect<R, E, A>) => Effect<R2 | R3 | R, E | E2 | E3, A>;
2744
- <R, E, A, XE extends E, XA extends A, R2, E2, X, R3, E3, X1>(self: Effect<R, E, A>, options: {
2745
- readonly onFailure: (e: XE) => Effect<R2, E2, X>;
2746
- readonly onSuccess: (a: XA) => Effect<R3, E3, X1>;
2747
- }): Effect<R | R2 | R3, E | E2 | E3, A>;
2739
+ <E, X, E2, R2, A, X1, E3, R3>(options: {
2740
+ readonly onFailure: (e: NoInfer<E>) => Effect<X, E2, R2>;
2741
+ readonly onSuccess: (a: NoInfer<A>) => Effect<X1, E3, R3>;
2742
+ }): <R>(self: Effect<A, E, R>) => Effect<A, E | E2 | E3, R2 | R3 | R>;
2743
+ <A, E, R, X, E2, R2, X1, E3, R3>(self: Effect<A, E, R>, options: {
2744
+ readonly onFailure: (e: E) => Effect<X, E2, R2>;
2745
+ readonly onSuccess: (a: A) => Effect<X1, E3, R3>;
2746
+ }): Effect<A, E | E2 | E3, R | R2 | R3>;
2748
2747
  };
2749
2748
  /**
2750
2749
  * Returns an effect that effectually "peeks" at the defect of this effect.
@@ -2753,8 +2752,8 @@ export declare const tapBoth: {
2753
2752
  * @category sequencing
2754
2753
  */
2755
2754
  export declare const tapDefect: {
2756
- <R2, E2, X>(f: (cause: Cause.Cause<never>) => Effect<R2, E2, X>): <R, E, A>(self: Effect<R, E, A>) => Effect<R2 | R, E2 | E, A>;
2757
- <R, E, A, R2, E2, X>(self: Effect<R, E, A>, f: (cause: Cause.Cause<never>) => Effect<R2, E2, X>): Effect<R | R2, E | E2, A>;
2755
+ <X, E2, R2>(f: (cause: Cause.Cause<never>) => Effect<X, E2, R2>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E2 | E, R2 | R>;
2756
+ <A, E, R, X, E2, R2>(self: Effect<A, E, R>, f: (cause: Cause.Cause<never>) => Effect<X, E2, R2>): Effect<A, E | E2, R | R2>;
2758
2757
  };
2759
2758
  /**
2760
2759
  * Returns an effect that effectfully "peeks" at the failure of this effect.
@@ -2763,8 +2762,8 @@ export declare const tapDefect: {
2763
2762
  * @category sequencing
2764
2763
  */
2765
2764
  export declare const tapError: {
2766
- <E, XE extends E, R2, E2, X>(f: (e: XE) => Effect<R2, E2, X>): <R, A>(self: Effect<R, E, A>) => Effect<R2 | R, E | E2, A>;
2767
- <R, E, XE extends E, A, R2, E2, X>(self: Effect<R, E, A>, f: (e: XE) => Effect<R2, E2, X>): Effect<R | R2, E | E2, A>;
2765
+ <E, X, E2, R2>(f: (e: NoInfer<E>) => Effect<X, E2, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A, E | E2, R2 | R>;
2766
+ <A, E, R, X, E2, R2>(self: Effect<A, E, R>, f: (e: E) => Effect<X, E2, R2>): Effect<A, E | E2, R | R2>;
2768
2767
  };
2769
2768
  /**
2770
2769
  * Returns an effect that effectfully "peeks" at the specific tagged failure of this effect.
@@ -2773,16 +2772,16 @@ export declare const tapError: {
2773
2772
  * @category sequencing
2774
2773
  */
2775
2774
  export declare const tapErrorTag: {
2776
- <K extends (E extends {
2775
+ <K extends E extends {
2777
2776
  _tag: string;
2778
- } ? E["_tag"] : never), E, R1, E1, A1>(k: K, f: (e: Extract<E, {
2777
+ } ? E["_tag"] : never, E, A1, E1, R1>(k: K, f: (e: Extract<E, {
2779
2778
  _tag: K;
2780
- }>) => Effect<R1, E1, A1>): <R, A>(self: Effect<R, E, A>) => Effect<R | R1, E | E1, A>;
2781
- <R, E, A, K extends (E extends {
2779
+ }>) => Effect<A1, E1, R1>): <A, R>(self: Effect<A, E, R>) => Effect<A, E | E1, R1 | R>;
2780
+ <A, E, R, K extends E extends {
2782
2781
  _tag: string;
2783
- } ? E["_tag"] : never), R1, E1, A1>(self: Effect<R, E, A>, k: K, f: (e: Extract<E, {
2782
+ } ? E["_tag"] : never, A1, E1, R1>(self: Effect<A, E, R>, k: K, f: (e: Extract<E, {
2784
2783
  _tag: K;
2785
- }>) => Effect<R1, E1, A1>): Effect<R | R1, E | E1, A>;
2784
+ }>) => Effect<A1, E1, R1>): Effect<A, E | E1, R | R1>;
2786
2785
  };
2787
2786
  /**
2788
2787
  * Returns an effect that effectually "peeks" at the cause of the failure of
@@ -2792,8 +2791,8 @@ export declare const tapErrorTag: {
2792
2791
  * @category sequencing
2793
2792
  */
2794
2793
  export declare const tapErrorCause: {
2795
- <E, XE extends E, R2, E2, X>(f: (cause: Cause.Cause<XE>) => Effect<R2, E2, X>): <R, A>(self: Effect<R, E, A>) => Effect<R2 | R, E | E2, A>;
2796
- <R, E, A, XE extends E, R2, E2, X>(self: Effect<R, E, A>, f: (cause: Cause.Cause<XE>) => Effect<R2, E2, X>): Effect<R | R2, E | E2, A>;
2794
+ <E, X, E2, R2>(f: (cause: Cause.Cause<NoInfer<E>>) => Effect<X, E2, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A, E | E2, R2 | R>;
2795
+ <A, E, R, X, E2, R2>(self: Effect<A, E, R>, f: (cause: Cause.Cause<E>) => Effect<X, E2, R2>): Effect<A, E | E2, R | R2>;
2797
2796
  };
2798
2797
  /**
2799
2798
  * Repeats this effect forever (until the first error).
@@ -2801,7 +2800,7 @@ export declare const tapErrorCause: {
2801
2800
  * @since 2.0.0
2802
2801
  * @category repetition / recursion
2803
2802
  */
2804
- export declare const forever: <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, never>;
2803
+ export declare const forever: <A, E, R>(self: Effect<A, E, R>) => Effect<never, E, R>;
2805
2804
  /**
2806
2805
  * The `Effect.iterate` function allows you to iterate with an effectful operation. It uses an effectful `body` operation to change the state during each iteration and continues the iteration as long as the `while` function evaluates to `true`:
2807
2806
  *
@@ -2827,12 +2826,12 @@ export declare const forever: <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, n
2827
2826
  export declare const iterate: {
2828
2827
  <A, B extends A, R, E>(initial: A, options: {
2829
2828
  readonly while: Refinement<A, B>;
2830
- readonly body: (b: B) => Effect<R, E, A>;
2831
- }): Effect<R, E, A>;
2829
+ readonly body: (b: B) => Effect<A, E, R>;
2830
+ }): Effect<A, E, R>;
2832
2831
  <A, R, E>(initial: A, options: {
2833
- readonly while: (a: A) => boolean;
2834
- readonly body: (a: A) => Effect<R, E, A>;
2835
- }): Effect<R, E, A>;
2832
+ readonly while: Predicate<A>;
2833
+ readonly body: (a: A) => Effect<A, E, R>;
2834
+ }): Effect<A, E, R>;
2836
2835
  };
2837
2836
  /**
2838
2837
  * The `Effect.loop` function allows you to repeatedly change the state based on an `step` function until a condition given by the `while` function is evaluated to `true`:
@@ -2861,30 +2860,30 @@ export declare const iterate: {
2861
2860
  * @category repetition / recursion
2862
2861
  */
2863
2862
  export declare const loop: {
2864
- <A, B extends A, R, E, C>(initial: A, options: {
2863
+ <A, B extends A, C, E, R>(initial: A, options: {
2865
2864
  readonly while: Refinement<A, B>;
2866
2865
  readonly step: (b: B) => A;
2867
- readonly body: (b: B) => Effect<R, E, C>;
2866
+ readonly body: (b: B) => Effect<C, E, R>;
2868
2867
  readonly discard?: false | undefined;
2869
- }): Effect<R, E, Array<C>>;
2870
- <A, R, E, C>(initial: A, options: {
2868
+ }): Effect<Array<C>, E, R>;
2869
+ <A, C, E, R>(initial: A, options: {
2871
2870
  readonly while: (a: A) => boolean;
2872
2871
  readonly step: (a: A) => A;
2873
- readonly body: (a: A) => Effect<R, E, C>;
2872
+ readonly body: (a: A) => Effect<C, E, R>;
2874
2873
  readonly discard?: false | undefined;
2875
- }): Effect<R, E, Array<C>>;
2876
- <A, B extends A, R, E, C>(initial: A, options: {
2874
+ }): Effect<Array<C>, E, R>;
2875
+ <A, B extends A, C, E, R>(initial: A, options: {
2877
2876
  readonly while: Refinement<A, B>;
2878
2877
  readonly step: (b: B) => A;
2879
- readonly body: (b: B) => Effect<R, E, C>;
2878
+ readonly body: (b: B) => Effect<C, E, R>;
2880
2879
  readonly discard: true;
2881
- }): Effect<R, E, void>;
2882
- <A, R, E, C>(initial: A, options: {
2880
+ }): Effect<void, E, R>;
2881
+ <A, C, E, R>(initial: A, options: {
2883
2882
  readonly while: (a: A) => boolean;
2884
2883
  readonly step: (a: A) => A;
2885
- readonly body: (a: A) => Effect<R, E, C>;
2884
+ readonly body: (a: A) => Effect<C, E, R>;
2886
2885
  readonly discard: true;
2887
- }): Effect<R, E, void>;
2886
+ }): Effect<void, E, R>;
2888
2887
  };
2889
2888
  /**
2890
2889
  * @since 2.0.0
@@ -2895,30 +2894,30 @@ export declare namespace Repeat {
2895
2894
  * @since 2.0.0
2896
2895
  * @category repetition / recursion
2897
2896
  */
2898
- type Return<R, E, A, O extends Options<A>> = Effect<R | (O extends {
2899
- schedule: Schedule.Schedule<infer X, infer _I, infer _O>;
2900
- } ? X : never) | (O extends {
2901
- while: (...args: Array<any>) => Effect<infer X, infer _E, infer _A>;
2902
- } ? X : never) | (O extends {
2903
- until: (...args: Array<any>) => Effect<infer X, infer _E, infer _A>;
2904
- } ? X : never), E | (O extends {
2905
- while: (...args: Array<any>) => Effect<infer _R, infer X, infer _A>;
2906
- } ? X : never) | (O extends {
2907
- until: (...args: Array<any>) => Effect<infer _R, infer X, infer _A>;
2908
- } ? X : never), (O extends {
2897
+ type Return<R, E, A, O extends Options<A>> = Effect<(O extends {
2909
2898
  schedule: Schedule.Schedule<infer _R, infer _I, infer Out>;
2910
2899
  } ? Out : O extends {
2911
2900
  until: Refinement<A, infer B>;
2912
- } ? B : A)> extends infer Z ? Z : never;
2901
+ } ? B : A), E | (O extends {
2902
+ while: (...args: Array<any>) => Effect<infer _A, infer E, infer _R>;
2903
+ } ? E : never) | (O extends {
2904
+ until: (...args: Array<any>) => Effect<infer _A, infer E, infer _R>;
2905
+ } ? E : never), R | (O extends {
2906
+ schedule: Schedule.Schedule<infer R, infer _I, infer _O>;
2907
+ } ? R : never) | (O extends {
2908
+ while: (...args: Array<any>) => Effect<infer _A, infer _E, infer R>;
2909
+ } ? R : never) | (O extends {
2910
+ until: (...args: Array<any>) => Effect<infer _A, infer _E, infer R>;
2911
+ } ? R : never)> extends infer Z ? Z : never;
2913
2912
  /**
2914
2913
  * @since 2.0.0
2915
2914
  * @category repetition / recursion
2916
2915
  */
2917
2916
  interface Options<A> {
2918
- while?: (_: A) => boolean | Effect<any, any, boolean>;
2919
- until?: (_: A) => boolean | Effect<any, any, boolean>;
2920
- times?: number;
2921
- schedule?: Schedule.Schedule<any, A, any>;
2917
+ while?: ((_: A) => boolean | Effect<boolean, any, any>) | undefined;
2918
+ until?: ((_: A) => boolean | Effect<boolean, any, any>) | undefined;
2919
+ times?: number | undefined;
2920
+ schedule?: Schedule.Schedule<any, A, any> | undefined;
2922
2921
  }
2923
2922
  }
2924
2923
  /**
@@ -2932,10 +2931,10 @@ export declare namespace Repeat {
2932
2931
  * @category repetition / recursion
2933
2932
  */
2934
2933
  export declare const repeat: {
2935
- <A, O extends Repeat.Options<A>>(options: O): <R, E>(self: Effect<R, E, A>) => Repeat.Return<R, E, A, O>;
2936
- <R1, A extends A0, A0, B>(schedule: Schedule.Schedule<R1, A, B>): <R, E>(self: Effect<R, E, A>) => Effect<R1 | R, E, B>;
2937
- <R, E, A, O extends Repeat.Options<A>>(self: Effect<R, E, A>, options: O): Repeat.Return<R, E, A, O>;
2938
- <R, E, A extends A0, A0, R1, B>(self: Effect<R, E, A>, schedule: Schedule.Schedule<R1, A0, B>): Effect<R | R1, E, B>;
2934
+ <A, O extends Repeat.Options<A>>(options: O): <E, R>(self: Effect<A, E, R>) => Repeat.Return<R, E, A, O>;
2935
+ <R1, A, B>(schedule: Schedule.Schedule<R1, A, B>): <E, R>(self: Effect<A, E, R>) => Effect<B, E, R1 | R>;
2936
+ <A, E, R, O extends Repeat.Options<A>>(self: Effect<A, E, R>, options: O): Repeat.Return<R, E, A, O>;
2937
+ <A, E, R, R1, B>(self: Effect<A, E, R>, schedule: Schedule.Schedule<R1, A, B>): Effect<B, E, R | R1>;
2939
2938
  };
2940
2939
  /**
2941
2940
  * Returns a new effect that repeats this effect the specified number of times
@@ -2947,8 +2946,8 @@ export declare const repeat: {
2947
2946
  * @category repetition / recursion
2948
2947
  */
2949
2948
  export declare const repeatN: {
2950
- (n: number): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
2951
- <R, E, A>(self: Effect<R, E, A>, n: number): Effect<R, E, A>;
2949
+ (n: number): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
2950
+ <A, E, R>(self: Effect<A, E, R>, n: number): Effect<A, E, R>;
2952
2951
  };
2953
2952
  /**
2954
2953
  * Returns a new effect that repeats this effect according to the specified
@@ -2963,8 +2962,8 @@ export declare const repeatN: {
2963
2962
  * @category repetition / recursion
2964
2963
  */
2965
2964
  export declare const repeatOrElse: {
2966
- <R2, A extends A0, A0, B, E, R3, E2>(schedule: Schedule.Schedule<R2, A, B>, orElse: (error: E, option: Option.Option<B>) => Effect<R3, E2, B>): <R>(self: Effect<R, E, A>) => Effect<R2 | R3 | R, E2, B>;
2967
- <R, E, A extends A0, A0, R2, B, R3, E2>(self: Effect<R, E, A>, schedule: Schedule.Schedule<R2, A0, B>, orElse: (error: E, option: Option.Option<B>) => Effect<R3, E2, B>): Effect<R | R2 | R3, E2, B>;
2965
+ <R2, A, B, E, E2, R3>(schedule: Schedule.Schedule<R2, A, B>, orElse: (error: E, option: Option.Option<B>) => Effect<B, E2, R3>): <R>(self: Effect<A, E, R>) => Effect<B, E2, R2 | R3 | R>;
2966
+ <A, E, R, R2, B, E2, R3>(self: Effect<A, E, R>, schedule: Schedule.Schedule<R2, A, B>, orElse: (error: E, option: Option.Option<B>) => Effect<B, E2, R3>): Effect<B, E2, R | R2 | R3>;
2968
2967
  };
2969
2968
  /**
2970
2969
  * Runs this effect according to the specified schedule.
@@ -2976,8 +2975,8 @@ export declare const repeatOrElse: {
2976
2975
  * @category repetition / recursion
2977
2976
  */
2978
2977
  export declare const schedule: {
2979
- <R2, Out>(schedule: Schedule.Schedule<R2, unknown, Out>): <R, E, A>(self: Effect<R, E, A>) => Effect<R2 | R, E, Out>;
2980
- <R, E, A, R2, Out>(self: Effect<R, E, A>, schedule: Schedule.Schedule<R2, unknown, Out>): Effect<R | R2, E, Out>;
2978
+ <R2, Out>(schedule: Schedule.Schedule<R2, unknown, Out>): <A, E, R>(self: Effect<A, E, R>) => Effect<Out, E, R2 | R>;
2979
+ <A, E, R, R2, Out>(self: Effect<A, E, R>, schedule: Schedule.Schedule<R2, unknown, Out>): Effect<Out, E, R | R2>;
2981
2980
  };
2982
2981
  /**
2983
2982
  * Runs this effect according to the specified schedule in a new fiber
@@ -2987,8 +2986,8 @@ export declare const schedule: {
2987
2986
  * @category repetition / recursion
2988
2987
  */
2989
2988
  export declare const scheduleForked: {
2990
- <R2, Out>(schedule: Schedule.Schedule<R2, unknown, Out>): <R, E, A>(self: Effect<R, E, A>) => Effect<Scope.Scope | R2 | R, never, Fiber.RuntimeFiber<E, Out>>;
2991
- <R, E, A, R2, Out>(self: Effect<R, E, A>, schedule: Schedule.Schedule<R2, unknown, Out>): Effect<Scope.Scope | R | R2, never, Fiber.RuntimeFiber<E, Out>>;
2989
+ <R2, Out>(schedule: Schedule.Schedule<R2, unknown, Out>): <A, E, R>(self: Effect<A, E, R>) => Effect<Scope.Scope | R2 | R, never, Fiber.RuntimeFiber<Out, E>>;
2990
+ <R, E, A, R2, Out>(self: Effect<A, E, R>, schedule: Schedule.Schedule<R2, unknown, Out>): Effect<Scope.Scope | R | R2, never, Fiber.RuntimeFiber<Out, E>>;
2992
2991
  };
2993
2992
  /**
2994
2993
  * Runs this effect according to the specified schedule starting from the
@@ -2998,18 +2997,18 @@ export declare const scheduleForked: {
2998
2997
  * @category repetition / recursion
2999
2998
  */
3000
2999
  export declare const scheduleFrom: {
3001
- <R2, In, Out>(initial: In, schedule: Schedule.Schedule<R2, In, Out>): <R, E>(self: Effect<R, E, In>) => Effect<R2 | R, E, Out>;
3002
- <R, E, In, R2, Out>(self: Effect<R, E, In>, initial: In, schedule: Schedule.Schedule<R2, In, Out>): Effect<R | R2, E, Out>;
3000
+ <R2, In, Out>(initial: In, schedule: Schedule.Schedule<R2, In, Out>): <E, R>(self: Effect<In, E, R>) => Effect<Out, E, R2 | R>;
3001
+ <In, E, R, R2, Out>(self: Effect<In, E, R>, initial: In, schedule: Schedule.Schedule<R2, In, Out>): Effect<Out, E, R | R2>;
3003
3002
  };
3004
3003
  /**
3005
3004
  * @since 2.0.0
3006
3005
  * @category repetition / recursion
3007
3006
  */
3008
- export declare const whileLoop: <R, E, A>(options: {
3007
+ export declare const whileLoop: <A, E, R>(options: {
3009
3008
  readonly while: LazyArg<boolean>;
3010
- readonly body: LazyArg<Effect<R, E, A>>;
3009
+ readonly body: LazyArg<Effect<A, E, R>>;
3011
3010
  readonly step: (a: A) => void;
3012
- }) => Effect<R, E, void>;
3011
+ }) => Effect<void, E, R>;
3013
3012
  /**
3014
3013
  * Returns a collection of all `FiberRef` values for the fiber running this
3015
3014
  * effect.
@@ -3017,45 +3016,45 @@ export declare const whileLoop: <R, E, A>(options: {
3017
3016
  * @since 2.0.0
3018
3017
  * @category fiber refs
3019
3018
  */
3020
- export declare const getFiberRefs: Effect<never, never, FiberRefs.FiberRefs>;
3019
+ export declare const getFiberRefs: Effect<FiberRefs.FiberRefs>;
3021
3020
  /**
3022
3021
  * Inherits values from all `FiberRef` instances into current fiber.
3023
3022
  *
3024
3023
  * @since 2.0.0
3025
3024
  * @category fiber refs
3026
3025
  */
3027
- export declare const inheritFiberRefs: (childFiberRefs: FiberRefs.FiberRefs) => Effect<never, never, void>;
3026
+ export declare const inheritFiberRefs: (childFiberRefs: FiberRefs.FiberRefs) => Effect<void>;
3028
3027
  /**
3029
3028
  * @since 2.0.0
3030
3029
  * @category fiber refs
3031
3030
  */
3032
3031
  export declare const locally: {
3033
- <A>(self: FiberRef.FiberRef<A>, value: A): <R, E, B>(use: Effect<R, E, B>) => Effect<R, E, B>;
3034
- <R, E, B, A>(use: Effect<R, E, B>, self: FiberRef.FiberRef<A>, value: A): Effect<R, E, B>;
3032
+ <A>(self: FiberRef.FiberRef<A>, value: A): <B, E, R>(use: Effect<B, E, R>) => Effect<B, E, R>;
3033
+ <B, E, R, A>(use: Effect<B, E, R>, self: FiberRef.FiberRef<A>, value: A): Effect<B, E, R>;
3035
3034
  };
3036
3035
  /**
3037
3036
  * @since 2.0.0
3038
3037
  * @category fiber refs
3039
3038
  */
3040
3039
  export declare const locallyWith: {
3041
- <A>(self: FiberRef.FiberRef<A>, f: (a: A) => A): <R, E, B>(use: Effect<R, E, B>) => Effect<R, E, B>;
3042
- <R, E, B, A>(use: Effect<R, E, B>, self: FiberRef.FiberRef<A>, f: (a: A) => A): Effect<R, E, B>;
3040
+ <A>(self: FiberRef.FiberRef<A>, f: (a: A) => A): <B, E, R>(use: Effect<B, E, R>) => Effect<B, E, R>;
3041
+ <B, E, R, A>(use: Effect<B, E, R>, self: FiberRef.FiberRef<A>, f: (a: A) => A): Effect<B, E, R>;
3043
3042
  };
3044
3043
  /**
3045
3044
  * @since 2.0.0
3046
3045
  * @category fiber refs
3047
3046
  */
3048
3047
  export declare const locallyScoped: {
3049
- <A>(value: A): (self: FiberRef.FiberRef<A>) => Effect<Scope.Scope, never, void>;
3050
- <A>(self: FiberRef.FiberRef<A>, value: A): Effect<Scope.Scope, never, void>;
3048
+ <A>(value: A): (self: FiberRef.FiberRef<A>) => Effect<void, never, Scope.Scope>;
3049
+ <A>(self: FiberRef.FiberRef<A>, value: A): Effect<void, never, Scope.Scope>;
3051
3050
  };
3052
3051
  /**
3053
3052
  * @since 2.0.0
3054
3053
  * @category fiber refs
3055
3054
  */
3056
3055
  export declare const locallyScopedWith: {
3057
- <A>(f: (a: A) => A): (self: FiberRef.FiberRef<A>) => Effect<Scope.Scope, never, void>;
3058
- <A>(self: FiberRef.FiberRef<A>, f: (a: A) => A): Effect<Scope.Scope, never, void>;
3056
+ <A>(f: (a: A) => A): (self: FiberRef.FiberRef<A>) => Effect<void, never, Scope.Scope>;
3057
+ <A>(self: FiberRef.FiberRef<A>, f: (a: A) => A): Effect<void, never, Scope.Scope>;
3059
3058
  };
3060
3059
  /**
3061
3060
  * Applies the specified changes to the `FiberRef` values for the fiber
@@ -3064,7 +3063,7 @@ export declare const locallyScopedWith: {
3064
3063
  * @since 2.0.0
3065
3064
  * @category fiber refs
3066
3065
  */
3067
- export declare const patchFiberRefs: (patch: FiberRefsPatch.FiberRefsPatch) => Effect<never, never, void>;
3066
+ export declare const patchFiberRefs: (patch: FiberRefsPatch.FiberRefsPatch) => Effect<void>;
3068
3067
  /**
3069
3068
  * Sets the `FiberRef` values for the fiber running this effect to the values
3070
3069
  * in the specified collection of `FiberRef` values.
@@ -3072,7 +3071,7 @@ export declare const patchFiberRefs: (patch: FiberRefsPatch.FiberRefsPatch) => E
3072
3071
  * @since 2.0.0
3073
3072
  * @category fiber refs
3074
3073
  */
3075
- export declare const setFiberRefs: (fiberRefs: FiberRefs.FiberRefs) => Effect<never, never, void>;
3074
+ export declare const setFiberRefs: (fiberRefs: FiberRefs.FiberRefs) => Effect<void>;
3076
3075
  /**
3077
3076
  * Updates the `FiberRef` values for the fiber running this effect using the
3078
3077
  * specified function.
@@ -3080,21 +3079,21 @@ export declare const setFiberRefs: (fiberRefs: FiberRefs.FiberRefs) => Effect<ne
3080
3079
  * @since 2.0.0
3081
3080
  * @category fiber refs
3082
3081
  */
3083
- export declare const updateFiberRefs: (f: (fiberId: FiberId.Runtime, fiberRefs: FiberRefs.FiberRefs) => FiberRefs.FiberRefs) => Effect<never, never, void>;
3082
+ export declare const updateFiberRefs: (f: (fiberId: FiberId.Runtime, fiberRefs: FiberRefs.FiberRefs) => FiberRefs.FiberRefs) => Effect<void>;
3084
3083
  /**
3085
3084
  * Returns `true` if this effect is a failure, `false` otherwise.
3086
3085
  *
3087
3086
  * @since 2.0.0
3088
3087
  * @category getters & folding
3089
3088
  */
3090
- export declare const isFailure: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never, boolean>;
3089
+ export declare const isFailure: <A, E, R>(self: Effect<A, E, R>) => Effect<boolean, never, R>;
3091
3090
  /**
3092
3091
  * Returns `true` if this effect is a success, `false` otherwise.
3093
3092
  *
3094
3093
  * @since 2.0.0
3095
3094
  * @category getters & folding
3096
3095
  */
3097
- export declare const isSuccess: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never, boolean>;
3096
+ export declare const isSuccess: <A, E, R>(self: Effect<A, E, R>) => Effect<boolean, never, R>;
3098
3097
  /**
3099
3098
  * Folds over the failure value or the success value to yield an effect that
3100
3099
  * does not fail, but succeeds with the value returned by the left or right
@@ -3104,14 +3103,14 @@ export declare const isSuccess: <R, E, A>(self: Effect<R, E, A>) => Effect<R, ne
3104
3103
  * @category getters & folding
3105
3104
  */
3106
3105
  export declare const match: {
3107
- <E, A, A2, A3>(options: {
3106
+ <E, A2, A, A3>(options: {
3108
3107
  readonly onFailure: (error: E) => A2;
3109
3108
  readonly onSuccess: (value: A) => A3;
3110
- }): <R>(self: Effect<R, E, A>) => Effect<R, never, A2 | A3>;
3111
- <R, E, A, A2, A3>(self: Effect<R, E, A>, options: {
3109
+ }): <R>(self: Effect<A, E, R>) => Effect<A2 | A3, never, R>;
3110
+ <A, E, R, A2, A3>(self: Effect<A, E, R>, options: {
3112
3111
  readonly onFailure: (error: E) => A2;
3113
3112
  readonly onSuccess: (value: A) => A3;
3114
- }): Effect<R, never, A2 | A3>;
3113
+ }): Effect<A2 | A3, never, R>;
3115
3114
  };
3116
3115
  /**
3117
3116
  * @since 2.0.0
@@ -3121,39 +3120,39 @@ export declare const matchCause: {
3121
3120
  <E, A2, A, A3>(options: {
3122
3121
  readonly onFailure: (cause: Cause.Cause<E>) => A2;
3123
3122
  readonly onSuccess: (a: A) => A3;
3124
- }): <R>(self: Effect<R, E, A>) => Effect<R, never, A2 | A3>;
3125
- <R, E, A2, A, A3>(self: Effect<R, E, A>, options: {
3123
+ }): <R>(self: Effect<A, E, R>) => Effect<A2 | A3, never, R>;
3124
+ <A, E, R, A2, A3>(self: Effect<A, E, R>, options: {
3126
3125
  readonly onFailure: (cause: Cause.Cause<E>) => A2;
3127
3126
  readonly onSuccess: (a: A) => A3;
3128
- }): Effect<R, never, A2 | A3>;
3127
+ }): Effect<A2 | A3, never, R>;
3129
3128
  };
3130
3129
  /**
3131
3130
  * @since 2.0.0
3132
3131
  * @category getters & folding
3133
3132
  */
3134
3133
  export declare const matchCauseEffect: {
3135
- <E, A, R2, E2, A2, R3, E3, A3>(options: {
3136
- readonly onFailure: (cause: Cause.Cause<E>) => Effect<R2, E2, A2>;
3137
- readonly onSuccess: (a: A) => Effect<R3, E3, A3>;
3138
- }): <R>(self: Effect<R, E, A>) => Effect<R2 | R3 | R, E2 | E3, A2 | A3>;
3139
- <R, E, A, R2, E2, A2, R3, E3, A3>(self: Effect<R, E, A>, options: {
3140
- readonly onFailure: (cause: Cause.Cause<E>) => Effect<R2, E2, A2>;
3141
- readonly onSuccess: (a: A) => Effect<R3, E3, A3>;
3142
- }): Effect<R | R2 | R3, E2 | E3, A2 | A3>;
3134
+ <E, A2, E2, R2, A, A3, E3, R3>(options: {
3135
+ readonly onFailure: (cause: Cause.Cause<E>) => Effect<A2, E2, R2>;
3136
+ readonly onSuccess: (a: A) => Effect<A3, E3, R3>;
3137
+ }): <R>(self: Effect<A, E, R>) => Effect<A2 | A3, E2 | E3, R2 | R3 | R>;
3138
+ <A, E, R, A2, E2, R2, A3, E3, R3>(self: Effect<A, E, R>, options: {
3139
+ readonly onFailure: (cause: Cause.Cause<E>) => Effect<A2, E2, R2>;
3140
+ readonly onSuccess: (a: A) => Effect<A3, E3, R3>;
3141
+ }): Effect<A2 | A3, E2 | E3, R2 | R3 | R>;
3143
3142
  };
3144
3143
  /**
3145
3144
  * @since 2.0.0
3146
3145
  * @category getters & folding
3147
3146
  */
3148
3147
  export declare const matchEffect: {
3149
- <E, A, R2, E2, A2, R3, E3, A3>(options: {
3150
- readonly onFailure: (e: E) => Effect<R2, E2, A2>;
3151
- readonly onSuccess: (a: A) => Effect<R3, E3, A3>;
3152
- }): <R>(self: Effect<R, E, A>) => Effect<R2 | R3 | R, E2 | E3, A2 | A3>;
3153
- <R, E, A, R2, E2, A2, R3, E3, A3>(self: Effect<R, E, A>, options: {
3154
- readonly onFailure: (e: E) => Effect<R2, E2, A2>;
3155
- readonly onSuccess: (a: A) => Effect<R3, E3, A3>;
3156
- }): Effect<R | R2 | R3, E2 | E3, A2 | A3>;
3148
+ <E, A2, E2, R2, A, A3, E3, R3>(options: {
3149
+ readonly onFailure: (e: E) => Effect<A2, E2, R2>;
3150
+ readonly onSuccess: (a: A) => Effect<A3, E3, R3>;
3151
+ }): <R>(self: Effect<A, E, R>) => Effect<A2 | A3, E2 | E3, R2 | R3 | R>;
3152
+ <A, E, R, A2, E2, R2, A3, E3, R3>(self: Effect<A, E, R>, options: {
3153
+ readonly onFailure: (e: E) => Effect<A2, E2, R2>;
3154
+ readonly onSuccess: (a: A) => Effect<A3, E3, R3>;
3155
+ }): Effect<A2 | A3, E2 | E3, R2 | R3 | R>;
3157
3156
  };
3158
3157
  /**
3159
3158
  * Logs the specified message or cause at the current log level.
@@ -3163,49 +3162,49 @@ export declare const matchEffect: {
3163
3162
  * @since 2.0.0
3164
3163
  * @category logging
3165
3164
  */
3166
- export declare const log: <A>(messageOrCause: A, supplementary?: A extends Cause.Cause<any> ? unknown : Cause.Cause<unknown>) => Effect<never, never, void>;
3165
+ export declare const log: <A>(messageOrCause: A, supplementary?: A extends Cause.Cause<any> ? unknown : Cause.Cause<unknown>) => Effect<void>;
3167
3166
  /**
3168
3167
  * Logs the specified message or cause at the Trace log level.
3169
3168
  *
3170
3169
  * @since 2.0.0
3171
3170
  * @category logging
3172
3171
  */
3173
- export declare const logTrace: <A>(messageOrCause: A, supplementary?: A extends Cause.Cause<any> ? unknown : Cause.Cause<unknown>) => Effect<never, never, void>;
3172
+ export declare const logTrace: <A>(messageOrCause: A, supplementary?: A extends Cause.Cause<any> ? unknown : Cause.Cause<unknown>) => Effect<void>;
3174
3173
  /**
3175
3174
  * Logs the specified message or cause at the Debug log level.
3176
3175
  *
3177
3176
  * @since 2.0.0
3178
3177
  * @category logging
3179
3178
  */
3180
- export declare const logDebug: <A>(messageOrCause: A, supplementary?: A extends Cause.Cause<any> ? unknown : Cause.Cause<unknown>) => Effect<never, never, void>;
3179
+ export declare const logDebug: <A>(messageOrCause: A, supplementary?: A extends Cause.Cause<any> ? unknown : Cause.Cause<unknown>) => Effect<void>;
3181
3180
  /**
3182
3181
  * Logs the specified message or cause at the Info log level.
3183
3182
  *
3184
3183
  * @since 2.0.0
3185
3184
  * @category logging
3186
3185
  */
3187
- export declare const logInfo: <A>(messageOrCause: A, supplementary?: A extends Cause.Cause<any> ? unknown : Cause.Cause<unknown>) => Effect<never, never, void>;
3186
+ export declare const logInfo: <A>(messageOrCause: A, supplementary?: A extends Cause.Cause<any> ? unknown : Cause.Cause<unknown>) => Effect<void>;
3188
3187
  /**
3189
3188
  * Logs the specified message or cause at the Warning log level.
3190
3189
  *
3191
3190
  * @since 2.0.0
3192
3191
  * @category logging
3193
3192
  */
3194
- export declare const logWarning: <A>(messageOrCause: A, supplementary?: A extends Cause.Cause<any> ? unknown : Cause.Cause<unknown>) => Effect<never, never, void>;
3193
+ export declare const logWarning: <A>(messageOrCause: A, supplementary?: A extends Cause.Cause<any> ? unknown : Cause.Cause<unknown>) => Effect<void>;
3195
3194
  /**
3196
3195
  * Logs the specified message or cause at the Error log level.
3197
3196
  *
3198
3197
  * @since 2.0.0
3199
3198
  * @category logging
3200
3199
  */
3201
- export declare const logError: <A>(messageOrCause: A, supplementary?: A extends Cause.Cause<any> ? unknown : Cause.Cause<unknown>) => Effect<never, never, void>;
3200
+ export declare const logError: <A>(messageOrCause: A, supplementary?: A extends Cause.Cause<any> ? unknown : Cause.Cause<unknown>) => Effect<void>;
3202
3201
  /**
3203
3202
  * Logs the specified message or cause at the Fatal log level.
3204
3203
  *
3205
3204
  * @since 2.0.0
3206
3205
  * @category logging
3207
3206
  */
3208
- export declare const logFatal: <A>(messageOrCause: A, supplementary?: A extends Cause.Cause<any> ? unknown : Cause.Cause<unknown>) => Effect<never, never, void>;
3207
+ export declare const logFatal: <A>(messageOrCause: A, supplementary?: A extends Cause.Cause<any> ? unknown : Cause.Cause<unknown>) => Effect<void>;
3209
3208
  /**
3210
3209
  * Adjusts the label for the current logging span.
3211
3210
  *
@@ -3213,8 +3212,8 @@ export declare const logFatal: <A>(messageOrCause: A, supplementary?: A extends
3213
3212
  * @category logging
3214
3213
  */
3215
3214
  export declare const withLogSpan: {
3216
- (label: string): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>;
3217
- <R, E, A>(effect: Effect<R, E, A>, label: string): Effect<R, E, A>;
3215
+ (label: string): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
3216
+ <A, E, R>(effect: Effect<A, E, R>, label: string): Effect<A, E, R>;
3218
3217
  };
3219
3218
  /**
3220
3219
  * Annotates each log in this effect with the specified log annotation.
@@ -3223,10 +3222,10 @@ export declare const withLogSpan: {
3223
3222
  * @category logging
3224
3223
  */
3225
3224
  export declare const annotateLogs: {
3226
- (key: string, value: unknown): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>;
3227
- (values: Record<string, unknown>): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>;
3228
- <R, E, A>(effect: Effect<R, E, A>, key: string, value: unknown): Effect<R, E, A>;
3229
- <R, E, A>(effect: Effect<R, E, A>, values: Record<string, unknown>): Effect<R, E, A>;
3225
+ (key: string, value: unknown): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
3226
+ (values: Record<string, unknown>): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
3227
+ <A, E, R>(effect: Effect<A, E, R>, key: string, value: unknown): Effect<A, E, R>;
3228
+ <A, E, R>(effect: Effect<A, E, R>, values: Record<string, unknown>): Effect<A, E, R>;
3230
3229
  };
3231
3230
  /**
3232
3231
  * Retrieves the log annotations associated with the current scope.
@@ -3234,7 +3233,7 @@ export declare const annotateLogs: {
3234
3233
  * @since 2.0.0
3235
3234
  * @category logging
3236
3235
  */
3237
- export declare const logAnnotations: Effect<never, never, HashMap.HashMap<string, unknown>>;
3236
+ export declare const logAnnotations: Effect<HashMap.HashMap<string, unknown>>;
3238
3237
  /**
3239
3238
  * Decides wether child fibers will report or not unhandled errors via the logger
3240
3239
  *
@@ -3242,8 +3241,8 @@ export declare const logAnnotations: Effect<never, never, HashMap.HashMap<string
3242
3241
  * @category logging
3243
3242
  */
3244
3243
  export declare const withUnhandledErrorLogLevel: {
3245
- (level: Option.Option<LogLevel>): <R, E, B>(self: Effect<R, E, B>) => Effect<R, E, B>;
3246
- <R, E, B>(self: Effect<R, E, B>, level: Option.Option<LogLevel>): Effect<R, E, B>;
3244
+ (level: Option.Option<LogLevel>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
3245
+ <A, E, R>(self: Effect<A, E, R>, level: Option.Option<LogLevel>): Effect<A, E, R>;
3247
3246
  };
3248
3247
  /**
3249
3248
  * Translates effect failure into death of the fiber, making all failures
@@ -3252,7 +3251,7 @@ export declare const withUnhandledErrorLogLevel: {
3252
3251
  * @since 2.0.0
3253
3252
  * @category alternatives
3254
3253
  */
3255
- export declare const orDie: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never, A>;
3254
+ export declare const orDie: <A, E, R>(self: Effect<A, E, R>) => Effect<A, never, R>;
3256
3255
  /**
3257
3256
  * Keeps none of the errors, and terminates the fiber with them, using the
3258
3257
  * specified function to convert the `E` into a `Throwable`.
@@ -3261,8 +3260,8 @@ export declare const orDie: <R, E, A>(self: Effect<R, E, A>) => Effect<R, never,
3261
3260
  * @category alternatives
3262
3261
  */
3263
3262
  export declare const orDieWith: {
3264
- <E>(f: (error: E) => unknown): <R, A>(self: Effect<R, E, A>) => Effect<R, never, A>;
3265
- <R, E, A>(self: Effect<R, E, A>, f: (error: E) => unknown): Effect<R, never, A>;
3263
+ <E>(f: (error: E) => unknown): <A, R>(self: Effect<A, E, R>) => Effect<A, never, R>;
3264
+ <A, E, R>(self: Effect<A, E, R>, f: (error: E) => unknown): Effect<A, never, R>;
3266
3265
  };
3267
3266
  /**
3268
3267
  * Executes this effect and returns its value, if it succeeds, but otherwise
@@ -3272,8 +3271,8 @@ export declare const orDieWith: {
3272
3271
  * @category alternatives
3273
3272
  */
3274
3273
  export declare const orElse: {
3275
- <R2, E2, A2>(that: LazyArg<Effect<R2, E2, A2>>): <R, E, A>(self: Effect<R, E, A>) => Effect<R2 | R, E2, A2 | A>;
3276
- <R, E, A, R2, E2, A2>(self: Effect<R, E, A>, that: LazyArg<Effect<R2, E2, A2>>): Effect<R | R2, E2, A | A2>;
3274
+ <A2, E2, R2>(that: LazyArg<Effect<A2, E2, R2>>): <A, E, R>(self: Effect<A, E, R>) => Effect<A2 | A, E2, R2 | R>;
3275
+ <A, E, R, A2, E2, R2>(self: Effect<A, E, R>, that: LazyArg<Effect<A2, E2, R2>>): Effect<A2 | A, E2, R2 | R>;
3277
3276
  };
3278
3277
  /**
3279
3278
  * Executes this effect and returns its value, if it succeeds, but otherwise
@@ -3283,8 +3282,8 @@ export declare const orElse: {
3283
3282
  * @category alternatives
3284
3283
  */
3285
3284
  export declare const orElseFail: {
3286
- <E2>(evaluate: LazyArg<E2>): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E2, A>;
3287
- <R, E, A, E2>(self: Effect<R, E, A>, evaluate: LazyArg<E2>): Effect<R, E2, A>;
3285
+ <E2>(evaluate: LazyArg<E2>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E2, R>;
3286
+ <A, E, R, E2>(self: Effect<A, E, R>, evaluate: LazyArg<E2>): Effect<A, E2, R>;
3288
3287
  };
3289
3288
  /**
3290
3289
  * Executes this effect and returns its value, if it succeeds, but
@@ -3294,8 +3293,8 @@ export declare const orElseFail: {
3294
3293
  * @category alternatives
3295
3294
  */
3296
3295
  export declare const orElseSucceed: {
3297
- <A2>(evaluate: LazyArg<A2>): <R, E, A>(self: Effect<R, E, A>) => Effect<R, never, A2 | A>;
3298
- <R, E, A, A2>(self: Effect<R, E, A>, evaluate: LazyArg<A2>): Effect<R, never, A | A2>;
3296
+ <A2>(evaluate: LazyArg<A2>): <A, E, R>(self: Effect<A, E, R>) => Effect<A2 | A, never, R>;
3297
+ <A, E, R, A2>(self: Effect<A, E, R>, evaluate: LazyArg<A2>): Effect<A | A2, never, R>;
3299
3298
  };
3300
3299
  /**
3301
3300
  * Retreives the `Random` service from the context.
@@ -3303,7 +3302,7 @@ export declare const orElseSucceed: {
3303
3302
  * @since 2.0.0
3304
3303
  * @category random
3305
3304
  */
3306
- export declare const random: Effect<never, never, Random.Random>;
3305
+ export declare const random: Effect<Random.Random>;
3307
3306
  /**
3308
3307
  * Retreives the `Random` service from the context and uses it to run the
3309
3308
  * specified workflow.
@@ -3311,7 +3310,7 @@ export declare const random: Effect<never, never, Random.Random>;
3311
3310
  * @since 2.0.0
3312
3311
  * @category random
3313
3312
  */
3314
- export declare const randomWith: <R, E, A>(f: (random: Random.Random) => Effect<R, E, A>) => Effect<R, E, A>;
3313
+ export declare const randomWith: <A, E, R>(f: (random: Random.Random) => Effect<A, E, R>) => Effect<A, E, R>;
3315
3314
  /**
3316
3315
  * Returns an effect that accesses the runtime, which can be used to
3317
3316
  * (unsafely) execute tasks. This is useful for integration with legacy code
@@ -3320,7 +3319,7 @@ export declare const randomWith: <R, E, A>(f: (random: Random.Random) => Effect<
3320
3319
  * @since 2.0.0
3321
3320
  * @category runtime
3322
3321
  */
3323
- export declare const runtime: <R>() => Effect<R, never, Runtime.Runtime<R>>;
3322
+ export declare const runtime: <R>() => Effect<Runtime.Runtime<R>, never, R>;
3324
3323
  /**
3325
3324
  * Retrieves an effect that succeeds with the current runtime flags, which
3326
3325
  * govern behavior and features of the runtime system.
@@ -3328,25 +3327,25 @@ export declare const runtime: <R>() => Effect<R, never, Runtime.Runtime<R>>;
3328
3327
  * @since 2.0.0
3329
3328
  * @category runtime
3330
3329
  */
3331
- export declare const getRuntimeFlags: Effect<never, never, RuntimeFlags.RuntimeFlags>;
3330
+ export declare const getRuntimeFlags: Effect<RuntimeFlags.RuntimeFlags>;
3332
3331
  /**
3333
3332
  * @since 2.0.0
3334
3333
  * @category runtime
3335
3334
  */
3336
- export declare const patchRuntimeFlags: (patch: RuntimeFlagsPatch.RuntimeFlagsPatch) => Effect<never, never, void>;
3335
+ export declare const patchRuntimeFlags: (patch: RuntimeFlagsPatch.RuntimeFlagsPatch) => Effect<void>;
3337
3336
  /**
3338
3337
  * @since 2.0.0
3339
3338
  * @category runtime
3340
3339
  */
3341
3340
  export declare const withRuntimeFlagsPatch: {
3342
- (update: RuntimeFlagsPatch.RuntimeFlagsPatch): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
3343
- <R, E, A>(self: Effect<R, E, A>, update: RuntimeFlagsPatch.RuntimeFlagsPatch): Effect<R, E, A>;
3341
+ (update: RuntimeFlagsPatch.RuntimeFlagsPatch): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
3342
+ <A, E, R>(self: Effect<A, E, R>, update: RuntimeFlagsPatch.RuntimeFlagsPatch): Effect<A, E, R>;
3344
3343
  };
3345
3344
  /**
3346
3345
  * @since 2.0.0
3347
3346
  * @category runtime
3348
3347
  */
3349
- export declare const withRuntimeFlagsPatchScoped: (update: RuntimeFlagsPatch.RuntimeFlagsPatch) => Effect<Scope.Scope, never, void>;
3348
+ export declare const withRuntimeFlagsPatchScoped: (update: RuntimeFlagsPatch.RuntimeFlagsPatch) => Effect<void, never, Scope.Scope>;
3350
3349
  /**
3351
3350
  * Tags each metric in this effect with the specific tag.
3352
3351
  *
@@ -3354,10 +3353,10 @@ export declare const withRuntimeFlagsPatchScoped: (update: RuntimeFlagsPatch.Run
3354
3353
  * @category metrics
3355
3354
  */
3356
3355
  export declare const tagMetrics: {
3357
- (key: string, value: string): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>;
3358
- (values: Record<string, string>): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>;
3359
- <R, E, A>(effect: Effect<R, E, A>, key: string, value: string): Effect<R, E, A>;
3360
- <R, E, A>(effect: Effect<R, E, A>, values: Record<string, string>): Effect<R, E, A>;
3356
+ (key: string, value: string): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
3357
+ (values: Record<string, string>): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
3358
+ <A, E, R>(effect: Effect<A, E, R>, key: string, value: string): Effect<A, E, R>;
3359
+ <A, E, R>(effect: Effect<A, E, R>, values: Record<string, string>): Effect<A, E, R>;
3361
3360
  };
3362
3361
  /**
3363
3362
  * Tags each metric in this effect with the specific tag.
@@ -3366,8 +3365,8 @@ export declare const tagMetrics: {
3366
3365
  * @category metrics
3367
3366
  */
3368
3367
  export declare const labelMetrics: {
3369
- (labels: Iterable<MetricLabel.MetricLabel>): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
3370
- <R, E, A>(self: Effect<R, E, A>, labels: Iterable<MetricLabel.MetricLabel>): Effect<R, E, A>;
3368
+ (labels: Iterable<MetricLabel.MetricLabel>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
3369
+ <A, E, R>(self: Effect<A, E, R>, labels: Iterable<MetricLabel.MetricLabel>): Effect<A, E, R>;
3371
3370
  };
3372
3371
  /**
3373
3372
  * Tags each metric in a scope with a the specific tag.
@@ -3375,28 +3374,28 @@ export declare const labelMetrics: {
3375
3374
  * @since 2.0.0
3376
3375
  * @category metrics
3377
3376
  */
3378
- export declare const tagMetricsScoped: (key: string, value: string) => Effect<Scope.Scope, never, void>;
3377
+ export declare const tagMetricsScoped: (key: string, value: string) => Effect<void, never, Scope.Scope>;
3379
3378
  /**
3380
3379
  * Tags each metric in a scope with a the specific tag.
3381
3380
  *
3382
3381
  * @since 2.0.0
3383
3382
  * @category metrics
3384
3383
  */
3385
- export declare const labelMetricsScoped: (labels: ReadonlyArray<MetricLabel.MetricLabel>) => Effect<Scope.Scope, never, void>;
3384
+ export declare const labelMetricsScoped: (labels: ReadonlyArray<MetricLabel.MetricLabel>) => Effect<void, never, Scope.Scope>;
3386
3385
  /**
3387
3386
  * Retrieves the metric labels associated with the current scope.
3388
3387
  *
3389
3388
  * @since 2.0.0
3390
3389
  * @category metrics
3391
3390
  */
3392
- export declare const metricLabels: Effect<never, never, ReadonlyArray<MetricLabel.MetricLabel>>;
3391
+ export declare const metricLabels: Effect<ReadonlyArray<MetricLabel.MetricLabel>>;
3393
3392
  /**
3394
3393
  * @since 2.0.0
3395
3394
  * @category metrics
3396
3395
  */
3397
3396
  export declare const withMetric: {
3398
- <Type, In, Out>(metric: Metric.Metric<Type, In, Out>): <R, E, A extends In>(self: Effect<R, E, A>) => Effect<R, E, A>;
3399
- <R, E, A extends In, Type, In, Out>(self: Effect<R, E, A>, metric: Metric.Metric<Type, In, Out>): Effect<R, E, A>;
3397
+ <Type, In, Out>(metric: Metric.Metric<Type, In, Out>): <R, E, A extends In>(self: Effect<A, E, R>) => Effect<A, E, R>;
3398
+ <R, E, A extends In, Type, In, Out>(self: Effect<A, E, R>, metric: Metric.Metric<Type, In, Out>): Effect<A, E, R>;
3400
3399
  };
3401
3400
  /**
3402
3401
  * Used to unify functions that would otherwise return `Effect<A, B, C> | Effect<D, E, F>`
@@ -3424,10 +3423,10 @@ export interface Permit {
3424
3423
  * @since 2.0.0
3425
3424
  */
3426
3425
  export interface Semaphore {
3427
- withPermits(permits: number): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
3428
- take(permits: number): Effect<never, never, number>;
3429
- release(permits: number): Effect<never, never, void>;
3430
- releaseAll: Effect<never, never, void>;
3426
+ withPermits(permits: number): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
3427
+ take(permits: number): Effect<number>;
3428
+ release(permits: number): Effect<void>;
3429
+ releaseAll: Effect<void>;
3431
3430
  }
3432
3431
  /**
3433
3432
  * Unsafely creates a new Semaphore
@@ -3442,17 +3441,17 @@ export declare const unsafeMakeSemaphore: (permits: number) => Semaphore;
3442
3441
  * @since 2.0.0
3443
3442
  * @category semaphore
3444
3443
  */
3445
- export declare const makeSemaphore: (permits: number) => Effect<never, never, Semaphore>;
3444
+ export declare const makeSemaphore: (permits: number) => Effect<Semaphore>;
3446
3445
  /**
3447
3446
  * @since 2.0.0
3448
3447
  * @category execution
3449
3448
  */
3450
- export declare const runFork: <E, A>(effect: Effect<never, E, A>, options?: Runtime.RunForkOptions) => Fiber.RuntimeFiber<E, A>;
3449
+ export declare const runFork: <A, E>(effect: Effect<A, E>, options?: Runtime.RunForkOptions) => Fiber.RuntimeFiber<A, E>;
3451
3450
  /**
3452
3451
  * @since 2.0.0
3453
3452
  * @category execution
3454
3453
  */
3455
- export declare const runCallback: <E, A>(effect: Effect<never, E, A>, options?: Runtime.RunCallbackOptions<E, A> | undefined) => Runtime.Cancel<E, A>;
3454
+ export declare const runCallback: <A, E>(effect: Effect<A, E>, options?: Runtime.RunCallbackOptions<A, E> | undefined) => Runtime.Cancel<A, E>;
3456
3455
  /**
3457
3456
  * Runs an `Effect` workflow, returning a `Promise` which resolves with the
3458
3457
  * result of the workflow or rejects with an error.
@@ -3460,7 +3459,7 @@ export declare const runCallback: <E, A>(effect: Effect<never, E, A>, options?:
3460
3459
  * @since 2.0.0
3461
3460
  * @category execution
3462
3461
  */
3463
- export declare const runPromise: <E, A>(effect: Effect<never, E, A>) => Promise<A>;
3462
+ export declare const runPromise: <A, E>(effect: Effect<A, E>) => Promise<A>;
3464
3463
  /**
3465
3464
  * Runs an `Effect` workflow, returning a `Promise` which resolves with the
3466
3465
  * `Exit` value of the workflow.
@@ -3468,17 +3467,17 @@ export declare const runPromise: <E, A>(effect: Effect<never, E, A>) => Promise<
3468
3467
  * @since 2.0.0
3469
3468
  * @category execution
3470
3469
  */
3471
- export declare const runPromiseExit: <E, A>(effect: Effect<never, E, A>) => Promise<Exit.Exit<E, A>>;
3470
+ export declare const runPromiseExit: <A, E>(effect: Effect<A, E>) => Promise<Exit.Exit<A, E>>;
3472
3471
  /**
3473
3472
  * @since 2.0.0
3474
3473
  * @category execution
3475
3474
  */
3476
- export declare const runSync: <E, A>(effect: Effect<never, E, A>) => A;
3475
+ export declare const runSync: <A, E>(effect: Effect<A, E>) => A;
3477
3476
  /**
3478
3477
  * @since 2.0.0
3479
3478
  * @category execution
3480
3479
  */
3481
- export declare const runSyncExit: <E, A>(effect: Effect<never, E, A>) => Exit.Exit<E, A>;
3480
+ export declare const runSyncExit: <A, E>(effect: Effect<A, E>) => Exit.Exit<A, E>;
3482
3481
  /**
3483
3482
  * Sequentially zips the this result with the specified result. Combines both
3484
3483
  * `Cause`s when both effects fail.
@@ -3487,14 +3486,18 @@ export declare const runSyncExit: <E, A>(effect: Effect<never, E, A>) => Exit.Ex
3487
3486
  * @category zipping
3488
3487
  */
3489
3488
  export declare const validate: {
3490
- <R1, E1, B>(that: Effect<R1, E1, B>, options?: {
3489
+ <B, E1, R1>(that: Effect<B, E1, R1>, options?: {
3490
+ /**
3491
+ * @since 2.0.0
3492
+ * @category supervision & fibers
3493
+ */
3491
3494
  readonly concurrent?: boolean | undefined;
3492
3495
  readonly batching?: boolean | "inherit" | undefined;
3493
- }): <R, E, A>(self: Effect<R, E, A>) => Effect<R1 | R, E1 | E, [A, B]>;
3494
- <R, E, A, R1, E1, B>(self: Effect<R, E, A>, that: Effect<R1, E1, B>, options?: {
3496
+ } | undefined): <A, E, R>(self: Effect<A, E, R>) => Effect<[A, B], E1 | E, R1 | R>;
3497
+ <A, E, R, B, E1, R1>(self: Effect<A, E, R>, that: Effect<B, E1, R1>, options?: {
3495
3498
  readonly concurrent?: boolean | undefined;
3496
3499
  readonly batching?: boolean | "inherit" | undefined;
3497
- }): Effect<R | R1, E | E1, [A, B]>;
3500
+ } | undefined): Effect<[A, B], E | E1, R | R1>;
3498
3501
  };
3499
3502
  /**
3500
3503
  * Sequentially zips this effect with the specified effect using the specified
@@ -3504,162 +3507,162 @@ export declare const validate: {
3504
3507
  * @category zipping
3505
3508
  */
3506
3509
  export declare const validateWith: {
3507
- <A, R1, E1, B, C>(that: Effect<R1, E1, B>, f: (a: A, b: B) => C, options?: {
3510
+ <B, E1, R1, A, C>(that: Effect<B, E1, R1>, f: (a: A, b: B) => C, options?: {
3508
3511
  readonly concurrent?: boolean | undefined;
3509
3512
  readonly batching?: boolean | "inherit" | undefined;
3510
- }): <R, E>(self: Effect<R, E, A>) => Effect<R1 | R, E1 | E, C>;
3511
- <R, E, A, R1, E1, B, C>(self: Effect<R, E, A>, that: Effect<R1, E1, B>, f: (a: A, b: B) => C, options?: {
3513
+ } | undefined): <E, R>(self: Effect<A, E, R>) => Effect<C, E1 | E, R1 | R>;
3514
+ <A, E, R, B, E1, R1, C>(self: Effect<A, E, R>, that: Effect<B, E1, R1>, f: (a: A, b: B) => C, options?: {
3512
3515
  readonly concurrent?: boolean | undefined;
3513
3516
  readonly batching?: boolean | "inherit" | undefined;
3514
- }): Effect<R | R1, E | E1, C>;
3517
+ } | undefined): Effect<C, E | E1, R | R1>;
3515
3518
  };
3516
3519
  /**
3517
3520
  * @since 2.0.0
3518
3521
  * @category zipping
3519
3522
  */
3520
3523
  export declare const zip: {
3521
- <R2, E2, A2>(that: Effect<R2, E2, A2>, options?: {
3524
+ <A2, E2, R2>(that: Effect<A2, E2, R2>, options?: {
3522
3525
  readonly concurrent?: boolean | undefined;
3523
3526
  readonly batching?: boolean | "inherit" | undefined;
3524
- }): <R, E, A>(self: Effect<R, E, A>) => Effect<R2 | R, E2 | E, [A, A2]>;
3525
- <R, E, A, R2, E2, A2>(self: Effect<R, E, A>, that: Effect<R2, E2, A2>, options?: {
3527
+ } | undefined): <A, E, R>(self: Effect<A, E, R>) => Effect<[A, A2], E2 | E, R2 | R>;
3528
+ <A, E, R, A2, E2, R2>(self: Effect<A, E, R>, that: Effect<A2, E2, R2>, options?: {
3526
3529
  readonly concurrent?: boolean | undefined;
3527
3530
  readonly batching?: boolean | "inherit" | undefined;
3528
- }): Effect<R | R2, E | E2, [A, A2]>;
3531
+ } | undefined): Effect<[A, A2], E | E2, R | R2>;
3529
3532
  };
3530
3533
  /**
3531
3534
  * @since 2.0.0
3532
3535
  * @category zipping
3533
3536
  */
3534
3537
  export declare const zipLeft: {
3535
- <R2, E2, A2>(that: Effect<R2, E2, A2>, options?: {
3538
+ <A2, E2, R2>(that: Effect<A2, E2, R2>, options?: {
3536
3539
  readonly concurrent?: boolean | undefined;
3537
3540
  readonly batching?: boolean | "inherit" | undefined;
3538
- }): <R, E, A>(self: Effect<R, E, A>) => Effect<R2 | R, E2 | E, A>;
3539
- <R, E, A, R2, E2, A2>(self: Effect<R, E, A>, that: Effect<R2, E2, A2>, options?: {
3541
+ } | undefined): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E2 | E, R2 | R>;
3542
+ <A, E, R, A2, E2, R2>(self: Effect<A, E, R>, that: Effect<A2, E2, R2>, options?: {
3540
3543
  readonly concurrent?: boolean | undefined;
3541
3544
  readonly batching?: boolean | "inherit" | undefined;
3542
- }): Effect<R | R2, E | E2, A>;
3545
+ } | undefined): Effect<A, E | E2, R | R2>;
3543
3546
  };
3544
3547
  /**
3545
3548
  * @since 2.0.0
3546
3549
  * @category zipping
3547
3550
  */
3548
3551
  export declare const zipRight: {
3549
- <R2, E2, A2>(that: Effect<R2, E2, A2>, options?: {
3552
+ <A2, E2, R2>(that: Effect<A2, E2, R2>, options?: {
3550
3553
  readonly concurrent?: boolean | undefined;
3551
3554
  readonly batching?: boolean | "inherit" | undefined;
3552
- }): <R, E, A>(self: Effect<R, E, A>) => Effect<R2 | R, E2 | E, A2>;
3553
- <R, E, A, R2, E2, A2>(self: Effect<R, E, A>, that: Effect<R2, E2, A2>, options?: {
3555
+ }): <A, E, R>(self: Effect<A, E, R>) => Effect<A2, E2 | E, R2 | R>;
3556
+ <A, E, R, A2, E2, R2>(self: Effect<A, E, R>, that: Effect<A2, E2, R2>, options?: {
3554
3557
  readonly concurrent?: boolean | undefined;
3555
3558
  readonly batching?: boolean | "inherit" | undefined;
3556
- }): Effect<R | R2, E | E2, A2>;
3559
+ }): Effect<A2, E2 | E, R2 | R>;
3557
3560
  };
3558
3561
  /**
3559
3562
  * @since 2.0.0
3560
3563
  * @category zipping
3561
3564
  */
3562
3565
  export declare const zipWith: {
3563
- <R2, E2, A2, A, B>(that: Effect<R2, E2, A2>, f: (a: A, b: A2) => B, options?: {
3566
+ <A2, E2, R2, A, B>(that: Effect<A2, E2, R2>, f: (a: A, b: A2) => B, options?: {
3564
3567
  readonly concurrent?: boolean | undefined;
3565
3568
  readonly batching?: boolean | "inherit" | undefined;
3566
- }): <R, E>(self: Effect<R, E, A>) => Effect<R2 | R, E2 | E, B>;
3567
- <R, E, A, R2, E2, A2, B>(self: Effect<R, E, A>, that: Effect<R2, E2, A2>, f: (a: A, b: A2) => B, options?: {
3569
+ }): <E, R>(self: Effect<A, E, R>) => Effect<B, E2 | E, R2 | R>;
3570
+ <A, E, R, A2, E2, R2, B>(self: Effect<A, E, R>, that: Effect<A2, E2, R2>, f: (a: A, b: A2) => B, options?: {
3568
3571
  readonly concurrent?: boolean | undefined;
3569
3572
  readonly batching?: boolean | "inherit" | undefined;
3570
- }): Effect<R | R2, E | E2, B>;
3573
+ }): Effect<B, E2 | E, R2 | R>;
3571
3574
  };
3572
3575
  /**
3573
3576
  * @category combining
3574
3577
  * @since 2.0.0
3575
3578
  */
3576
3579
  export declare const ap: {
3577
- <R2, E2, A>(that: Effect<R2, E2, A>): <R, E, B>(self: Effect<R, E, (a: A) => B>) => Effect<R | R2, E | E2, B>;
3578
- <R, E, A, B, R2, E2>(self: Effect<R, E, (a: A) => B>, that: Effect<R2, E2, A>): Effect<R | R2, E | E2, B>;
3580
+ <A, E2, R2>(that: Effect<A, E2, R2>): <B, R, E>(self: Effect<(a: A) => B, E, R>) => Effect<B, E | E2, R | R2>;
3581
+ <A, B, E, R, E2, R2>(self: Effect<(a: A) => B, E, R>, that: Effect<A, E2, R2>): Effect<B, E | E2, R | R2>;
3579
3582
  };
3580
3583
  /**
3581
3584
  * @category requests & batching
3582
3585
  * @since 2.0.0
3583
3586
  */
3584
- export declare const blocked: <E, A>(blockedRequests: RequestBlock, _continue: Effect<never, E, A>) => Blocked<E, A>;
3587
+ export declare const blocked: <A, E>(blockedRequests: RequestBlock, _continue: Effect<A, E>) => Blocked<A, E>;
3585
3588
  /**
3586
3589
  * @category requests & batching
3587
3590
  * @since 2.0.0
3588
3591
  */
3589
- export declare const runRequestBlock: <R>(blockedRequests: RequestBlock) => Effect<R, never, void>;
3592
+ export declare const runRequestBlock: (blockedRequests: RequestBlock) => Effect<void>;
3590
3593
  /**
3591
3594
  * @category requests & batching
3592
3595
  * @since 2.0.0
3593
3596
  */
3594
- export declare const step: <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, Exit.Exit<E, A> | Blocked<E, A>>;
3597
+ export declare const step: <A, E, R>(self: Effect<A, E, R>) => Effect<Exit.Exit<A, E> | Blocked<A, E>, never, R>;
3595
3598
  /**
3596
3599
  * @since 2.0.0
3597
3600
  * @category requests & batching
3598
3601
  */
3599
3602
  export declare const request: {
3600
- <A extends Request.Request<any, any>, Ds extends RequestResolver<A, never> | Effect<any, any, RequestResolver<A, never>>>(request: A, dataSource: Ds): Effect<[
3603
+ <A extends Request.Request<any, any>, Ds extends RequestResolver<A> | Effect<RequestResolver<A>, any, any>>(request: A, dataSource: Ds): Effect<Request.Request.Success<A>, Request.Request.Error<A>, [
3601
3604
  Ds
3602
- ] extends [Effect<any, any, any>] ? Effect.Context<Ds> : never, Request.Request.Error<A>, Request.Request.Success<A>>;
3605
+ ] extends [Effect<any, any, any>] ? Effect.Context<Ds> : never>;
3603
3606
  };
3604
3607
  /**
3605
3608
  * @since 2.0.0
3606
3609
  * @category requests & batching
3607
3610
  */
3608
- export declare const cacheRequestResult: <A extends Request.Request<any, any>>(request: A, result: Request.Request.Result<A>) => Effect<never, never, void>;
3611
+ export declare const cacheRequestResult: <A extends Request.Request<any, any>>(request: A, result: Request.Request.Result<A>) => Effect<void>;
3609
3612
  /**
3610
3613
  * @since 2.0.0
3611
3614
  * @category requests & batching
3612
3615
  */
3613
3616
  export declare const withRequestBatching: {
3614
- (requestBatching: boolean): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
3615
- <R, E, A>(self: Effect<R, E, A>, requestBatching: boolean): Effect<R, E, A>;
3617
+ (requestBatching: boolean): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
3618
+ <A, E, R>(self: Effect<A, E, R>, requestBatching: boolean): Effect<A, E, R>;
3616
3619
  };
3617
3620
  /**
3618
3621
  * @since 2.0.0
3619
3622
  * @category requests & batching
3620
3623
  */
3621
3624
  export declare const withRequestCaching: {
3622
- (strategy: boolean): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
3623
- <R, E, A>(self: Effect<R, E, A>, strategy: boolean): Effect<R, E, A>;
3625
+ (strategy: boolean): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
3626
+ <A, E, R>(self: Effect<A, E, R>, strategy: boolean): Effect<A, E, R>;
3624
3627
  };
3625
3628
  /**
3626
3629
  * @since 2.0.0
3627
3630
  * @category requests & batching
3628
3631
  */
3629
3632
  export declare const withRequestCache: {
3630
- (cache: Request.Cache): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
3631
- <R, E, A>(self: Effect<R, E, A>, cache: Request.Cache): Effect<R, E, A>;
3633
+ (cache: Request.Cache): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
3634
+ <A, E, R>(self: Effect<A, E, R>, cache: Request.Cache): Effect<A, E, R>;
3632
3635
  };
3633
3636
  /**
3634
3637
  * @since 2.0.0
3635
3638
  * @category tracing
3636
3639
  */
3637
- export declare const tracer: Effect<never, never, Tracer.Tracer>;
3640
+ export declare const tracer: Effect<Tracer.Tracer>;
3638
3641
  /**
3639
3642
  * @since 2.0.0
3640
3643
  * @category tracing
3641
3644
  */
3642
- export declare const tracerWith: <R, E, A>(f: (tracer: Tracer.Tracer) => Effect<R, E, A>) => Effect<R, E, A>;
3645
+ export declare const tracerWith: <A, E, R>(f: (tracer: Tracer.Tracer) => Effect<A, E, R>) => Effect<A, E, R>;
3643
3646
  /**
3644
3647
  * @since 2.0.0
3645
3648
  * @category tracing
3646
3649
  */
3647
3650
  export declare const withTracer: {
3648
- (value: Tracer.Tracer): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>;
3649
- <R, E, A>(effect: Effect<R, E, A>, value: Tracer.Tracer): Effect<R, E, A>;
3651
+ (value: Tracer.Tracer): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
3652
+ <A, E, R>(effect: Effect<A, E, R>, value: Tracer.Tracer): Effect<A, E, R>;
3650
3653
  };
3651
3654
  /**
3652
3655
  * @since 2.0.0
3653
3656
  * @category tracing
3654
3657
  */
3655
- export declare const withTracerScoped: (value: Tracer.Tracer) => Effect<Scope.Scope, never, void>;
3658
+ export declare const withTracerScoped: (value: Tracer.Tracer) => Effect<void, never, Scope.Scope>;
3656
3659
  /**
3657
3660
  * @since 2.0.0
3658
3661
  * @category tracing
3659
3662
  */
3660
3663
  export declare const withTracerTiming: {
3661
- (enabled: boolean): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>;
3662
- <R, E, A>(effect: Effect<R, E, A>, enabled: boolean): Effect<R, E, A>;
3664
+ (enabled: boolean): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
3665
+ <A, E, R>(effect: Effect<A, E, R>, enabled: boolean): Effect<A, E, R>;
3663
3666
  };
3664
3667
  /**
3665
3668
  * Adds an annotation to each span in this effect.
@@ -3668,10 +3671,10 @@ export declare const withTracerTiming: {
3668
3671
  * @category tracing
3669
3672
  */
3670
3673
  export declare const annotateSpans: {
3671
- (key: string, value: unknown): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>;
3672
- (values: Record<string, unknown>): <R, E, A>(effect: Effect<R, E, A>) => Effect<R, E, A>;
3673
- <R, E, A>(effect: Effect<R, E, A>, key: string, value: unknown): Effect<R, E, A>;
3674
- <R, E, A>(effect: Effect<R, E, A>, values: Record<string, unknown>): Effect<R, E, A>;
3674
+ (key: string, value: unknown): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
3675
+ (values: Record<string, unknown>): <A, E, R>(effect: Effect<A, E, R>) => Effect<A, E, R>;
3676
+ <A, E, R>(effect: Effect<A, E, R>, key: string, value: unknown): Effect<A, E, R>;
3677
+ <A, E, R>(effect: Effect<A, E, R>, values: Record<string, unknown>): Effect<A, E, R>;
3675
3678
  };
3676
3679
  /**
3677
3680
  * Adds an annotation to the current span if available
@@ -3680,29 +3683,29 @@ export declare const annotateSpans: {
3680
3683
  * @category tracing
3681
3684
  */
3682
3685
  export declare const annotateCurrentSpan: {
3683
- (key: string, value: unknown): Effect<never, never, void>;
3684
- (values: Record<string, unknown>): Effect<never, never, void>;
3686
+ (key: string, value: unknown): Effect<void>;
3687
+ (values: Record<string, unknown>): Effect<void>;
3685
3688
  };
3686
3689
  /**
3687
3690
  * @since 2.0.0
3688
3691
  * @category tracing
3689
3692
  */
3690
- export declare const currentSpan: Effect<never, Cause.NoSuchElementException, Tracer.Span>;
3693
+ export declare const currentSpan: Effect<Tracer.Span, Cause.NoSuchElementException>;
3691
3694
  /**
3692
3695
  * @since 2.0.0
3693
3696
  * @category tracing
3694
3697
  */
3695
- export declare const currentParentSpan: Effect<never, Cause.NoSuchElementException, Tracer.ParentSpan>;
3698
+ export declare const currentParentSpan: Effect<Tracer.ParentSpan, Cause.NoSuchElementException>;
3696
3699
  /**
3697
3700
  * @since 2.0.0
3698
3701
  * @category tracing
3699
3702
  */
3700
- export declare const spanAnnotations: Effect<never, never, HashMap.HashMap<string, unknown>>;
3703
+ export declare const spanAnnotations: Effect<HashMap.HashMap<string, unknown>>;
3701
3704
  /**
3702
3705
  * @since 2.0.0
3703
3706
  * @category tracing
3704
3707
  */
3705
- export declare const spanLinks: Effect<never, never, Chunk.Chunk<Tracer.SpanLink>>;
3708
+ export declare const spanLinks: Effect<Chunk.Chunk<Tracer.SpanLink>>;
3706
3709
  /**
3707
3710
  * For all spans in this effect, add a link with the provided span.
3708
3711
  *
@@ -3710,8 +3713,8 @@ export declare const spanLinks: Effect<never, never, Chunk.Chunk<Tracer.SpanLink
3710
3713
  * @category tracing
3711
3714
  */
3712
3715
  export declare const linkSpans: {
3713
- (span: Tracer.ParentSpan, attributes?: Record<string, unknown>): <R, E, A>(self: Effect<R, E, A>) => Effect<R, E, A>;
3714
- <R, E, A>(self: Effect<R, E, A>, span: Tracer.ParentSpan, attributes?: Record<string, unknown>): Effect<R, E, A>;
3716
+ (span: Tracer.ParentSpan, attributes?: Record<string, unknown>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R>;
3717
+ <A, E, R>(self: Effect<A, E, R>, span: Tracer.ParentSpan, attributes?: Record<string, unknown>): Effect<A, E, R>;
3715
3718
  };
3716
3719
  /**
3717
3720
  * Create a new span for tracing.
@@ -3725,7 +3728,7 @@ export declare const makeSpan: (name: string, options?: {
3725
3728
  readonly parent?: Tracer.ParentSpan | undefined;
3726
3729
  readonly root?: boolean | undefined;
3727
3730
  readonly context?: Context.Context<never> | undefined;
3728
- }) => Effect<never, never, Tracer.Span>;
3731
+ }) => Effect<Tracer.Span>;
3729
3732
  /**
3730
3733
  * Create a new span for tracing, and automatically close it when the Scope
3731
3734
  * finalizes.
@@ -3742,7 +3745,7 @@ export declare const makeSpanScoped: (name: string, options?: {
3742
3745
  readonly parent?: Tracer.ParentSpan | undefined;
3743
3746
  readonly root?: boolean | undefined;
3744
3747
  readonly context?: Context.Context<never> | undefined;
3745
- }) => Effect<Scope.Scope, never, Tracer.Span>;
3748
+ }) => Effect<Tracer.Span, never, Scope.Scope>;
3746
3749
  /**
3747
3750
  * Create a new span for tracing, and automatically close it when the effect
3748
3751
  * completes.
@@ -3754,14 +3757,14 @@ export declare const makeSpanScoped: (name: string, options?: {
3754
3757
  * @category tracing
3755
3758
  */
3756
3759
  export declare const useSpan: {
3757
- <R, E, A>(name: string, evaluate: (span: Tracer.Span) => Effect<R, E, A>): Effect<R, E, A>;
3758
- <R, E, A>(name: string, options: {
3760
+ <A, E, R>(name: string, evaluate: (span: Tracer.Span) => Effect<A, E, R>): Effect<A, E, R>;
3761
+ <A, E, R>(name: string, options: {
3759
3762
  readonly attributes?: Record<string, unknown> | undefined;
3760
3763
  readonly links?: ReadonlyArray<Tracer.SpanLink> | undefined;
3761
3764
  readonly parent?: Tracer.ParentSpan | undefined;
3762
3765
  readonly root?: boolean | undefined;
3763
3766
  readonly context?: Context.Context<never> | undefined;
3764
- }, evaluate: (span: Tracer.Span) => Effect<R, E, A>): Effect<R, E, A>;
3767
+ }, evaluate: (span: Tracer.Span) => Effect<A, E, R>): Effect<A, E, R>;
3765
3768
  };
3766
3769
  /**
3767
3770
  * Wraps the effect with a new span for tracing.
@@ -3776,14 +3779,14 @@ export declare const withSpan: {
3776
3779
  readonly parent?: Tracer.ParentSpan | undefined;
3777
3780
  readonly root?: boolean | undefined;
3778
3781
  readonly context?: Context.Context<never> | undefined;
3779
- }): <R, E, A>(self: Effect<R, E, A>) => Effect<Exclude<R, Tracer.ParentSpan>, E, A>;
3780
- <R, E, A>(self: Effect<R, E, A>, name: string, options?: {
3782
+ } | undefined): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, Exclude<R, Tracer.ParentSpan>>;
3783
+ <A, E, R>(self: Effect<A, E, R>, name: string, options?: {
3781
3784
  readonly attributes?: Record<string, unknown> | undefined;
3782
3785
  readonly links?: ReadonlyArray<Tracer.SpanLink> | undefined;
3783
3786
  readonly parent?: Tracer.ParentSpan | undefined;
3784
3787
  readonly root?: boolean | undefined;
3785
3788
  readonly context?: Context.Context<never> | undefined;
3786
- }): Effect<Exclude<R, Tracer.ParentSpan>, E, A>;
3789
+ } | undefined): Effect<A, E, Exclude<R, Tracer.ParentSpan>>;
3787
3790
  };
3788
3791
  /**
3789
3792
  * Wraps the effect with a new span for tracing.
@@ -3800,14 +3803,14 @@ export declare const withSpanScoped: {
3800
3803
  readonly parent?: Tracer.ParentSpan | undefined;
3801
3804
  readonly root?: boolean | undefined;
3802
3805
  readonly context?: Context.Context<never> | undefined;
3803
- }): <R, E, A>(self: Effect<R, E, A>) => Effect<Exclude<R, Tracer.ParentSpan> | Scope.Scope, E, A>;
3804
- <R, E, A>(self: Effect<R, E, A>, name: string, options?: {
3806
+ }): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, Exclude<R, Tracer.ParentSpan> | Scope.Scope>;
3807
+ <A, E, R>(self: Effect<A, E, R>, name: string, options?: {
3805
3808
  readonly attributes?: Record<string, unknown> | undefined;
3806
3809
  readonly links?: ReadonlyArray<Tracer.SpanLink> | undefined;
3807
3810
  readonly parent?: Tracer.ParentSpan | undefined;
3808
3811
  readonly root?: boolean | undefined;
3809
3812
  readonly context?: Context.Context<never> | undefined;
3810
- }): Effect<Scope.Scope | Exclude<R, Tracer.ParentSpan>, E, A>;
3813
+ }): Effect<A, E, Exclude<R, Tracer.ParentSpan> | Scope.Scope>;
3811
3814
  };
3812
3815
  /**
3813
3816
  * Adds the provided span to the current span stack.
@@ -3816,8 +3819,8 @@ export declare const withSpanScoped: {
3816
3819
  * @category tracing
3817
3820
  */
3818
3821
  export declare const withParentSpan: {
3819
- (span: Tracer.ParentSpan): <R, E, A>(self: Effect<R, E, A>) => Effect<Exclude<R, Tracer.ParentSpan>, E, A>;
3820
- <R, E, A>(self: Effect<R, E, A>, span: Tracer.ParentSpan): Effect<Exclude<R, Tracer.ParentSpan>, E, A>;
3822
+ (span: Tracer.ParentSpan): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, Exclude<R, Tracer.ParentSpan>>;
3823
+ <A, E, R>(self: Effect<A, E, R>, span: Tracer.ParentSpan): Effect<A, E, Exclude<R, Tracer.ParentSpan>>;
3821
3824
  };
3822
3825
  /**
3823
3826
  * Returns an effect that errors with `NoSuchElementException` if the value is
@@ -3826,7 +3829,7 @@ export declare const withParentSpan: {
3826
3829
  * @since 2.0.0
3827
3830
  * @category optionality
3828
3831
  */
3829
- export declare const fromNullable: <A>(value: A) => Effect<never, Cause.NoSuchElementException, NonNullable<A>>;
3832
+ export declare const fromNullable: <A>(value: A) => Effect<NonNullable<A>, Cause.NoSuchElementException>;
3830
3833
  /**
3831
3834
  * Wraps the success value of this effect with `Option.some`, and maps
3832
3835
  * `Cause.NoSuchElementException` to `Option.none`.
@@ -3834,5 +3837,5 @@ export declare const fromNullable: <A>(value: A) => Effect<never, Cause.NoSuchEl
3834
3837
  * @since 2.0.0
3835
3838
  * @category optionality
3836
3839
  */
3837
- export declare const optionFromOptional: <R, E, A>(self: Effect<R, E, A>) => Effect<R, Exclude<E, Cause.NoSuchElementException>, Option.Option<A>>;
3840
+ export declare const optionFromOptional: <A, E, R>(self: Effect<A, E, R>) => Effect<Option.Option<A>, Exclude<E, Cause.NoSuchElementException>, R>;
3838
3841
  //# sourceMappingURL=Effect.d.ts.map