@typed/fx 1.12.5 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (446) hide show
  1. package/dist/RefSubject.d.ts +2 -1
  2. package/dist/RefSubject.d.ts.map +1 -1
  3. package/dist/RefSubject.js +4 -1
  4. package/dist/RefSubject.js.map +1 -1
  5. package/dist/Subject.d.ts +1 -1
  6. package/dist/Subject.d.ts.map +1 -1
  7. package/dist/Subject.js +2 -1
  8. package/dist/Subject.js.map +1 -1
  9. package/dist/at.d.ts +1 -1
  10. package/dist/at.d.ts.map +1 -1
  11. package/dist/at.js +1 -1
  12. package/dist/at.js.map +1 -1
  13. package/dist/catchAllCause.d.ts +2 -1
  14. package/dist/catchAllCause.d.ts.map +1 -1
  15. package/dist/catchAllCause.js +2 -1
  16. package/dist/catchAllCause.js.map +1 -1
  17. package/dist/cjs/RefSubject.d.ts +2 -1
  18. package/dist/cjs/RefSubject.d.ts.map +1 -1
  19. package/dist/cjs/RefSubject.js +72 -69
  20. package/dist/cjs/RefSubject.js.map +1 -1
  21. package/dist/cjs/Subject.d.ts +1 -1
  22. package/dist/cjs/Subject.d.ts.map +1 -1
  23. package/dist/cjs/Subject.js +27 -3
  24. package/dist/cjs/Subject.js.map +1 -1
  25. package/dist/cjs/at.d.ts +1 -1
  26. package/dist/cjs/at.d.ts.map +1 -1
  27. package/dist/cjs/at.js +25 -2
  28. package/dist/cjs/at.js.map +1 -1
  29. package/dist/cjs/catchAllCause.d.ts +2 -1
  30. package/dist/cjs/catchAllCause.d.ts.map +1 -1
  31. package/dist/cjs/catchAllCause.js +26 -2
  32. package/dist/cjs/catchAllCause.js.map +1 -1
  33. package/dist/cjs/combineAll.d.ts.map +1 -1
  34. package/dist/cjs/combineAll.js +28 -5
  35. package/dist/cjs/combineAll.js.map +1 -1
  36. package/dist/cjs/combineAllDiscard.d.ts.map +1 -1
  37. package/dist/cjs/combineAllDiscard.js +27 -4
  38. package/dist/cjs/combineAllDiscard.js.map +1 -1
  39. package/dist/cjs/continueWith.d.ts +1 -1
  40. package/dist/cjs/continueWith.d.ts.map +1 -1
  41. package/dist/cjs/continueWith.js +25 -2
  42. package/dist/cjs/continueWith.js.map +1 -1
  43. package/dist/cjs/debounce.d.ts +1 -1
  44. package/dist/cjs/debounce.d.ts.map +1 -1
  45. package/dist/cjs/debounce.js +25 -2
  46. package/dist/cjs/debounce.js.map +1 -1
  47. package/dist/cjs/delay.d.ts.map +1 -1
  48. package/dist/cjs/delay.js +25 -2
  49. package/dist/cjs/delay.js.map +1 -1
  50. package/dist/cjs/exhaustMap.d.ts +1 -1
  51. package/dist/cjs/exhaustMap.d.ts.map +1 -1
  52. package/dist/cjs/exhaustMap.js.map +1 -1
  53. package/dist/cjs/exhaustMapCause.d.ts +2 -1
  54. package/dist/cjs/exhaustMapCause.d.ts.map +1 -1
  55. package/dist/cjs/exhaustMapCause.js +26 -2
  56. package/dist/cjs/exhaustMapCause.js.map +1 -1
  57. package/dist/cjs/exhaustMapLatest.d.ts +1 -1
  58. package/dist/cjs/exhaustMapLatest.d.ts.map +1 -1
  59. package/dist/cjs/exhaustMapLatest.js.map +1 -1
  60. package/dist/cjs/exhaustMapLatestCause.d.ts +2 -1
  61. package/dist/cjs/exhaustMapLatestCause.d.ts.map +1 -1
  62. package/dist/cjs/exhaustMapLatestCause.js +26 -2
  63. package/dist/cjs/exhaustMapLatestCause.js.map +1 -1
  64. package/dist/cjs/filter.d.ts.map +1 -1
  65. package/dist/cjs/filter.js +25 -2
  66. package/dist/cjs/filter.js.map +1 -1
  67. package/dist/cjs/filterMap.d.ts +1 -1
  68. package/dist/cjs/filterMap.d.ts.map +1 -1
  69. package/dist/cjs/filterMap.js +26 -2
  70. package/dist/cjs/filterMap.js.map +1 -1
  71. package/dist/cjs/flatMap.d.ts +1 -1
  72. package/dist/cjs/flatMap.d.ts.map +1 -1
  73. package/dist/cjs/flatMap.js.map +1 -1
  74. package/dist/cjs/fromArray.d.ts.map +1 -1
  75. package/dist/cjs/fromArray.js +27 -4
  76. package/dist/cjs/fromArray.js.map +1 -1
  77. package/dist/cjs/fromEffect.d.ts +1 -1
  78. package/dist/cjs/fromEffect.d.ts.map +1 -1
  79. package/dist/cjs/fromEffect.js +25 -2
  80. package/dist/cjs/fromEffect.js.map +1 -1
  81. package/dist/cjs/fromEmitter.d.ts +2 -2
  82. package/dist/cjs/fromEmitter.d.ts.map +1 -1
  83. package/dist/cjs/fromEmitter.js +34 -9
  84. package/dist/cjs/fromEmitter.js.map +1 -1
  85. package/dist/cjs/fromFxEffect.d.ts +1 -1
  86. package/dist/cjs/fromFxEffect.d.ts.map +1 -1
  87. package/dist/cjs/fromFxEffect.js +25 -2
  88. package/dist/cjs/fromFxEffect.js.map +1 -1
  89. package/dist/cjs/fromIterable.d.ts.map +1 -1
  90. package/dist/cjs/fromIterable.js +27 -4
  91. package/dist/cjs/fromIterable.js.map +1 -1
  92. package/dist/cjs/gen.d.ts +1 -1
  93. package/dist/cjs/gen.d.ts.map +1 -1
  94. package/dist/cjs/gen.js +25 -2
  95. package/dist/cjs/gen.js.map +1 -1
  96. package/dist/cjs/helpers.d.ts +2 -1
  97. package/dist/cjs/helpers.d.ts.map +1 -1
  98. package/dist/cjs/helpers.js +64 -36
  99. package/dist/cjs/helpers.js.map +1 -1
  100. package/dist/cjs/hold.d.ts +3 -1
  101. package/dist/cjs/hold.d.ts.map +1 -1
  102. package/dist/cjs/hold.js +32 -7
  103. package/dist/cjs/hold.js.map +1 -1
  104. package/dist/cjs/index.d.ts +7 -1
  105. package/dist/cjs/index.d.ts.map +1 -1
  106. package/dist/cjs/index.js.map +1 -1
  107. package/dist/cjs/keyed.d.ts.map +1 -1
  108. package/dist/cjs/keyed.js +43 -28
  109. package/dist/cjs/keyed.js.map +1 -1
  110. package/dist/cjs/map.d.ts.map +1 -1
  111. package/dist/cjs/map.js +25 -2
  112. package/dist/cjs/map.js.map +1 -1
  113. package/dist/cjs/mergeAll.d.ts.map +1 -1
  114. package/dist/cjs/mergeAll.js +28 -3
  115. package/dist/cjs/mergeAll.js.map +1 -1
  116. package/dist/cjs/multicast.d.ts +5 -3
  117. package/dist/cjs/multicast.d.ts.map +1 -1
  118. package/dist/cjs/multicast.js +39 -15
  119. package/dist/cjs/multicast.js.map +1 -1
  120. package/dist/cjs/never.d.ts.map +1 -1
  121. package/dist/cjs/never.js +25 -2
  122. package/dist/cjs/never.js.map +1 -1
  123. package/dist/cjs/observe.d.ts +1 -1
  124. package/dist/cjs/observe.d.ts.map +1 -1
  125. package/dist/cjs/observe.js +34 -9
  126. package/dist/cjs/observe.js.map +1 -1
  127. package/dist/cjs/onInterrupt.d.ts +1 -1
  128. package/dist/cjs/onInterrupt.d.ts.map +1 -1
  129. package/dist/cjs/onInterrupt.js +25 -2
  130. package/dist/cjs/onInterrupt.js.map +1 -1
  131. package/dist/cjs/promise.d.ts.map +1 -1
  132. package/dist/cjs/promise.js +36 -13
  133. package/dist/cjs/promise.js.map +1 -1
  134. package/dist/cjs/provide.d.ts +3 -2
  135. package/dist/cjs/provide.d.ts.map +1 -1
  136. package/dist/cjs/provide.js +31 -7
  137. package/dist/cjs/provide.js.map +1 -1
  138. package/dist/cjs/reduce.d.ts +2 -1
  139. package/dist/cjs/reduce.d.ts.map +1 -1
  140. package/dist/cjs/reduce.js +26 -3
  141. package/dist/cjs/reduce.js.map +1 -1
  142. package/dist/cjs/scan.d.ts.map +1 -1
  143. package/dist/cjs/scan.js +26 -3
  144. package/dist/cjs/scan.js.map +1 -1
  145. package/dist/cjs/scoped.d.ts +1 -1
  146. package/dist/cjs/scoped.d.ts.map +1 -1
  147. package/dist/cjs/scoped.js +25 -2
  148. package/dist/cjs/scoped.js.map +1 -1
  149. package/dist/cjs/skipRepeats.d.ts.map +1 -1
  150. package/dist/cjs/skipRepeats.js +31 -7
  151. package/dist/cjs/skipRepeats.js.map +1 -1
  152. package/dist/cjs/skipWhile.d.ts.map +1 -1
  153. package/dist/cjs/skipWhile.js +27 -4
  154. package/dist/cjs/skipWhile.js.map +1 -1
  155. package/dist/cjs/slice.d.ts.map +1 -1
  156. package/dist/cjs/slice.js +29 -6
  157. package/dist/cjs/slice.js.map +1 -1
  158. package/dist/cjs/snapshotEffect.d.ts +1 -1
  159. package/dist/cjs/snapshotEffect.d.ts.map +1 -1
  160. package/dist/cjs/snapshotEffect.js +36 -10
  161. package/dist/cjs/snapshotEffect.js.map +1 -1
  162. package/dist/cjs/switchMap.d.ts +1 -1
  163. package/dist/cjs/switchMap.d.ts.map +1 -1
  164. package/dist/cjs/switchMap.js.map +1 -1
  165. package/dist/cjs/switchMapCause.d.ts +2 -1
  166. package/dist/cjs/switchMapCause.d.ts.map +1 -1
  167. package/dist/cjs/switchMapCause.js +26 -2
  168. package/dist/cjs/switchMapCause.js.map +1 -1
  169. package/dist/cjs/switchMatch.d.ts +2 -1
  170. package/dist/cjs/switchMatch.d.ts.map +1 -1
  171. package/dist/cjs/switchMatch.js +26 -2
  172. package/dist/cjs/switchMatch.js.map +1 -1
  173. package/dist/cjs/takeWhile.d.ts.map +1 -1
  174. package/dist/cjs/takeWhile.js +27 -4
  175. package/dist/cjs/takeWhile.js.map +1 -1
  176. package/dist/cjs/tap.d.ts +1 -1
  177. package/dist/cjs/tap.d.ts.map +1 -1
  178. package/dist/cjs/tap.js +26 -3
  179. package/dist/cjs/tap.js.map +1 -1
  180. package/dist/cjs/tapCause.d.ts +2 -1
  181. package/dist/cjs/tapCause.d.ts.map +1 -1
  182. package/dist/cjs/tapCause.js +29 -5
  183. package/dist/cjs/tapCause.js.map +1 -1
  184. package/dist/cjs/test-utils.d.ts +1 -1
  185. package/dist/cjs/test-utils.d.ts.map +1 -1
  186. package/dist/cjs/test-utils.js +32 -7
  187. package/dist/cjs/test-utils.js.map +1 -1
  188. package/dist/cjs/throttle.d.ts +1 -1
  189. package/dist/cjs/throttle.d.ts.map +1 -1
  190. package/dist/cjs/throttle.js +25 -2
  191. package/dist/cjs/throttle.js.map +1 -1
  192. package/dist/cjs/toArray.d.ts +1 -1
  193. package/dist/cjs/toArray.d.ts.map +1 -1
  194. package/dist/cjs/toArray.js +26 -3
  195. package/dist/cjs/toArray.js.map +1 -1
  196. package/dist/cjs/toChunk.d.ts +2 -1
  197. package/dist/cjs/toChunk.d.ts.map +1 -1
  198. package/dist/cjs/toChunk.js +28 -4
  199. package/dist/cjs/toChunk.js.map +1 -1
  200. package/dist/cjs/toReadonlyArray.d.ts +1 -1
  201. package/dist/cjs/toReadonlyArray.d.ts.map +1 -1
  202. package/dist/combineAll.d.ts.map +1 -1
  203. package/dist/combineAll.js +1 -1
  204. package/dist/combineAll.js.map +1 -1
  205. package/dist/combineAllDiscard.d.ts.map +1 -1
  206. package/dist/combineAllDiscard.js +1 -1
  207. package/dist/combineAllDiscard.js.map +1 -1
  208. package/dist/continueWith.d.ts +1 -1
  209. package/dist/continueWith.d.ts.map +1 -1
  210. package/dist/continueWith.js +1 -1
  211. package/dist/continueWith.js.map +1 -1
  212. package/dist/debounce.d.ts +1 -1
  213. package/dist/debounce.d.ts.map +1 -1
  214. package/dist/debounce.js +1 -1
  215. package/dist/debounce.js.map +1 -1
  216. package/dist/delay.d.ts.map +1 -1
  217. package/dist/delay.js +1 -1
  218. package/dist/delay.js.map +1 -1
  219. package/dist/exhaustMap.d.ts +1 -1
  220. package/dist/exhaustMap.d.ts.map +1 -1
  221. package/dist/exhaustMap.js.map +1 -1
  222. package/dist/exhaustMapCause.d.ts +2 -1
  223. package/dist/exhaustMapCause.d.ts.map +1 -1
  224. package/dist/exhaustMapCause.js +2 -1
  225. package/dist/exhaustMapCause.js.map +1 -1
  226. package/dist/exhaustMapLatest.d.ts +1 -1
  227. package/dist/exhaustMapLatest.d.ts.map +1 -1
  228. package/dist/exhaustMapLatest.js.map +1 -1
  229. package/dist/exhaustMapLatestCause.d.ts +2 -1
  230. package/dist/exhaustMapLatestCause.d.ts.map +1 -1
  231. package/dist/exhaustMapLatestCause.js +2 -1
  232. package/dist/exhaustMapLatestCause.js.map +1 -1
  233. package/dist/filter.d.ts.map +1 -1
  234. package/dist/filter.js +1 -1
  235. package/dist/filter.js.map +1 -1
  236. package/dist/filterMap.d.ts +1 -1
  237. package/dist/filterMap.d.ts.map +1 -1
  238. package/dist/filterMap.js +2 -1
  239. package/dist/filterMap.js.map +1 -1
  240. package/dist/flatMap.d.ts +1 -1
  241. package/dist/flatMap.d.ts.map +1 -1
  242. package/dist/flatMap.js.map +1 -1
  243. package/dist/fromArray.d.ts.map +1 -1
  244. package/dist/fromArray.js +1 -1
  245. package/dist/fromArray.js.map +1 -1
  246. package/dist/fromEffect.d.ts +1 -1
  247. package/dist/fromEffect.d.ts.map +1 -1
  248. package/dist/fromEffect.js +1 -1
  249. package/dist/fromEffect.js.map +1 -1
  250. package/dist/fromEmitter.d.ts +2 -2
  251. package/dist/fromEmitter.d.ts.map +1 -1
  252. package/dist/fromEmitter.js +3 -1
  253. package/dist/fromEmitter.js.map +1 -1
  254. package/dist/fromFxEffect.d.ts +1 -1
  255. package/dist/fromFxEffect.d.ts.map +1 -1
  256. package/dist/fromFxEffect.js +1 -1
  257. package/dist/fromFxEffect.js.map +1 -1
  258. package/dist/fromIterable.d.ts.map +1 -1
  259. package/dist/fromIterable.js +1 -1
  260. package/dist/fromIterable.js.map +1 -1
  261. package/dist/gen.d.ts +1 -1
  262. package/dist/gen.d.ts.map +1 -1
  263. package/dist/gen.js +1 -1
  264. package/dist/gen.js.map +1 -1
  265. package/dist/helpers.d.ts +2 -1
  266. package/dist/helpers.d.ts.map +1 -1
  267. package/dist/helpers.js +6 -1
  268. package/dist/helpers.js.map +1 -1
  269. package/dist/hold.d.ts +3 -1
  270. package/dist/hold.d.ts.map +1 -1
  271. package/dist/hold.js +3 -1
  272. package/dist/hold.js.map +1 -1
  273. package/dist/index.d.ts +7 -1
  274. package/dist/index.d.ts.map +1 -1
  275. package/dist/index.js.map +1 -1
  276. package/dist/keyed.d.ts.map +1 -1
  277. package/dist/keyed.js +43 -25
  278. package/dist/keyed.js.map +1 -1
  279. package/dist/map.d.ts.map +1 -1
  280. package/dist/map.js +1 -1
  281. package/dist/map.js.map +1 -1
  282. package/dist/mergeAll.d.ts.map +1 -1
  283. package/dist/mergeAll.js +3 -1
  284. package/dist/mergeAll.js.map +1 -1
  285. package/dist/multicast.d.ts +5 -3
  286. package/dist/multicast.d.ts.map +1 -1
  287. package/dist/multicast.js +2 -1
  288. package/dist/multicast.js.map +1 -1
  289. package/dist/never.d.ts.map +1 -1
  290. package/dist/never.js +1 -1
  291. package/dist/never.js.map +1 -1
  292. package/dist/observe.d.ts +1 -1
  293. package/dist/observe.d.ts.map +1 -1
  294. package/dist/observe.js +3 -1
  295. package/dist/observe.js.map +1 -1
  296. package/dist/onInterrupt.d.ts +1 -1
  297. package/dist/onInterrupt.d.ts.map +1 -1
  298. package/dist/onInterrupt.js +1 -1
  299. package/dist/onInterrupt.js.map +1 -1
  300. package/dist/promise.d.ts.map +1 -1
  301. package/dist/promise.js +1 -1
  302. package/dist/promise.js.map +1 -1
  303. package/dist/provide.d.ts +3 -2
  304. package/dist/provide.d.ts.map +1 -1
  305. package/dist/provide.js +2 -1
  306. package/dist/provide.js.map +1 -1
  307. package/dist/reduce.d.ts +2 -1
  308. package/dist/reduce.d.ts.map +1 -1
  309. package/dist/reduce.js +1 -1
  310. package/dist/reduce.js.map +1 -1
  311. package/dist/scan.d.ts.map +1 -1
  312. package/dist/scan.js +1 -1
  313. package/dist/scan.js.map +1 -1
  314. package/dist/scoped.d.ts +1 -1
  315. package/dist/scoped.d.ts.map +1 -1
  316. package/dist/scoped.js +1 -1
  317. package/dist/scoped.js.map +1 -1
  318. package/dist/skipRepeats.d.ts.map +1 -1
  319. package/dist/skipRepeats.js +2 -1
  320. package/dist/skipRepeats.js.map +1 -1
  321. package/dist/skipWhile.d.ts.map +1 -1
  322. package/dist/skipWhile.js +1 -1
  323. package/dist/skipWhile.js.map +1 -1
  324. package/dist/slice.d.ts.map +1 -1
  325. package/dist/slice.js +1 -1
  326. package/dist/slice.js.map +1 -1
  327. package/dist/snapshotEffect.d.ts +1 -1
  328. package/dist/snapshotEffect.d.ts.map +1 -1
  329. package/dist/snapshotEffect.js +4 -1
  330. package/dist/snapshotEffect.js.map +1 -1
  331. package/dist/switchMap.d.ts +1 -1
  332. package/dist/switchMap.d.ts.map +1 -1
  333. package/dist/switchMap.js.map +1 -1
  334. package/dist/switchMapCause.d.ts +2 -1
  335. package/dist/switchMapCause.d.ts.map +1 -1
  336. package/dist/switchMapCause.js +2 -1
  337. package/dist/switchMapCause.js.map +1 -1
  338. package/dist/switchMatch.d.ts +2 -1
  339. package/dist/switchMatch.d.ts.map +1 -1
  340. package/dist/switchMatch.js +2 -1
  341. package/dist/switchMatch.js.map +1 -1
  342. package/dist/takeWhile.d.ts.map +1 -1
  343. package/dist/takeWhile.js +1 -1
  344. package/dist/takeWhile.js.map +1 -1
  345. package/dist/tap.d.ts +1 -1
  346. package/dist/tap.d.ts.map +1 -1
  347. package/dist/tap.js +1 -1
  348. package/dist/tap.js.map +1 -1
  349. package/dist/tapCause.d.ts +2 -1
  350. package/dist/tapCause.d.ts.map +1 -1
  351. package/dist/tapCause.js +2 -1
  352. package/dist/tapCause.js.map +1 -1
  353. package/dist/test-utils.d.ts +1 -1
  354. package/dist/test-utils.d.ts.map +1 -1
  355. package/dist/test-utils.js +3 -1
  356. package/dist/test-utils.js.map +1 -1
  357. package/dist/throttle.d.ts +1 -1
  358. package/dist/throttle.d.ts.map +1 -1
  359. package/dist/throttle.js +1 -1
  360. package/dist/throttle.js.map +1 -1
  361. package/dist/toArray.d.ts +1 -1
  362. package/dist/toArray.d.ts.map +1 -1
  363. package/dist/toArray.js +1 -1
  364. package/dist/toArray.js.map +1 -1
  365. package/dist/toChunk.d.ts +2 -1
  366. package/dist/toChunk.d.ts.map +1 -1
  367. package/dist/toChunk.js +2 -1
  368. package/dist/toChunk.js.map +1 -1
  369. package/dist/toReadonlyArray.d.ts +1 -1
  370. package/dist/toReadonlyArray.d.ts.map +1 -1
  371. package/dist/tsconfig.cjs.build.tsbuildinfo +1 -1
  372. package/package.json +2 -2
  373. package/src/RefSubject.test.ts +5 -1
  374. package/src/RefSubject.ts +5 -2
  375. package/src/Subject.ts +2 -1
  376. package/src/at.ts +3 -2
  377. package/src/catchAllCause.test.ts +1 -1
  378. package/src/catchAllCause.ts +3 -1
  379. package/src/combineAll.ts +2 -1
  380. package/src/combineAllDiscard.ts +2 -1
  381. package/src/continueWith.ts +2 -1
  382. package/src/debounce.test.ts +1 -1
  383. package/src/debounce.ts +3 -2
  384. package/src/delay.test.ts +1 -1
  385. package/src/delay.ts +1 -1
  386. package/src/exhaustMap.test.ts +1 -1
  387. package/src/exhaustMap.ts +2 -1
  388. package/src/exhaustMapCause.test.ts +1 -1
  389. package/src/exhaustMapCause.ts +3 -1
  390. package/src/exhaustMapLatest.test.ts +1 -1
  391. package/src/exhaustMapLatest.ts +2 -1
  392. package/src/exhaustMapLatestCause.test.ts +1 -1
  393. package/src/exhaustMapLatestCause.ts +3 -1
  394. package/src/failCause.test.ts +2 -1
  395. package/src/filter.ts +1 -1
  396. package/src/filterMap.ts +3 -1
  397. package/src/flatMap.test.ts +1 -1
  398. package/src/flatMap.ts +2 -1
  399. package/src/fromArray.ts +2 -1
  400. package/src/fromEffect.test.ts +2 -1
  401. package/src/fromEffect.ts +2 -1
  402. package/src/fromEmitter.test.ts +2 -1
  403. package/src/fromEmitter.ts +4 -2
  404. package/src/fromFxEffect.test.ts +2 -1
  405. package/src/fromFxEffect.ts +2 -1
  406. package/src/fromIterable.ts +2 -1
  407. package/src/gen.test.ts +2 -1
  408. package/src/gen.ts +2 -1
  409. package/src/helpers.ts +6 -2
  410. package/src/hold.test.ts +1 -1
  411. package/src/hold.ts +3 -1
  412. package/src/index.ts +7 -2
  413. package/src/keyed.ts +55 -33
  414. package/src/map.ts +2 -1
  415. package/src/mergeAll.ts +4 -1
  416. package/src/multicast.test.ts +2 -1
  417. package/src/multicast.ts +5 -3
  418. package/src/never.ts +2 -1
  419. package/src/observe.ts +4 -2
  420. package/src/onInterrupt.ts +1 -1
  421. package/src/promise.ts +2 -1
  422. package/src/provide.ts +5 -3
  423. package/src/reduce.ts +3 -1
  424. package/src/scan.ts +2 -1
  425. package/src/scoped.ts +3 -1
  426. package/src/skipRepeats.ts +2 -1
  427. package/src/skipWhile.ts +1 -1
  428. package/src/slice.ts +2 -1
  429. package/src/snapshotEffect.ts +5 -1
  430. package/src/switchMap.test.ts +1 -1
  431. package/src/switchMap.ts +2 -1
  432. package/src/switchMapCause.test.ts +1 -1
  433. package/src/switchMapCause.ts +3 -1
  434. package/src/switchMatch.test.ts +1 -1
  435. package/src/switchMatch.ts +3 -1
  436. package/src/takeWhile.ts +2 -2
  437. package/src/tap.ts +2 -1
  438. package/src/tapCause.ts +2 -1
  439. package/src/test-utils.ts +3 -1
  440. package/src/throttle.test.ts +1 -1
  441. package/src/throttle.ts +3 -1
  442. package/src/toArray.ts +1 -1
  443. package/src/toChunk.ts +2 -1
  444. package/src/toReadonlyArray.ts +1 -1
  445. package/tsconfig.build.tsbuildinfo +1 -1
  446. package/src/externals.ts +0 -18
