@typed/fx 1.0.10 → 1.0.12

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 (427) hide show
  1. package/coverage/src/Fx.ts.html +1 -1
  2. package/coverage/src/Subject/Subject.ts.html +1 -1
  3. package/coverage/src/_internal/RefCounter.ts.html +1 -1
  4. package/coverage/src/_internal/earlyExit.ts.html +1 -1
  5. package/coverage/src/constructor/at.ts.html +1 -1
  6. package/coverage/src/constructor/fromArray.ts.html +1 -1
  7. package/coverage/src/constructor/fromEffect.ts.html +1 -1
  8. package/coverage/src/constructor/fromEmitter.ts.html +1 -1
  9. package/coverage/src/constructor/serviceWith.ts.html +70 -66
  10. package/coverage/src/constructor/succeed.ts.html +11 -12
  11. package/coverage/src/operator/delay.ts.html +1 -1
  12. package/coverage/src/operator/filterEffect.ts.html +1 -1
  13. package/coverage/src/operator/filterMap.ts.html +78 -74
  14. package/coverage/src/operator/filterMapEffect.ts.html +1 -1
  15. package/coverage/src/operator/flatMap.ts.html +1 -1
  16. package/coverage/src/operator/flatMapConcurrently.ts.html +71 -66
  17. package/coverage/src/operator/merge.ts.html +1 -1
  18. package/coverage/src/operator/multicast.ts.html +1 -1
  19. package/coverage/src/operator/provideService.ts.html +1 -1
  20. package/coverage/src/operator/provideServiceEffect.ts.html +1 -1
  21. package/coverage/src/operator/scan.ts.html +70 -66
  22. package/coverage/src/operator/scanEffect.ts.html +1 -1
  23. package/coverage/src/operator/skipRepeats.ts.html +1 -1
  24. package/coverage/src/operator/slice.ts.html +78 -74
  25. package/coverage/src/operator/startWith.ts.html +70 -66
  26. package/coverage/src/operator/switchMap.ts.html +1 -1
  27. package/coverage/src/operator/withPermit.ts.html +1 -1
  28. package/coverage/src/run/collectAll.ts.html +1 -1
  29. package/coverage/src/run/observe.ts.html +1 -1
  30. package/coverage/src/run/reduce.ts.html +70 -66
  31. package/coverage/src/run/run.ts.html +1 -1
  32. package/dist/Fx.js +1 -1
  33. package/dist/Subject/HoldSubject.d.ts +1 -1
  34. package/dist/Subject/HoldSubject.d.ts.map +1 -1
  35. package/dist/Subject/HoldSubject.js +3 -3
  36. package/dist/Subject/HoldSubject.js.map +1 -1
  37. package/dist/Subject/RefSubject.d.ts +1 -1
  38. package/dist/Subject/RefSubject.d.ts.map +1 -1
  39. package/dist/Subject/RefSubject.js +3 -3
  40. package/dist/Subject/RefSubject.js.map +1 -1
  41. package/dist/Subject/Subject.js +1 -1
  42. package/dist/Subject/SynchronizedSubject.d.ts.map +1 -1
  43. package/dist/Subject/SynchronizedSubject.js +5 -6
  44. package/dist/Subject/SynchronizedSubject.js.map +1 -1
  45. package/dist/_internal/RefCounter.js +2 -2
  46. package/dist/_internal/RefCounter.js.map +1 -1
  47. package/dist/_internal/earlyExit.js +1 -1
  48. package/dist/constructor/acquireUseRelease.js +1 -1
  49. package/dist/constructor/async.js +1 -1
  50. package/dist/constructor/asyncEffect.js +1 -1
  51. package/dist/constructor/asyncOption.d.ts +1 -1
  52. package/dist/constructor/asyncOption.js +1 -1
  53. package/dist/constructor/at.d.ts.map +1 -1
  54. package/dist/constructor/at.js +1 -1
  55. package/dist/constructor/at.js.map +1 -1
  56. package/dist/constructor/die.js +1 -1
  57. package/dist/constructor/dieMessage.js +1 -1
  58. package/dist/constructor/dieSync.js +1 -1
  59. package/dist/constructor/done.js +1 -1
  60. package/dist/constructor/fail.js +1 -1
  61. package/dist/constructor/failCause.js +1 -1
  62. package/dist/constructor/failCauseSync.js +1 -1
  63. package/dist/constructor/fromArray.js +1 -1
  64. package/dist/constructor/fromEffect.js +1 -1
  65. package/dist/constructor/fromEither.d.ts +1 -1
  66. package/dist/constructor/fromEither.js +1 -1
  67. package/dist/constructor/fromEitherCause.d.ts +1 -1
  68. package/dist/constructor/fromEitherCause.js +1 -1
  69. package/dist/constructor/fromEmitter.d.ts +4 -4
  70. package/dist/constructor/fromEmitter.d.ts.map +1 -1
  71. package/dist/constructor/fromEmitter.js +4 -4
  72. package/dist/constructor/fromEmitter.js.map +1 -1
  73. package/dist/constructor/fromFiber.js +1 -1
  74. package/dist/constructor/fromFiberEffect.js +1 -1
  75. package/dist/constructor/fromFxEffect.js +1 -1
  76. package/dist/constructor/fromOption.d.ts +1 -1
  77. package/dist/constructor/fromOption.js +1 -1
  78. package/dist/constructor/periodic.d.ts.map +1 -1
  79. package/dist/constructor/periodic.js +1 -1
  80. package/dist/constructor/periodic.js.map +1 -1
  81. package/dist/constructor/promise.js +1 -1
  82. package/dist/constructor/promiseAbort.js +1 -1
  83. package/dist/constructor/promiseFx.js +1 -1
  84. package/dist/constructor/random.js +1 -1
  85. package/dist/constructor/scheduled.js +1 -1
  86. package/dist/constructor/service.d.ts.map +1 -1
  87. package/dist/constructor/service.js +1 -1
  88. package/dist/constructor/service.js.map +1 -1
  89. package/dist/constructor/serviceWith.d.ts.map +1 -1
  90. package/dist/constructor/serviceWith.js +1 -2
  91. package/dist/constructor/serviceWith.js.map +1 -1
  92. package/dist/constructor/serviceWithEffect.d.ts.map +1 -1
  93. package/dist/constructor/serviceWithEffect.js +1 -2
  94. package/dist/constructor/serviceWithEffect.js.map +1 -1
  95. package/dist/constructor/serviceWithFx.js +1 -1
  96. package/dist/constructor/serviceWithFx.js.map +1 -1
  97. package/dist/constructor/succeed.js +1 -1
  98. package/dist/constructor/sync.js +1 -1
  99. package/dist/constructor/tryCatchPromise.js +1 -1
  100. package/dist/constructor/tryCatchPromiseAbort.js +1 -1
  101. package/dist/constructor/tryPromise.js +1 -1
  102. package/dist/constructor/tryPromiseAbort.js +1 -1
  103. package/dist/operator/catch.js +1 -1
  104. package/dist/operator/catchAll.js +2 -2
  105. package/dist/operator/catchAllDefect.js +2 -2
  106. package/dist/operator/combine.js +1 -1
  107. package/dist/operator/compact.d.ts +1 -1
  108. package/dist/operator/compact.js +1 -1
  109. package/dist/operator/contramapContext.d.ts +5 -0
  110. package/dist/operator/contramapContext.d.ts.map +1 -0
  111. package/dist/operator/contramapContext.js +25 -0
  112. package/dist/operator/contramapContext.js.map +1 -0
  113. package/dist/operator/debounce.d.ts.map +1 -1
  114. package/dist/operator/debounce.js +1 -1
  115. package/dist/operator/debounce.js.map +1 -1
  116. package/dist/operator/delay.d.ts.map +1 -1
  117. package/dist/operator/delay.js +1 -1
  118. package/dist/operator/delay.js.map +1 -1
  119. package/dist/operator/during.js +1 -1
  120. package/dist/operator/exhaustMap.js +1 -1
  121. package/dist/operator/exhaustMapEffect.js +1 -1
  122. package/dist/operator/exhaustMapLatest.js +1 -1
  123. package/dist/operator/exhaustMapLatestEffect.js +1 -1
  124. package/dist/operator/filter.d.ts +1 -1
  125. package/dist/operator/filterEffect.js +1 -1
  126. package/dist/operator/filterMap.d.ts +1 -1
  127. package/dist/operator/filterMap.js +2 -2
  128. package/dist/operator/filterMapEffect.d.ts +1 -1
  129. package/dist/operator/filterMapEffect.js +2 -2
  130. package/dist/operator/flatMap.js +1 -1
  131. package/dist/operator/flatMapCause.js +1 -1
  132. package/dist/operator/flatMapConcurrently.js +3 -3
  133. package/dist/operator/flatMapConcurrently.js.map +1 -1
  134. package/dist/operator/flatMapEffect.js +1 -1
  135. package/dist/operator/flatMapEffectConcurrently.js +1 -1
  136. package/dist/operator/hold.d.ts +1 -1
  137. package/dist/operator/hold.d.ts.map +1 -1
  138. package/dist/operator/hold.js +3 -3
  139. package/dist/operator/hold.js.map +1 -1
  140. package/dist/operator/index.d.ts +2 -2
  141. package/dist/operator/index.d.ts.map +1 -1
  142. package/dist/operator/index.js +2 -2
  143. package/dist/operator/index.js.map +1 -1
  144. package/dist/operator/interruptible.js +1 -1
  145. package/dist/operator/mapCause.js +1 -1
  146. package/dist/operator/merge.js +1 -1
  147. package/dist/operator/mergeRace.js +1 -1
  148. package/dist/operator/multicast.d.ts.map +1 -1
  149. package/dist/operator/multicast.js +7 -7
  150. package/dist/operator/multicast.js.map +1 -1
  151. package/dist/operator/onDone.js +2 -2
  152. package/dist/operator/onDoneCause.js +1 -1
  153. package/dist/operator/onExit.js +1 -1
  154. package/dist/operator/onInterrupt.js +1 -1
  155. package/dist/operator/provideContext.d.ts +4 -0
  156. package/dist/operator/provideContext.d.ts.map +1 -0
  157. package/dist/operator/provideContext.js +18 -0
  158. package/dist/operator/provideContext.js.map +1 -0
  159. package/dist/operator/provideLayer.js +1 -1
  160. package/dist/operator/provideService.d.ts.map +1 -1
  161. package/dist/operator/provideService.js +2 -2
  162. package/dist/operator/provideService.js.map +1 -1
  163. package/dist/operator/provideServiceEffect.d.ts.map +1 -1
  164. package/dist/operator/provideServiceEffect.js +2 -2
  165. package/dist/operator/provideServiceEffect.js.map +1 -1
  166. package/dist/operator/provideSomeLayer.js +1 -1
  167. package/dist/operator/race.js +4 -5
  168. package/dist/operator/race.js.map +1 -1
  169. package/dist/operator/sample.js +1 -1
  170. package/dist/operator/sampleEffect.js +1 -1
  171. package/dist/operator/sandbox.js +1 -1
  172. package/dist/operator/scan.js +1 -1
  173. package/dist/operator/scanEffect.js +3 -4
  174. package/dist/operator/scanEffect.js.map +1 -1
  175. package/dist/operator/separate.d.ts +1 -1
  176. package/dist/operator/separate.js +2 -2
  177. package/dist/operator/since.js +1 -1
  178. package/dist/operator/skipAfter.d.ts +1 -1
  179. package/dist/operator/skipRepeats.js +3 -3
  180. package/dist/operator/skipRepeats.js.map +1 -1
  181. package/dist/operator/skipUntil.d.ts +1 -1
  182. package/dist/operator/skipWhile.d.ts +1 -1
  183. package/dist/operator/skipWhile.js +2 -2
  184. package/dist/operator/slice.js +1 -1
  185. package/dist/operator/snapshot.js +3 -3
  186. package/dist/operator/snapshot.js.map +1 -1
  187. package/dist/operator/snapshotEffect.js +4 -6
  188. package/dist/operator/snapshotEffect.js.map +1 -1
  189. package/dist/operator/startWith.js +1 -1
  190. package/dist/operator/startWithEffect.js +1 -1
  191. package/dist/operator/struct.js +1 -1
  192. package/dist/operator/switchMap.js +1 -1
  193. package/dist/operator/switchMapCause.js +1 -1
  194. package/dist/operator/switchMapEffect.js +1 -1
  195. package/dist/operator/switchMapError.js +2 -2
  196. package/dist/operator/switchMatch.js +2 -2
  197. package/dist/operator/takeUntil.d.ts +1 -1
  198. package/dist/operator/takeWhile.d.ts +1 -1
  199. package/dist/operator/takeWhile.js +2 -2
  200. package/dist/operator/tap.js +1 -1
  201. package/dist/operator/tapCause.js +1 -1
  202. package/dist/operator/tapDefect.js +2 -2
  203. package/dist/operator/tapError.js +2 -2
  204. package/dist/operator/throttle.d.ts.map +1 -1
  205. package/dist/operator/throttle.js +1 -1
  206. package/dist/operator/throttle.js.map +1 -1
  207. package/dist/operator/uninterruptible.js +1 -1
  208. package/dist/operator/withItems.js +1 -1
  209. package/dist/operator/withPermit.d.ts +2 -2
  210. package/dist/operator/withPermit.d.ts.map +1 -1
  211. package/dist/operator/withPermit.js +2 -3
  212. package/dist/operator/withPermit.js.map +1 -1
  213. package/dist/operator/withRuntimeFlags.js +1 -1
  214. package/dist/operator/zip.js +1 -1
  215. package/dist/run/collectAll.js +1 -1
  216. package/dist/run/collectN.js +1 -1
  217. package/dist/run/drain.d.ts.map +1 -1
  218. package/dist/run/drain.js +1 -1
  219. package/dist/run/drain.js.map +1 -1
  220. package/dist/run/observe.js +1 -1
  221. package/dist/run/reduce.js +1 -1
  222. package/dist/run/run.js +3 -3
  223. package/dist/run/run.js.map +1 -1
  224. package/dist/run/unsafe.d.ts +5 -5
  225. package/dist/run/unsafe.d.ts.map +1 -1
  226. package/dist/run/unsafe.js +5 -5
  227. package/dist/run/unsafe.js.map +1 -1
  228. package/dist/typeclass/Applicative.js +1 -1
  229. package/dist/typeclass/Applicative.js.map +1 -1
  230. package/dist/typeclass/Bicovariant.d.ts.map +1 -1
  231. package/dist/typeclass/Bicovariant.js +1 -1
  232. package/dist/typeclass/Bicovariant.js.map +1 -1
  233. package/dist/typeclass/Product.d.ts.map +1 -1
  234. package/dist/typeclass/Product.js +1 -1
  235. package/dist/typeclass/Product.js.map +1 -1
  236. package/dist/typeclass/SemiCoproduct.js +4 -4
  237. package/dist/typeclass/SemiCoproduct.js.map +1 -1
  238. package/dist/typeclass/SemiProduct.d.ts.map +1 -1
  239. package/dist/typeclass/SemiProduct.js +2 -2
  240. package/dist/typeclass/SemiProduct.js.map +1 -1
  241. package/package.json +5 -6
  242. package/src/Fx.ts +1 -1
  243. package/src/Subject/HoldSubject.test.ts +1 -1
  244. package/src/Subject/HoldSubject.ts +3 -3
  245. package/src/Subject/RefSubject.ts +3 -3
  246. package/src/Subject/Subject.test.ts +1 -1
  247. package/src/Subject/Subject.ts +1 -1
  248. package/src/Subject/SynchronizedSubject.ts +5 -6
  249. package/src/_internal/RefCounter.ts +2 -2
  250. package/src/_internal/earlyExit.ts +1 -1
  251. package/src/constructor/acquireUseRelease.ts +1 -1
  252. package/src/constructor/async.ts +1 -1
  253. package/src/constructor/asyncEffect.ts +1 -1
  254. package/src/constructor/asyncOption.ts +2 -2
  255. package/src/constructor/at.ts +1 -1
  256. package/src/constructor/die.ts +1 -1
  257. package/src/constructor/dieMessage.ts +1 -1
  258. package/src/constructor/dieSync.ts +1 -1
  259. package/src/constructor/done.ts +1 -1
  260. package/src/constructor/fail.ts +1 -1
  261. package/src/constructor/failCause.ts +1 -1
  262. package/src/constructor/failCauseSync.ts +1 -1
  263. package/src/constructor/fromArray.test.ts +1 -1
  264. package/src/constructor/fromArray.ts +1 -1
  265. package/src/constructor/fromEffect.test.ts +1 -1
  266. package/src/constructor/fromEffect.ts +1 -1
  267. package/src/constructor/fromEither.ts +2 -2
  268. package/src/constructor/fromEitherCause.ts +2 -2
  269. package/src/constructor/fromEmitter.test.ts +1 -1
  270. package/src/constructor/fromEmitter.ts +7 -8
  271. package/src/constructor/fromFiber.ts +1 -1
  272. package/src/constructor/fromFiberEffect.ts +1 -1
  273. package/src/constructor/fromFxEffect.ts +1 -1
  274. package/src/constructor/fromIterable.test.ts +1 -1
  275. package/src/constructor/fromOption.ts +2 -2
  276. package/src/constructor/periodic.ts +1 -1
  277. package/src/constructor/promise.ts +1 -1
  278. package/src/constructor/promiseAbort.ts +1 -1
  279. package/src/constructor/promiseFx.ts +1 -1
  280. package/src/constructor/random.ts +1 -1
  281. package/src/constructor/scheduled.ts +1 -1
  282. package/src/constructor/service.ts +1 -1
  283. package/src/constructor/serviceWith.ts +3 -4
  284. package/src/constructor/serviceWithEffect.ts +2 -3
  285. package/src/constructor/serviceWithFx.ts +1 -1
  286. package/src/constructor/succeed.ts +1 -1
  287. package/src/constructor/sync.ts +1 -1
  288. package/src/constructor/tryCatchPromise.ts +1 -1
  289. package/src/constructor/tryCatchPromiseAbort.ts +1 -1
  290. package/src/constructor/tryPromise.ts +1 -1
  291. package/src/constructor/tryPromiseAbort.ts +1 -1
  292. package/src/operator/catchAll.ts +2 -2
  293. package/src/operator/catchAllCause.test.ts +2 -2
  294. package/src/operator/catchAllDefect.ts +2 -2
  295. package/src/operator/combine.test.ts +2 -2
  296. package/src/operator/combine.ts +1 -1
  297. package/src/operator/compact.ts +2 -2
  298. package/src/operator/concatMap.test.ts +2 -2
  299. package/src/operator/continueWith.test.ts +2 -2
  300. package/src/operator/contramapContext.ts +34 -0
  301. package/src/operator/debounce.test.ts +2 -2
  302. package/src/operator/debounce.ts +1 -1
  303. package/src/operator/delay.ts +1 -1
  304. package/src/operator/during.ts +1 -1
  305. package/src/operator/exhaustMap.test.ts +2 -2
  306. package/src/operator/exhaustMap.ts +1 -1
  307. package/src/operator/exhaustMapEffect.ts +1 -1
  308. package/src/operator/exhaustMapLatest.test.ts +2 -2
  309. package/src/operator/exhaustMapLatest.ts +1 -1
  310. package/src/operator/exhaustMapLatestEffect.ts +1 -1
  311. package/src/operator/filter.test.ts +2 -2
  312. package/src/operator/filter.ts +1 -1
  313. package/src/operator/filterEffect.test.ts +2 -2
  314. package/src/operator/filterEffect.ts +1 -1
  315. package/src/operator/filterMap.test.ts +4 -4
  316. package/src/operator/filterMap.ts +2 -2
  317. package/src/operator/filterMapEffect.test.ts +4 -4
  318. package/src/operator/filterMapEffect.ts +2 -2
  319. package/src/operator/flatMap.test.ts +3 -3
  320. package/src/operator/flatMap.ts +1 -1
  321. package/src/operator/flatMapCause.ts +1 -1
  322. package/src/operator/flatMapConcurrently.test.ts +2 -2
  323. package/src/operator/flatMapConcurrently.ts +3 -3
  324. package/src/operator/flatMapEffect.ts +1 -1
  325. package/src/operator/flatMapEffectConcurrently.ts +1 -1
  326. package/src/operator/hold.test.ts +1 -1
  327. package/src/operator/hold.ts +3 -3
  328. package/src/operator/index.ts +2 -2
  329. package/src/operator/interruptible.ts +1 -1
  330. package/src/operator/loop.test.ts +2 -2
  331. package/src/operator/map.test.ts +2 -2
  332. package/src/operator/mapCause.test.ts +3 -3
  333. package/src/operator/mapCause.ts +1 -1
  334. package/src/operator/merge.test.ts +2 -2
  335. package/src/operator/merge.ts +1 -1
  336. package/src/operator/mergeRace.test.ts +3 -3
  337. package/src/operator/mergeRace.ts +1 -1
  338. package/src/operator/multicast.test.ts +2 -2
  339. package/src/operator/multicast.ts +7 -11
  340. package/src/operator/onDone.ts +2 -2
  341. package/src/operator/onDoneCause.ts +1 -1
  342. package/src/operator/onExit.ts +1 -1
  343. package/src/operator/onInterrupt.ts +1 -1
  344. package/src/operator/{provideEnvironment.ts → provideContext.ts} +5 -5
  345. package/src/operator/provideLayer.ts +1 -1
  346. package/src/operator/provideService.test.ts +2 -2
  347. package/src/operator/provideService.ts +2 -2
  348. package/src/operator/provideServiceEffect.test.ts +2 -2
  349. package/src/operator/provideServiceEffect.ts +2 -2
  350. package/src/operator/provideSomeLayer.ts +1 -1
  351. package/src/operator/race.test.ts +2 -2
  352. package/src/operator/race.ts +17 -18
  353. package/src/operator/sample.ts +1 -1
  354. package/src/operator/sandbox.ts +1 -1
  355. package/src/operator/scan.test.ts +2 -2
  356. package/src/operator/scan.ts +1 -1
  357. package/src/operator/scanEffect.test.ts +3 -3
  358. package/src/operator/scanEffect.ts +9 -7
  359. package/src/operator/separate.test.ts +2 -2
  360. package/src/operator/separate.ts +2 -2
  361. package/src/operator/since.ts +1 -1
  362. package/src/operator/skipAfter.test.ts +2 -2
  363. package/src/operator/skipAfter.ts +1 -1
  364. package/src/operator/skipRepeats.test.ts +2 -2
  365. package/src/operator/skipRepeats.ts +3 -3
  366. package/src/operator/skipUntil.test.ts +2 -2
  367. package/src/operator/skipUntil.ts +1 -1
  368. package/src/operator/skipWhile.ts +2 -2
  369. package/src/operator/slice.test.ts +2 -2
  370. package/src/operator/slice.ts +1 -1
  371. package/src/operator/snapshot.test.ts +2 -2
  372. package/src/operator/snapshot.ts +3 -3
  373. package/src/operator/snapshotEffect.test.ts +2 -2
  374. package/src/operator/snapshotEffect.ts +14 -18
  375. package/src/operator/startWith.ts +1 -1
  376. package/src/operator/startWithEffect.ts +1 -1
  377. package/src/operator/struct.test.ts +2 -2
  378. package/src/operator/struct.ts +1 -1
  379. package/src/operator/switchMap.test.ts +2 -2
  380. package/src/operator/switchMap.ts +1 -1
  381. package/src/operator/switchMapCause.test.ts +3 -3
  382. package/src/operator/switchMapCause.ts +1 -1
  383. package/src/operator/switchMapEffect.ts +1 -1
  384. package/src/operator/switchMapError.ts +2 -2
  385. package/src/operator/switchMatch.test.ts +2 -2
  386. package/src/operator/switchMatch.ts +2 -2
  387. package/src/operator/takeUntil.test.ts +2 -2
  388. package/src/operator/takeUntil.ts +1 -1
  389. package/src/operator/takeWhile.ts +2 -2
  390. package/src/operator/tap.ts +1 -1
  391. package/src/operator/tapCause.ts +1 -1
  392. package/src/operator/tapDefect.ts +2 -2
  393. package/src/operator/tapError.ts +2 -2
  394. package/src/operator/throttle.test.ts +2 -2
  395. package/src/operator/throttle.ts +1 -1
  396. package/src/operator/uninterruptible.ts +1 -1
  397. package/src/operator/withItems.ts +1 -1
  398. package/src/operator/withPermit.ts +5 -6
  399. package/src/operator/withRuntimeFlags.ts +1 -1
  400. package/src/operator/zip.test.ts +2 -2
  401. package/src/operator/zip.ts +1 -1
  402. package/src/operator/zipItems.test.ts +2 -2
  403. package/src/run/collectAll.ts +1 -1
  404. package/src/run/collectN.ts +1 -1
  405. package/src/run/drain.ts +3 -1
  406. package/src/run/observe.ts +1 -1
  407. package/src/run/reduce.ts +1 -1
  408. package/src/run/run.ts +3 -3
  409. package/src/run/unsafe.ts +9 -10
  410. package/src/typeclass/Applicative.ts +2 -2
  411. package/src/typeclass/Bicovariant.ts +1 -1
  412. package/src/typeclass/Product.ts +2 -1
  413. package/src/typeclass/SemiCoproduct.ts +4 -4
  414. package/src/typeclass/SemiProduct.ts +5 -2
  415. package/tsconfig.build.tsbuildinfo +1 -1
  416. package/dist/operator/provideEnvironment.d.ts +0 -4
  417. package/dist/operator/provideEnvironment.d.ts.map +0 -1
  418. package/dist/operator/provideEnvironment.js +0 -18
  419. package/dist/operator/provideEnvironment.js.map +0 -1
  420. package/dist/operator/provideSomeEnvironment.d.ts +0 -4
  421. package/dist/operator/provideSomeEnvironment.d.ts.map +0 -1
  422. package/dist/operator/provideSomeEnvironment.js +0 -18
  423. package/dist/operator/provideSomeEnvironment.js.map +0 -1
  424. package/src/operator/during.test.ts +0 -49
  425. package/src/operator/provideSomeEnvironment.ts +0 -29
  426. package/src/operator/since.test.ts +0 -48
  427. package/src/operator/until.test.ts +0 -48
