@fncts/io 0.0.31 → 0.0.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (342) hide show
  1. package/Channel/api/runScoped.d.ts +1 -0
  2. package/Channel/api.d.ts +1 -0
  3. package/Channel/internal/ChannelExecutor.d.ts +2 -2
  4. package/Fiber/FiberMessage.d.ts +5 -5
  5. package/Fiber/FiberRuntime.d.ts +3 -3
  6. package/IO/api/provideSomeLayer.d.ts +1 -2
  7. package/IO/api/zipConcurrent.d.ts +2 -1
  8. package/IO/api.d.ts +2 -1
  9. package/IO/definition.d.ts +34 -24
  10. package/IO/runtime.d.ts +10 -18
  11. package/STM/definition.d.ts +1 -1
  12. package/Stream/api.d.ts +113 -5
  13. package/_cjs/Channel/api/mapOutConcurrentIO.cjs +1 -1
  14. package/_cjs/Channel/api/mapOutConcurrentIO.cjs.map +1 -1
  15. package/_cjs/Channel/api/mergeAllWith.cjs +3 -3
  16. package/_cjs/Channel/api/mergeAllWith.cjs.map +1 -1
  17. package/_cjs/Channel/api/mergeWith.cjs +4 -4
  18. package/_cjs/Channel/api/mergeWith.cjs.map +1 -1
  19. package/_cjs/Channel/api/runScoped.cjs +19 -3
  20. package/_cjs/Channel/api/runScoped.cjs.map +1 -1
  21. package/_cjs/Channel/api/toPull.cjs +3 -3
  22. package/_cjs/Channel/api/toPull.cjs.map +1 -1
  23. package/_cjs/Channel/api.cjs +8 -7
  24. package/_cjs/Channel/api.cjs.map +1 -1
  25. package/_cjs/Channel/internal/ChannelExecutor.cjs +71 -62
  26. package/_cjs/Channel/internal/ChannelExecutor.cjs.map +1 -1
  27. package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs +3 -3
  28. package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs.map +1 -1
  29. package/_cjs/Clock/live.cjs +1 -1
  30. package/_cjs/Clock/live.cjs.map +1 -1
  31. package/_cjs/Fiber/FiberMessage.cjs +12 -11
  32. package/_cjs/Fiber/FiberMessage.cjs.map +1 -1
  33. package/_cjs/Fiber/FiberRuntime.cjs +102 -70
  34. package/_cjs/Fiber/FiberRuntime.cjs.map +1 -1
  35. package/_cjs/Fiber/api/collectAll.cjs +1 -1
  36. package/_cjs/Fiber/api/collectAll.cjs.map +1 -1
  37. package/_cjs/Fiber/api/mapIO.cjs +1 -1
  38. package/_cjs/Fiber/api/mapIO.cjs.map +1 -1
  39. package/_cjs/Fiber/api/zipWith.cjs +1 -1
  40. package/_cjs/Fiber/api/zipWith.cjs.map +1 -1
  41. package/_cjs/Fiber/constructors.cjs +5 -5
  42. package/_cjs/Fiber/constructors.cjs.map +1 -1
  43. package/_cjs/FiberRef/unsafe.cjs +3 -2
  44. package/_cjs/FiberRef/unsafe.cjs.map +1 -1
  45. package/_cjs/FiberScope/definition.cjs +2 -2
  46. package/_cjs/FiberScope/definition.cjs.map +1 -1
  47. package/_cjs/Future/api.cjs +4 -4
  48. package/_cjs/Future/api.cjs.map +1 -1
  49. package/_cjs/Hub/api.cjs.map +1 -1
  50. package/_cjs/Hub/internal.cjs +1 -1
  51. package/_cjs/Hub/internal.cjs.map +1 -1
  52. package/_cjs/IO/api/asyncIO.cjs +1 -1
  53. package/_cjs/IO/api/asyncIO.cjs.map +1 -1
  54. package/_cjs/IO/api/asyncInterrupt.cjs +2 -2
  55. package/_cjs/IO/api/asyncInterrupt.cjs.map +1 -1
  56. package/_cjs/IO/api/concurrency.cjs +3 -3
  57. package/_cjs/IO/api/concurrency.cjs.map +1 -1
  58. package/_cjs/IO/api/daemonChildren.cjs +1 -1
  59. package/_cjs/IO/api/daemonChildren.cjs.map +1 -1
  60. package/_cjs/IO/api/fork.cjs +2 -1
  61. package/_cjs/IO/api/fork.cjs.map +1 -1
  62. package/_cjs/IO/api/interrupt.cjs +2 -2
  63. package/_cjs/IO/api/interrupt.cjs.map +1 -1
  64. package/_cjs/IO/api/provideSomeLayer.cjs.map +1 -1
  65. package/_cjs/IO/api/raceWith.cjs +9 -12
  66. package/_cjs/IO/api/raceWith.cjs.map +1 -1
  67. package/_cjs/IO/api/repeat.cjs +2 -2
  68. package/_cjs/IO/api/repeat.cjs.map +1 -1
  69. package/_cjs/IO/api/stateful.cjs +3 -3
  70. package/_cjs/IO/api/stateful.cjs.map +1 -1
  71. package/_cjs/IO/api/timeout.cjs +1 -1
  72. package/_cjs/IO/api/timeout.cjs.map +1 -1
  73. package/_cjs/IO/api/transplant.cjs +1 -1
  74. package/_cjs/IO/api/transplant.cjs.map +1 -1
  75. package/_cjs/IO/api/withChildren.cjs +5 -4
  76. package/_cjs/IO/api/withChildren.cjs.map +1 -1
  77. package/_cjs/IO/api/withEarlyRelease.cjs +1 -1
  78. package/_cjs/IO/api/withEarlyRelease.cjs.map +1 -1
  79. package/_cjs/IO/api/zipConcurrent.cjs +23 -23
  80. package/_cjs/IO/api/zipConcurrent.cjs.map +1 -1
  81. package/_cjs/IO/api.cjs +33 -32
  82. package/_cjs/IO/api.cjs.map +1 -1
  83. package/_cjs/IO/definition.cjs +17 -31
  84. package/_cjs/IO/definition.cjs.map +1 -1
  85. package/_cjs/IO/runtime.cjs +47 -40
  86. package/_cjs/IO/runtime.cjs.map +1 -1
  87. package/_cjs/Logger/api.cjs +3 -2
  88. package/_cjs/Logger/api.cjs.map +1 -1
  89. package/_cjs/MVar/api.cjs +11 -11
  90. package/_cjs/MVar/api.cjs.map +1 -1
  91. package/_cjs/Push/api.cjs +3 -3
  92. package/_cjs/Push/api.cjs.map +1 -1
  93. package/_cjs/Push/internal.cjs +1 -1
  94. package/_cjs/Push/internal.cjs.map +1 -1
  95. package/_cjs/Queue/api/filterInputIO.cjs +2 -2
  96. package/_cjs/Queue/api/filterInputIO.cjs.map +1 -1
  97. package/_cjs/Queue/api/filterOutputIO.cjs.map +1 -1
  98. package/_cjs/Ref/Derived.cjs +4 -4
  99. package/_cjs/Ref/Derived.cjs.map +1 -1
  100. package/_cjs/Ref/DerivedAll.cjs +5 -5
  101. package/_cjs/Ref/DerivedAll.cjs.map +1 -1
  102. package/_cjs/Ref/Synchronized/api.cjs +3 -3
  103. package/_cjs/Ref/Synchronized/api.cjs.map +1 -1
  104. package/_cjs/Ref/api/collect.cjs +1 -1
  105. package/_cjs/Ref/api/collect.cjs.map +1 -1
  106. package/_cjs/Ref/api/dimap.cjs +3 -3
  107. package/_cjs/Ref/api/dimap.cjs.map +1 -1
  108. package/_cjs/Ref/api/filter.cjs +2 -2
  109. package/_cjs/Ref/api/filter.cjs.map +1 -1
  110. package/_cjs/Ref/api.cjs +2 -3
  111. package/_cjs/Ref/api.cjs.map +1 -1
  112. package/_cjs/RefSubject/Atomic.cjs +6 -6
  113. package/_cjs/RefSubject/Atomic.cjs.map +1 -1
  114. package/_cjs/STM/api.cjs +5 -5
  115. package/_cjs/STM/api.cjs.map +1 -1
  116. package/_cjs/STM/definition.cjs +1 -1
  117. package/_cjs/STM/definition.cjs.map +1 -1
  118. package/_cjs/STM/internal/CommitState.cjs +5 -4
  119. package/_cjs/STM/internal/CommitState.cjs.map +1 -1
  120. package/_cjs/STM/internal/Journal.cjs +8 -8
  121. package/_cjs/STM/internal/Journal.cjs.map +1 -1
  122. package/_cjs/Schedule/api/driver.cjs +3 -3
  123. package/_cjs/Schedule/api/driver.cjs.map +1 -1
  124. package/_cjs/Schedule/api.cjs +8 -8
  125. package/_cjs/Schedule/api.cjs.map +1 -1
  126. package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs +1 -1
  127. package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs.map +1 -1
  128. package/_cjs/Scope/ReleaseMap/api.cjs +3 -3
  129. package/_cjs/Scope/ReleaseMap/api.cjs.map +1 -1
  130. package/_cjs/ScopedRef/api.cjs +1 -1
  131. package/_cjs/ScopedRef/api.cjs.map +1 -1
  132. package/_cjs/Semaphore.cjs +2 -2
  133. package/_cjs/Semaphore.cjs.map +1 -1
  134. package/_cjs/Sink/api.cjs +6 -6
  135. package/_cjs/Sink/api.cjs.map +1 -1
  136. package/_cjs/Stream/api/zipAllWith.cjs +8 -8
  137. package/_cjs/Stream/api/zipAllWith.cjs.map +1 -1
  138. package/_cjs/Stream/api/zipWithChunks.cjs +6 -6
  139. package/_cjs/Stream/api/zipWithChunks.cjs.map +1 -1
  140. package/_cjs/Stream/api.cjs +415 -133
  141. package/_cjs/Stream/api.cjs.map +1 -1
  142. package/_cjs/Stream/internal/Handoff.cjs +2 -2
  143. package/_cjs/Stream/internal/Handoff.cjs.map +1 -1
  144. package/_cjs/Stream/internal/Pull.cjs +2 -2
  145. package/_cjs/Stream/internal/Pull.cjs.map +1 -1
  146. package/_cjs/Stream/internal/Take.cjs +6 -6
  147. package/_cjs/Stream/internal/Take.cjs.map +1 -1
  148. package/_cjs/Stream/internal/util.cjs +3 -2
  149. package/_cjs/Stream/internal/util.cjs.map +1 -1
  150. package/_cjs/TFuture/api.cjs +3 -3
  151. package/_cjs/TFuture/api.cjs.map +1 -1
  152. package/_cjs/TFuture/constructors.cjs +1 -1
  153. package/_cjs/TFuture/constructors.cjs.map +1 -1
  154. package/_cjs/TRef/definition.cjs +9 -9
  155. package/_cjs/TRef/definition.cjs.map +1 -1
  156. package/_cjs/collection/immutable/Conc/findIO.cjs +3 -3
  157. package/_cjs/collection/immutable/Conc/findIO.cjs.map +1 -1
  158. package/_cjs/data/Exit/foreachIO.cjs +1 -1
  159. package/_cjs/data/Exit/foreachIO.cjs.map +1 -1
  160. package/_mjs/Cached/definition.mjs.map +1 -1
  161. package/_mjs/Channel/api/mapOutConcurrentIO.mjs +1 -1
  162. package/_mjs/Channel/api/mapOutConcurrentIO.mjs.map +1 -1
  163. package/_mjs/Channel/api/mergeAllWith.mjs +3 -3
  164. package/_mjs/Channel/api/mergeAllWith.mjs.map +1 -1
  165. package/_mjs/Channel/api/mergeWith.mjs +4 -4
  166. package/_mjs/Channel/api/mergeWith.mjs.map +1 -1
  167. package/_mjs/Channel/api/runScoped.mjs +19 -3
  168. package/_mjs/Channel/api/runScoped.mjs.map +1 -1
  169. package/_mjs/Channel/api/toPull.mjs +3 -3
  170. package/_mjs/Channel/api/toPull.mjs.map +1 -1
  171. package/_mjs/Channel/api.mjs +8 -7
  172. package/_mjs/Channel/api.mjs.map +1 -1
  173. package/_mjs/Channel/internal/ChannelExecutor.mjs +71 -62
  174. package/_mjs/Channel/internal/ChannelExecutor.mjs.map +1 -1
  175. package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs +3 -3
  176. package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs.map +1 -1
  177. package/_mjs/Clock/live.mjs +1 -1
  178. package/_mjs/Clock/live.mjs.map +1 -1
  179. package/_mjs/Fiber/FiberMessage.mjs +5 -5
  180. package/_mjs/Fiber/FiberMessage.mjs.map +1 -1
  181. package/_mjs/Fiber/FiberRuntime.mjs +102 -70
  182. package/_mjs/Fiber/FiberRuntime.mjs.map +1 -1
  183. package/_mjs/Fiber/api/collectAll.mjs +1 -1
  184. package/_mjs/Fiber/api/collectAll.mjs.map +1 -1
  185. package/_mjs/Fiber/api/mapIO.mjs +1 -1
  186. package/_mjs/Fiber/api/mapIO.mjs.map +1 -1
  187. package/_mjs/Fiber/api/zipWith.mjs +1 -1
  188. package/_mjs/Fiber/api/zipWith.mjs.map +1 -1
  189. package/_mjs/Fiber/constructors.mjs +5 -5
  190. package/_mjs/Fiber/constructors.mjs.map +1 -1
  191. package/_mjs/FiberRef/unsafe.mjs +3 -2
  192. package/_mjs/FiberRef/unsafe.mjs.map +1 -1
  193. package/_mjs/FiberScope/definition.mjs +2 -2
  194. package/_mjs/FiberScope/definition.mjs.map +1 -1
  195. package/_mjs/Future/api.mjs +4 -4
  196. package/_mjs/Future/api.mjs.map +1 -1
  197. package/_mjs/Hub/api.mjs.map +1 -1
  198. package/_mjs/Hub/internal.mjs +1 -1
  199. package/_mjs/Hub/internal.mjs.map +1 -1
  200. package/_mjs/IO/api/asyncIO.mjs +1 -1
  201. package/_mjs/IO/api/asyncIO.mjs.map +1 -1
  202. package/_mjs/IO/api/asyncInterrupt.mjs +2 -2
  203. package/_mjs/IO/api/asyncInterrupt.mjs.map +1 -1
  204. package/_mjs/IO/api/concurrency.mjs +3 -3
  205. package/_mjs/IO/api/concurrency.mjs.map +1 -1
  206. package/_mjs/IO/api/daemonChildren.mjs +1 -1
  207. package/_mjs/IO/api/daemonChildren.mjs.map +1 -1
  208. package/_mjs/IO/api/fork.mjs +2 -1
  209. package/_mjs/IO/api/fork.mjs.map +1 -1
  210. package/_mjs/IO/api/interrupt.mjs +2 -2
  211. package/_mjs/IO/api/interrupt.mjs.map +1 -1
  212. package/_mjs/IO/api/provideSomeLayer.mjs.map +1 -1
  213. package/_mjs/IO/api/raceWith.mjs +9 -12
  214. package/_mjs/IO/api/raceWith.mjs.map +1 -1
  215. package/_mjs/IO/api/repeat.mjs +2 -2
  216. package/_mjs/IO/api/repeat.mjs.map +1 -1
  217. package/_mjs/IO/api/stateful.mjs +3 -3
  218. package/_mjs/IO/api/stateful.mjs.map +1 -1
  219. package/_mjs/IO/api/timeout.mjs +1 -1
  220. package/_mjs/IO/api/timeout.mjs.map +1 -1
  221. package/_mjs/IO/api/transplant.mjs +1 -1
  222. package/_mjs/IO/api/transplant.mjs.map +1 -1
  223. package/_mjs/IO/api/withChildren.mjs +5 -4
  224. package/_mjs/IO/api/withChildren.mjs.map +1 -1
  225. package/_mjs/IO/api/withEarlyRelease.mjs +1 -1
  226. package/_mjs/IO/api/withEarlyRelease.mjs.map +1 -1
  227. package/_mjs/IO/api/zipConcurrent.mjs +23 -23
  228. package/_mjs/IO/api/zipConcurrent.mjs.map +1 -1
  229. package/_mjs/IO/api.mjs +32 -30
  230. package/_mjs/IO/api.mjs.map +1 -1
  231. package/_mjs/IO/definition.mjs +16 -27
  232. package/_mjs/IO/definition.mjs.map +1 -1
  233. package/_mjs/IO/runtime.mjs +43 -34
  234. package/_mjs/IO/runtime.mjs.map +1 -1
  235. package/_mjs/Logger/api.mjs +3 -2
  236. package/_mjs/Logger/api.mjs.map +1 -1
  237. package/_mjs/MVar/api.mjs +11 -11
  238. package/_mjs/MVar/api.mjs.map +1 -1
  239. package/_mjs/Push/api.mjs +3 -3
  240. package/_mjs/Push/api.mjs.map +1 -1
  241. package/_mjs/Push/internal.mjs +1 -1
  242. package/_mjs/Push/internal.mjs.map +1 -1
  243. package/_mjs/Queue/api/filterInputIO.mjs +2 -2
  244. package/_mjs/Queue/api/filterInputIO.mjs.map +1 -1
  245. package/_mjs/Queue/api/filterOutputIO.mjs.map +1 -1
  246. package/_mjs/Ref/Derived.mjs +4 -4
  247. package/_mjs/Ref/Derived.mjs.map +1 -1
  248. package/_mjs/Ref/DerivedAll.mjs +5 -5
  249. package/_mjs/Ref/DerivedAll.mjs.map +1 -1
  250. package/_mjs/Ref/Synchronized/api.mjs +3 -3
  251. package/_mjs/Ref/Synchronized/api.mjs.map +1 -1
  252. package/_mjs/Ref/api/collect.mjs +1 -1
  253. package/_mjs/Ref/api/collect.mjs.map +1 -1
  254. package/_mjs/Ref/api/dimap.mjs +3 -3
  255. package/_mjs/Ref/api/dimap.mjs.map +1 -1
  256. package/_mjs/Ref/api/filter.mjs +2 -2
  257. package/_mjs/Ref/api/filter.mjs.map +1 -1
  258. package/_mjs/Ref/api.mjs +2 -1
  259. package/_mjs/Ref/api.mjs.map +1 -1
  260. package/_mjs/RefSubject/Atomic.mjs +6 -6
  261. package/_mjs/RefSubject/Atomic.mjs.map +1 -1
  262. package/_mjs/STM/api.mjs +5 -5
  263. package/_mjs/STM/api.mjs.map +1 -1
  264. package/_mjs/STM/definition.mjs +1 -1
  265. package/_mjs/STM/definition.mjs.map +1 -1
  266. package/_mjs/STM/internal/CommitState.mjs +5 -4
  267. package/_mjs/STM/internal/CommitState.mjs.map +1 -1
  268. package/_mjs/STM/internal/Journal.mjs +8 -8
  269. package/_mjs/STM/internal/Journal.mjs.map +1 -1
  270. package/_mjs/Schedule/api/driver.mjs +3 -3
  271. package/_mjs/Schedule/api/driver.mjs.map +1 -1
  272. package/_mjs/Schedule/api.mjs +8 -8
  273. package/_mjs/Schedule/api.mjs.map +1 -1
  274. package/_mjs/Scope/ReleaseMap/api/releaseAll.mjs +1 -1
  275. package/_mjs/Scope/ReleaseMap/api/releaseAll.mjs.map +1 -1
  276. package/_mjs/Scope/ReleaseMap/api.mjs +3 -3
  277. package/_mjs/Scope/ReleaseMap/api.mjs.map +1 -1
  278. package/_mjs/ScopedRef/api.mjs +1 -1
  279. package/_mjs/ScopedRef/api.mjs.map +1 -1
  280. package/_mjs/Semaphore.mjs +2 -2
  281. package/_mjs/Semaphore.mjs.map +1 -1
  282. package/_mjs/Sink/api.mjs +6 -6
  283. package/_mjs/Sink/api.mjs.map +1 -1
  284. package/_mjs/Stream/api/zipAllWith.mjs +8 -8
  285. package/_mjs/Stream/api/zipAllWith.mjs.map +1 -1
  286. package/_mjs/Stream/api/zipWithChunks.mjs +6 -6
  287. package/_mjs/Stream/api/zipWithChunks.mjs.map +1 -1
  288. package/_mjs/Stream/api.mjs +321 -60
  289. package/_mjs/Stream/api.mjs.map +1 -1
  290. package/_mjs/Stream/internal/Handoff.mjs +2 -2
  291. package/_mjs/Stream/internal/Handoff.mjs.map +1 -1
  292. package/_mjs/Stream/internal/Pull.mjs +2 -2
  293. package/_mjs/Stream/internal/Pull.mjs.map +1 -1
  294. package/_mjs/Stream/internal/Take.mjs +6 -6
  295. package/_mjs/Stream/internal/Take.mjs.map +1 -1
  296. package/_mjs/Stream/internal/util.mjs +3 -2
  297. package/_mjs/Stream/internal/util.mjs.map +1 -1
  298. package/_mjs/TFuture/api.mjs +3 -3
  299. package/_mjs/TFuture/api.mjs.map +1 -1
  300. package/_mjs/TFuture/constructors.mjs +1 -1
  301. package/_mjs/TFuture/constructors.mjs.map +1 -1
  302. package/_mjs/TRef/definition.mjs +9 -9
  303. package/_mjs/TRef/definition.mjs.map +1 -1
  304. package/_mjs/collection/immutable/Conc/findIO.mjs +3 -3
  305. package/_mjs/collection/immutable/Conc/findIO.mjs.map +1 -1
  306. package/_mjs/data/Exit/foreachIO.mjs +1 -1
  307. package/_mjs/data/Exit/foreachIO.mjs.map +1 -1
  308. package/_src/Cached/definition.ts +1 -1
  309. package/_src/Channel/api/runScoped.ts +30 -5
  310. package/_src/Channel/api/toPull.ts +1 -1
  311. package/_src/Channel/api.ts +1 -0
  312. package/_src/Channel/internal/ChannelExecutor.ts +24 -20
  313. package/_src/Fiber/FiberMessage.ts +5 -5
  314. package/_src/Fiber/FiberRuntime.ts +40 -17
  315. package/_src/FiberRefs/api.ts +1 -1
  316. package/_src/Hub/api.ts +1 -1
  317. package/_src/IO/api/asyncIO.ts +1 -1
  318. package/_src/IO/api/provideSomeLayer.ts +1 -3
  319. package/_src/IO/api/raceWith.ts +1 -3
  320. package/_src/IO/api/stateful.ts +1 -1
  321. package/_src/IO/api/zipConcurrent.ts +26 -30
  322. package/_src/IO/api.ts +4 -3
  323. package/_src/IO/definition.ts +35 -28
  324. package/_src/IO/runtime.ts +39 -38
  325. package/_src/Queue/api/filterInputIO.ts +1 -1
  326. package/_src/Queue/api/filterOutputIO.ts +1 -1
  327. package/_src/RefSubject/Atomic.ts +4 -4
  328. package/_src/STM/definition.ts +1 -1
  329. package/_src/State/definition.ts +1 -1
  330. package/_src/Stream/api.ts +315 -14
  331. package/_src/Subject/Atomic.ts +1 -1
  332. package/_src/global.ts +0 -4
  333. package/_src/index.ts +2 -2
  334. package/global.d.ts +0 -4
  335. package/index.d.ts +2 -2
  336. package/package.json +3 -3
  337. package/RuntimeConfig.d.ts +0 -11
  338. package/_cjs/RuntimeConfig.cjs +0 -12
  339. package/_cjs/RuntimeConfig.cjs.map +0 -1
  340. package/_mjs/RuntimeConfig.mjs +0 -3
  341. package/_mjs/RuntimeConfig.mjs.map +0 -1
  342. package/_src/RuntimeConfig.ts +0 -6