@@ -1,7 +1,7 @@
1
+ import * as Duration from '@effect/data/Duration'
1
2
  import { describe } from 'vitest'
2
3
 
3
4
  import { debounce } from './debounce.js'
4
- import { Duration } from './externals.js'
5
5
  import { fromArray } from './fromArray.js'
6
6
  import { testCollectAll } from './test-utils.js'
7
7
 
package/src/debounce.ts CHANGED
@@ -1,6 +1,7 @@
1
+ import * as Duration from '@effect/data/Duration'
2
+ import * as Effect from '@effect/io/Effect'
3
+
1
4
  import type { Fx } from './Fx.js'
2
- import type { Duration } from './externals.js'
3
- import { Effect } from './externals.js'
4
5
  import { switchMapEffect } from './switchMap.js'
5
6
 
6
7
  export function debounce<R, E, A>(fx: Fx<R, E, A>, duration: Duration.Duration): Fx<R, E, A> {
package/src/delay.test.ts CHANGED
@@ -1,7 +1,7 @@
1
+ import * as Duration from '@effect/data/Duration'
1
2
  import { describe } from 'vitest'
2
3
 
3
4
  import { delay } from './delay.js'
4
- import { Duration } from './externals.js'
5
5
  import { fromArray } from './fromArray.js'
6
6
  import { testCollectAll } from './test-utils.js'
7
7
 
package/src/delay.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { Duration } from '@effect/data/Duration'
2
+ import * as Effect from '@effect/io/Effect'
2
3
 
3
4
  import { Fx, Sink } from './Fx.js'
4
- import { Effect } from './externals.js'
5
5
 
6
6
  export function delay<R, E, A>(fx: Fx<R, E, A>, delay: Duration): Fx<R, E, A> {
7
7
  return Fx((sink) => fx.run(Sink((a) => Effect.delay(sink.event(a), delay), sink.error)))
@@ -1,8 +1,8 @@
1
+ import * as Duration from '@effect/data/Duration'
1
2
  import { describe } from 'vitest'
2
3
 
3
4
  import { delay } from './delay.js'
4
5
  import { exhaustMap } from './exhaustMap.js'
5
- import { Duration } from './externals.js'
6
6
  import { fromArray } from './fromArray.js'
7
7
  import { testCollectAll } from './test-utils.js'
8
8
 
package/src/exhaustMap.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import * as Effect from '@effect/io/Effect'
2
+
1
3
  import { Fx, Sink } from './Fx.js'
2
- import { Effect } from './externals.js'
3
4
  import { fromEffect } from './fromEffect.js'
4
5
  import { withExhaust } from './helpers.js'
5
6
 
@@ -1,8 +1,8 @@
1
+ import * as Duration from '@effect/data/Duration'
1
2
  import { describe } from 'vitest'
2
3
 
3
4
  import { delay } from './delay.js'
4
5
  import { exhaustMapCause, exhaustMapError } from './exhaustMapCause.js'
5
- import { Duration } from './externals.js'
6
6
  import { fail } from './failCause.js'
7
7
  import { fromArray } from './fromArray.js'
8
8
  import { mergeAll } from './mergeAll.js'
@@ -1,7 +1,9 @@
1
+ import * as Either from '@effect/data/Either'
1
2
  import { pipe } from '@effect/data/Function'
3
+ import * as Cause from '@effect/io/Cause'
4
+ import * as Effect from '@effect/io/Effect'
2
5
 
3
6
  import { Fx, Sink } from './Fx.js'
4
- import { Cause, Effect, Either } from './externals.js'
5
7
  import { failCause } from './failCause.js'
6
8
  import { fromEffect } from './fromEffect.js'
7
9
  import { withExhaust } from './helpers.js'
@@ -1,8 +1,8 @@
1
+ import * as Duration from '@effect/data/Duration'
1
2
  import { describe } from 'vitest'
2
3
 
3
4
  import { delay } from './delay.js'
4
5
  import { exhaustMapLatest } from './exhaustMapLatest.js'
5
- import { Duration } from './externals.js'
6
6
  import { fromArray } from './fromArray.js'
7
7
  import { testCollectAll } from './test-utils.js'
8
8
 
@@ -1,5 +1,6 @@
1
+ import * as Effect from '@effect/io/Effect'
2
+
1
3
  import { Fx, Sink } from './Fx.js'
2
- import { Effect } from './externals.js'
3
4
  import { fromEffect } from './fromEffect.js'
4
5
  import { withExhaustLatest } from './helpers.js'
5
6
 
@@ -1,8 +1,8 @@
1
+ import * as Duration from '@effect/data/Duration'
1
2
  import { describe } from 'vitest'
2
3
 
3
4
  import { delay } from './delay.js'
4
5
  import { exhaustMapLatestCause, exhaustMapLatestError } from './exhaustMapLatestCause.js'
5
- import { Duration } from './externals.js'
6
6
  import { fail } from './failCause.js'
7
7
  import { fromArray } from './fromArray.js'
8
8
  import { mergeAll } from './mergeAll.js'
@@ -1,7 +1,9 @@
1
+ import * as Either from '@effect/data/Either'
1
2
  import { pipe } from '@effect/data/Function'
3
+ import * as Cause from '@effect/io/Cause'
4
+ import * as Effect from '@effect/io/Effect'
2
5
 
3
6
  import { Fx, Sink } from './Fx.js'
4
- import { Cause, Effect, Either } from './externals.js'
5
7
  import { failCause } from './failCause.js'
6
8
  import { fromEffect } from './fromEffect.js'
7
9
  import { withExhaustLatest } from './helpers.js'
@@ -1,6 +1,7 @@
1
+ import * as Cause from '@effect/io/Cause'
2
+ import * as FiberId from '@effect/io/Fiber/Id'
1
3
  import { describe } from 'vitest'
2
4
 
3
- import { Cause, FiberId } from './externals.js'
4
5
  import { failCause } from './failCause.js'
5
6
  import { testCause } from './test-utils.js'
6
7
 
package/src/filter.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import type { Predicate, Refinement } from '@effect/data/Predicate'
2
2
  import { not } from '@effect/data/Predicate'
3
+ import * as Effect from '@effect/io/Effect'
3
4
 
4
5
  import { Fx, Sink } from './Fx.js'
5
- import { Effect } from './externals.js'
6
6
 
7
7
  export function filter<R, E, A, B extends A>(
8
8
  fx: Fx<R, E, A>,
package/src/filterMap.ts CHANGED
@@ -1,5 +1,7 @@
1
+ import * as Option from '@effect/data/Option'
2
+ import * as Effect from '@effect/io/Effect'
3
+
1
4
  import { Fx, Sink } from './Fx.js'
2
- import { Effect, Option } from './externals.js'
3
5
 
4
6
  export function filterMap<R, E, A, B>(fx: Fx<R, E, A>, f: (a: A) => Option.Option<B>): Fx<R, E, B> {
5
7
  return Fx((sink) => fx.run(Sink((a) => Option.match(f(a), Effect.unit, sink.event), sink.error)))
@@ -1,7 +1,7 @@
1
+ import * as Duration from '@effect/data/Duration'
1
2
  import { describe } from 'vitest'
2
3
 
3
4
  import { delay } from './delay.js'
4
- import { Duration } from './externals.js'
5
5
  import { flatMap } from './flatMap.js'
6
6
  import { fromArray } from './fromArray.js'
7
7
  import { testCollectAll } from './test-utils.js'
package/src/flatMap.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import * as Effect from '@effect/io/Effect'
2
+
1
3
  import { Fx, Sink } from './Fx.js'
2
- import { Effect } from './externals.js'
3
4
  import { fromEffect } from './fromEffect.js'
4
5
  import { withUnboundedConcurrency } from './helpers.js'
5
6
 
package/src/fromArray.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import * as Effect from '@effect/io/Effect'
2
+
1
3
  import { Fx } from './Fx.js'
2
- import { Effect } from './externals.js'
3
4
 
4
5
  export function fromArray<A>(array: ReadonlyArray<A>): Fx<never, never, A> {
5
6
  return Fx((sink) =>
@@ -1,6 +1,7 @@
1
+ import * as Cause from '@effect/io/Cause'
2
+ import * as Effect from '@effect/io/Effect'
1
3
  import { describe } from 'vitest'
2
4
 
3
- import { Cause, Effect } from './externals.js'
4
5
  import { fromEffect } from './fromEffect.js'
5
6
  import { testCause, testCollectAll } from './test-utils.js'
6
7
 
package/src/fromEffect.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import * as Effect from '@effect/io/Effect'
2
+
1
3
  import { Fx } from './Fx.js'
2
- import { Effect } from './externals.js'
3
4
 
4
5
  export function fromEffect<R, E, A>(effect: Effect.Effect<R, E, A>): Fx<R, E, A> {
5
6
  return Fx((sink) => Effect.matchCauseEffect(effect, sink.error, sink.event))
@@ -1,6 +1,7 @@
1
+ import * as Cause from '@effect/io/Cause'
2
+ import * as Effect from '@effect/io/Effect'
1
3
  import { describe } from 'vitest'
2
4
 
3
- import { Cause, Effect } from './externals.js'
4
5
  import { fromEmitter } from './fromEmitter.js'
5
6
  import { testCause, testCollectAll } from './test-utils.js'
6
7
 
@@ -1,10 +1,12 @@
1
1
  import { methodWithTrace } from '@effect/data/Debug'
2
+ import * as Cause from '@effect/io/Cause'
3
+ import * as Deferred from '@effect/io/Deferred'
4
+ import * as Effect from '@effect/io/Effect'
5
+ import * as Runtime from '@effect/io/Runtime'
2
6
  import type { Scope } from '@effect/io/Scope'
3
7
 
4
8
  import type { Sink } from './Fx.js'
5
9
  import { Fx } from './Fx.js'
6
- import type { Cause } from './externals.js'
7
- import { Deferred, Effect, Runtime } from './externals.js'
8
10
 
9
11
  export function fromEmitter<E, A, R, E2>(
10
12
  f: (emitter: Emitter<E, A>) => Effect.Effect<R | Scope, E2, void>,
@@ -1,6 +1,7 @@
1
+ import * as Cause from '@effect/io/Cause'
2
+ import * as Effect from '@effect/io/Effect'
1
3
  import { describe } from 'vitest'
2
4
 
3
- import { Cause, Effect } from './externals.js'
4
5
  import { fromFxEffect } from './fromFxEffect.js'
5
6
  import { succeed } from './succeed.js'
6
7
  import { testCause, testCollectAll } from './test-utils.js'
@@ -1,5 +1,6 @@
1
+ import * as Effect from '@effect/io/Effect'
2
+
1
3
  import { Fx } from './Fx.js'
2
- import { Effect } from './externals.js'
3
4
 
4
5
  export function fromFxEffect<R, E, R2, E2, B>(
5
6
  effect: Effect.Effect<R, E, Fx<R2, E2, B>>,
@@ -1,5 +1,6 @@
1
+ import * as Effect from '@effect/io/Effect'
2
+
1
3
  import { Fx } from './Fx.js'
2
- import { Effect } from './externals.js'
3
4
 
4
5
  export function fromIterable<A>(iterable: Iterable<A>): Fx<never, never, A> {
5
6
  return Fx((sink) =>
package/src/gen.test.ts CHANGED
@@ -1,6 +1,7 @@
1
+ import * as Cause from '@effect/io/Cause'
2
+ import * as Effect from '@effect/io/Effect'
1
3
  import { describe } from 'vitest'
2
4
 
3
- import { Cause, Effect } from './externals.js'
4
5
  import { gen } from './gen.js'
5
6
  import { succeed } from './succeed.js'
6
7
  import { testCause, testCollectAll } from './test-utils.js'
package/src/gen.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import * as Effect from '@effect/io/Effect'
2
+
1
3
  import type { Fx } from './Fx.js'
2
- import { Effect } from './externals.js'
3
4
  import { fromFxEffect } from './fromFxEffect.js'
4
5
 
5
6
  export type EffectGenResources<T> = [T] extends [never]
package/src/helpers.ts CHANGED
@@ -1,6 +1,10 @@
1
1
  import { pipe } from '@effect/data/Function'
2
-
3
- import { Effect, Fiber, Option, Ref, RefS, Scope } from './externals.js'
2
+ import * as Option from '@effect/data/Option'
3
+ import * as Effect from '@effect/io/Effect'
4
+ import * as Fiber from '@effect/io/Fiber'
5
+ import * as Ref from '@effect/io/Ref'
6
+ import * as RefS from '@effect/io/Ref/Synchronized'
7
+ import * as Scope from '@effect/io/Scope'
4
8
 
5
9
  export type ScopedFork = <R2, E2, B>(
6
10
  effect: Effect.Effect<R2, E2, B>,
package/src/hold.test.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import * as Chunk from '@effect/data/Chunk'
1
2
  import { millis } from '@effect/data/Duration'
2
3
  import { range } from '@effect/data/ReadonlyArray'
3
4
  import * as Effect from '@effect/io/Effect'
@@ -5,7 +6,6 @@ import * as Fiber from '@effect/io/Fiber'
5
6
  import { describe, it, expect } from 'vitest'
6
7
 
7
8
  import { at } from './at.js'
8
- import { Chunk } from './externals.js'
9
9
  import { hold } from './hold.js'
10
10
  import { mergeAll } from './mergeAll.js'
11
11
  import { toChunk } from './toChunk.js'
package/src/hold.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  import type { Trace } from '@effect/data/Debug'
2
+ import * as MutableRef from '@effect/data/MutableRef'
3
+ import * as Option from '@effect/data/Option'
4
+ import * as Effect from '@effect/io/Effect'
2
5
 
3
6
  import type { Fx, Sink } from './Fx.js'
4
7
  import { Traced } from './Fx.js'
5
- import { Effect, MutableRef, Option } from './externals.js'
6
8
  import { MulticastFx } from './multicast.js'
7
9
 
8
10
  export function hold<R, E, A>(fx: Fx<R, E, A>): Fx<R, E, A> {
package/src/index.ts CHANGED
@@ -1,14 +1,19 @@
1
+ import * as Chunk from '@effect/data/Chunk'
2
+ import * as Context from '@effect/data/Context'
1
3
  import { dualWithTrace, methodWithTrace } from '@effect/data/Debug'
2
4
  import type { Duration } from '@effect/data/Duration'
3
5
  import type { HashSet } from '@effect/data/HashSet'
6
+ import * as Option from '@effect/data/Option'
4
7
  import type { Predicate, Refinement } from '@effect/data/Predicate'
5
8
  import type { Equivalence } from '@effect/data/typeclass/Equivalence'
9
+ import * as Cause from '@effect/io/Cause'
10
+ import * as Effect from '@effect/io/Effect'
6
11
  import type { FiberId } from '@effect/io/Fiber/Id'
12
+ import * as Layer from '@effect/io/Layer'
13
+ import * as Scope from '@effect/io/Scope'
7
14
 
8
15
  import type { Fx } from './Fx.js'
9
16
  import * as internal from './data-first.js'
10
- import type { Cause, Chunk, Context, Effect, Layer, Option, Scope } from './externals.js'
11
-
12
17
  export * from './Fx.js'
13
18
 
14
19
  export const at: {
package/src/keyed.ts CHANGED
@@ -1,15 +1,13 @@
1
1
  import * as MutableHashMap from '@effect/data/MutableHashMap'
2
2
  import * as Option from '@effect/data/Option'
3
3
  import * as ReadonlyArray from '@effect/data/ReadonlyArray'
4
- import * as Equivalence from '@effect/data/typeclass/Equivalence'
4
+ import * as Cause from '@effect/io/Cause'
5
5
  import * as Effect from '@effect/io/Effect'
6
6
  import * as Fiber from '@effect/io/Fiber'
7
- import fastDeepEqual from 'fast-deep-equal'
8
7
 
9
8
  import { Fx, Sink } from './Fx.js'
10
9
  import { RefSubject } from './RefSubject.js'
11
10
  import { Subject, makeHoldSubject } from './Subject.js'
12
- import { Cause } from './externals.js'
13
11
  import { ScopedFork, withScopedFork } from './helpers.js'
14
12
 
15
13
  export function keyed<R, E, A, R2, E2, B, C>(
@@ -21,13 +19,10 @@ export function keyed<R, E, A, R2, E2, B, C>(
21
19
  withScopedFork((fork) =>
22
20
  Effect.gen(function* ($) {
23
21
  const state = createKeyedState<A, B, C>()
24
- const eq = Equivalence.make((x: A, y: A) => fastDeepEqual(getKey(x), getKey(y)))
25
- const difference = ReadonlyArray.difference(eq)
26
- const intersection = ReadonlyArray.intersection(eq)
27
22
  const emit = emitWhenReady(state, getKey)
28
23
 
29
- // Let output emit to the sink
30
- const fiber = yield* $(fork(state.output.run(sink)))
24
+ // Let output emit to the sink, it is closes by the surrounding scope
25
+ yield* $(fork(state.output.run(sink)))
31
26
 
32
27
  // Listen to the input and update the state
33
28
  yield* $(
@@ -40,8 +35,6 @@ export function keyed<R, E, A, R2, E2, B, C>(
40
35
  getKey,
41
36
  f,
42
37
  fork,
43
- difference,
44
- intersection,
45
38
  emit,
46
39
  error: sink.error,
47
40
  }),
@@ -54,9 +47,6 @@ export function keyed<R, E, A, R2, E2, B, C>(
54
47
 
55
48
  // When the source stream ends we wait for the remaining fibers to end
56
49
  yield* $(Fiber.joinAll(Array.from(state.fibers).map((x) => x[1])))
57
-
58
- // Terminate the output fiber
59
- yield* $(Fiber.interrupt(fiber))
60
50
  }),
61
51
  ),
62
52
  )
@@ -64,7 +54,7 @@ export function keyed<R, E, A, R2, E2, B, C>(
64
54
 
65
55
  type KeyedState<A, B, C> = {
66
56
  previous: readonly A[]
67
- ended: boolean
57
+ previousKeys: ReadonlySet<C>
68
58
 
69
59
  readonly subjects: MutableHashMap.MutableHashMap<C, RefSubject<never, A>>
70
60
  readonly fibers: MutableHashMap.MutableHashMap<C, Fiber.RuntimeFiber<never, void>>
@@ -75,7 +65,7 @@ type KeyedState<A, B, C> = {
75
65
  function createKeyedState<A, B, C>(): KeyedState<A, B, C> {
76
66
  return {
77
67
  previous: [],
78
- ended: false,
68
+ previousKeys: new Set(),
79
69
  subjects: MutableHashMap.empty(),
80
70
  fibers: MutableHashMap.empty(),
81
71
  values: MutableHashMap.empty(),
@@ -88,8 +78,6 @@ function updateState<A, B, C, R2, E2, R3>({
88
78
  updated,
89
79
  f,
90
80
  fork,
91
- difference,
92
- intersection,
93
81
  emit,
94
82
  error,
95
83
  getKey,
@@ -98,21 +86,18 @@ function updateState<A, B, C, R2, E2, R3>({
98
86
  updated: readonly A[]
99
87
  f: (fx: RefSubject<never, A>) => Fx<R2, E2, B>
100
88
  fork: ScopedFork
101
- difference: (self: Iterable<A>, that: Iterable<A>) => A[]
102
- intersection: (self: Iterable<A>, that: Iterable<A>) => A[]
103
89
  emit: Effect.Effect<never, never, void>
104
90
  error: (e: Cause.Cause<E2>) => Effect.Effect<R3, never, void>
105
91
  getKey: (a: A) => C
106
92
  }) {
107
93
  return Effect.gen(function* ($) {
108
- const added = difference(updated, state.previous)
109
- const removed = difference(state.previous, updated)
110
- const unchanged = intersection(updated, state.previous)
111
-
112
- state.previous = updated
94
+ const { added, removed, unchanged } = diffValues(state, updated, getKey)
113
95
 
114
96
  // Remove values that are no longer in the stream
115
- yield* $(Effect.forEachParDiscard(removed, (value) => removeValue(state, value, getKey)))
97
+ yield* $(Effect.forEachDiscard(removed, (key) => removeValue(state, key)))
98
+
99
+ // Update values that are still in the stream
100
+ yield* $(Effect.forEachParDiscard(unchanged, (value) => updateValue(state, value, getKey)))
116
101
 
117
102
  // Add values that are new to the stream
118
103
  yield* $(
@@ -121,9 +106,6 @@ function updateState<A, B, C, R2, E2, R3>({
121
106
  ),
122
107
  )
123
108
 
124
- // Update values that are still in the stream
125
- yield* $(Effect.forEachParDiscard(unchanged, (value) => updateValue(state, value, getKey)))
126
-
127
109
  // If nothing was added, emit the current values
128
110
  if (added.length === 0) {
129
111
  yield* $(emit)
@@ -131,9 +113,46 @@ function updateState<A, B, C, R2, E2, R3>({
131
113
  })
132
114
  }
133
115
 
134
- function removeValue<A, B, C>(state: KeyedState<A, B, C>, value: A, getKey: (a: A) => C) {
135
- return Effect.gen(function* ($) {
116
+ function diffValues<A, B, C>(
117
+ state: KeyedState<A, B, C>,
118
+ updated: ReadonlyArray<A>,
119
+ getKey: (a: A) => C,
120
+ ) {
121
+ const added: A[] = []
122
+ const unchanged: A[] = []
123
+ const removed: C[] = []
124
+ const previousKeys = state.previousKeys
125
+ const keys = new Set<C>(updated.map(getKey))
126
+
127
+ for (let i = 0; i < updated.length; ++i) {
128
+ const value = updated[i]
136
129
  const key = getKey(value)
130
+
131
+ if (previousKeys.has(key)) {
132
+ unchanged.push(value)
133
+ } else {
134
+ added.push(value)
135
+ }
136
+ }
137
+
138
+ previousKeys.forEach((k) => {
139
+ if (!keys.has(k)) {
140
+ removed.push(k)
141
+ }
142
+ })
143
+
144
+ state.previous = updated
145
+ state.previousKeys = keys
146
+
147
+ return {
148
+ added,
149
+ unchanged,
150
+ removed,
151
+ } as const
152
+ }
153
+
154
+ function removeValue<A, B, C>(state: KeyedState<A, B, C>, key: C) {
155
+ return Effect.gen(function* ($) {
137
156
  const subject = MutableHashMap.get(state.subjects, key)
138
157
 
139
158
  if (Option.isSome(subject)) yield* $(Effect.fork(subject.value.end()))
@@ -202,6 +221,11 @@ function updateValue<A, B, C>(state: KeyedState<A, B, C>, value: A, getKey: (a:
202
221
 
203
222
  function emitWhenReady<A, B, C>(state: KeyedState<A, B, C>, getKey: (a: A) => C) {
204
223
  return Effect.suspend(() => {
224
+ // Fast path: if we don't have enough values, don't emit
225
+ if (MutableHashMap.size(state.values) !== state.previous.length) {
226
+ return Effect.unit()
227
+ }
228
+
205
229
  const values = ReadonlyArray.filterMap(state.previous, (value) =>
206
230
  MutableHashMap.get(state.values, getKey(value)),
207
231
  )
@@ -216,7 +240,5 @@ function emitWhenReady<A, B, C>(state: KeyedState<A, B, C>, getKey: (a: A) => C)
216
240
  }
217
241
 
218
242
  function endAll<A, B, C>(state: KeyedState<A, B, C>) {
219
- return Effect.gen(function* ($) {
220
- yield* $(Effect.forEachParDiscard(state.subjects, ([, subject]) => subject.end()))
221
- })
243
+ return Effect.forEachParDiscard(state.subjects, ([, subject]) => subject.end())
222
244
  }
package/src/map.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import * as Effect from '@effect/io/Effect'
2
+
1
3
  import { Fx, Sink } from './Fx.js'
2
- import { Effect } from './externals.js'
3
4
 
4
5
  export function map<R, E, A, B>(fx: Fx<R, E, A>, f: (a: A) => B): Fx<R, E, B> {
5
6
  return Fx((sink) => fx.run(Sink((a) => Effect.suspend(() => sink.event(f(a))), sink.error)))
package/src/mergeAll.ts CHANGED
@@ -1,5 +1,8 @@
1
+ import * as Option from '@effect/data/Option'
2
+ import * as Cause from '@effect/io/Cause'
3
+ import * as Effect from '@effect/io/Effect'
4
+
1
5
  import { Fx, Sink } from './Fx.js'
2
- import { Cause, Effect, Option } from './externals.js'
3
6
  import { compact } from './filterMap.js'
4
7
  import { map } from './map.js'
5
8
 
@@ -1,10 +1,11 @@
1
+ import * as Chunk from '@effect/data/Chunk'
2
+ import * as Duration from '@effect/data/Duration'
1
3
  import { pipe } from '@effect/data/Function'
2
4
  import * as Effect from '@effect/io/Effect'
3
5
  import * as Fiber from '@effect/io/Fiber'
4
6
  import { describe, it, expect } from 'vitest'
5
7
 
6
8
  import { delay } from './delay.js'
7
- import { Chunk, Duration } from './externals.js'
8
9
  import { flatMap } from './flatMap.js'
9
10
  import { fromArray } from './fromArray.js'
10
11
  import { merge } from './mergeAll.js'
package/src/multicast.ts CHANGED
@@ -1,10 +1,12 @@
1
+ import type * as Context from '@effect/data/Context'
1
2
  import type { Trace } from '@effect/data/Debug'
2
3
  import { identity } from '@effect/data/Function'
4
+ import type * as Cause from '@effect/io/Cause'
5
+ import * as Effect from '@effect/io/Effect'
6
+ import * as Fiber from '@effect/io/Fiber'
3
7
 
4
- import type { Fx, Sink } from './Fx.js'
5
8
  import { FxTypeId, Traced } from './Fx.js'
6
- import type { Cause, Context } from './externals.js'
7
- import { Effect, Fiber } from './externals.js'
9
+ import type { Fx, Sink } from './Fx.js'
8
10
 
9
11
  export function multicast<R, E, A>(fx: Fx<R, E, A>): Fx<R, E, A> {
10
12
  return new MulticastFx(fx)
package/src/never.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import * as Effect from '@effect/io/Effect'
2
+
1
3
  import { Fx } from './Fx.js'
2
- import { Effect } from './externals.js'
3
4
 
4
5
  export function never<E = never, A = never>(): Fx<never, E, A> {
5
6
  return Fx<never, E, A>(() => Effect.never())
package/src/observe.ts CHANGED
@@ -1,9 +1,11 @@
1
+ import * as Cause from '@effect/io/Cause'
2
+ import * as Deferred from '@effect/io/Deferred'
3
+ import * as Effect from '@effect/io/Effect'
4
+ import * as Fiber from '@effect/io/Fiber'
1
5
  import type { Scope } from '@effect/io/Scope'
2
6
 
3
7
  import type { Fx } from './Fx.js'
4
8
  import { Sink } from './Fx.js'
5
- import type { Cause } from './externals.js'
6
- import { Deferred, Effect, Fiber } from './externals.js'
7
9
 
8
10
  export function observe<R, E, A, R2, E2>(
9
11
  fx: Fx<R, E, A>,
@@ -1,8 +1,8 @@
1
1
  import type { HashSet } from '@effect/data/HashSet'
2
+ import * as Effect from '@effect/io/Effect'
2
3
  import type { FiberId } from '@effect/io/Fiber/Id'
3
4
 
4
5
  import { Fx } from './Fx.js'
5
- import { Effect } from './externals.js'
6
6
 
7
7
  export function onInterrupt<R, E, A, R2, E2, B>(
8
8
  fx: Fx<R, E, A>,
package/src/promise.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import * as Effect from '@effect/io/Effect'
2
+
1
3
  import type { Fx } from './Fx.js'
2
- import { Effect } from './externals.js'
3
4
  import { fromEffect } from './fromEffect.js'
4
5
  import { fromFxEffect } from './fromFxEffect.js'
5
6
 
package/src/provide.ts CHANGED
@@ -1,7 +1,9 @@
1
- import type { Sink } from './Fx.js'
1
+ import * as Context from '@effect/data/Context'
2
+ import * as Effect from '@effect/io/Effect'
3
+ import * as Layer from '@effect/io/Layer'
4
+
2
5
  import { Fx } from './Fx.js'
3
- import type { Layer } from './externals.js'
4
- import { Context, Effect } from './externals.js'
6
+ import type { Sink } from './Fx.js'
5
7
  import { switchMap } from './switchMap.js'
6
8
 
7
9
  export function provideContext<R, E, A>(
package/src/reduce.ts CHANGED
@@ -1,5 +1,7 @@
1
+ import * as Effect from '@effect/io/Effect'
2
+ import * as Scope from '@effect/io/Scope'
3
+
1
4
  import { Fx } from './Fx.js'
2
- import { Effect, Scope } from './externals.js'
3
5
  import { observe } from './observe.js'
4
6
 
5
7
  export function reduce<R, E, A, B>(