@@ -1,5 +1,5 @@
1
1
  import { zipRight } from '@effect/io/Effect'
2
- import { pipe } from '@fp-ts/data/Function'
2
+ import { pipe } from '@fp-ts/core/Function'
3
3
 
4
4
  import { Fx } from '../Fx.js'
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as Effect from '@effect/io/Effect'
2
- import { flow } from '@fp-ts/data/Function'
2
+ import { flow } from '@fp-ts/core/Function'
3
3
 
4
4
  import type { Fx } from '../Fx.js'
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as Effect from '@effect/io/Effect'
2
- import { flow } from '@fp-ts/data/Function'
2
+ import { flow } from '@fp-ts/core/Function'
3
3
 
4
4
  import type { Fx } from '../Fx.js'
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as Effect from '@effect/io/Effect'
2
- import { flow } from '@fp-ts/data/Function'
2
+ import { flow } from '@fp-ts/core/Function'
3
3
 
4
4
  import type { Fx } from '../Fx.js'
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as Effect from '@effect/io/Effect'
2
- import { flow } from '@fp-ts/data/Function'
2
+ import { flow } from '@fp-ts/core/Function'
3
3
 
4
4
  import type { Fx } from '../Fx.js'
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as Effect from '@effect/io/Effect'
2
- import { flow } from '@fp-ts/data/Function'
2
+ import { flow } from '@fp-ts/core/Function'
3
3
 