@@ -1,6 +1,7 @@
1
1
  import { IO } from "@fncts/io/IO/definition";
2
2
  import { Channel } from "@fncts/io/Channel";
3
3
  import { Scope } from "@fncts/io/Scope/definition";
4
+ import { Future } from "@fncts/io/Future";
4
5
  /**
5
6
  * Runs a channel until the end is received
6
7
  * @tsplus getter fncts.io.Channel runScoped
package/Channel/api.d.ts CHANGED
@@ -356,6 +356,7 @@ export declare function orHaltWith<OutErr, E>(f: (e: OutErr) => E): <Env, InErr,
356
356
  export declare function pipeTo<OutErr, OutElem, OutDone, Env1, OutErr1, OutElem1, OutDone1>(right: Channel<Env1, OutErr, OutElem, OutDone, OutErr1, OutElem1, OutDone1>): <Env, InErr, InElem, InDone>(left: Channel<Env, InErr, InElem, InDone, OutErr, OutElem, OutDone>) => Channel<Env1 | Env, InErr, InElem, InDone, OutErr1, OutElem1, OutDone1>;
357
357
  /**
358
358
  * @tsplus pipeable fncts.io.Channel pipeToOrFail
359
+ * @tsplus pipeable-operator fncts.io.Channel >>>
359
360
  * @tsplus location "@fncts/io/Channel/api"
360
361
  */
