@typed/fx 1.0.9 → 1.0.11
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.
- package/coverage/src/Fx.ts.html +1 -1
- package/coverage/src/Subject/Subject.ts.html +1 -1
- package/coverage/src/_internal/RefCounter.ts.html +1 -1
- package/coverage/src/_internal/earlyExit.ts.html +1 -1
- package/coverage/src/constructor/at.ts.html +1 -1
- package/coverage/src/constructor/fromArray.ts.html +1 -1
- package/coverage/src/constructor/fromEffect.ts.html +1 -1
- package/coverage/src/constructor/fromEmitter.ts.html +1 -1
- package/coverage/src/constructor/serviceWith.ts.html +70 -66
- package/coverage/src/constructor/succeed.ts.html +11 -12
- package/coverage/src/operator/delay.ts.html +1 -1
- package/coverage/src/operator/filterEffect.ts.html +1 -1
- package/coverage/src/operator/filterMap.ts.html +78 -74
- package/coverage/src/operator/filterMapEffect.ts.html +1 -1
- package/coverage/src/operator/flatMap.ts.html +1 -1
- package/coverage/src/operator/flatMapConcurrently.ts.html +71 -66
- package/coverage/src/operator/merge.ts.html +1 -1
- package/coverage/src/operator/multicast.ts.html +1 -1
- package/coverage/src/operator/provideService.ts.html +1 -1
- package/coverage/src/operator/provideServiceEffect.ts.html +1 -1
- package/coverage/src/operator/scan.ts.html +70 -66
- package/coverage/src/operator/scanEffect.ts.html +1 -1
- package/coverage/src/operator/skipRepeats.ts.html +1 -1
- package/coverage/src/operator/slice.ts.html +78 -74
- package/coverage/src/operator/startWith.ts.html +70 -66
- package/coverage/src/operator/switchMap.ts.html +1 -1
- package/coverage/src/operator/withPermit.ts.html +1 -1
- package/coverage/src/run/collectAll.ts.html +1 -1
- package/coverage/src/run/observe.ts.html +1 -1
- package/coverage/src/run/reduce.ts.html +70 -66
- package/coverage/src/run/run.ts.html +1 -1
- package/dist/Fx.js +1 -1
- package/dist/Subject/HoldSubject.d.ts +1 -1
- package/dist/Subject/HoldSubject.d.ts.map +1 -1
- package/dist/Subject/HoldSubject.js +3 -3
- package/dist/Subject/HoldSubject.js.map +1 -1
- package/dist/Subject/RefSubject.d.ts +1 -1
- package/dist/Subject/RefSubject.d.ts.map +1 -1
- package/dist/Subject/RefSubject.js +3 -3
- package/dist/Subject/RefSubject.js.map +1 -1
- package/dist/Subject/Subject.js +1 -1
- package/dist/Subject/SynchronizedSubject.d.ts.map +1 -1
- package/dist/Subject/SynchronizedSubject.js +5 -6
- package/dist/Subject/SynchronizedSubject.js.map +1 -1
- package/dist/_internal/RefCounter.js +2 -2
- package/dist/_internal/RefCounter.js.map +1 -1
- package/dist/_internal/earlyExit.js +1 -1
- package/dist/constructor/acquireUseRelease.js +1 -1
- package/dist/constructor/async.js +1 -1
- package/dist/constructor/asyncEffect.js +1 -1
- package/dist/constructor/asyncOption.d.ts +1 -1
- package/dist/constructor/asyncOption.js +1 -1
- package/dist/constructor/at.d.ts.map +1 -1
- package/dist/constructor/at.js +1 -1
- package/dist/constructor/at.js.map +1 -1
- package/dist/constructor/die.js +1 -1
- package/dist/constructor/dieMessage.js +1 -1
- package/dist/constructor/dieSync.js +1 -1
- package/dist/constructor/done.js +1 -1
- package/dist/constructor/fail.js +1 -1
- package/dist/constructor/failCause.js +1 -1
- package/dist/constructor/failCauseSync.js +1 -1
- package/dist/constructor/fromArray.js +1 -1
- package/dist/constructor/fromEffect.js +1 -1
- package/dist/constructor/fromEither.d.ts +1 -1
- package/dist/constructor/fromEither.js +1 -1
- package/dist/constructor/fromEitherCause.d.ts +1 -1
- package/dist/constructor/fromEitherCause.js +1 -1
- package/dist/constructor/fromEmitter.d.ts +4 -4
- package/dist/constructor/fromEmitter.d.ts.map +1 -1
- package/dist/constructor/fromEmitter.js +4 -4
- package/dist/constructor/fromEmitter.js.map +1 -1
- package/dist/constructor/fromFiber.js +1 -1
- package/dist/constructor/fromFiberEffect.js +1 -1
- package/dist/constructor/fromFxEffect.js +1 -1
- package/dist/constructor/fromOption.d.ts +1 -1
- package/dist/constructor/fromOption.js +1 -1
- package/dist/constructor/periodic.d.ts.map +1 -1
- package/dist/constructor/periodic.js +1 -1
- package/dist/constructor/periodic.js.map +1 -1
- package/dist/constructor/promise.js +1 -1
- package/dist/constructor/promiseAbort.js +1 -1
- package/dist/constructor/promiseFx.js +1 -1
- package/dist/constructor/random.js +1 -1
- package/dist/constructor/scheduled.js +1 -1
- package/dist/constructor/service.d.ts.map +1 -1
- package/dist/constructor/service.js +1 -1
- package/dist/constructor/service.js.map +1 -1
- package/dist/constructor/serviceWith.d.ts.map +1 -1
- package/dist/constructor/serviceWith.js +1 -2
- package/dist/constructor/serviceWith.js.map +1 -1
- package/dist/constructor/serviceWithEffect.d.ts.map +1 -1
- package/dist/constructor/serviceWithEffect.js +1 -2
- package/dist/constructor/serviceWithEffect.js.map +1 -1
- package/dist/constructor/serviceWithFx.js +1 -1
- package/dist/constructor/serviceWithFx.js.map +1 -1
- package/dist/constructor/succeed.js +1 -1
- package/dist/constructor/sync.js +1 -1
- package/dist/constructor/tryCatchPromise.js +1 -1
- package/dist/constructor/tryCatchPromiseAbort.js +1 -1
- package/dist/constructor/tryPromise.js +1 -1
- package/dist/constructor/tryPromiseAbort.js +1 -1
- package/dist/operator/catch.js +1 -1
- package/dist/operator/catchAll.js +2 -2
- package/dist/operator/catchAllDefect.js +2 -2
- package/dist/operator/combine.js +1 -1
- package/dist/operator/compact.d.ts +1 -1
- package/dist/operator/compact.js +1 -1
- package/dist/operator/contramapContext.d.ts +5 -0
- package/dist/operator/contramapContext.d.ts.map +1 -0
- package/dist/operator/contramapContext.js +25 -0
- package/dist/operator/contramapContext.js.map +1 -0
- package/dist/operator/debounce.d.ts.map +1 -1
- package/dist/operator/debounce.js +1 -1
- package/dist/operator/debounce.js.map +1 -1
- package/dist/operator/delay.d.ts.map +1 -1
- package/dist/operator/delay.js +1 -1
- package/dist/operator/delay.js.map +1 -1
- package/dist/operator/during.js +1 -1
- package/dist/operator/exhaustMap.js +1 -1
- package/dist/operator/exhaustMapEffect.js +1 -1
- package/dist/operator/exhaustMapLatest.js +1 -1
- package/dist/operator/exhaustMapLatestEffect.js +1 -1
- package/dist/operator/filter.d.ts +1 -1
- package/dist/operator/filterEffect.js +1 -1
- package/dist/operator/filterMap.d.ts +1 -1
- package/dist/operator/filterMap.js +2 -2
- package/dist/operator/filterMapEffect.d.ts +1 -1
- package/dist/operator/filterMapEffect.js +2 -2
- package/dist/operator/flatMap.js +1 -1
- package/dist/operator/flatMapCause.js +1 -1
- package/dist/operator/flatMapConcurrently.js +3 -3
- package/dist/operator/flatMapConcurrently.js.map +1 -1
- package/dist/operator/flatMapEffect.js +1 -1
- package/dist/operator/flatMapEffectConcurrently.js +1 -1
- package/dist/operator/hold.d.ts +1 -1
- package/dist/operator/hold.d.ts.map +1 -1
- package/dist/operator/hold.js +3 -3
- package/dist/operator/hold.js.map +1 -1
- package/dist/operator/index.d.ts +2 -2
- package/dist/operator/index.d.ts.map +1 -1
- package/dist/operator/index.js +2 -2
- package/dist/operator/index.js.map +1 -1
- package/dist/operator/interruptible.js +1 -1
- package/dist/operator/mapCause.js +1 -1
- package/dist/operator/merge.js +1 -1
- package/dist/operator/mergeRace.js +1 -1
- package/dist/operator/multicast.d.ts.map +1 -1
- package/dist/operator/multicast.js +7 -7
- package/dist/operator/multicast.js.map +1 -1
- package/dist/operator/onDone.js +2 -2
- package/dist/operator/onDoneCause.js +1 -1
- package/dist/operator/onExit.js +1 -1
- package/dist/operator/onInterrupt.js +1 -1
- package/dist/operator/provideContext.d.ts +4 -0
- package/dist/operator/provideContext.d.ts.map +1 -0
- package/dist/operator/provideContext.js +18 -0
- package/dist/operator/provideContext.js.map +1 -0
- package/dist/operator/provideLayer.js +1 -1
- package/dist/operator/provideService.d.ts.map +1 -1
- package/dist/operator/provideService.js +2 -2
- package/dist/operator/provideService.js.map +1 -1
- package/dist/operator/provideServiceEffect.d.ts.map +1 -1
- package/dist/operator/provideServiceEffect.js +2 -2
- package/dist/operator/provideServiceEffect.js.map +1 -1
- package/dist/operator/provideSomeLayer.js +1 -1
- package/dist/operator/race.js +4 -5
- package/dist/operator/race.js.map +1 -1
- package/dist/operator/sample.js +1 -1
- package/dist/operator/sampleEffect.js +1 -1
- package/dist/operator/sandbox.js +1 -1
- package/dist/operator/scan.js +1 -1
- package/dist/operator/scanEffect.js +3 -4
- package/dist/operator/scanEffect.js.map +1 -1
- package/dist/operator/separate.d.ts +1 -1
- package/dist/operator/separate.js +2 -2
- package/dist/operator/since.js +1 -1
- package/dist/operator/skipAfter.d.ts +1 -1
- package/dist/operator/skipRepeats.js +3 -3
- package/dist/operator/skipRepeats.js.map +1 -1
- package/dist/operator/skipUntil.d.ts +1 -1
- package/dist/operator/skipWhile.d.ts +1 -1
- package/dist/operator/skipWhile.js +2 -2
- package/dist/operator/slice.js +1 -1
- package/dist/operator/snapshot.js +3 -3
- package/dist/operator/snapshot.js.map +1 -1
- package/dist/operator/snapshotEffect.js +4 -6
- package/dist/operator/snapshotEffect.js.map +1 -1
- package/dist/operator/startWith.js +1 -1
- package/dist/operator/startWithEffect.js +1 -1
- package/dist/operator/struct.js +1 -1
- package/dist/operator/switchMap.js +1 -1
- package/dist/operator/switchMapCause.js +1 -1
- package/dist/operator/switchMapEffect.js +1 -1
- package/dist/operator/switchMapError.js +2 -2
- package/dist/operator/switchMatch.js +3 -3
- package/dist/operator/switchMatch.js.map +1 -1
- package/dist/operator/takeUntil.d.ts +1 -1
- package/dist/operator/takeWhile.d.ts +1 -1
- package/dist/operator/takeWhile.js +2 -2
- package/dist/operator/tap.js +1 -1
- package/dist/operator/tapCause.js +1 -1
- package/dist/operator/tapDefect.js +2 -2
- package/dist/operator/tapError.js +2 -2
- package/dist/operator/throttle.d.ts.map +1 -1
- package/dist/operator/throttle.js +1 -1
- package/dist/operator/throttle.js.map +1 -1
- package/dist/operator/uninterruptible.js +1 -1
- package/dist/operator/withItems.js +1 -1
- package/dist/operator/withPermit.d.ts +2 -2
- package/dist/operator/withPermit.d.ts.map +1 -1
- package/dist/operator/withPermit.js +2 -3
- package/dist/operator/withPermit.js.map +1 -1
- package/dist/operator/withRuntimeFlags.js +1 -1
- package/dist/operator/zip.js +1 -1
- package/dist/run/collectAll.js +1 -1
- package/dist/run/collectN.js +1 -1
- package/dist/run/drain.d.ts.map +1 -1
- package/dist/run/drain.js +1 -1
- package/dist/run/drain.js.map +1 -1
- package/dist/run/observe.js +1 -1
- package/dist/run/reduce.js +1 -1
- package/dist/run/run.js +3 -3
- package/dist/run/run.js.map +1 -1
- package/dist/run/unsafe.d.ts +5 -5
- package/dist/run/unsafe.d.ts.map +1 -1
- package/dist/run/unsafe.js +5 -5
- package/dist/run/unsafe.js.map +1 -1
- package/dist/typeclass/Applicative.js +1 -1
- package/dist/typeclass/Applicative.js.map +1 -1
- package/dist/typeclass/Bicovariant.d.ts.map +1 -1
- package/dist/typeclass/Bicovariant.js +1 -1
- package/dist/typeclass/Bicovariant.js.map +1 -1
- package/dist/typeclass/Product.d.ts.map +1 -1
- package/dist/typeclass/Product.js +1 -1
- package/dist/typeclass/Product.js.map +1 -1
- package/dist/typeclass/SemiCoproduct.js +4 -4
- package/dist/typeclass/SemiCoproduct.js.map +1 -1
- package/dist/typeclass/SemiProduct.d.ts.map +1 -1
- package/dist/typeclass/SemiProduct.js +2 -2
- package/dist/typeclass/SemiProduct.js.map +1 -1
- package/package.json +5 -6
- package/src/Fx.ts +1 -1
- package/src/Subject/HoldSubject.test.ts +1 -1
- package/src/Subject/HoldSubject.ts +3 -3
- package/src/Subject/RefSubject.ts +3 -3
- package/src/Subject/Subject.test.ts +1 -1
- package/src/Subject/Subject.ts +1 -1
- package/src/Subject/SynchronizedSubject.ts +5 -6
- package/src/_internal/RefCounter.ts +2 -2
- package/src/_internal/earlyExit.ts +1 -1
- package/src/constructor/acquireUseRelease.ts +1 -1
- package/src/constructor/async.ts +1 -1
- package/src/constructor/asyncEffect.ts +1 -1
- package/src/constructor/asyncOption.ts +2 -2
- package/src/constructor/at.ts +1 -1
- package/src/constructor/die.ts +1 -1
- package/src/constructor/dieMessage.ts +1 -1
- package/src/constructor/dieSync.ts +1 -1
- package/src/constructor/done.ts +1 -1
- package/src/constructor/fail.ts +1 -1
- package/src/constructor/failCause.ts +1 -1
- package/src/constructor/failCauseSync.ts +1 -1
- package/src/constructor/fromArray.test.ts +1 -1
- package/src/constructor/fromArray.ts +1 -1
- package/src/constructor/fromEffect.test.ts +1 -1
- package/src/constructor/fromEffect.ts +1 -1
- package/src/constructor/fromEither.ts +2 -2
- package/src/constructor/fromEitherCause.ts +2 -2
- package/src/constructor/fromEmitter.test.ts +1 -1
- package/src/constructor/fromEmitter.ts +7 -8
- package/src/constructor/fromFiber.ts +1 -1
- package/src/constructor/fromFiberEffect.ts +1 -1
- package/src/constructor/fromFxEffect.ts +1 -1
- package/src/constructor/fromIterable.test.ts +1 -1
- package/src/constructor/fromOption.ts +2 -2
- package/src/constructor/periodic.ts +1 -1
- package/src/constructor/promise.ts +1 -1
- package/src/constructor/promiseAbort.ts +1 -1
- package/src/constructor/promiseFx.ts +1 -1
- package/src/constructor/random.ts +1 -1
- package/src/constructor/scheduled.ts +1 -1
- package/src/constructor/service.ts +1 -1
- package/src/constructor/serviceWith.ts +3 -4
- package/src/constructor/serviceWithEffect.ts +2 -3
- package/src/constructor/serviceWithFx.ts +1 -1
- package/src/constructor/succeed.ts +1 -1
- package/src/constructor/sync.ts +1 -1
- package/src/constructor/tryCatchPromise.ts +1 -1
- package/src/constructor/tryCatchPromiseAbort.ts +1 -1
- package/src/constructor/tryPromise.ts +1 -1
- package/src/constructor/tryPromiseAbort.ts +1 -1
- package/src/operator/catchAll.ts +2 -2
- package/src/operator/catchAllCause.test.ts +2 -2
- package/src/operator/catchAllDefect.ts +2 -2
- package/src/operator/combine.test.ts +2 -2
- package/src/operator/combine.ts +1 -1
- package/src/operator/compact.ts +2 -2
- package/src/operator/concatMap.test.ts +2 -2
- package/src/operator/continueWith.test.ts +2 -2
- package/src/operator/contramapContext.ts +34 -0
- package/src/operator/debounce.test.ts +2 -2
- package/src/operator/debounce.ts +1 -1
- package/src/operator/delay.ts +1 -1
- package/src/operator/during.ts +1 -1
- package/src/operator/exhaustMap.test.ts +2 -2
- package/src/operator/exhaustMap.ts +1 -1
- package/src/operator/exhaustMapEffect.ts +1 -1
- package/src/operator/exhaustMapLatest.test.ts +2 -2
- package/src/operator/exhaustMapLatest.ts +1 -1
- package/src/operator/exhaustMapLatestEffect.ts +1 -1
- package/src/operator/filter.test.ts +2 -2
- package/src/operator/filter.ts +1 -1
- package/src/operator/filterEffect.test.ts +2 -2
- package/src/operator/filterEffect.ts +1 -1
- package/src/operator/filterMap.test.ts +4 -4
- package/src/operator/filterMap.ts +2 -2
- package/src/operator/filterMapEffect.test.ts +4 -4
- package/src/operator/filterMapEffect.ts +2 -2
- package/src/operator/flatMap.test.ts +3 -3
- package/src/operator/flatMap.ts +1 -1
- package/src/operator/flatMapCause.ts +1 -1
- package/src/operator/flatMapConcurrently.test.ts +2 -2
- package/src/operator/flatMapConcurrently.ts +3 -3
- package/src/operator/flatMapEffect.ts +1 -1
- package/src/operator/flatMapEffectConcurrently.ts +1 -1
- package/src/operator/hold.test.ts +1 -1
- package/src/operator/hold.ts +3 -3
- package/src/operator/index.ts +2 -2
- package/src/operator/interruptible.ts +1 -1
- package/src/operator/loop.test.ts +2 -2
- package/src/operator/map.test.ts +2 -2
- package/src/operator/mapCause.test.ts +3 -3
- package/src/operator/mapCause.ts +1 -1
- package/src/operator/merge.test.ts +2 -2
- package/src/operator/merge.ts +1 -1
- package/src/operator/mergeRace.test.ts +3 -3
- package/src/operator/mergeRace.ts +1 -1
- package/src/operator/multicast.test.ts +2 -2
- package/src/operator/multicast.ts +7 -11
- package/src/operator/onDone.ts +2 -2
- package/src/operator/onDoneCause.ts +1 -1
- package/src/operator/onExit.ts +1 -1
- package/src/operator/onInterrupt.ts +1 -1
- package/src/operator/{provideEnvironment.ts → provideContext.ts} +5 -5
- package/src/operator/provideLayer.ts +1 -1
- package/src/operator/provideService.test.ts +2 -2
- package/src/operator/provideService.ts +2 -2
- package/src/operator/provideServiceEffect.test.ts +2 -2
- package/src/operator/provideServiceEffect.ts +2 -2
- package/src/operator/provideSomeLayer.ts +1 -1
- package/src/operator/race.test.ts +2 -2
- package/src/operator/race.ts +17 -18
- package/src/operator/sample.ts +1 -1
- package/src/operator/sandbox.ts +1 -1
- package/src/operator/scan.test.ts +2 -2
- package/src/operator/scan.ts +1 -1
- package/src/operator/scanEffect.test.ts +3 -3
- package/src/operator/scanEffect.ts +9 -7
- package/src/operator/separate.test.ts +2 -2
- package/src/operator/separate.ts +2 -2
- package/src/operator/since.ts +1 -1
- package/src/operator/skipAfter.test.ts +2 -2
- package/src/operator/skipAfter.ts +1 -1
- package/src/operator/skipRepeats.test.ts +2 -2
- package/src/operator/skipRepeats.ts +3 -3
- package/src/operator/skipUntil.test.ts +2 -2
- package/src/operator/skipUntil.ts +1 -1
- package/src/operator/skipWhile.ts +2 -2
- package/src/operator/slice.test.ts +2 -2
- package/src/operator/slice.ts +1 -1
- package/src/operator/snapshot.test.ts +2 -2
- package/src/operator/snapshot.ts +3 -3
- package/src/operator/snapshotEffect.test.ts +2 -2
- package/src/operator/snapshotEffect.ts +14 -18
- package/src/operator/startWith.ts +1 -1
- package/src/operator/startWithEffect.ts +1 -1
- package/src/operator/struct.test.ts +2 -2
- package/src/operator/struct.ts +1 -1
- package/src/operator/switchMap.test.ts +2 -2
- package/src/operator/switchMap.ts +1 -1
- package/src/operator/switchMapCause.test.ts +3 -3
- package/src/operator/switchMapCause.ts +1 -1
- package/src/operator/switchMapEffect.ts +1 -1
- package/src/operator/switchMapError.ts +2 -2
- package/src/operator/switchMatch.test.ts +2 -2
- package/src/operator/switchMatch.ts +3 -3
- package/src/operator/takeUntil.test.ts +2 -2
- package/src/operator/takeUntil.ts +1 -1
- package/src/operator/takeWhile.ts +2 -2
- package/src/operator/tap.ts +1 -1
- package/src/operator/tapCause.ts +1 -1
- package/src/operator/tapDefect.ts +2 -2
- package/src/operator/tapError.ts +2 -2
- package/src/operator/throttle.test.ts +2 -2
- package/src/operator/throttle.ts +1 -1
- package/src/operator/uninterruptible.ts +1 -1
- package/src/operator/withItems.ts +1 -1
- package/src/operator/withPermit.ts +5 -6
- package/src/operator/withRuntimeFlags.ts +1 -1
- package/src/operator/zip.test.ts +2 -2
- package/src/operator/zip.ts +1 -1
- package/src/operator/zipItems.test.ts +2 -2
- package/src/run/collectAll.ts +1 -1
- package/src/run/collectN.ts +1 -1
- package/src/run/drain.ts +3 -1
- package/src/run/observe.ts +1 -1
- package/src/run/reduce.ts +1 -1
- package/src/run/run.ts +3 -3
- package/src/run/unsafe.ts +9 -10
- package/src/typeclass/Applicative.ts +2 -2
- package/src/typeclass/Bicovariant.ts +1 -1
- package/src/typeclass/Product.ts +2 -1
- package/src/typeclass/SemiCoproduct.ts +4 -4
- package/src/typeclass/SemiProduct.ts +5 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/dist/operator/provideEnvironment.d.ts +0 -4
- package/dist/operator/provideEnvironment.d.ts.map +0 -1
- package/dist/operator/provideEnvironment.js +0 -18
- package/dist/operator/provideEnvironment.js.map +0 -1
- package/dist/operator/provideSomeEnvironment.d.ts +0 -4
- package/dist/operator/provideSomeEnvironment.d.ts.map +0 -1
- package/dist/operator/provideSomeEnvironment.js +0 -18
- package/dist/operator/provideSomeEnvironment.js.map +0 -1
- package/src/operator/during.test.ts +0 -49
- package/src/operator/provideSomeEnvironment.ts +0 -29
- package/src/operator/since.test.ts +0 -48
- package/src/operator/until.test.ts +0 -48
package/dist/run/unsafe.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unsafe.js","sourceRoot":"","sources":["../../src/run/unsafe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAQ3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"unsafe.js","sourceRoot":"","sources":["../../src/run/unsafe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAQ3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAO,EAAmB,EAAmB,EAAE,CACrE,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;AAE/B,MAAM,CAAC,MAAM,WAAW,GACtB,CAAI,CAAqC,EAAE,EAAE,CAC7C,CAAI,EAAmB,EAAmB,EAAE,CAC1C,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;AAEpC,MAAM,CAAC,MAAM,OAAO,GAAG,CAAO,EAAmB,EAA+B,EAAE,CAChF,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;AAE3B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAO,EAAmB,EAAiB,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;AAEpG,MAAM,CAAC,MAAM,cAAc,GAAG,CAAO,EAAmB,EAA+B,EAAE,CACvF,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;AAElC,MAAM,CAAC,MAAM,IAAI,GAAG,CAClB,EAAe,EACuC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;AAEjF,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,EAAe,EACuC,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;AAEvF,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,EAAe,EACqD,EAAE,CACtE,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA"}
|
|
@@ -4,6 +4,6 @@ import { SemiApplicative } from './SemiApplicative.js';
|
|
|
4
4
|
export const Applicative = {
|
|
5
5
|
...SemiApplicative,
|
|
6
6
|
...Of,
|
|
7
|
-
productAll: (collection) => combineAll(...collection),
|
|
7
|
+
productAll: ((collection) => combineAll(...collection)),
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=Applicative.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Applicative.js","sourceRoot":"","sources":["../../src/typeclass/Applicative.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAGtD,MAAM,CAAC,MAAM,WAAW,GAAgC;IACtD,GAAG,eAAe;IAClB,GAAG,EAAE;IACL,UAAU,EAAE,CAAU,UAAiC,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"Applicative.js","sourceRoot":"","sources":["../../src/typeclass/Applicative.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAGtD,MAAM,CAAC,MAAM,WAAW,GAAgC;IACtD,GAAG,eAAe;IAClB,GAAG,EAAE;IACL,UAAU,EAAE,CAAC,CAAU,UAAiC,EAAE,EAAE,CAC1D,UAAU,CAAyB,GAAG,UAAU,CAAC,CAA8C;CAClG,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bicovariant.d.ts","sourceRoot":"","sources":["../../src/typeclass/Bicovariant.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Bicovariant.d.ts","sourceRoot":"","sources":["../../src/typeclass/Bicovariant.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,mCAAmC,CAAA;AAEtD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAA;AAIlC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEnD,eAAO,MAAM,WAAW,EAAE,CAAC,CAAC,WAAW,CAAC,YAAY,CAEnD,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CACrE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { pipe } from '@fp-ts/core/Function';
|
|
1
2
|
import * as B from '@fp-ts/core/typeclass/Bicovariant';
|
|
2
|
-
import { pipe } from '@fp-ts/data/Function';
|
|
3
3
|
import { map } from '../operator/map.js';
|
|
4
4
|
import { mapError } from '../operator/mapError.js';
|
|
5
5
|
export const Bicovariant = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bicovariant.js","sourceRoot":"","sources":["../../src/typeclass/Bicovariant.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Bicovariant.js","sourceRoot":"","sources":["../../src/typeclass/Bicovariant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,KAAK,CAAC,MAAM,mCAAmC,CAAA;AAGtD,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAIlD,MAAM,CAAC,MAAM,WAAW,GAAgC;IACtD,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;CACvD,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAClB,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Product.d.ts","sourceRoot":"","sources":["../../src/typeclass/Product.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,+BAA+B,CAAA;AAMvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEnD,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"Product.d.ts","sourceRoot":"","sources":["../../src/typeclass/Product.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,+BAA+B,CAAA;AAMvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEnD,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAK3C,CAAA"}
|
|
@@ -4,6 +4,6 @@ import { SemiProduct } from './SemiProduct.js';
|
|
|
4
4
|
export const Product = {
|
|
5
5
|
...SemiProduct,
|
|
6
6
|
...Of,
|
|
7
|
-
productAll: (iterable) => combineAll(...Array.from(iterable)),
|
|
7
|
+
productAll: ((iterable) => combineAll(...Array.from(iterable))),
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=Product.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Product.js","sourceRoot":"","sources":["../../src/typeclass/Product.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,MAAM,CAAC,MAAM,OAAO,GAA4B;IAC9C,GAAG,WAAW;IACd,GAAG,EAAE;IACL,UAAU,EAAE,CAAC,QAAQ,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"Product.js","sourceRoot":"","sources":["../../src/typeclass/Product.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,MAAM,CAAC,MAAM,OAAO,GAA4B;IAC9C,GAAG,WAAW;IACd,GAAG,EAAE;IACL,UAAU,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,CACxB,UAAU,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAA0C;CAChF,CAAA"}
|
|
@@ -2,13 +2,13 @@ import { orElse } from '../operator/orElse.js';
|
|
|
2
2
|
import { race, raceAll } from '../operator/race.js';
|
|
3
3
|
import { Covariant } from './Covariant.js';
|
|
4
4
|
export const SemiCoproductRace = {
|
|
5
|
-
coproduct: race,
|
|
6
|
-
coproductMany: (collection) =>
|
|
5
|
+
coproduct: (s, o) => race(o)(s),
|
|
6
|
+
coproductMany: (fx, collection) => raceAll(fx, ...collection),
|
|
7
7
|
imap: Covariant.imap,
|
|
8
8
|
};
|
|
9
9
|
export const SemiCoproductOrElse = {
|
|
10
|
-
coproduct: orElse,
|
|
11
|
-
coproductMany: (collection) =>
|
|
10
|
+
coproduct: (s, o) => orElse(o)(s),
|
|
11
|
+
coproductMany: (fx, collection) => Array.from(collection).reduce((acc, fx) => orElse(fx)(acc), fx),
|
|
12
12
|
imap: Covariant.imap,
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=SemiCoproduct.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SemiCoproduct.js","sourceRoot":"","sources":["../../src/typeclass/SemiCoproduct.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAG1C,MAAM,CAAC,MAAM,iBAAiB,GAAoC;IAChE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"SemiCoproduct.js","sourceRoot":"","sources":["../../src/typeclass/SemiCoproduct.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAG1C,MAAM,CAAC,MAAM,iBAAiB,GAAoC;IAChE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/B,aAAa,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,GAAG,UAAU,CAAC;IAC7D,IAAI,EAAE,SAAS,CAAC,IAAI;CACrB,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAoC;IAClE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACjC,aAAa,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,EAAE,CAChC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;IACjE,IAAI,EAAE,SAAS,CAAC,IAAI;CACrB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SemiProduct.d.ts","sourceRoot":"","sources":["../../src/typeclass/SemiProduct.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,mCAAmC,CAAA;AAKvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEnD,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"SemiProduct.d.ts","sourceRoot":"","sources":["../../src/typeclass/SemiProduct.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,mCAAmC,CAAA;AAKvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEnD,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,YAAY,CAOpD,CAAA"}
|
|
@@ -2,8 +2,8 @@ import * as SP from '@fp-ts/core/typeclass/SemiProduct';
|
|
|
2
2
|
import { combine } from '../operator/combine.js';
|
|
3
3
|
import { Covariant } from './Covariant.js';
|
|
4
4
|
export const SemiProduct = {
|
|
5
|
-
product: combine,
|
|
6
|
-
productMany: SP.productMany(Covariant, combine),
|
|
5
|
+
product: ((s, o) => combine(o)(s)),
|
|
6
|
+
productMany: SP.productMany(Covariant, (s, o) => combine(o)(s)),
|
|
7
7
|
imap: Covariant.imap,
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=SemiProduct.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SemiProduct.js","sourceRoot":"","sources":["../../src/typeclass/SemiProduct.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,mCAAmC,CAAA;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAG1C,MAAM,CAAC,MAAM,WAAW,GAAiC;IACvD,OAAO,EAAE,OAAO;
|
|
1
|
+
{"version":3,"file":"SemiProduct.js","sourceRoot":"","sources":["../../src/typeclass/SemiProduct.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,mCAAmC,CAAA;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAG1C,MAAM,CAAC,MAAM,WAAW,GAAiC;IACvD,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAA4C;IAC7E,WAAW,EAAE,EAAE,CAAC,WAAW,CACzB,SAAS,EACT,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAQ,CACgB;IAChD,IAAI,EAAE,SAAS,CAAC,IAAI;CACrB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typed/fx",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -17,12 +17,11 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@effect/io": "
|
|
21
|
-
"@
|
|
22
|
-
"@fp-ts/
|
|
23
|
-
"@fp-ts/data": "~0.0.39"
|
|
20
|
+
"@effect/io": "0.1.3",
|
|
21
|
+
"@fp-ts/core": "0.1.1",
|
|
22
|
+
"@fp-ts/data": "0.1.0"
|
|
24
23
|
},
|
|
25
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "13a5ec0fe1b8bf1365a2010415927bebbdd7d320",
|
|
26
25
|
"publishConfig": {
|
|
27
26
|
"access": "public"
|
|
28
27
|
},
|
package/src/Fx.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Cause } from '@effect/io/Cause'
|
|
2
2
|
import type { Effect } from '@effect/io/Effect'
|
|
3
3
|
import type { Scope } from '@effect/io/Scope'
|
|
4
|
-
import { identity } from '@fp-ts/
|
|
4
|
+
import { identity } from '@fp-ts/core/Function'
|
|
5
5
|
|
|
6
6
|
export interface Fx<R, E, A> extends Fx.Variance<R, E, A> {
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Effect from '@effect/io/Effect'
|
|
2
|
-
import { identity } from '@fp-ts/
|
|
2
|
+
import { identity } from '@fp-ts/core/Function'
|
|
3
|
+
import { type Option, none } from '@fp-ts/core/Option'
|
|
3
4
|
import { type MutableRef, make } from '@fp-ts/data/MutableRef'
|
|
4
|
-
import { type Option, none } from '@fp-ts/data/Option'
|
|
5
5
|
|
|
6
6
|
import type { Fx, Sink } from '../Fx.js'
|
|
7
7
|
import { never } from '../constructor/never.js'
|
|
@@ -37,7 +37,7 @@ export namespace HoldSubject {
|
|
|
37
37
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
38
38
|
export type OutputsOf<T> = [T] extends [Variance<infer _E, infer A>] ? A : never
|
|
39
39
|
|
|
40
|
-
export function unsafeMake<E, A>(value: MutableRef<Option<A>> = make(none)): HoldSubject<E, A> {
|
|
40
|
+
export function unsafeMake<E, A>(value: MutableRef<Option<A>> = make(none())): HoldSubject<E, A> {
|
|
41
41
|
return new HoldSubjectImpl(value)
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as Effect from '@effect/io/Effect'
|
|
2
2
|
import * as Ref from '@effect/io/Ref'
|
|
3
|
+
import { identity, pipe } from '@fp-ts/core/Function'
|
|
4
|
+
import * as Option from '@fp-ts/core/Option'
|
|
3
5
|
import { equals } from '@fp-ts/data/Equal'
|
|
4
|
-
import { identity, pipe } from '@fp-ts/data/Function'
|
|
5
6
|
import * as MutableRef from '@fp-ts/data/MutableRef'
|
|
6
|
-
import * as Option from '@fp-ts/data/Option'
|
|
7
7
|
|
|
8
8
|
import { Fx } from '../Fx.js'
|
|
9
9
|
|
|
@@ -84,7 +84,7 @@ export namespace RefSubject {
|
|
|
84
84
|
const option = mutableRef.get()
|
|
85
85
|
|
|
86
86
|
// Next pull should recompute the initial value
|
|
87
|
-
mutableRef.set(Option.none)
|
|
87
|
+
mutableRef.set(Option.none())
|
|
88
88
|
|
|
89
89
|
return option
|
|
90
90
|
}),
|
package/src/Subject/Subject.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as Effect from '@effect/io/Effect'
|
|
2
2
|
import * as Ref from '@effect/io/Ref'
|
|
3
3
|
import * as Synchronized from '@effect/io/Ref/Synchronized'
|
|
4
|
-
import
|
|
4
|
+
import { identity, pipe } from '@fp-ts/core/Function'
|
|
5
|
+
import * as Option from '@fp-ts/core/Option'
|
|
5
6
|
import { equals } from '@fp-ts/data/Equal'
|
|
6
|
-
import { identity, pipe } from '@fp-ts/data/Function'
|
|
7
7
|
import * as MutableRef from '@fp-ts/data/MutableRef'
|
|
8
|
-
import * as Option from '@fp-ts/data/Option'
|
|
9
8
|
|
|
10
9
|
import { Fx } from '../Fx.js'
|
|
11
10
|
|
|
@@ -31,8 +30,8 @@ export namespace SynchronizedSubject {
|
|
|
31
30
|
): SynchronizedSubject<A> {
|
|
32
31
|
const mutableRef = MutableRef.make(Option.some(initial()))
|
|
33
32
|
const subject = HoldSubject.unsafeMake<never, A>(mutableRef)
|
|
34
|
-
const semaphore =
|
|
35
|
-
const locked =
|
|
33
|
+
const semaphore = Effect.unsafeMakeSemaphore(1)
|
|
34
|
+
const locked = semaphore.withPermits(1)
|
|
36
35
|
|
|
37
36
|
const getValue = () =>
|
|
38
37
|
pipe(
|
|
@@ -102,7 +101,7 @@ export namespace SynchronizedSubject {
|
|
|
102
101
|
const option = mutableRef.get()
|
|
103
102
|
|
|
104
103
|
// Next pull should recompute the initial value
|
|
105
|
-
mutableRef.set(Option.none)
|
|
104
|
+
mutableRef.set(Option.none())
|
|
106
105
|
|
|
107
106
|
return option
|
|
108
107
|
}),
|
|
@@ -4,8 +4,8 @@ import * as Fiber from '@effect/io/Fiber'
|
|
|
4
4
|
import * as Ref from '@effect/io/Ref'
|
|
5
5
|
import * as Schedule from '@effect/io/Schedule'
|
|
6
6
|
import type { Scope } from '@effect/io/Scope'
|
|
7
|
+
import { pipe } from '@fp-ts/core/Function'
|
|
7
8
|
import { millis } from '@fp-ts/data/Duration'
|
|
8
|
-
import { pipe } from '@fp-ts/data/Function'
|
|
9
9
|
|
|
10
10
|
export const asap = pipe(
|
|
11
11
|
Schedule.once(),
|
|
@@ -43,7 +43,7 @@ export class RefCounter {
|
|
|
43
43
|
Effect.flatMap(() => Ref.get(this.count)),
|
|
44
44
|
Effect.flatMap((x) =>
|
|
45
45
|
Effect.sync(() => {
|
|
46
|
-
if (x === 0) Deferred.unsafeDone(Effect.unit())
|
|
46
|
+
if (x === 0) Deferred.unsafeDone<never, void>(this.deferred, Effect.unit())
|
|
47
47
|
}),
|
|
48
48
|
),
|
|
49
49
|
Effect.scheduleForked(asap),
|
package/src/constructor/async.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Effect from '@effect/io/Effect'
|
|
2
2
|
import type { FiberId } from '@effect/io/Fiber/Id'
|
|
3
|
-
import { flow } from '@fp-ts/
|
|
4
|
-
import type { Option } from '@fp-ts/
|
|
3
|
+
import { flow } from '@fp-ts/core/Function'
|
|
4
|
+
import type { Option } from '@fp-ts/core/Option'
|
|
5
5
|
|
|
6
6
|
import type { Fx } from '../Fx.js'
|
|
7
7
|
|
package/src/constructor/at.ts
CHANGED
package/src/constructor/die.ts
CHANGED
package/src/constructor/done.ts
CHANGED
package/src/constructor/fail.ts
CHANGED
|
@@ -11,7 +11,7 @@ describe(import.meta.url, () => {
|
|
|
11
11
|
describe(fromArray.name, () => {
|
|
12
12
|
it('converts an Effect to an Fx', async () => {
|
|
13
13
|
const test = collectAll(fromArray([1, 2, 3]))
|
|
14
|
-
const events = await Effect.
|
|
14
|
+
const events = await Effect.runPromise(test)
|
|
15
15
|
|
|
16
16
|
deepStrictEqual(events, [1, 2, 3])
|
|
17
17
|
})
|
|
@@ -11,7 +11,7 @@ describe(import.meta.url, () => {
|
|
|
11
11
|
describe(fromEffect.name, () => {
|
|
12
12
|
it('converts an Effect to an Fx', async () => {
|
|
13
13
|
const test = collectAll(fromEffect(Effect.sync(() => 1)))
|
|
14
|
-
const events = await Effect.
|
|
14
|
+
const events = await Effect.runPromise(test)
|
|
15
15
|
|
|
16
16
|
deepStrictEqual(events, [1])
|
|
17
17
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Effect from '@effect/io/Effect'
|
|
2
|
-
import type { Either } from '@fp-ts/
|
|
3
|
-
import { flow } from '@fp-ts/
|
|
2
|
+
import type { Either } from '@fp-ts/core/Either'
|
|
3
|
+
import { flow } from '@fp-ts/core/Function'
|
|
4
4
|
|
|
5
5
|
import type { Fx } from '../Fx.js'
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Cause } from '@effect/io/Cause'
|
|
2
2
|
import * as Effect from '@effect/io/Effect'
|
|
3
|
-
import type { Either } from '@fp-ts/
|
|
4
|
-
import { flow } from '@fp-ts/
|
|
3
|
+
import type { Either } from '@fp-ts/core/Either'
|
|
4
|
+
import { flow } from '@fp-ts/core/Function'
|
|
5
5
|
|
|
6
6
|
import type { Fx } from '../Fx.js'
|
|
7
7
|
|
|
@@ -3,16 +3,15 @@ import * as Deferred from '@effect/io/Deferred'
|
|
|
3
3
|
import * as Effect from '@effect/io/Effect'
|
|
4
4
|
import * as Exit from '@effect/io/Exit'
|
|
5
5
|
import * as Fiber from '@effect/io/Fiber'
|
|
6
|
-
import type * as Runtime from '@effect/io/Runtime'
|
|
7
6
|
import type { Scope } from '@effect/io/Scope'
|
|
8
|
-
import { pipe } from '@fp-ts/
|
|
7
|
+
import { pipe } from '@fp-ts/core/Function'
|
|
9
8
|
|
|
10
9
|
import { Fx } from '../Fx.js'
|
|
11
10
|
|
|
12
11
|
export interface Emitter<E, A> {
|
|
13
|
-
readonly emit: (a: A) =>
|
|
14
|
-
readonly failCause: (e: Cause<E>) =>
|
|
15
|
-
readonly end: () =>
|
|
12
|
+
readonly emit: (a: A) => Fiber.RuntimeFiber<never, unknown>
|
|
13
|
+
readonly failCause: (e: Cause<E>) => Fiber.RuntimeFiber<never, unknown>
|
|
14
|
+
readonly end: () => Fiber.RuntimeFiber<never, unknown>
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export function fromEmitter<E, A, R, E2>(
|
|
@@ -37,9 +36,9 @@ class FromEmitterFx<R, E, E2, A>
|
|
|
37
36
|
const deferred = yield* $(Deferred.make<never, Exit.Exit<E | E2, void>>())
|
|
38
37
|
const done = (exit: Exit.Exit<E | E2, void>) => Deferred.done(Exit.succeed(exit))(deferred)
|
|
39
38
|
const emitter: Emitter<E, A> = {
|
|
40
|
-
emit: (a) => runtime.
|
|
41
|
-
failCause: (e) => runtime.
|
|
42
|
-
end: () => runtime.
|
|
39
|
+
emit: (a) => runtime.unsafeFork(sink.event(a)),
|
|
40
|
+
failCause: (e) => runtime.unsafeFork(done(Exit.failCause(e))),
|
|
41
|
+
end: () => runtime.unsafeFork(done(Exit.succeed(undefined))),
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
const fiber = yield* $(
|
|
@@ -11,7 +11,7 @@ describe(import.meta.url, () => {
|
|
|
11
11
|
describe(fromIterable.name, () => {
|
|
12
12
|
it('converts an Effect to an Fx', async () => {
|
|
13
13
|
const test = collectAll(fromIterable([1, 2, 3]))
|
|
14
|
-
const events = await Effect.
|
|
14
|
+
const events = await Effect.runPromise(test)
|
|
15
15
|
|
|
16
16
|
deepStrictEqual(events, [1, 2, 3])
|
|
17
17
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Effect from '@effect/io/Effect'
|
|
2
|
-
import { flow } from '@fp-ts/
|
|
3
|
-
import type { Option } from '@fp-ts/
|
|
2
|
+
import { flow } from '@fp-ts/core/Function'
|
|
3
|
+
import type { Option } from '@fp-ts/core/Option'
|
|
4
4
|
|
|
5
5
|
import type { Fx } from '../Fx.js'
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Effect from '@effect/io/Effect'
|
|
2
2
|
import * as Schedule from '@effect/io/Schedule'
|
|
3
|
+
import { pipe } from '@fp-ts/core/Function'
|
|
3
4
|
import type { Duration } from '@fp-ts/data/Duration'
|
|
4
|
-
import { pipe } from '@fp-ts/data/Function'
|
|
5
5
|
|
|
6
6
|
import type { Fx } from '../Fx.js'
|
|
7
7
|
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as Effect from '@effect/io/Effect'
|
|
2
2
|
import type { Tag } from '@fp-ts/data/Context'
|
|
3
|
-
import { flow } from '@fp-ts/data/Function'
|
|
4
3
|
|
|
5
4
|
import type { Fx } from '../Fx.js'
|
|
6
5
|
|
|
7
6
|
import { fromEffect } from './fromEffect.js'
|
|
8
7
|
|
|
9
|
-
export const serviceWith: <T>(tag: Tag<T>) => <A>(f: (a: T) => A) => Fx<T, never, A> =
|
|
10
|
-
tag
|
|
11
|
-
|
|
8
|
+
export const serviceWith: <T>(tag: Tag<T>) => <A>(f: (a: T) => A) => Fx<T, never, A> =
|
|
9
|
+
(tag) => (f) =>
|
|
10
|
+
fromEffect(Effect.serviceWith(tag, f))
|