4
4
  import type { Fx } from '../Fx.js'
5
5
 
@@ -1,6 +1,6 @@
1
1
  import * as Cause from '@effect/io/Cause'
2
- import { match } from '@fp-ts/data/Either'
3
- import { pipe } from '@fp-ts/data/Function'
2
+ import { match } from '@fp-ts/core/Either'
3
+ import { pipe } from '@fp-ts/core/Function'
4
4
 
5
5
  import type { Fx } from '../Fx.js'
6
6
  import { failCause } from '../constructor/failCause.js'
@@ -1,7 +1,7 @@
1
1
  import { deepStrictEqual } from 'assert'
2
2
 
3
3
  import * as Effect from '@effect/io/Effect'
4
- import { pipe } from '@fp-ts/data/Function'
4
+ import { pipe } from '@fp-ts/core/Function'
5
5
  import { describe, it } from 'vitest'
6
6
 
7
7
  import { fail } from '../constructor/fail.js'
@@ -18,7 +18,7 @@ describe(import.meta.url, () => {
18
18
  catchAllCause(() => fromArray([4, 5, 6])),
19
19
  collectAll,
20
20
  )
21
- const events = await Effect.unsafeRunPromise(test)
21
+ const events = await Effect.runPromise(test)
22
22
 
23
23
  deepStrictEqual(events, [4, 5, 6])
24
24
  })