361
362
  export declare function pipeToOrFail<OutElem, OutDone, Env1, OutErr1, OutElem1, OutDone1>(right: Channel<Env1, never, OutElem, OutDone, OutErr1, OutElem1, OutDone1>): <Env, InErr, InElem, InDone, OutErr>(left: Channel<Env, InErr, InElem, InDone, OutErr, OutElem, OutDone>) => Channel<Env1 | Env, InErr, InElem, InDone, OutErr1 | OutErr, OutElem1, OutDone1>;
@@ -1,15 +1,15 @@
1
1
  import { Channel } from "@fncts/io/Channel";
2
2
  import { Exit } from "@fncts/base/data/Exit/definition";
3
3
  import { URIO, IO } from "@fncts/io/IO/definition";
4
+ import { Cause } from "@fncts/base/data/Cause/definition";
4
5
  import { List, Nil } from "@fncts/base/collection/immutable/List/definition";
5
6
  import { Environment } from "@fncts/base/data/Environment/definition";
6
- import { Cause } from "@fncts/base/data/Cause/definition";
7
7
  import { ListBuffer } from "@fncts/base/collection/mutable/ListBuffer";
8
8
  import { Maybe } from "@fncts/base/data/Maybe/definition";
9
9
  import type { ChannelState } from "@fncts/io/Channel/internal/ChannelState";
10
10
  import * as State from "@fncts/io/Channel/internal/ChannelState";
11
11
  export type ErasedExecutor<R> = ChannelExecutor<R, unknown, unknown, unknown, unknown, unknown, unknown>;