@@ -1,6 +1,6 @@
1
1
  import * as Cause from '@effect/io/Cause'
2
- import { pipe } from '@fp-ts/data/Function'
3
- import { match } from '@fp-ts/data/Option'
2
+ import { pipe } from '@fp-ts/core/Function'
3
+ import { match } from '@fp-ts/core/Option'
4
4
 
5
5
  import type { Fx } from '../Fx.js'
6
6
  import { failCause } from '../constructor/failCause.js'
@@ -1,8 +1,8 @@
1
1
  import { deepStrictEqual } from 'assert'
2
2
 
3
3
  import * as Effect from '@effect/io/Effect'
4
+ import { pipe } from '@fp-ts/core/Function'
4
5
  import { millis } from '@fp-ts/data/Duration'
5
- import { pipe } from '@fp-ts/data/Function'
6
6
  import { describe, it } from 'vitest'
7
7
 
8
8
  import { at } from '../constructor/at.js'
@@ -24,7 +24,7 @@ describe(import.meta.url, () => {
24
24
  ),
25
25
  collectAll,
26
26
  )
27
- const events = await Effect.unsafeRunPromise(test)
27
+ const events = await Effect.runPromise(test)
28
28
 
29
29
  deepStrictEqual(events, [
30
30
  [1, 2, 3, 4, 5],
@@ -1,5 +1,5 @@
1
1
  import * as Effect from '@effect/io/Effect'
2
- import { pipe } from '@fp-ts/data/Function'
2
+ import { pipe } from '@fp-ts/core/Function'
3
3
 
4
4
  import { Fx } from '../Fx.js'
5
5
  import { withRefCounter } from '../_internal/RefCounter.js'
@@ -1,5 +1,5 @@
1
- import { identity } from '@fp-ts/data/Function'
2
- import type { Option } from '@fp-ts/data/Option'
1
+ import { identity } from '@fp-ts/core/Function'
2
+ import type { Option } from '@fp-ts/core/Option'
3
3
 
4
4
  import type { Fx } from '../Fx.js'
5
5
 
@@ -1,8 +1,8 @@
1
1
  import { deepStrictEqual } from 'assert'
2
2
 
3
3
  import * as Effect from '@effect/io/Effect'
4
+ import { pipe } from '@fp-ts/core/Function'
4
5
  import { millis } from '@fp-ts/data/Duration'
5
- import { pipe } from '@fp-ts/data/Function'
6
6
  import { describe, it } from 'vitest'
7
7
 
8
8
  import { at } from '../constructor/at.js'
@@ -20,7 +20,7 @@ describe(import.meta.url, () => {
20
20
  concatMap((n) => mergeAll(at(millis(0), n), at(millis(10), n * n))),
21
21
  collectAll,
22
22
  )
23
- const events = await Effect.unsafeRunPromise(test)
23
+ const events = await Effect.runPromise(test)
24
24
 
25
25
  deepStrictEqual(events, [1, 1, 2, 4, 3, 9])
26
26
  })
@@ -1,7 +1,7 @@
1
1
  import { deepStrictEqual } from 'assert'
2
2
 
3
3
  import * as Effect from '@effect/io/Effect'
4
- import { pipe } from '@fp-ts/data/Function'
4
+ import { pipe } from '@fp-ts/core/Function'
5
5
  import { describe, it } from 'vitest'
6
6
 
7
7
  import { fromArray } from '../constructor/fromArray.js'
@@ -17,7 +17,7 @@ describe(import.meta.url, () => {
17
17
  continueWith(() => fromArray([4, 5, 6])),
18
18
  collectAll,
19
19
  )
20
- const events = await Effect.unsafeRunPromise(test)
20
+ const events = await Effect.runPromise(test)
21
21
 
22
22
  deepStrictEqual(events, [1, 2, 3, 4, 5, 6])
23
23
  })
@@ -0,0 +1,34 @@
1
+ import * as Effect from '@effect/io/Effect'
2
+ import type { Scope } from '@effect/io/Scope'
3
+ import * as Context from '@fp-ts/data/Context'
4
+
5
+ import { Fx } from '../Fx.js'
6
+
7
+ export function provideSomeContext<R2>(context: Context.Context<R2>) {
8
+ return <R, E, A>(self: Fx<R, E, A>): Fx<Exclude<R, R2>, E, A> =>
9
+ new ContramapContextFx(self, (ctx) => Context.merge(context)(ctx as Context.Context<R>))
10
+ }
11
+
12
+ export function contramapContext<R2, R>(f: (ctx: Context.Context<R2>) => Context.Context<R>) {
13
+ return <E, A>(self: Fx<R, E, A>): Fx<R2, E, A> => new ContramapContextFx(self, f)
14
+ }
15
+
16
+ class ContramapContextFx<R, R2, E, A> extends Fx.Variance<R2, E, A> implements Fx<R2, E, A> {
17
+ constructor(
18
+ readonly self: Fx<R, E, A>,
19
+ readonly f: (ctx: Context.Context<R2>) => Context.Context<R>,
20
+ ) {
21
+ super()
22
+ }
23
+
24
+ run<R3>(sink: Fx.Sink<R3, E, A>) {
25
+ const { self, f } = this
26
+
27
+ return Effect.gen(function* ($) {
28
+ const ctx = yield* $(Effect.context<R2 | R3 | Scope>())
29
+ const context = Context.merge(f(ctx))(ctx)
30
+
31
+ return yield* $(Effect.provideContext(context)(self.run(sink)))
32
+ })
33
+ }
34
+ }
@@ -1,8 +1,8 @@
1
1
  import { deepStrictEqual } from 'assert'