12
- export declare function readUpstream<R, E, A>(r: State.Read<R, E>, cont: () => IO<R, E, A>): IO<R, E, A>;
12
+ export declare function readUpstream<R, E, A, E1>(r: State.Read<R, E>, cont: () => IO<R, E1, A>, onFailure: (cause: Cause<E>) => IO<R, E1, A>): IO<R, E1, A>;
13
13
  export declare class ChannelExecutor<Env, InErr, InElem, InDone, OutErr, OutElem, OutDone> {
14
14
  private providedEnv;
15
15
  private executeCloseLastSubstream;
@@ -26,7 +26,7 @@ export declare class InterruptSignal {
26
26
  * @tsplus static fncts.io.FiberMessageOps InterruptSignal
27
27
  * @tsplus location "@fncts/io/Fiber/FiberMessage"
28
28
  */
29
- export declare function mkInterruptSignal(cause: Cause<never>): FiberMessage;
29
+ export declare function interruptSignal(cause: Cause<never>): FiberMessage;
30
30
  export declare class GenStackTrace {
31
31
  readonly onTrace: (trace: Trace) => void;
32
32
  readonly _tag = FiberMessageTag.GenStackTrace;
@@ -36,7 +36,7 @@ export declare class GenStackTrace {
36
36
  * @tsplus static fncts.io.FiberMessageOps GenStackTrace
37
37
  * @tsplus location "@fncts/io/Fiber/FiberMessage"
38
38
  */
39
- export declare function mkGenStackTrace(onTrace: (trace: Trace) => void): FiberMessage;
39
+ export declare function genStackTrace(onTrace: (trace: Trace) => void): FiberMessage;
40
40
  export declare class Stateful {
41
41
  readonly onFiber: (fiber: FiberRuntime<any, any>, status: FiberStatus) => void;
42
42
  readonly _tag = FiberMessageTag.Stateful;
@@ -46,7 +46,7 @@ export declare class Stateful {
46
46
  * @tsplus static fncts.io.FiberMessageOps Stateful
47
47
  * @tsplus location "@fncts/io/Fiber/FiberMessage"
48
48
  */
49
- export declare function mkStateful(onFiber: (fiber: FiberRuntime<any, any>, status: FiberStatus) => void): FiberMessage;
49
+ export declare function stateful(onFiber: (fiber: FiberRuntime<any, any>, status: FiberStatus) => void): FiberMessage;
50
50
  export declare class Resume {
51
51
  readonly cont: IO<any, any, any>;
52
52
  readonly _tag = FiberMessageTag.Resume;
@@ -56,7 +56,7 @@ export declare class Resume {
56
56
  * @tsplus static fncts.io.FiberMessageOps Resume
57
57
  * @tsplus location "@fncts/io/Fiber/FiberMessage"
58
58
  */
59
- export declare function mkResume(cont: IO<any, any, any>): FiberMessage;
59
+ export declare function resume(cont: IO<any, any, any>): FiberMessage;
60
60
  export interface YieldNow {
61
61
  readonly _tag: FiberMessageTag.YieldNow;
62
62
  }
@@ -64,4 +64,4 @@ export interface YieldNow {
64
64
  * @tsplus static fncts.io.FiberMessageOps YieldNow
65
65
  * @tsplus location "@fncts/io/Fiber/FiberMessage"
66
66
  */
67
- export declare const YieldNow: FiberMessage;
67
+ export declare const yieldNow: FiberMessage;
@@ -11,7 +11,7 @@ import { Cause } from "@fncts/base/data/Cause/definition";
11
11
  import { Supervisor } from "@fncts/io/Supervisor/definition";
12
12
  import { FiberRef } from "@fncts/io/FiberRef/definition";
13
13
  import { Maybe } from "@fncts/base/data/Maybe/definition";
14
- import { IllegalStateError, isInterruptedException } from "@fncts/base/data/exceptions";
14
+ import { IllegalStateError, NoSuchElementError, isInterruptedException } from "@fncts/base/data/exceptions";
15
15
  import { TraceElement } from "@fncts/base/data/TraceElement/definition";
16
16
  import { FiberScope } from "@fncts/io/FiberScope";
17
17
  import { LogLevel } from "@fncts/io/LogLevel";
@@ -27,12 +27,12 @@ import { FiberMessage } from "./FiberMessage.js";
27
27
  export declare class RevertFlags {
28
28
  readonly patch: RuntimeFlags.Patch;
29
29
  readonly trace?: string | undefined;
30
- readonly ioOpCode = IOOpCode.RevertFlags;
30
+ readonly _tag = IOOpCode.RevertFlags;
31
31
  constructor(patch: RuntimeFlags.Patch, trace?: string | undefined);
32
32
  }
33
33
  export declare class UpdateTrace {
34
34
  readonly trace?: string | undefined;
35
- readonly ioOpCode = IOOpCode.UpdateTrace;
35
+ readonly _tag = IOOpCode.UpdateTrace;
36
36
  constructor(trace?: string | undefined);
37
37
  }
38
38
  export type Continuation = OnSuccess<any, any, any, any, any, any> | OnSuccessAndFailure<any, any, any, any, any, any, any, any, any> | OnFailure<any, any, any, any, any, any> | WhileLoop<any, any, any> | UpdateTrace | RevertFlags;
@@ -1,9 +1,8 @@
1
1
  import { Layer } from "@fncts/io/Layer";
2
2
  import { IO } from "@fncts/io/IO/definition";
3
- import type { Erase } from "@fncts/typelevel/Intersection";
4
3
  /**
5
4
  * @tsplus static fncts.io.IOAspects provideSomeLayer
6
5
  * @tsplus pipeable fncts.io.IO provideSomeLayer
7
6
  * @tsplus location "@fncts/io/IO/api/provideSomeLayer"
8
7
  */
9
- export declare function provideSomeLayer<RIn, E1, ROut>(layer: Layer<RIn, E1, ROut>, __tsplusTrace?: string): <R, E, A>(self: import("../definition").IO<R, E, A>) => import("../definition").IO<RIn & Erase<R, ROut>, E1 | E, A>;
8
+ export declare function provideSomeLayer<RIn, E1, ROut>(layer: Layer<RIn, E1, ROut>, __tsplusTrace?: string): <R, E, A>(self: import("../definition").IO<R, E, A>) => import("../definition").IO<RIn | Exclude<R, ROut>, E1 | E, A>;
@@ -1,4 +1,5 @@
1
1
  import { IO } from "@fncts/io/IO/definition";
2
+ import { Zipped } from "@fncts/base/data/Zipped";
2
3
  import { Lazy } from "@fncts/base/data/function/definition";
3
4
  import { Future } from "@fncts/io/Future";
4
5
  import { Fiber } from "@fncts/io/Fiber/definition";
@@ -6,7 +7,7 @@ import { Fiber } from "@fncts/io/Fiber/definition";
6
7
  * @tsplus pipeable fncts.io.IO zipConcurrent
7
8
  * @tsplus location "@fncts/io/IO/api/zipConcurrent"
8
9
  */
9
- export declare function zipConcurrent<R1, E1, B>(that: IO<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: import("../definition.js").IO<R, E, A>) => import("../definition.js").IO<R1 | R, E1 | E, readonly [A, B]>;
10
+ export declare function zipConcurrent<R1, E1, B>(that: IO<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: import("../definition.js").IO<R, E, A>) => import("../definition.js").IO<R1 | R, E1 | E, import("@fncts/base/data/Zipped.js").Zipped.Make<A, B>>;
10
11
  /**
11
12
  * @tsplus pipeable fncts.io.IO zipWithConcurrent
12
13
  * @tsplus location "@fncts/io/IO/api/zipConcurrent"
package/IO/api.d.ts CHANGED
@@ -11,6 +11,7 @@ import { Predicate } from "@fncts/base/data/Predicate/definition";
11
11
  import { NonEmptyArray } from "@fncts/base/collection/immutable/ImmutableNonEmptyArray/definition";
12
12
  import { Eval } from "@fncts/base/control/Eval/definition";
13
13
  import { Exit } from "@fncts/base/data/Exit/definition";
14
+ import { NoSuchElementError } from "@fncts/base/data/exceptions";
14
15
  import { Trace } from "@fncts/base/data/Trace/definition";
15
16
  import { List } from "@fncts/base/collection/immutable/List/definition";
16
17
  import { ImmutableArray } from "@fncts/base/collection/immutable/ImmutableArray/definition";
@@ -427,7 +428,7 @@ export declare function fromMaybe<A>(maybe: Lazy<Maybe<A>>, __tsplusTrace?: stri
427
428
  * @tsplus getter fncts.Maybe toIO
428
429
  * @tsplus location "@fncts/io/IO/api"
429
430
  */
430
- export declare function fromMaybeNow<A = never>(maybe: Maybe<A>, __tsplusTrace?: string): IO<unknown, Maybe<never>, A>;
431
+ export declare function fromMaybeNow<A = never>(maybe: Maybe<A>, __tsplusTrace?: string): IO<never, NoSuchElementError, A>;
431
432
  /**
432
433
  * Create an IO that when executed will construct `promise` and wait for its result,
433
434
  * errors will be handled using `onReject`
@@ -1,11 +1,15 @@
1
1
  import { HKT } from "@fncts/typelevel/HKT";
2
+ import { NoSuchElementError } from "@fncts/base/data/exceptions";
2
3
  import { FiberId } from "@fncts/base/data/FiberId/definition";
3
4
  import { Cause } from "@fncts/base/data/Cause/definition";
4
5
  import { Lazy } from "@fncts/base/data/function/definition";
5
6
  import { STM } from "@fncts/io/STM/definition";
7
+ import { Nothing, Just } from "@fncts/base/data/Maybe/definition";
6
8
  import type { FiberRuntime } from "../Fiber/FiberRuntime.js";
7
9
  import type { Running } from "../FiberStatus.js";
8
10
  import type { RuntimeFlagsPatch } from "../RuntimeFlags.js";
11
+ import type { Left, Right } from "@fncts/base/data/Either";
12
+ import type { Failure, Success } from "@fncts/base/data/Exit";
9
13
  import type { Trace } from "@fncts/base/data/Trace";
10
14
  import { RuntimeFlags } from "../RuntimeFlags.js";
11
15
  export declare const IOVariance: unique symbol;
@@ -32,6 +36,20 @@ export declare abstract class IO<R, E, A> {
32
36
  _A: () => A;
33
37
  };
34
38
  }
39
+ declare module "@fncts/base/data/Either/definition" {
40
+ interface Either<E, A> extends IO<never, E, A> {
41
+ }
42
+ }
43
+ declare module "@fncts/base/data/Maybe/definition" {
44
+ interface Maybe<A> extends IO<never, NoSuchElementError, A> {
45
+ }
46
+ }
47
+ declare module "@fncts/base/data/Exit/definition" {
48
+ interface Success<A> extends IO<never, never, A> {
49
+ }
50
+ interface Failure<E> extends IO<never, E, never> {
51
+ }
52
+ }
35
53
  /**
36
54
  * @tsplus type fncts.io.IOAspects
37
55
  */
@@ -89,14 +107,14 @@ export declare function isIO(u: unknown): u is IO<any, any, any>;
89
107
  export declare class Sync<A> extends IO<never, never, A> {
90
108
  readonly evaluate: () => A;
91
109
  readonly trace?: string | undefined;
92
- readonly ioOpCode = IOOpCode.Sync;
110
+ readonly _tag = IOOpCode.Sync;
93
111
  constructor(evaluate: () => A, trace?: string | undefined);
94
112
  }
95
113
  export declare class Async<R, E, A> extends IO<R, E, A> {
96
114
  readonly registerCallback: (f: (_: IO<R, E, A>) => void) => any;
97
115
  readonly blockingOn: () => FiberId;
98
116
  readonly trace?: string | undefined;
99
- readonly ioOpCode = IOOpCode.Async;
117
+ readonly _tag = IOOpCode.Async;
100
118
  constructor(registerCallback: (f: (_: IO<R, E, A>) => void) => any, blockingOn: () => FiberId, trace?: string | undefined);
101
119
  }
102
120
  /**
@@ -107,7 +125,7 @@ export declare class OnSuccessAndFailure<R, E, A, R1, E1, B, R2, E2, C> extends
107
125
  readonly failureK: (cause: Cause<E>) => IO<R1, E1, B>;
108
126
  readonly successK: (a: A) => IO<R2, E2, C>;
109
127
  readonly trace?: string | undefined;
110
- readonly ioOpCode = IOOpCode.OnSuccessAndFailure;
128
+ readonly _tag = IOOpCode.OnSuccessAndFailure;
111
129
  constructor(first: IO<R, E, A>, failureK: (cause: Cause<E>) => IO<R1, E1, B>, successK: (a: A) => IO<R2, E2, C>, trace?: string | undefined);
112
130
  onFailure(c: Cause<E>): IO<R | R1 | R2, E1 | E2, B | C>;
113
131
  onSuccess(a: A): IO<R | R1 | R2, E1 | E2, B | C>;
@@ -116,7 +134,7 @@ export declare class OnFailure<R, E, A, R1, E1, B> extends IO<R | R1, E1, A | B>
116
134
  readonly first: IO<R, E, A>;
117
135
  readonly failureK: (cause: Cause<E>) => IO<R1, E1, B>;
118
136
  readonly trace?: string | undefined;
119
- readonly ioOpCode = IOOpCode.OnFailure;
137
+ readonly _tag = IOOpCode.OnFailure;
120
138
  constructor(first: IO<R, E, A>, failureK: (cause: Cause<E>) => IO<R1, E1, B>, trace?: string | undefined);
121
139
  onFailure(c: Cause<E>): IO<R | R1, E1, A | B>;
122
140
  onSuccess(a: A): IO<R | R1, E1, A | B>;
@@ -128,7 +146,7 @@ export declare class OnSuccess<R, R1, E, E1, A, A1> extends IO<R | R1, E | E1, A
128
146
  readonly first: IO<R, E, A>;
129
147
  readonly successK: (a: A) => IO<R1, E1, A1>;
130
148
  readonly trace?: string | undefined;
131
- readonly ioOpCode = IOOpCode.OnSuccess;
149
+ readonly _tag = IOOpCode.OnSuccess;
132
150
  constructor(first: IO<R, E, A>, successK: (a: A) => IO<R1, E1, A1>, trace?: string | undefined);
133
151
  onFailure(c: Cause<E>): IO<R | R1, E | E1, A1>;
134
152
  onSuccess(a: A): IO<R | R1, E | E1, A1>;
@@ -139,19 +157,19 @@ export declare class OnSuccess<R, R1, E, E1, A, A1> extends IO<R | R1, E | E1, A
139
157
  export declare class SucceedNow<A> extends IO<never, never, A> {
140
158
  readonly value: A;
141
159
  readonly trace?: string | undefined;
142
- readonly ioOpCode = IOOpCode.SucceedNow;
160
+ readonly _tag = IOOpCode.SucceedNow;
143
161
  constructor(value: A, trace?: string | undefined);
144
162
  }
145
163
  export declare class UpdateRuntimeFlags extends IO<never, never, void> {
146
164
  readonly update: RuntimeFlags.Patch;
147
165
  readonly trace?: string | undefined;
148
- readonly ioOpCode = IOOpCode.UpdateRuntimeFlags;
166
+ readonly _tag = IOOpCode.UpdateRuntimeFlags;
149
167
  constructor(update: RuntimeFlags.Patch, trace?: string | undefined);
150
168
  }
151
169
  export declare class Interruptible<R, E, A> extends IO<R, E, A> {
152
170
  readonly effect: IO<R, E, A>;
153
171
  readonly trace?: string | undefined;
154
- readonly ioOpCode = IOOpCode.UpdateRuntimeFlagsWithin;
172
+ readonly _tag = IOOpCode.UpdateRuntimeFlagsWithin;
155
173
  constructor(effect: IO<R, E, A>, trace?: string | undefined);
156
174
  readonly update: RuntimeFlags.Patch;
157
175
  scope(oldRuntimeFlags: RuntimeFlags): IO<R, E, A>;
@@ -159,7 +177,7 @@ export declare class Interruptible<R, E, A> extends IO<R, E, A> {
159
177
  export declare class Uninterruptible<R, E, A> extends IO<R, E, A> {
160
178
  readonly effect: IO<R, E, A>;
161
179
  readonly trace?: string | undefined;
162
- readonly ioOpCode = IOOpCode.UpdateRuntimeFlagsWithin;
180
+ readonly _tag = IOOpCode.UpdateRuntimeFlagsWithin;
163
181
  constructor(effect: IO<R, E, A>, trace?: string | undefined);
164
182
  readonly update: RuntimeFlags.Patch;
165
183
  scope(oldRuntimeFlags: RuntimeFlags): IO<R, E, A>;
@@ -168,19 +186,19 @@ export declare class Dynamic<R, E, A> extends IO<R, E, A> {
168
186
  readonly update: RuntimeFlagsPatch;
169
187
  readonly f: (oldRuntimeFlags: RuntimeFlags) => IO<R, E, A>;
170
188
  readonly trace?: string | undefined;
171
- readonly ioOpCode = IOOpCode.UpdateRuntimeFlagsWithin;
189
+ readonly _tag = IOOpCode.UpdateRuntimeFlagsWithin;
172
190
  constructor(update: RuntimeFlagsPatch, f: (oldRuntimeFlags: RuntimeFlags) => IO<R, E, A>, trace?: string | undefined);
173
191
  scope(oldRuntimeFlags: RuntimeFlags): IO<R, E, A>;
174
192
  }
175
193
  export declare class GenerateStackTrace extends IO<never, never, Trace> {
176
194
  readonly trace?: string | undefined;
177
- readonly ioOpCode = IOOpCode.GenerateStackTrace;
195
+ readonly _tag = IOOpCode.GenerateStackTrace;
178
196
  constructor(trace?: string | undefined);
179
197
  }
180
198
  export declare class Stateful<R, E, A> extends IO<R, E, A> {
181
199
  readonly onState: (fiber: FiberRuntime<E, A>, status: Running) => IO<R, E, A>;
182
200
  readonly trace?: string | undefined;
183
- readonly ioOpCode = IOOpCode.Stateful;
201
+ readonly _tag = IOOpCode.Stateful;
184
202
  constructor(onState: (fiber: FiberRuntime<E, A>, status: Running) => IO<R, E, A>, trace?: string | undefined);
185
203
  }
186
204
  export declare class WhileLoop<R, E, A> extends IO<R, E, void> {
@@ -188,12 +206,12 @@ export declare class WhileLoop<R, E, A> extends IO<R, E, void> {
188
206
  readonly body: () => IO<R, E, A>;
189
207
  readonly process: (a: A) => any;
190
208
  readonly trace?: string | undefined;
191
- readonly ioOpCode = IOOpCode.WhileLoop;
209
+ readonly _tag = IOOpCode.WhileLoop;
192
210
  constructor(check: () => boolean, body: () => IO<R, E, A>, process: (a: A) => any, trace?: string | undefined);
193
211
  }
194
212
  export declare class YieldNow extends IO<never, never, void> {
195
213
  readonly trace?: string | undefined;
196
- readonly ioOpCode = IOOpCode.YieldNow;
214
+ readonly _tag = IOOpCode.YieldNow;
197
215
  constructor(trace?: string | undefined);
198
216
  }
199
217
  /**
@@ -202,10 +220,10 @@ export declare class YieldNow extends IO<never, never, void> {
202
220
  export declare class Fail<E> extends IO<never, E, never> {
203
221
  readonly cause: Lazy<Cause<E>>;
204
222
  readonly trace?: string | undefined;
205
- readonly ioOpCode = IOOpCode.Fail;
223
+ readonly _tag = IOOpCode.Fail;
206
224
  constructor(cause: Lazy<Cause<E>>, trace?: string | undefined);
207
225
  }
208
- export type Concrete = OnSuccessAndFailure<any, any, any, any, any, any, any, any, any> | OnFailure<any, any, any, any, any, any> | OnSuccess<any, any, any, any, any, any> | UpdateRuntimeFlagsWithin | Sync<any> | Async<any, any, any> | SucceedNow<any> | UpdateRuntimeFlags | GenerateStackTrace | Stateful<any, any, any> | WhileLoop<any, any, any> | YieldNow | Fail<any> | STM<any, any, any>;
226
+ export type Concrete = OnSuccessAndFailure<any, any, any, any, any, any, any, any, any> | OnFailure<any, any, any, any, any, any> | OnSuccess<any, any, any, any, any, any> | UpdateRuntimeFlagsWithin | Sync<any> | Async<any, any, any> | SucceedNow<any> | UpdateRuntimeFlags | GenerateStackTrace | Stateful<any, any, any> | WhileLoop<any, any, any> | YieldNow | Fail<any> | STM<any, any, any> | Left<any> | Right<any> | Nothing | Just<any> | Failure<any> | Success<any>;
209
227
  /**
210
228
  * @tsplus static fncts.io.IOOps concrete
211
229
  * @tsplus macro identity
@@ -215,11 +233,3 @@ export declare function concrete(io: IO<any, any, any>): Concrete;
215
233
  export type EvaluationStep = OnSuccessAndFailure<any, any, any, any, any, any, any, any, any> | OnFailure<any, any, any, any, any, any> | OnSuccess<any, any, any, any, any, any>;
216
234
  export type UpdateRuntimeFlagsWithin = Interruptible<any, any, any> | Uninterruptible<any, any, any> | Dynamic<any, any, any>;
217
235
  export type Canceler<R> = URIO<R, void>;
218
- export declare const IOErrorTypeId: unique symbol;
219
- export type IOErrorTypeId = typeof IOErrorTypeId;
220
- export declare class IOError<E> {
221
- readonly cause: Cause<E>;
222
- readonly [IOErrorTypeId]: IOErrorTypeId;
223
- constructor(cause: Cause<E>);
224
- }
225
- export declare function isIOError(u: unknown): u is IOError<unknown>;
package/IO/runtime.d.ts CHANGED
@@ -6,6 +6,8 @@ import { Supervisor } from "@fncts/io/Supervisor/definition";
6
6
  import { Nothing } from "@fncts/base/data/Maybe/definition";
7
7
  import { FiberScope } from "@fncts/io/FiberScope";
8
8
  import { Exit } from "@fncts/base/data/Exit/definition";
9
+ import { Either } from "@fncts/base/data/Either/definition";
10
+ import { Fiber } from "@fncts/io/Fiber/definition";
9
11
  import { FiberRuntime } from "@fncts/io/Fiber";
10
12
  import { FiberRefs } from "@fncts/io/FiberRefs";
11
13
  import { RuntimeFlags } from "@fncts/io/RuntimeFlags";
@@ -14,12 +16,12 @@ export declare class Runtime<R> {
14
16
  readonly runtimeFlags: RuntimeFlags;
15
17
  readonly fiberRefs: FiberRefs;
16
18
  constructor(environment: Environment<R>, runtimeFlags: RuntimeFlags, fiberRefs: FiberRefs);
19
+ makeFiber: <E, A>(io: import("./definition.js").IO<R, E, A>, __tsplusTrace?: string) => FiberRuntime<E, A>;
17
20
  unsafeRunFiber: <E, A>(io: import("./definition.js").IO<R, E, A>, __tsplusTrace?: string) => FiberRuntime<E, A>;
18
- unsafeRunWith: <E, A>(io: import("./definition.js").IO<R, E, A>, k: (exit: import("@fncts/base/data/Exit.js").Exit<E, A>) => any, __tsplusTrace?: string) => (fiberId: FiberId) => (f: (exit: import("@fncts/base/data/Exit.js").Exit<E, A>) => any) => void;
19
- unsafeRunAsync: <E, A>(io: import("./definition.js").IO<R, E, A>, __tsplusTrace?: string) => void;
20
- unsafeRunAsyncWith: <E, A>(io: import("./definition.js").IO<R, E, A>, k: (exit: import("@fncts/base/data/Exit.js").Exit<E, A>) => any, __tsplusTrace?: string) => void;
21
21
  unsafeRunPromiseExit: <E, A>(io: import("./definition.js").IO<R, E, A>, __tsplusTrace?: string) => Promise<import("@fncts/base/data/Exit.js").Exit<E, A>>;
22
- unsafeRunSyncExit: <E, A>(io: import("./definition.js").IO<R, E, A>, __tsplusTrace?: string) => import("@fncts/base/data/Exit.js").Exit<E, A>;
22
+ unsafeRunPromise: <E, A>(io: import("./definition.js").IO<R, E, A>, __tsplusTrace?: string) => Promise<A>;
23
+ unsafeRunOrFork: <E, A>(io: import("./definition.js").IO<R, E, A>, __tsplusTrace?: string) => import("@fncts/base/data/Either.js").Either<import("@fncts/io/Fiber").Fiber.Runtime<E, A>, import("@fncts/base/data/Exit.js").Exit<E, A>>;
24
+ unsafeRun: <E, A>(io: import("./definition.js").IO<R, E, A>, __tsplusTrace?: string) => import("@fncts/base/data/Exit.js").Exit<E, A>;
23
25
  }
24
26
  /**
25
27
  * @tsplus static fncts.io.IOOps runtime
@@ -32,28 +34,18 @@ export declare const defaultRuntime: Runtime<never>;
32
34
  * @tsplus location "@fncts/io/IO/runtime"
33
35
  */
34
36
  export declare const unsafeRunFiber: <E, A>(io: import("./definition.js").IO<never, E, A>, __tsplusTrace?: string) => FiberRuntime<E, A>;
35
- /**
36
- * @tsplus fluent fncts.io.IO unsafeRunAsync
37
- * @tsplus location "@fncts/io/IO/runtime"
38
- */
39
- export declare const unsafeRunAsync: <E, A>(io: import("./definition.js").IO<never, E, A>, __tsplusTrace?: string) => void;
40
- /**
41
- * @tsplus fluent fncts.io.IO unsafeRunAsyncWith
42
- * @tsplus location "@fncts/io/IO/runtime"
43
- */
44
- export declare const unsafeRunAsyncWith: <E, A>(io: import("./definition.js").IO<never, E, A>, k: (exit: import("@fncts/base/data/Exit.js").Exit<E, A>) => any, __tsplusTrace?: string) => void;
45
37
  /**
46
38
  * @tsplus fluent fncts.io.IO unsafeRunPromiseExit
47
39
  * @tsplus location "@fncts/io/IO/runtime"
48
40
  */
49
41
  export declare const unsafeRunPromiseExit: <E, A>(io: import("./definition.js").IO<never, E, A>, __tsplusTrace?: string) => Promise<import("@fncts/base/data/Exit.js").Exit<E, A>>;
50
42
  /**
51
- * @tsplus fluent fncts.io.IO unsafeRunWith
43
+ * @tsplus getter fncts.io.IO unsafeRunOrFork
52
44
  * @tsplus location "@fncts/io/IO/runtime"
53
45
  */
54
- export declare const unsafeRunWith: <E, A>(io: import("./definition.js").IO<never, E, A>, k: (exit: import("@fncts/base/data/Exit.js").Exit<E, A>) => any, __tsplusTrace?: string) => (fiberId: FiberId) => (f: (exit: import("@fncts/base/data/Exit.js").Exit<E, A>) => any) => void;
46
+ export declare const unsafeRunOrFork: <E, A>(io: import("./definition.js").IO<never, E, A>, __tsplusTrace?: string) => import("@fncts/base/data/Either.js").Either<import("@fncts/io/Fiber").Fiber.Runtime<E, A>, import("@fncts/base/data/Exit.js").Exit<E, A>>;
55
47
  /**
56
- * @tsplus getter fncts.io.IO unsafeRunSyncExit
48
+ * @tsplus getter fncts.io.IO unsafeRun
57
49
  * @tsplus location "@fncts/io/IO/runtime"
58
50
  */
59
- export declare const unsafeRunSyncExit: <E, A>(io: import("./definition.js").IO<never, E, A>, __tsplusTrace?: string) => import("@fncts/base/data/Exit.js").Exit<E, A>;
51
+ export declare const unsafeRun: <E, A>(io: import("./definition.js").IO<never, E, A>, __tsplusTrace?: string) => import("@fncts/base/data/Exit.js").Exit<E, A>;
@@ -22,7 +22,7 @@ export type STMTypeId = typeof STMTypeId;
22
22
  */
23
23
  export declare abstract class STM<R, E, A> {
24
24
  readonly [IOTypeId]: IOTypeId;
25
- readonly ioOpCode = IOOpCode.Commit;
25
+ readonly _tag = IOOpCode.Commit;
26
26
  readonly trace?: string;
27
27
  readonly [STMTypeId]: STMTypeId;
28
28
  [IOVariance]: {
package/Stream/api.d.ts CHANGED
@@ -21,7 +21,6 @@ import { Layer } from "@fncts/io/Layer";
21
21
  import type { PHub } from "../Hub.js";
22
22
  import type { Canceler } from "../IO.js";
23
23
  import type { PDequeue, PEnqueue, PQueue } from "../Queue.js";
24
- import { MergeDecision } from "../Channel/internal/MergeDecision.js";
25
24
  import { Hub } from "../Hub.js";
26
25
  import { Queue } from "../Queue.js";
27
26
  import { Stream } from "./definition.js";
@@ -310,6 +309,11 @@ export declare function contramapEnvironment<R, R0>(f: (r0: Environment<R0>) =>
310
309
  * @tsplus location "@fncts/io/Stream/api"
311
310
  */
312
311
  export declare function debounce(duration: Lazy<Duration>, __tsplusTrace?: string): <R, E, A>(stream: Stream<R, E, A>) => Stream<R, E, A>;
312
+ /**
313
+ * @tsplus static fncts.io.StreamOps defer
314
+ * @tsplus location "@fncts/io/Stream/api"
315
+ */
316
+ export declare function defer<R, E, A>(self: Lazy<Stream<R, E, A>>): Stream<R, E, A>;
313
317
  /**
314
318
  * Switches to the provided stream in case this one is empty.
315
319
  * @tsplus pipeable fncts.io.Stream defaultIfEmpty
@@ -341,7 +345,7 @@ export declare function distributedWithDynamic<E, A>(maximumLag: number, decide:
341
345
  * @tsplus getter fncts.io.Stream drain
342
346
  * @tsplus location "@fncts/io/Stream/api"
343
347
  */
344
- export declare function drain<R, E, A>(fa: Stream<R, E, A>, __tsplusTrace?: string): Stream<R, E, void>;
348
+ export declare function drain<R, E, A>(fa: Stream<R, E, A>, __tsplusTrace?: string): Stream<R, E, never>;
345
349
  /**
346
350
  * Drops the specified number of elements from this stream.
347
351
  * @tsplus pipeable fncts.io.Stream drop
@@ -416,6 +420,12 @@ export declare function environmentWithIO<R0, R, E, A>(f: (r0: Environment<R0>)
416
420
  * @tsplus location "@fncts/io/Stream/api"
417
421
  */
418
422
  export declare function environmentWithStream<R0, R, E, A>(f: (r0: Environment<R0>) => Stream<R, E, A>, __tsplusTrace?: string): Stream<R0 | R, E, A>;
423
+ /**
424
+ * Creates a stream that executes the specified effect but emits no elements.
425
+ * @tsplus static fncts.io.StreamOps execute
426
+ * @tsplus location "@fncts/io/Stream/api"
427
+ */
428
+ export declare function execute<R, E>(io: IO<R, E, any>, __tsplusTrace?: string): Stream<R, E, never>;
419
429
  /**
420
430
  * Halt a stream with the specified error
421
431
  * @tsplus static fncts.io.StreamOps failNow
@@ -525,6 +535,12 @@ export declare function fromChunk<O>(c: Lazy<Conc<O>>, __tsplusTrace?: string):
525
535
  * @tsplus location "@fncts/io/Stream/api"
526
536
  */
527
537
  export declare function scoped<R, E, A>(stream: Lazy<IO<R, E, A>>, __tsplusTrace?: string): Stream<Exclude<R, Scope>, E, A>;
538
+ /**
539
+ * Emits a sliding window of n elements.
540
+ * @tsplus pipeable fncts.io.Stream sliding
541
+ * @tsplus location "@fncts/io/Stream/api"
542
+ */
543
+ export declare function sliding(chunkSize: number, stepSize: number, __tsplusTrace?: string): <R, E, A>(self: Stream<R, E, A>) => Stream<R, E, import("@fncts/base/collection/immutable/Conc.js").Conc<A>>;
528
544
  /**
529
545
  * Creates a stream from an effect producing a value of type `A`
530
546
  * @tsplus static fncts.io.StreamOps fromIO
@@ -729,10 +745,59 @@ export declare function mapIO<A, R1, E1, B>(f: (a: A) => IO<R1, E1, B>, __tsplus
729
745
  * executing up to `n` invocations of `f` concurrently. Transformed elements
730
746
  * will be emitted in the original order.
731
747
  * @note This combinator destroys the chunking structure. It's recommended to use chunkN afterwards.
732
- * @tsplus pipeable fncts.io.Stream mapIOC
748
+ * @tsplus pipeable fncts.io.Stream mapIOConcurrently
749
+ * @tsplus location "@fncts/io/Stream/api"
750
+ */
751
+ export declare function mapIOConcurrently<A, R1, E1, B>(n: number, f: (a: A) => IO<R1, E1, B>, __tsplusTrace?: string): <R, E>(stream: Stream<R, E, A>) => Stream<R1 | R, E1 | E, B>;
752
+ /**
753
+ * @tsplus pipeable fncts.io.Stream mapIOConcurrentlyUnordered
754
+ * @tsplus location "@fncts/io/Stream/api"
755
+ */
756
+ export declare function mapIOConcurrentlyUnordered<A, R1, E1, B>(n: number, f: (a: A) => IO<R1, E1, B>): <R, E>(self: Stream<R, E, A>) => Stream<R1 | R, E1 | E, B>;
757
+ /**
758
+ * Merges this stream and the specified stream together.
759
+ *
760
+ * New produced stream will terminate when both specified stream terminate if
761
+ * no termination strategy is specified.
762
+ * @tsplus pipeable fncts.io.Stream merge
763
+ * @tsplus location "@fncts/io/Stream/api"
764
+ */
765
+ export declare function merge<R1, E1, B>(that: Stream<R1, E1, B>, strategy?: TerminationStrategy, __tsplusTrace?: string): <R, E, A>(self: Stream<R, E, A>) => Stream<R1 | R, E1 | E, B | A>;
766
+ /**
767
+ * Merges this stream and the specified stream together. New produced stream
768
+ * will terminate when either stream terminates.
769
+ * @tsplus pipeable fncts.io.Stream mergeHaltEither
770
+ * @tsplus location "@fncts/io/Stream/api"
771
+ */
772
+ export declare function mergeHaltEither<R1, E1, B>(that: Stream<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: Stream<R, E, A>) => Stream<R1 | R, E1 | E, B | A>;
773
+ /**
774
+ * Merges this stream and the specified stream together. New produced stream
775
+ * will terminate when this stream terminates.
776
+ * @tsplus pipeable fncts.io.Stream mergeHaltLeft
777
+ * @tsplus location "@fncts/io/Stream/api"
778
+ */
779
+ export declare function mergeHaltLeft<R1, E1, B>(that: Stream<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: Stream<R, E, A>) => Stream<R1 | R, E1 | E, B | A>;
780
+ /**
781
+ * Merges this stream and the specified stream together. New produced stream
782
+ * will terminate when the specified stream terminates.
783
+ * @tsplus pipeable fncts.io.Stream mergeHaltRight
784
+ * @tsplus location "@fncts/io/Stream/api"
785
+ */
786
+ export declare function mergeHaltRight<R1, E1, B>(that: Stream<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: Stream<R, E, A>) => Stream<R1 | R, E1 | E, B | A>;
787
+ /**
788
+ * Merges this stream and the specified stream together, discarding the values
789
+ * from the right stream.
790
+ * @tsplus pipeable fncts.io.Stream mergeLeft
733
791
  * @tsplus location "@fncts/io/Stream/api"
734
792
  */
735
- export declare function mapIOC<A, R1, E1, B>(n: number, f: (a: A) => IO<R1, E1, B>, __tsplusTrace?: string): <R, E>(stream: Stream<R, E, A>) => Stream<R1 | R, E1 | E, B>;
793
+ export declare function mergeLeft<R1, E1, B>(that: Stream<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: Stream<R, E, A>) => Stream<R1 | R, E1 | E, A>;
794
+ /**
795
+ * Merges this stream and the specified stream together, discarding the values
796
+ * from the left stream.
797
+ * @tsplus pipeable fncts.io.Stream mergeRight
798
+ * @tsplus location "@fncts/io/Stream/api"
799
+ */
800
+ export declare function mergeRight<R1, E1, B>(that: Stream<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: Stream<R, E, A>) => Stream<R1 | R, E1 | E, B>;
736
801
  /**
737
802
  * Maps each element of this stream to another stream and returns the
738
803
  * non-deterministic merge of those streams, executing up to `n` inner streams
@@ -755,7 +820,6 @@ export declare function mergeMapIO<A, R1, E1, B>(f: (a: A) => IO<R1, E1, B>, n:
755
820
  * @tsplus location "@fncts/io/Stream/api"
756
821
  */
757
822
  export declare function mergeEither<R1, E1, B>(fb: Stream<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(fa: Stream<R, E, A>) => Stream<R1 | R, E1 | E, import("@fncts/base/data/Either.js").Either<A, B>>;
758
- export declare function mergeWithHandler<R, E>(terminate: boolean, __tsplusTrace?: string): (exit: Exit<E, unknown>) => MergeDecision<R, E, unknown, E, unknown>;
759
823
  export type TerminationStrategy = "Left" | "Right" | "Both" | "Either";
760
824
  /**
761
825
  * @tsplus pipeable fncts.io.Stream mergeWith
@@ -811,6 +875,11 @@ export declare function orElseSucceed<A1>(a: Lazy<A1>, __tsplusTrace?: string):
811
875
  * @tsplus location "@fncts/io/Stream/api"
812
876
  */
813
877
  export declare function pipeThrough<A, R1, E1, L, Z>(sa: Sink<R1, E1, A, L, Z>, __tsplusTrace?: string): <R, E>(ma: Stream<R, E, A>) => Stream<R1 | R, E1 | E, L>;
878
+ /**
879
+ * @tsplus pipeable fncts.io.Stream pipeThroughChannelOrFail
880
+ * @tsplus location "@fncts/io/Stream/api"
881
+ */
882
+ export declare function pipeThroughChannelOrFail<A, R1, E1, B>(channel: Channel<R1, never, Conc<A>, any, E1, Conc<B>, any>): <R, E>(self: Stream<R, E, A>) => Stream<R1 | R, E1 | E, B>;
814
883
  /**
815
884
  * Provides the stream with its required environment, which eliminates
816
885
  * its dependency on `R`.
@@ -903,6 +972,13 @@ export declare function runIntoElementsScoped_<E, A, R1, E1>(queue: PQueue<R1, u
903
972
  * @tsplus location "@fncts/io/Stream/api"
904
973
  */
905
974
  export declare function runIntoQueueScoped<RA, RB, EA, EB, E1, A, B>(queue: PEnqueue<RA, RB, EA, EB, Take<E1, A>, B>, __tsplusTrace?: string): <R, E extends E1>(stream: Stream<R, E, A>) => import("../IO.js").IO<import("../Scope.js").Scope | RA | R, EA | E1 | E, void>;
975
+ /**
976
+ * Like runIntoQueue, but provides the result as a scoped IO
977
+ * to allow for scope composition.
978
+ * @tsplus pipeable fncts.io.Stream runIntoQueueElementsScoped
979
+ * @tsplus location "@fncts/io/Stream/api"
980
+ */
981
+ export declare function runIntoQueueElementsScoped<E, A>(queue: Lazy<Queue.Enqueue<Exit<Maybe<E>, A>>>): <R>(self: Stream<R, E, A>) => import("../IO.js").IO<import("../Scope.js").Scope | R, never, void>;
906
982
  /**
907
983
  * Like `Stream#runIntoHub`, but provides the result as a `Managed` to allow for scope
908
984
  * composition.
@@ -944,6 +1020,11 @@ export declare function scanReduce<A extends B, B>(f: (b: B, a: A) => B, __tsplu
944
1020
  * @tsplus location "@fncts/io/Stream/api"
945
1021
  */
946
1022
  export declare function scanReduceIO<A extends B, R1, E1, B>(f: (b: B, a: A) => IO<R1, E1, B>, __tsplusTrace?: string): <R, E>(fa: Stream<R, E, A>) => Stream<R1 | R, E1 | E, B>;
1023
+ /**
1024
+ * @tsplus pipeable fncts.io.Stream split
1025
+ * @tsplus location "@fncts/io/Stream/api"
1026
+ */
1027
+ export declare function split<A>(predicate: Predicate<A>, __tsplusTrace?: string): <R, E>(self: Stream<R, E, A>) => Stream<R, E, import("@fncts/base/collection/immutable/Conc.js").Conc<A>>;
947
1028
  /**
948
1029
  * Creates a single-valued pure stream
949
1030
  * @tsplus static fncts.io.StreamOps succeedNow
@@ -979,6 +1060,33 @@ export declare function takeUntil<A>(p: Predicate<A>, __tsplusTrace?: string): <
979
1060
  * @tsplus location "@fncts/io/Stream/api"
980
1061
  */
981
1062
  export declare function tap<A, R1, E1>(f: (a: A) => IO<R1, E1, any>, __tsplusTrace?: string): <R, E>(ma: Stream<R, E, A>) => Stream<R1 | R, E1 | E, A>;
1063
+ /**
1064
+ * Returns a stream that effectfully "peeks" at the failure and adds an effect
1065
+ * to consumption of every element of the stream
1066
+ * @tsplus pipeable fncts.io.Stream tapBoth
1067
+ * @tsplus location "@fncts/io/Stream/api"
1068
+ */
1069
+ export declare function tapBoth<E, A, R1, E1, R2, E2>(f: (e: E) => IO<R1, E1, any>, g: (a: A) => IO<R2, E2, any>, __tsplusTrace?: string): <R>(self: Stream<R, E, A>) => Stream<R1 | R2 | R, E | E1 | E2, A>;
1070
+ /**
1071
+ * Returns a stream that effectfully "peeks" at the failure of the stream.
1072
+ * @tsplus pipeable fncts.io.Stream tapError
1073
+ * @tsplus location "@fncts/io/Stream/api"
1074
+ */
1075
+ export declare function tapError<E, R1, E1>(f: (e: E) => IO<R1, E1, any>, __tsplusTrace?: string): <R, A>(self: Stream<R, E, A>) => Stream<R1 | R, E | E1, A>;
1076
+ /**
1077
+ * Returns a stream that effectfully "peeks" at the cause of failure of the
1078
+ * stream.
1079
+ * @tsplus pipeable fncts.io.Stream tapErrorCause
1080
+ * @tsplus location "@fncts/io/Stream/api"
1081
+ */
1082
+ export declare function tapErrorCause<E, R1, E1>(f: (cause: Cause<E>) => IO<R1, E1, any>, __tsplusTrace?: string): <R, A>(self: Stream<R, E, A>) => Stream<R1 | R, E | E1, A>;
1083
+ /**
1084
+ * Sends all elements emitted by this stream to the specified sink in addition
1085
+ * to emitting them.
1086
+ * @tsplus pipeable fncts.io.Stream tapSink
1087
+ * @tsplus location "@fncts/io/Stream/api"
1088
+ */
1089
+ export declare function tapSink<A, R1, E1>(sink: Sink<R1, E1, A, any, any>, __tsplusTrace?: string): <R, E>(self: Stream<R, E, A>) => Stream<R1 | R, E1 | E, A>;
982
1090
  /**
983
1091
  * Throttles the chunks of this stream according to the given bandwidth parameters using the token bucket
984
1092
  * algorithm. Allows for burst in the processing of elements by allowing the token bucket to accumulate
@@ -34,7 +34,7 @@ function mapOutConcurrentIO(n, f) {
34
34
  return tsplus_module_2.unwrapScoped(() => tsplus_module_5.map(queue => {
35
35
  const consumer = tsplus_module_2.unwrap(() => tsplus_module_5.matchCause(tsplus_module_1.failCauseNow, r => tsplus_module_3.match(tsplus_module_1.endNow, outElem => tsplus_module_1.zipRight(consumer)(tsplus_module_2.writeNow(outElem)))(r), fileName_1 + ":58:42")(tsplus_module_5.flatten(tsplus_module_4.take(queue, fileName_1 + ":58:18"), fileName_1 + ":58:23")));
36
36
  return consumer;
37
- }, fileName_1 + ":55:12")(tsplus_module_19.withChildren(getChildren => tsplus_module_5.flatMap(() => tsplus_module_5.flatMap(queue => tsplus_module_5.flatMap(errorSignal => tsplus_module_5.flatMap(permits => tsplus_module_5.flatMap(pull => tsplus_module_5.map(() => queue, fileName_1 + ":24:12")(tsplus_module_12.fork(tsplus_module_7.uninterruptible(tsplus_module_5.forever(tsplus_module_5.matchCauseIO(cause => tsplus_module_4.offer(tsplus_module_5.failCauseNow(cause, fileName_1 + ":26:53"), fileName_1 + ":26:37")(queue), r => tsplus_module_3.match(outDone => tsplus_module_5.asUnit(tsplus_module_5.zipRight(tsplus_module_4.offer(tsplus_module_5.succeedNow(tsplus_module_6.left(outDone), fileName_1 + ":32:72"), fileName_1 + ":32:58")(queue), fileName_1 + ":32:46")(tsplus_module_7.interruptible(permits.withPermits(n)(tsplus_module_5.unit), fileName_1 + ":31:47")), fileName_1 + ":32:96"), outElem => tsplus_module_5.flatMap(p => tsplus_module_5.flatMap(latch => tsplus_module_5.flatMap(() => tsplus_module_5.flatMap(() => tsplus_module_5.map(() => void 0, fileName_1 + ":48:24")(tsplus_module_8.wait(latch, fileName_1 + ":48:30")), fileName_1 + ":38:24")(permits.withPermit(tsplus_module_5.zipRight(tsplus_module_10.fulfill(p, fileName_1 + ":44:39")(tsplus_module_5.tapErrorCause(c => tsplus_module_8.failCause(c, fileName_1 + ":43:64")(p), fileName_1 + ":43:45")(tsplus_module_9.raceFirst(f(outElem), fileName_1 + ":42:41")(tsplus_module_8.wait(errorSignal, fileName_1 + ":41:40")))), fileName_1 + ":40:60")(tsplus_module_8.succeed_(undefined, fileName_1 + ":40:40")(latch)))), fileName_1 + ":37:24")(tsplus_module_4.offer(tsplus_module_5.map(tsplus_module_6.right, fileName_1 + ":37:48")(tsplus_module_8.wait(p, fileName_1 + ":37:38")), fileName_1 + ":37:36")(queue)), fileName_1 + ":36:38")(tsplus_module_11.make(fileName_1 + ":36:50")), fileName_1 + ":35:38")(tsplus_module_11.make(fileName_1 + ":35:50")))(r), fileName_1 + ":25:30")(pull), fileName_1 + ":51:14"), fileName_1 + ":51:22"), fileName_1 + ":51:38")), fileName_1 + ":23:32")(tsplus_module_13.toPull(self)), fileName_1 + ":22:32")(tsplus_module_14.makeSemaphore(n, fileName_1 + ":22:42")), fileName_1 + ":21:32")(tsplus_module_11.make(fileName_1 + ":21:44")), fileName_1 + ":15:26")(tsplus_module_16.acquireRelease(() => tsplus_module_15.makeBounded(n, fileName_1 + ":17:32"), queue => tsplus_module_4.shutdown(queue, fileName_1 + ":18:31"), fileName_1 + ":16:30")), fileName_1 + ":14:12")(tsplus_module_18.addFinalizer(() => tsplus_module_5.flatMap(tsplus_module_17.interruptAll, fileName_1 + ":14:48")(getChildren), fileName_1 + ":14:28")), fileName_1 + ":12:22")));
37
+ }, fileName_1 + ":55:12")(tsplus_module_19.withChildren(getChildren => tsplus_module_5.flatMap(() => tsplus_module_5.flatMap(queue => tsplus_module_5.flatMap(errorSignal => tsplus_module_5.flatMap(permits => tsplus_module_5.flatMap(pull => tsplus_module_5.map(() => queue, fileName_1 + ":24:12")(tsplus_module_12.fork(tsplus_module_7.uninterruptible(tsplus_module_5.forever(tsplus_module_5.matchCauseIO(cause => tsplus_module_4.offer(tsplus_module_5.failCauseNow(cause, fileName_1 + ":26:53"), fileName_1 + ":26:37")(queue), r => tsplus_module_3.match(outDone => tsplus_module_5.asUnit(tsplus_module_5.zipRight(tsplus_module_4.offer(tsplus_module_5.succeedNow(tsplus_module_6.left(outDone, fileName_1 + ":32:84"), fileName_1 + ":32:72"), fileName_1 + ":32:58")(queue), fileName_1 + ":32:46")(tsplus_module_7.interruptible(permits.withPermits(n)(tsplus_module_5.unit), fileName_1 + ":31:47")), fileName_1 + ":32:96"), outElem => tsplus_module_5.flatMap(p => tsplus_module_5.flatMap(latch => tsplus_module_5.flatMap(() => tsplus_module_5.flatMap(() => tsplus_module_5.map(() => void 0, fileName_1 + ":48:24")(tsplus_module_8.wait(latch, fileName_1 + ":48:30")), fileName_1 + ":38:24")(permits.withPermit(tsplus_module_5.zipRight(tsplus_module_10.fulfill(p, fileName_1 + ":44:39")(tsplus_module_5.tapErrorCause(c => tsplus_module_8.failCause(c, fileName_1 + ":43:64")(p), fileName_1 + ":43:45")(tsplus_module_9.raceFirst(f(outElem), fileName_1 + ":42:41")(tsplus_module_8.wait(errorSignal, fileName_1 + ":41:40")))), fileName_1 + ":40:60")(tsplus_module_8.succeed_(undefined, fileName_1 + ":40:40")(latch)))), fileName_1 + ":37:24")(tsplus_module_4.offer(tsplus_module_5.map(tsplus_module_6.right, fileName_1 + ":37:48")(tsplus_module_8.wait(p, fileName_1 + ":37:38")), fileName_1 + ":37:36")(queue)), fileName_1 + ":36:38")(tsplus_module_11.make(fileName_1 + ":36:50")), fileName_1 + ":35:38")(tsplus_module_11.make(fileName_1 + ":35:50")))(r), fileName_1 + ":25:30")(pull), fileName_1 + ":51:14"), fileName_1 + ":51:22"), fileName_1 + ":51:38")), fileName_1 + ":23:32")(tsplus_module_13.toPull(self)), fileName_1 + ":22:32")(tsplus_module_14.makeSemaphore(n, fileName_1 + ":22:42")), fileName_1 + ":21:32")(tsplus_module_11.make(fileName_1 + ":21:44")), fileName_1 + ":15:26")(tsplus_module_16.acquireRelease(() => tsplus_module_15.makeBounded(n, fileName_1 + ":17:32"), queue => tsplus_module_4.shutdown(queue, fileName_1 + ":18:31"), fileName_1 + ":16:30")), fileName_1 + ":14:12")(tsplus_module_18.addFinalizer(() => tsplus_module_5.flatMap(tsplus_module_17.interruptAll, fileName_1 + ":14:48")(getChildren), fileName_1 + ":14:28")), fileName_1 + ":12:22")));
38
38
  };
39
39
  }
40
40
  //# sourceMappingURL=mapOutConcurrentIO.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mapOutConcurrentIO.cjs","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;AAGM,SAAUA,kBAAkB,CAChCC,CAAS,EACTC,CAA8C;EAE9C,OACEC,IAAmE,IACgB;IACnF,OAAOC,mCACLC,oBA2COC,KAAK,IAAI;MACd,MAAMC,QAAQ,GACZH,6BACEC,yDAAqDG,CAAC,IACpDC,8CAAyBC,OAAO,IAAKC,yBAAmCJ,QAAQ,EAA3CH,yBAAiBM,OAAO,CAAC,CAAmB,EAAjFF,CAAC,CAAiF,sEADpFF,KAAK,iDAEJ,CACF;MACH,OAAOC,QAAQ;IACjB,CAAC,yBAnDDK,8BAAiBC,WAAW,IAAIR,sDAGtBC,KAAK,4BAMLQ,WAAW,4BACXC,OAAO,4BACPC,IAAI,8BA8BHV,KAAK,uGA5BVD,6BACGY,KAAK,IAAKC,sBAAYb,6BAAgBY,KAAK,wBAAC,yBAAlCX,KAAK,CAA8B,EAC7CE,CAAC,IACAC,sBACGU,OAAO,IAAId,uBACVA,yBAE0Ba,sBAAYb,2BAAce,qBAAYD,OAAO,CAAC,wBAAC,yBAA/Cb,KAAK,CAA2C,uDAF1ES,OAAO,CACJM,WAAW,CAACpB,CAAC,CAAC,sBAAS,yBACiD,wBAAO,EACnFS,OAAO,IAAIL,wBAEFiB,CAAC,4BACDC,KAAK,8IAYTA,KAAK,kDATLR,OAAO,CAACS,UAAU,CAChBnB,yBACEoB,yBAGWH,CAAC,yBAHZjB,8BAEkBqB,CAAC,IAAKC,0BAAYD,CAAC,yBAAbJ,CAAC,CAAa,yBAFtCM,0BACa1B,CAAC,CAACQ,OAAO,CAAC,8CADvBI,WAAW,yBACa,CACe,CAC1B,yBAJfa,yBAAcE,SAAS,yBAAvBN,KAAK,CAAmB,CAKvB,CACF,0BATDL,sBAAYb,wFAAC,yBAAwB,yBAArCC,KAAK,CAAiC,0BADxBwB,4CAA0B,0BAD1BA,4CAAgC,CAchD,EArBNtB,CAAC,CAsBA,yBAzBLQ,IAAI,CA0BH,0HA5BmBb,IAAI,2BADJ4B,+BAAU9B,CAAC,wBAAC,0BADZ6B,4CAA6B,0BALjDE,sCACEC,6BAAyEhC,CAAC,wBAAC,EAC1EK,KAAK,IAAIY,yBAACZ,KAAK,wBAAS,wBAC1B,0BALD4B,oCAAgB7B,yFAAW,CAA4B,wBAAC,CAwC1D,wBACH,CAQC,CACH;EACH,CAAC;AACH","names":["mapOutConcurrentIO","n","f","self","tsplus_module_2","tsplus_module_5","queue","consumer","r","tsplus_module_3","outElem","tsplus_module_1","tsplus_module_19","getChildren","errorSignal","permits","pull","cause","tsplus_module_4","outDone","tsplus_module_6","withPermits","p","latch","withPermit","tsplus_module_10","c","tsplus_module_8","tsplus_module_9","undefined","tsplus_module_11","tsplus_module_14","tsplus_module_16","tsplus_module_15","tsplus_module_18"],"sourceRoot":"","sources":["../../../_src/Channel/api/mapOutConcurrentIO.ts"],"sourcesContent":[null]}
1
+ {"version":3,"file":"mapOutConcurrentIO.cjs","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;AAGM,SAAUA,kBAAkB,CAChCC,CAAS,EACTC,CAA8C;EAE9C,OACEC,IAAmE,IACgB;IACnF,OAAOC,mCACLC,oBA2COC,KAAK,IAAI;MACd,MAAMC,QAAQ,GACZH,6BACEC,yDAAqDG,CAAC,IACpDC,8CAAyBC,OAAO,IAAKC,yBAAmCJ,QAAQ,EAA3CH,yBAAiBM,OAAO,CAAC,CAAmB,EAAjFF,CAAC,CAAiF,sEADpFF,KAAK,iDAEJ,CACF;MACH,OAAOC,QAAQ;IACjB,CAAC,yBAnDDK,8BAAiBC,WAAW,IAAIR,sDAGtBC,KAAK,4BAMLQ,WAAW,4BACXC,OAAO,4BACPC,IAAI,8BA8BHV,KAAK,uGA5BVD,6BACGY,KAAK,IAAKC,sBAAYb,6BAAgBY,KAAK,wBAAC,yBAAlCX,KAAK,CAA8B,EAC7CE,CAAC,IACAC,sBACGU,OAAO,IAAId,uBACVA,yBAE0Ba,sBAAYb,2BAAce,qBAAYD,OAAO,wBAAC,wBAAC,yBAA/Cb,KAAK,CAA2C,uDAF1ES,OAAO,CACJM,WAAW,CAACpB,CAAC,CAAC,sBAAS,yBACiD,wBAAO,EACnFS,OAAO,IAAIL,wBAEFiB,CAAC,4BACDC,KAAK,8IAYTA,KAAK,kDATLR,OAAO,CAACS,UAAU,CAChBnB,yBACEoB,yBAGWH,CAAC,yBAHZjB,8BAEkBqB,CAAC,IAAKC,0BAAYD,CAAC,yBAAbJ,CAAC,CAAa,yBAFtCM,0BACa1B,CAAC,CAACQ,OAAO,CAAC,8CADvBI,WAAW,yBACa,CACe,CAC1B,yBAJfa,yBAAcE,SAAS,yBAAvBN,KAAK,CAAmB,CAKvB,CACF,0BATDL,sBAAYb,wFAAC,yBAAwB,yBAArCC,KAAK,CAAiC,0BADxBwB,4CAA0B,0BAD1BA,4CAAgC,CAchD,EArBNtB,CAAC,CAsBA,yBAzBLQ,IAAI,CA0BH,0HA5BmBb,IAAI,2BADJ4B,+BAAU9B,CAAC,wBAAC,0BADZ6B,4CAA6B,0BALjDE,sCACEC,6BAAyEhC,CAAC,wBAAC,EAC1EK,KAAK,IAAIY,yBAACZ,KAAK,wBAAS,wBAC1B,0BALD4B,oCAAgB7B,yFAAW,CAA4B,wBAAC,CAwC1D,wBACH,CAQC,CACH;EACH,CAAC;AACH","names":["mapOutConcurrentIO","n","f","self","tsplus_module_2","tsplus_module_5","queue","consumer","r","tsplus_module_3","outElem","tsplus_module_1","tsplus_module_19","getChildren","errorSignal","permits","pull","cause","tsplus_module_4","outDone","tsplus_module_6","withPermits","p","latch","withPermit","tsplus_module_10","c","tsplus_module_8","tsplus_module_9","undefined","tsplus_module_11","tsplus_module_14","tsplus_module_16","tsplus_module_15","tsplus_module_18"],"sourceRoot":"","sources":["../../../_src/Channel/api/mapOutConcurrentIO.ts"],"sourcesContent":[null]}