2
2
 
3
3
  import * as Effect from '@effect/io/Effect'
4
+ import { pipe } from '@fp-ts/core/Function'
4
5
  import * as Duration from '@fp-ts/data/Duration'
5
- import { pipe } from '@fp-ts/data/Function'
6
6
  import { describe, it } from 'vitest'
7
7
 
8
8
  import { fromArray } from '../constructor/fromArray.js'
@@ -14,7 +14,7 @@ describe(import.meta.url, () => {
14
14
  describe(debounce.name, () => {
15
15
  it('filters noisy streams, favoring the latest', async () => {
16
16
  const test = pipe(fromArray([1, 2, 3]), debounce(Duration.millis(10)), collectAll)
17
- const events = await Effect.unsafeRunPromise(test)
17
+ const events = await Effect.runPromise(test)
18
18
 
19
19
  deepStrictEqual(events, [3])
20
20
  })
@@ -1,8 +1,8 @@
1
1
  import * as Cause from '@effect/io/Cause'
2
2
  import * as Effect from '@effect/io/Effect'
3
3
  import * as Fiber from '@effect/io/Fiber'
4
+ import { pipe } from '@fp-ts/core/Function'
4
5
  import type * as Duration from '@fp-ts/data/Duration'
5
- import { pipe } from '@fp-ts/data/Function'
6
6
 
7
7
  import { Fx } from '../Fx.js'
8
8
  import { withRefCounter } from '../_internal/RefCounter.js'
@@ -1,6 +1,6 @@
1
1
  import * as Effect from '@effect/io/Effect'
2
+ import { flow } from '@fp-ts/core/Function'
2
3
  import type { Duration } from '@fp-ts/data/Duration'
3
- import { flow } from '@fp-ts/data/Function'
4
4
 
5
5
  import { Fx } from '../Fx.js'
6
6
 
@@ -1,6 +1,6 @@
1
1
  import * as Effect from '@effect/io/Effect'
2
2
  import * as Fiber from '@effect/io/Fiber'
3
- import { pipe } from '@fp-ts/data/Function'
3
+ import { pipe } from '@fp-ts/core/Function'
4
4
 
5
5
  import { Fx } from '../Fx.js'
6
6
  import { asap } from '../_internal/RefCounter.js'
@@ -1,8 +1,8 @@
1
1
  import { deepStrictEqual } from 'assert'
2
2
 
3
3
  import * as Effect from '@effect/io/Effect'
4
+ import { pipe } from '@fp-ts/core/Function'
4
5
  import * as Duration from '@fp-ts/data/Duration'
5
- import { pipe } from '@fp-ts/data/Function'
6
6
  import { describe, it } from 'vitest'
7
7
 
8
8
  import { fromIterable } from '../constructor/fromIterable.js'
@@ -18,7 +18,7 @@ describe(import.meta.url, () => {
18
18
  fromIterable([1, 2, 3]),
19
19
  exhaustMap((n) => delay(Duration.millis(10))(fromIterable([n, n, n]))),
20
20
  collectAll,
21
- Effect.unsafeRunPromise,
21
+ Effect.runPromise,
22
22
  )
23
23
 
24
24
  deepStrictEqual(result, [1, 1, 1])
@@ -2,7 +2,7 @@ import * as Cause from '@effect/io/Cause'
2
2
  import * as Effect from '@effect/io/Effect'
3
3
  import type * as Fiber from '@effect/io/Fiber'
4
4
  import * as Ref from '@effect/io/Ref/Synchronized'
5
- import { pipe } from '@fp-ts/data/Function'
5
+ import { pipe } from '@fp-ts/core/Function'
6
6
 
7
7
  import { Fx } from '../Fx.js'
8
8
  import { withRefCounter } from '../_internal/RefCounter.js'
@@ -1,5 +1,5 @@
1
1
  import type { Effect } from '@effect/io/Effect'
2
- import { flow } from '@fp-ts/data/Function'
2
+ import { flow } from '@fp-ts/core/Function'
3
3
 
4
4
  import type { Fx } from '../Fx.js'
5
5
  import { fromEffect } from '../constructor/fromEffect.js'
@@ -1,8 +1,8 @@
1
1
  import { deepStrictEqual } from 'assert'
2
2
 
3
3
  import * as Effect from '@effect/io/Effect'
4
+ import { pipe } from '@fp-ts/core/Function'
4
5
  import * as Duration from '@fp-ts/data/Duration'
5
- import { pipe } from '@fp-ts/data/Function'
6
6
  import { describe, it } from 'vitest'
7
7
 
8
8
  import { fromIterable } from '../constructor/fromIterable.js'
@@ -18,7 +18,7 @@ describe(import.meta.url, () => {
18
18
  fromIterable([1, 2, 3]),
19
19
  exhaustMapLatest((n) => delay(Duration.millis(10))(fromIterable([n, n, n]))),
20
20
  collectAll,
21
- Effect.unsafeRunPromise,
21
+ Effect.runPromise,
22
22
  )
23
23
 
24
24
  deepStrictEqual(result, [1, 1, 1, 3, 3, 3])
@@ -3,7 +3,7 @@ import * as Effect from '@effect/io/Effect'
3
3
  import type * as Fiber from '@effect/io/Fiber'
4
4
  import * as Ref from '@effect/io/Ref/Synchronized'
5
5
  import type { Scope } from '@effect/io/Scope'
6
- import { pipe } from '@fp-ts/data/Function'
6
+ import { pipe } from '@fp-ts/core/Function'
7
7
 
8
8
  import { Fx } from '../Fx.js'
9
9
  import { withRefCounter } from '../_internal/RefCounter.js'
@@ -1,5 +1,5 @@
1
1
  import type { Effect } from '@effect/io/Effect'
2
- import { flow } from '@fp-ts/data/Function'
2
+ import { flow } from '@fp-ts/core/Function'
3
3
 
4
4
  import type { Fx } from '../Fx.js'
5
5
  import { fromEffect } from '../constructor/fromEffect.js'
@@ -1,7 +1,7 @@
1
1
  import { deepStrictEqual } from 'assert'
2
2
 
3
3
  import * as Effect from '@effect/io/Effect'
4
- import { pipe } from '@fp-ts/data/Function'
4
+ import { pipe } from '@fp-ts/core/Function'
5
5
  import { describe, it } from 'vitest'
6
6
 
7
7
  import { fromArray } from '../constructor/fromArray.js'
@@ -17,7 +17,7 @@ describe(import.meta.url, () => {
17
17
  filter((x) => x % 2 === 0),
18
18
  collectAll,
19
19
  )
20
- const events = await Effect.unsafeRunPromise(test)
20
+ const events = await Effect.runPromise(test)
21
21
 
22
22
  deepStrictEqual(events, [2, 4])
23
23
  })
@@ -1,5 +1,5 @@
1
1
  import * as Effect from '@effect/io/Effect'
2
- import type { Predicate, Refinement } from '@fp-ts/data/Predicate'
2
+ import type { Predicate, Refinement } from '@fp-ts/core/Predicate'
3
3
 
4
4
  import { Fx } from '../Fx.js'
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { deepStrictEqual } from 'assert'
2
2
 
3
3
  import * as Effect from '@effect/io/Effect'
4
- import { pipe } from '@fp-ts/data/Function'
4
+ import { pipe } from '@fp-ts/core/Function'
5
5
  import { describe, it } from 'vitest'
6
6
 
7
7
  import { fromArray } from '../constructor/fromArray.js'
@@ -17,7 +17,7 @@ describe(import.meta.url, () => {
17
17
  filterEffect((x) => Effect.sync(() => x % 2 === 0)),
18
18
  collectAll,
19
19
  )
20
- const events = await Effect.unsafeRunPromise(test)
20
+ const events = await Effect.runPromise(test)
21
21
 
22
22
  deepStrictEqual(events, [2, 4])
23
23
  })
@@ -1,5 +1,5 @@
1
1
  import * as Effect from '@effect/io/Effect'
2
- import { pipe } from '@fp-ts/data/Function'
2
+ import { pipe } from '@fp-ts/core/Function'
3
3
 
4
4
  import { Fx } from '../Fx.js'
5
5
 
@@ -1,8 +1,8 @@
1
1
  import { deepStrictEqual } from 'assert'
2
2
 
3
3
  import * as Effect from '@effect/io/Effect'
4
- import { pipe } from '@fp-ts/data/Function'
5
- import { none, some } from '@fp-ts/data/Option'
4
+ import { pipe } from '@fp-ts/core/Function'
5
+ import { none, some } from '@fp-ts/core/Option'
6
6
  import { describe, it } from 'vitest'
7
7
 
8
8
  import { fromArray } from '../constructor/fromArray.js'
@@ -15,10 +15,10 @@ describe(import.meta.url, () => {
15
15
  it('filters and transforms an Fx', async () => {
16
16
  const test = pipe(
17
17
  fromArray([1, 2, 3]),
18
- filterMap((n) => (n % 2 === 0 ? some(n + 1) : none)),
18
+ filterMap((n) => (n % 2 === 0 ? some(n + 1) : none())),
19
19
  collectAll,
20
20
  )
21
- const events = await Effect.unsafeRunPromise(test)
21
+ const events = await Effect.runPromise(test)
22
22
 
23
23
  deepStrictEqual(events, [3])
24
24
  })
@@ -1,6 +1,6 @@
1
1
  import * as Effect from '@effect/io/Effect'
2
- import { pipe } from '@fp-ts/data/Function'
3
- import * as Option from '@fp-ts/data/Option'
2
+ import { pipe } from '@fp-ts/core/Function'
3
+ import * as Option from '@fp-ts/core/Option'
4
4
 
5
5
  import { Fx } from '../Fx.js'
6
6
 
@@ -1,8 +1,8 @@
1
1
  import { deepStrictEqual } from 'assert'
2
2
 
3
3
  import * as Effect from '@effect/io/Effect'
4
- import { pipe } from '@fp-ts/data/Function'
5
- import { none, some } from '@fp-ts/data/Option'
4
+ import { pipe } from '@fp-ts/core/Function'
5
+ import { none, some } from '@fp-ts/core/Option'
6
6
  import { describe, it } from 'vitest'
7
7
 
8
8
  import { fromArray } from '../constructor/fromArray.js'
@@ -15,10 +15,10 @@ describe(import.meta.url, () => {
15
15
  it('filters and transforms an Fx', async () => {
16
16
  const test = pipe(
17
17
  fromArray([1, 2, 3]),
18
- filterMapEffect((n) => Effect.sync(() => (n % 2 === 0 ? some(n + 1) : none))),
18
+ filterMapEffect((n) => Effect.sync(() => (n % 2 === 0 ? some(n + 1) : none()))),
19
19
  collectAll,
20
20
  )
21
- const events = await Effect.unsafeRunPromise(test)
21
+ const events = await Effect.runPromise(test)
22
22
 
23
23
  deepStrictEqual(events, [3])
24
24
  })
@@ -1,6 +1,6 @@
1
1
  import * as Effect from '@effect/io/Effect'
2
- import { pipe } from '@fp-ts/data/Function'
3
- import * as Option from '@fp-ts/data/Option'
2
+ import { pipe } from '@fp-ts/core/Function'
3
+ import * as Option from '@fp-ts/core/Option'
4
4
 
5
5
  import { Fx } from '../Fx.js'
6
6
 
@@ -1,8 +1,8 @@
1
1
  import { deepStrictEqual } from 'assert'
2
2
 
3
3
  import * as Effect from '@effect/io/Effect'
4
+ import { pipe } from '@fp-ts/core/Function'
4
5
  import { millis } from '@fp-ts/data/Duration'
5
- import { pipe } from '@fp-ts/data/Function'
6
6
  import { describe, it } from 'vitest'
7
7
 
8
8
  import { at } from '../constructor/at.js'
@@ -19,7 +19,7 @@ describe(import.meta.url, () => {
19
19
  flatMap((n) => fromArray([n * 2, n + 1])),
20
20
  collectAll,
21
21
  )
22
- const events = await Effect.unsafeRunPromise(test)
22
+ const events = await Effect.runPromise(test)
23
23
 
24
24
  deepStrictEqual(events, [2, 2, 4, 3, 6, 4])
25
25
  })
@@ -30,7 +30,7 @@ describe(import.meta.url, () => {
30
30
  flatMap((n) => at(millis(10), n * 2)),
31
31
  collectAll,
32
32
  )
33
- const events = await Effect.unsafeRunPromise(test)
33
+ const events = await Effect.runPromise(test)
34
34
 
35
35
  deepStrictEqual(events, [2, 4, 6])
36
36
  })
@@ -1,6 +1,6 @@
1
1
  import * as Cause from '@effect/io/Cause'
2
2
  import * as Effect from '@effect/io/Effect'
3
- import { identity, pipe } from '@fp-ts/data/Function'
3
+ import { identity, pipe } from '@fp-ts/core/Function'
4
4
 
5
5
  import { Fx } from '../Fx.js'
6
6
  import { withRefCounter } from '../_internal/RefCounter.js'
@@ -1,6 +1,6 @@
1
1
  import * as Cause from '@effect/io/Cause'
2
2
  import * as Effect from '@effect/io/Effect'
3
- import { pipe } from '@fp-ts/data/Function'
3
+ import { pipe } from '@fp-ts/core/Function'
4
4
 
5
5
  import { Fx } from '../Fx.js'
6
6
  import { withRefCounter } from '../_internal/RefCounter.js'
@@ -1,8 +1,8 @@
1
1
  import { deepStrictEqual } from 'assert'
2
2
 
3
3
  import * as Effect from '@effect/io/Effect'
4
+ import { pipe } from '@fp-ts/core/Function'
4
5
  import { millis } from '@fp-ts/data/Duration'
5
- import { pipe } from '@fp-ts/data/Function'
6
6
  import { describe, it } from 'vitest'
7
7
 
8
8
  import { at } from '../constructor/at.js'
@@ -20,7 +20,7 @@ describe(import.meta.url, () => {
20
20
  flatMapConcurrently(2, (n) => mergeAll(at(millis(50), n), at(millis(100), n * n))),
21
21
  collectAll,
22
22
  )
23
- const events = await Effect.unsafeRunPromise(test)
23
+ const events = await Effect.runPromise(test)
24
24
 
25
25
  deepStrictEqual(events, [1, 2, 1, 4, 3, 4, 9, 16])
26
26
  })
@@ -1,5 +1,5 @@
1
- import * as TSemaphore from '@effect/stm/TSemaphore'
2
- import { flow, pipe } from '@fp-ts/data/Function'
1
+ import { unsafeMakeSemaphore } from '@effect/io/Effect'
2
+ import { flow, pipe } from '@fp-ts/core/Function'
3
3
 
4
4
  import type { Fx } from '../Fx.js'
5
5
  import { suspend } from '../constructor/suspend.js'
@@ -10,7 +10,7 @@ import { withPermit } from './withPermit.js'
10
10
  export function flatMapConcurrently<A, R2, E2, B>(concurrency: number, f: (a: A) => Fx<R2, E2, B>) {
11
11
  return <R, E>(stream: Fx<R, E, A>): Fx<R | R2, E | E2, B> =>
12
12
  suspend(() => {
13
- const semaphore = TSemaphore.unsafeMake(concurrency)
13
+ const semaphore = unsafeMakeSemaphore(concurrency)
14
14
 
15
15
  return pipe(stream, flatMap(flow(f, withPermit(semaphore))))
16
16
  })
@@ -1,5 +1,5 @@
1
1
  import type { Effect } from '@effect/io/Effect'
2
- import { flow } from '@fp-ts/data/Function'
2
+ import { flow } from '@fp-ts/core/Function'
3
3
 
4
4
  import type { Fx } from '../Fx.js'
5
5
  import { fromEffect } from '../constructor/fromEffect.js'
@@ -1,5 +1,5 @@
1
1
  import type { Effect } from '@effect/io/Effect'
2
- import { flow } from '@fp-ts/data/Function'
2
+ import { flow } from '@fp-ts/core/Function'
3
3
 
4
4
  import type { Fx } from '../Fx.js'
5
5
  import { fromEffect } from '../constructor/fromEffect.js'
@@ -41,7 +41,7 @@ describe(import.meta.url, () => {
41
41
  deepStrictEqual(yield* $(Fiber.join(fiber3)), [2, 3, 4, 5, 6], '3')
42
42
  })
43
43
 
44
- await Effect.unsafeRunPromise(test)
44
+ await Effect.runPromise(test)
45
45
  })
46
46
  })
47
47
  })
@@ -2,9 +2,9 @@ import type * as Cause from '@effect/io/Cause'
2
2
  import * as Effect from '@effect/io/Effect'
3
3
  import * as Fiber from '@effect/io/Fiber'
4
4
  import type { Scope } from '@effect/io/Scope'
5
- import { pipe } from '@fp-ts/data/Function'
5
+ import { pipe } from '@fp-ts/core/Function'
6
+ import * as Option from '@fp-ts/core/Option'
6
7
  import * as MutableRef from '@fp-ts/data/MutableRef'
7
- import * as Option from '@fp-ts/data/Option'
8
8
 
9
9
  import type { Fx } from '../Fx.js'
10
10
  import { asap } from '../_internal/RefCounter.js'
@@ -12,7 +12,7 @@ import { asap } from '../_internal/RefCounter.js'
12
12
  import { MulticastFx } from './multicast.js'
13
13
 
14
14
  export function hold<R, E, A>(fx: Fx<R, E, A>): Fx<R, E, A> {
15
- return new HoldFx(fx, MutableRef.make(Option.none))
15
+ return new HoldFx(fx, MutableRef.make(Option.none()))
16
16
  }
17
17
 
18
18
  export function hold_<R, E, A>(fx: Fx<R, E, A>, value: MutableRef.MutableRef<Option.Option<A>>) {
@@ -38,11 +38,11 @@ export * from './onError.js'
38
38
  export * from './onExit.js'
39
39
  export * from './onInterrupt.js'
40
40
  export * from './orElse.js'
41
- export * from './provideEnvironment.js'
41
+ export * from './provideContext.js'
42
42
  export * from './provideLayer.js'
43
43
  export * from './provideService.js'
44
44
  export * from './provideServiceEffect.js'
45
- export * from './provideSomeEnvironment.js'
45
+ export * from './contramapContext.js'
46
46
  export * from './provideSomeLayer.js'
47
47
  export * from './race.js'
48
48
  export * from './sample.js'
@@ -1,5 +1,5 @@
1
1
  import * as Effect from '@effect/io/Effect'
2
- import { pipe } from '@fp-ts/data/Function'
2
+ import { pipe } from '@fp-ts/core/Function'
3
3
 
4
4
  import { Fx } from '../Fx.js'
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { deepStrictEqual } from 'assert'
2
2
 
3
3
  import * as Effect from '@effect/io/Effect'
4
- import { pipe } from '@fp-ts/data/Function'
4
+ import { pipe } from '@fp-ts/core/Function'
5
5
  import { describe, it } from 'vitest'
6
6
 
7
7
  import { fromArray } from '../constructor/fromArray.js'
@@ -17,7 +17,7 @@ describe(import.meta.url, () => {
17
17
  loop(0, (acc, n) => [(acc + n).toString(), acc + n]),
18
18
  collectAll,
19
19
  )
20
- const events = await Effect.unsafeRunPromise(test)
20
+ const events = await Effect.runPromise(test)
21
21
 
22
22
  deepStrictEqual(events, ['1', '3', '6'])
23
23
  })
@@ -1,7 +1,7 @@
1
1
  import { deepStrictEqual } from 'assert'
2
2
 
3
3
  import * as Effect from '@effect/io/Effect'
4
- import { pipe } from '@fp-ts/data/Function'
4
+ import { pipe } from '@fp-ts/core/Function'
5
5
  import { describe, it } from 'vitest'
6
6
 
7
7
  import { fromArray } from '../constructor/fromArray.js'
@@ -17,7 +17,7 @@ describe(import.meta.url, () => {
17
17
  map((x) => x + 1),
18
18
  collectAll,
19
19
  )
20
- const events = await Effect.unsafeRunPromise(test)
20
+ const events = await Effect.runPromise(test)
21
21
 
22
22
  deepStrictEqual(events, [2, 3, 4])
23
23
  })