@typed/fx 1.32.0 → 2.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +367 -2
- package/dist/Fx/Fx.d.ts +96 -0
- package/dist/Fx/Fx.d.ts.map +1 -0
- package/dist/Fx/Fx.js +35 -0
- package/dist/Fx/TypeId.d.ts +20 -0
- package/dist/Fx/TypeId.d.ts.map +1 -0
- package/dist/Fx/TypeId.js +15 -0
- package/dist/Fx/combinators/additive.d.ts +94 -0
- package/dist/Fx/combinators/additive.d.ts.map +1 -0
- package/dist/Fx/combinators/additive.js +92 -0
- package/dist/Fx/combinators/catch.d.ts +114 -0
- package/dist/Fx/combinators/catch.d.ts.map +1 -0
- package/dist/Fx/combinators/catch.js +123 -0
- package/dist/Fx/combinators/causes.d.ts +12 -0
- package/dist/Fx/combinators/causes.d.ts.map +1 -0
- package/dist/Fx/combinators/causes.js +16 -0
- package/dist/Fx/combinators/changesWithEffect.d.ts +20 -0
- package/dist/Fx/combinators/changesWithEffect.d.ts.map +1 -0
- package/dist/Fx/combinators/changesWithEffect.js +28 -0
- package/dist/Fx/combinators/compact.d.ts +12 -0
- package/dist/Fx/combinators/compact.d.ts.map +1 -0
- package/dist/Fx/combinators/compact.js +11 -0
- package/dist/Fx/combinators/continueWith.d.ts +51 -0
- package/dist/Fx/combinators/continueWith.d.ts.map +1 -0
- package/dist/Fx/combinators/continueWith.js +41 -0
- package/dist/Fx/combinators/dropUntil.d.ts +29 -0
- package/dist/Fx/combinators/dropUntil.d.ts.map +1 -0
- package/dist/Fx/combinators/dropUntil.js +23 -0
- package/dist/Fx/combinators/ensuring.d.ts +16 -0
- package/dist/Fx/combinators/ensuring.d.ts.map +1 -0
- package/dist/Fx/combinators/ensuring.js +13 -0
- package/dist/Fx/combinators/exhaustLatestMap.d.ts +15 -0
- package/dist/Fx/combinators/exhaustLatestMap.d.ts.map +1 -0
- package/dist/Fx/combinators/exhaustLatestMap.js +48 -0
- package/dist/Fx/combinators/exhaustLatestMapEffect.d.ts +13 -0
- package/dist/Fx/combinators/exhaustLatestMapEffect.d.ts.map +1 -0
- package/dist/Fx/combinators/exhaustLatestMapEffect.js +14 -0
- package/dist/Fx/combinators/exhaustMap.d.ts +11 -0
- package/dist/Fx/combinators/exhaustMap.d.ts.map +1 -0
- package/dist/Fx/combinators/exhaustMap.js +19 -0
- package/dist/Fx/combinators/exhaustMapEffect.d.ts +11 -0
- package/dist/Fx/combinators/exhaustMapEffect.d.ts.map +1 -0
- package/dist/Fx/combinators/exhaustMapEffect.js +12 -0
- package/dist/Fx/combinators/exit.d.ts +12 -0
- package/dist/Fx/combinators/exit.d.ts.map +1 -0
- package/dist/Fx/combinators/exit.js +11 -0
- package/dist/Fx/combinators/filter.d.ts +14 -0
- package/dist/Fx/combinators/filter.d.ts.map +1 -0
- package/dist/Fx/combinators/filter.js +12 -0
- package/dist/Fx/combinators/filterEffect.d.ts +15 -0
- package/dist/Fx/combinators/filterEffect.d.ts.map +1 -0
- package/dist/Fx/combinators/filterEffect.js +12 -0
- package/dist/Fx/combinators/filterMap.d.ts +15 -0
- package/dist/Fx/combinators/filterMap.d.ts.map +1 -0
- package/dist/Fx/combinators/filterMap.js +12 -0
- package/dist/Fx/combinators/filterMapEffect.d.ts +16 -0
- package/dist/Fx/combinators/filterMapEffect.d.ts.map +1 -0
- package/dist/Fx/combinators/filterMapEffect.js +12 -0
- package/dist/Fx/combinators/filterMapLoop.d.ts +17 -0
- package/dist/Fx/combinators/filterMapLoop.d.ts.map +1 -0
- package/dist/Fx/combinators/filterMapLoop.js +14 -0
- package/dist/Fx/combinators/filterMapLoopCause.d.ts +18 -0
- package/dist/Fx/combinators/filterMapLoopCause.d.ts.map +1 -0
- package/dist/Fx/combinators/filterMapLoopCause.js +14 -0
- package/dist/Fx/combinators/filterMapLoopCauseEffect.d.ts +18 -0
- package/dist/Fx/combinators/filterMapLoopCauseEffect.d.ts.map +1 -0
- package/dist/Fx/combinators/filterMapLoopCauseEffect.js +13 -0
- package/dist/Fx/combinators/filterMapLoopEffect.d.ts +17 -0
- package/dist/Fx/combinators/filterMapLoopEffect.d.ts.map +1 -0
- package/dist/Fx/combinators/filterMapLoopEffect.js +13 -0
- package/dist/Fx/combinators/flatMap.d.ts +23 -0
- package/dist/Fx/combinators/flatMap.d.ts.map +1 -0
- package/dist/Fx/combinators/flatMap.js +21 -0
- package/dist/Fx/combinators/flatMapConcurrently.d.ts +12 -0
- package/dist/Fx/combinators/flatMapConcurrently.d.ts.map +1 -0
- package/dist/Fx/combinators/flatMapConcurrently.js +23 -0
- package/dist/Fx/combinators/flatMapConcurrentlyEffect.d.ts +12 -0
- package/dist/Fx/combinators/flatMapConcurrentlyEffect.d.ts.map +1 -0
- package/dist/Fx/combinators/flatMapConcurrentlyEffect.js +13 -0
- package/dist/Fx/combinators/flatMapEffect.d.ts +24 -0
- package/dist/Fx/combinators/flatMapEffect.d.ts.map +1 -0
- package/dist/Fx/combinators/flatMapEffect.js +14 -0
- package/dist/Fx/combinators/flip.d.ts +11 -0
- package/dist/Fx/combinators/flip.d.ts.map +1 -0
- package/dist/Fx/combinators/flip.js +11 -0
- package/dist/Fx/combinators/gen.d.ts +20 -0
- package/dist/Fx/combinators/gen.d.ts.map +1 -0
- package/dist/Fx/combinators/gen.js +14 -0
- package/dist/Fx/combinators/genScoped.d.ts +20 -0
- package/dist/Fx/combinators/genScoped.d.ts.map +1 -0
- package/dist/Fx/combinators/genScoped.js +13 -0
- package/dist/Fx/combinators/index.d.ts +62 -0
- package/dist/Fx/combinators/index.d.ts.map +1 -0
- package/dist/Fx/combinators/index.js +61 -0
- package/dist/Fx/combinators/keyed.d.ts +44 -0
- package/dist/Fx/combinators/keyed.d.ts.map +1 -0
- package/dist/Fx/combinators/keyed.js +199 -0
- package/dist/Fx/combinators/loop.d.ts +16 -0
- package/dist/Fx/combinators/loop.d.ts.map +1 -0
- package/dist/Fx/combinators/loop.js +14 -0
- package/dist/Fx/combinators/loopCause.d.ts +16 -0
- package/dist/Fx/combinators/loopCause.d.ts.map +1 -0
- package/dist/Fx/combinators/loopCause.js +13 -0
- package/dist/Fx/combinators/loopCauseEffect.d.ts +17 -0
- package/dist/Fx/combinators/loopCauseEffect.d.ts.map +1 -0
- package/dist/Fx/combinators/loopCauseEffect.js +13 -0
- package/dist/Fx/combinators/loopEffect.d.ts +16 -0
- package/dist/Fx/combinators/loopEffect.d.ts.map +1 -0
- package/dist/Fx/combinators/loopEffect.js +13 -0
- package/dist/Fx/combinators/map.d.ts +14 -0
- package/dist/Fx/combinators/map.d.ts.map +1 -0
- package/dist/Fx/combinators/map.js +12 -0
- package/dist/Fx/combinators/mapBoth.d.ts +21 -0
- package/dist/Fx/combinators/mapBoth.d.ts.map +1 -0
- package/dist/Fx/combinators/mapBoth.js +14 -0
- package/dist/Fx/combinators/mapEffect.d.ts +15 -0
- package/dist/Fx/combinators/mapEffect.d.ts.map +1 -0
- package/dist/Fx/combinators/mapEffect.js +12 -0
- package/dist/Fx/combinators/mapError.d.ts +17 -0
- package/dist/Fx/combinators/mapError.d.ts.map +1 -0
- package/dist/Fx/combinators/mapError.js +16 -0
- package/dist/Fx/combinators/mergeAll.d.ts +11 -0
- package/dist/Fx/combinators/mergeAll.d.ts.map +1 -0
- package/dist/Fx/combinators/mergeAll.js +15 -0
- package/dist/Fx/combinators/mergeOrdered.d.ts +14 -0
- package/dist/Fx/combinators/mergeOrdered.d.ts.map +1 -0
- package/dist/Fx/combinators/mergeOrdered.js +89 -0
- package/dist/Fx/combinators/onError.d.ts +17 -0
- package/dist/Fx/combinators/onError.d.ts.map +1 -0
- package/dist/Fx/combinators/onError.js +14 -0
- package/dist/Fx/combinators/onExit.d.ts +16 -0
- package/dist/Fx/combinators/onExit.d.ts.map +1 -0
- package/dist/Fx/combinators/onExit.js +39 -0
- package/dist/Fx/combinators/onInterrupt.d.ts +16 -0
- package/dist/Fx/combinators/onInterrupt.d.ts.map +1 -0
- package/dist/Fx/combinators/onInterrupt.js +38 -0
- package/dist/Fx/combinators/provide.d.ts +56 -0
- package/dist/Fx/combinators/provide.d.ts.map +1 -0
- package/dist/Fx/combinators/provide.js +54 -0
- package/dist/Fx/combinators/result.d.ts +23 -0
- package/dist/Fx/combinators/result.d.ts.map +1 -0
- package/dist/Fx/combinators/result.js +32 -0
- package/dist/Fx/combinators/scan.d.ts +33 -0
- package/dist/Fx/combinators/scan.d.ts.map +1 -0
- package/dist/Fx/combinators/scan.js +38 -0
- package/dist/Fx/combinators/skip.d.ts +27 -0
- package/dist/Fx/combinators/skip.d.ts.map +1 -0
- package/dist/Fx/combinators/skip.js +22 -0
- package/dist/Fx/combinators/skipRepeats.d.ts +11 -0
- package/dist/Fx/combinators/skipRepeats.d.ts.map +1 -0
- package/dist/Fx/combinators/skipRepeats.js +12 -0
- package/dist/Fx/combinators/skipRepeatsWith.d.ts +12 -0
- package/dist/Fx/combinators/skipRepeatsWith.d.ts.map +1 -0
- package/dist/Fx/combinators/skipRepeatsWith.js +20 -0
- package/dist/Fx/combinators/skipWhile.d.ts +49 -0
- package/dist/Fx/combinators/skipWhile.d.ts.map +1 -0
- package/dist/Fx/combinators/skipWhile.js +66 -0
- package/dist/Fx/combinators/slice.d.ts +36 -0
- package/dist/Fx/combinators/slice.d.ts.map +1 -0
- package/dist/Fx/combinators/slice.js +23 -0
- package/dist/Fx/combinators/switchMap.d.ts +13 -0
- package/dist/Fx/combinators/switchMap.d.ts.map +1 -0
- package/dist/Fx/combinators/switchMap.js +33 -0
- package/dist/Fx/combinators/switchMapEffect.d.ts +13 -0
- package/dist/Fx/combinators/switchMapEffect.d.ts.map +1 -0
- package/dist/Fx/combinators/switchMapEffect.js +14 -0
- package/dist/Fx/combinators/take.d.ts +27 -0
- package/dist/Fx/combinators/take.d.ts.map +1 -0
- package/dist/Fx/combinators/take.js +22 -0
- package/dist/Fx/combinators/takeUntil.d.ts +42 -0
- package/dist/Fx/combinators/takeUntil.d.ts.map +1 -0
- package/dist/Fx/combinators/takeUntil.js +45 -0
- package/dist/Fx/combinators/takeWhile.d.ts +29 -0
- package/dist/Fx/combinators/takeWhile.d.ts.map +1 -0
- package/dist/Fx/combinators/takeWhile.js +23 -0
- package/dist/Fx/combinators/tapEffect.d.ts +15 -0
- package/dist/Fx/combinators/tapEffect.d.ts.map +1 -0
- package/dist/Fx/combinators/tapEffect.js +18 -0
- package/dist/Fx/combinators/tuple.d.ts +27 -0
- package/dist/Fx/combinators/tuple.d.ts.map +1 -0
- package/dist/Fx/combinators/tuple.js +46 -0
- package/dist/Fx/combinators/unwrap.d.ts +12 -0
- package/dist/Fx/combinators/unwrap.d.ts.map +1 -0
- package/dist/Fx/combinators/unwrap.js +14 -0
- package/dist/Fx/combinators/unwrapScoped.d.ts +15 -0
- package/dist/Fx/combinators/unwrapScoped.d.ts.map +1 -0
- package/dist/Fx/combinators/unwrapScoped.js +16 -0
- package/dist/Fx/combinators/when.d.ts +36 -0
- package/dist/Fx/combinators/when.d.ts.map +1 -0
- package/dist/Fx/combinators/when.js +28 -0
- package/dist/Fx/combinators/withSpan.d.ts +4 -0
- package/dist/Fx/combinators/withSpan.d.ts.map +1 -0
- package/dist/Fx/combinators/withSpan.js +6 -0
- package/dist/Fx/combinators/zip.d.ts +75 -0
- package/dist/Fx/combinators/zip.d.ts.map +1 -0
- package/dist/Fx/combinators/zip.js +100 -0
- package/dist/Fx/constructors/at.d.ts +16 -0
- package/dist/Fx/constructors/at.d.ts.map +1 -0
- package/dist/Fx/constructors/at.js +13 -0
- package/dist/Fx/constructors/die.d.ts +11 -0
- package/dist/Fx/constructors/die.d.ts.map +1 -0
- package/dist/Fx/constructors/die.js +12 -0
- package/dist/Fx/constructors/empty.d.ts +8 -0
- package/dist/Fx/constructors/empty.d.ts.map +1 -0
- package/dist/Fx/constructors/empty.js +8 -0
- package/dist/Fx/constructors/fail.d.ts +11 -0
- package/dist/Fx/constructors/fail.d.ts.map +1 -0
- package/dist/Fx/constructors/fail.js +12 -0
- package/dist/Fx/constructors/failCause.d.ts +12 -0
- package/dist/Fx/constructors/failCause.d.ts.map +1 -0
- package/dist/Fx/constructors/failCause.js +11 -0
- package/dist/Fx/constructors/fn.d.ts +47 -0
- package/dist/Fx/constructors/fn.d.ts.map +1 -0
- package/dist/Fx/constructors/fn.js +23 -0
- package/dist/Fx/constructors/fromEffect.d.ts +21 -0
- package/dist/Fx/constructors/fromEffect.d.ts.map +1 -0
- package/dist/Fx/constructors/fromEffect.js +21 -0
- package/dist/Fx/constructors/fromFailures.d.ts +10 -0
- package/dist/Fx/constructors/fromFailures.d.ts.map +1 -0
- package/dist/Fx/constructors/fromFailures.js +13 -0
- package/dist/Fx/constructors/fromIterable.d.ts +12 -0
- package/dist/Fx/constructors/fromIterable.d.ts.map +1 -0
- package/dist/Fx/constructors/fromIterable.js +12 -0
- package/dist/Fx/constructors/fromSchedule.d.ts +13 -0
- package/dist/Fx/constructors/fromSchedule.d.ts.map +1 -0
- package/dist/Fx/constructors/fromSchedule.js +13 -0
- package/dist/Fx/constructors/fromYieldable.d.ts +12 -0
- package/dist/Fx/constructors/fromYieldable.d.ts.map +1 -0
- package/dist/Fx/constructors/fromYieldable.js +12 -0
- package/dist/Fx/constructors/index.d.ts +16 -0
- package/dist/Fx/constructors/index.d.ts.map +1 -0
- package/dist/Fx/constructors/index.js +15 -0
- package/dist/Fx/constructors/interrupt.d.ts +10 -0
- package/dist/Fx/constructors/interrupt.d.ts.map +1 -0
- package/dist/Fx/constructors/interrupt.js +12 -0
- package/dist/Fx/constructors/make.d.ts +40 -0
- package/dist/Fx/constructors/make.d.ts.map +1 -0
- package/dist/Fx/constructors/make.js +61 -0
- package/dist/Fx/constructors/periodic.d.ts +12 -0
- package/dist/Fx/constructors/periodic.d.ts.map +1 -0
- package/dist/Fx/constructors/periodic.js +12 -0
- package/dist/Fx/constructors/succeed.d.ts +32 -0
- package/dist/Fx/constructors/succeed.d.ts.map +1 -0
- package/dist/Fx/constructors/succeed.js +32 -0
- package/dist/Fx/constructors/suspend.d.ts +3 -0
- package/dist/Fx/constructors/suspend.d.ts.map +1 -0
- package/dist/Fx/constructors/suspend.js +3 -0
- package/dist/Fx/index.d.ts +7 -0
- package/dist/Fx/index.d.ts.map +1 -0
- package/dist/Fx/index.js +6 -0
- package/dist/Fx/internal/DeferredRef.d.ts +29 -0
- package/dist/Fx/internal/DeferredRef.d.ts.map +1 -0
- package/dist/Fx/internal/DeferredRef.js +63 -0
- package/dist/Fx/internal/UnionToTuple.d.ts.map +1 -0
- package/dist/Fx/internal/UnionToTuple.js +1 -0
- package/dist/Fx/internal/diff.d.ts +44 -0
- package/dist/Fx/internal/diff.d.ts.map +1 -0
- package/dist/Fx/internal/diff.js +106 -0
- package/dist/Fx/internal/equivalence.d.ts +4 -0
- package/dist/Fx/internal/equivalence.d.ts.map +1 -0
- package/dist/Fx/internal/equivalence.js +10 -0
- package/dist/Fx/internal/multicast.d.ts +10 -0
- package/dist/Fx/internal/multicast.d.ts.map +1 -0
- package/dist/Fx/internal/multicast.js +32 -0
- package/dist/Fx/internal/ring-buffer.d.ts +14 -0
- package/dist/Fx/internal/ring-buffer.d.ts.map +1 -0
- package/dist/Fx/internal/ring-buffer.js +52 -0
- package/dist/Fx/internal/scope.d.ts +11 -0
- package/dist/Fx/internal/scope.d.ts.map +1 -0
- package/dist/Fx/internal/scope.js +12 -0
- package/dist/Fx/internal/yieldable.d.ts +17 -0
- package/dist/Fx/internal/yieldable.d.ts.map +1 -0
- package/dist/Fx/internal/yieldable.js +20 -0
- package/dist/Fx/run/collect.d.ts +45 -0
- package/dist/Fx/run/collect.d.ts.map +1 -0
- package/dist/Fx/run/collect.js +51 -0
- package/dist/Fx/run/first.d.ts +14 -0
- package/dist/Fx/run/first.d.ts.map +1 -0
- package/dist/Fx/run/first.js +16 -0
- package/dist/Fx/run/fork.d.ts +29 -0
- package/dist/Fx/run/fork.d.ts.map +1 -0
- package/dist/Fx/run/fork.js +27 -0
- package/dist/Fx/run/index.d.ts +6 -0
- package/dist/Fx/run/index.d.ts.map +1 -0
- package/dist/Fx/run/index.js +5 -0
- package/dist/Fx/run/observe.d.ts +53 -0
- package/dist/Fx/run/observe.d.ts.map +1 -0
- package/dist/Fx/run/observe.js +55 -0
- package/dist/Fx/run/runPromise.d.ts +25 -0
- package/dist/Fx/run/runPromise.d.ts.map +1 -0
- package/dist/Fx/run/runPromise.js +23 -0
- package/dist/Fx/stream.d.ts +7 -0
- package/dist/Fx/stream.d.ts.map +1 -0
- package/dist/Fx/stream.js +7 -0
- package/dist/Fx.d.ts +2 -0
- package/dist/Fx.d.ts.map +1 -0
- package/dist/Fx.js +1 -0
- package/dist/Push/Push.d.ts +375 -0
- package/dist/Push/Push.d.ts.map +1 -0
- package/dist/Push/Push.js +346 -0
- package/dist/Push/index.d.ts +2 -0
- package/dist/Push/index.d.ts.map +1 -0
- package/dist/Push/index.js +1 -0
- package/dist/Push.d.ts +2 -0
- package/dist/Push.d.ts.map +1 -0
- package/dist/Push.js +1 -0
- package/dist/RefSubject/RefArray.d.ts +328 -0
- package/dist/RefSubject/RefArray.d.ts.map +1 -0
- package/dist/RefSubject/RefArray.js +302 -0
- package/dist/RefSubject/RefBigDecimal.d.ts +183 -0
- package/dist/RefSubject/RefBigDecimal.d.ts.map +1 -0
- package/dist/RefSubject/RefBigDecimal.js +161 -0
- package/dist/RefSubject/RefBigInt.d.ts +138 -0
- package/dist/RefSubject/RefBigInt.d.ts.map +1 -0
- package/dist/RefSubject/RefBigInt.js +126 -0
- package/dist/RefSubject/RefBoolean.d.ts +135 -0
- package/dist/RefSubject/RefBoolean.d.ts.map +1 -0
- package/dist/RefSubject/RefBoolean.js +124 -0
- package/dist/RefSubject/RefCause.d.ts +100 -0
- package/dist/RefSubject/RefCause.d.ts.map +1 -0
- package/dist/RefSubject/RefCause.js +93 -0
- package/dist/RefSubject/RefChunk.d.ts +316 -0
- package/dist/RefSubject/RefChunk.d.ts.map +1 -0
- package/dist/RefSubject/RefChunk.js +286 -0
- package/dist/RefSubject/RefDateTime.d.ts +155 -0
- package/dist/RefSubject/RefDateTime.d.ts.map +1 -0
- package/dist/RefSubject/RefDateTime.js +101 -0
- package/dist/RefSubject/RefDuration.d.ts +126 -0
- package/dist/RefSubject/RefDuration.d.ts.map +1 -0
- package/dist/RefSubject/RefDuration.js +115 -0
- package/dist/RefSubject/RefGraph.d.ts +239 -0
- package/dist/RefSubject/RefGraph.d.ts.map +1 -0
- package/dist/RefSubject/RefGraph.js +272 -0
- package/dist/RefSubject/RefHashMap.d.ts +228 -0
- package/dist/RefSubject/RefHashMap.d.ts.map +1 -0
- package/dist/RefSubject/RefHashMap.js +212 -0
- package/dist/RefSubject/RefHashRing.d.ts +123 -0
- package/dist/RefSubject/RefHashRing.d.ts.map +1 -0
- package/dist/RefSubject/RefHashRing.js +115 -0
- package/dist/RefSubject/RefHashSet.d.ts +179 -0
- package/dist/RefSubject/RefHashSet.d.ts.map +1 -0
- package/dist/RefSubject/RefHashSet.js +164 -0
- package/dist/RefSubject/RefIterable.d.ts +257 -0
- package/dist/RefSubject/RefIterable.d.ts.map +1 -0
- package/dist/RefSubject/RefIterable.js +237 -0
- package/dist/RefSubject/RefOption.d.ts +124 -0
- package/dist/RefSubject/RefOption.d.ts.map +1 -0
- package/dist/RefSubject/RefOption.js +115 -0
- package/dist/RefSubject/RefRecord.d.ts +264 -0
- package/dist/RefSubject/RefRecord.d.ts.map +1 -0
- package/dist/RefSubject/RefRecord.js +249 -0
- package/dist/RefSubject/RefResult.d.ts +121 -0
- package/dist/RefSubject/RefResult.d.ts.map +1 -0
- package/dist/RefSubject/RefResult.js +107 -0
- package/dist/RefSubject/RefString.d.ts +147 -0
- package/dist/RefSubject/RefString.d.ts.map +1 -0
- package/dist/RefSubject/RefString.js +137 -0
- package/dist/RefSubject/RefStruct.d.ts +123 -0
- package/dist/RefSubject/RefStruct.d.ts.map +1 -0
- package/dist/RefSubject/RefStruct.js +113 -0
- package/dist/RefSubject/RefSubject.d.ts +1057 -0
- package/dist/RefSubject/RefSubject.d.ts.map +1 -0
- package/dist/RefSubject/RefSubject.js +1389 -0
- package/dist/RefSubject/RefTrie.d.ts +216 -0
- package/dist/RefSubject/RefTrie.d.ts.map +1 -0
- package/dist/RefSubject/RefTrie.js +201 -0
- package/dist/RefSubject/RefTuple.d.ts +107 -0
- package/dist/RefSubject/RefTuple.d.ts.map +1 -0
- package/dist/RefSubject/RefTuple.js +94 -0
- package/dist/RefSubject/index.d.ts +22 -0
- package/dist/RefSubject/index.d.ts.map +1 -0
- package/dist/RefSubject/index.js +21 -0
- package/dist/RefSubject.d.ts +2 -0
- package/dist/RefSubject.d.ts.map +1 -0
- package/dist/RefSubject.js +1 -0
- package/dist/Sink/Sink.d.ts +94 -0
- package/dist/Sink/Sink.d.ts.map +1 -0
- package/dist/Sink/Sink.js +34 -0
- package/dist/Sink/combinators.d.ts +228 -0
- package/dist/Sink/combinators.d.ts.map +1 -0
- package/dist/Sink/combinators.js +689 -0
- package/dist/Sink/index.d.ts +3 -0
- package/dist/Sink/index.d.ts.map +1 -0
- package/dist/Sink/index.js +2 -0
- package/dist/Sink.d.ts +2 -0
- package/dist/Sink.d.ts.map +1 -0
- package/dist/Sink.js +1 -0
- package/dist/Subject/Subject.d.ts +152 -0
- package/dist/Subject/Subject.d.ts.map +1 -0
- package/dist/Subject/Subject.js +272 -0
- package/dist/Subject/index.d.ts +2 -0
- package/dist/Subject/index.d.ts.map +1 -0
- package/dist/Subject/index.js +1 -0
- package/dist/Subject.d.ts +2 -0
- package/dist/Subject.d.ts.map +1 -0
- package/dist/Subject.js +1 -0
- package/dist/Versioned/Versioned.d.ts +206 -0
- package/dist/Versioned/Versioned.d.ts.map +1 -0
- package/dist/Versioned/Versioned.js +246 -0
- package/dist/Versioned/index.d.ts +2 -0
- package/dist/Versioned/index.d.ts.map +1 -0
- package/dist/Versioned/index.js +1 -0
- package/dist/Versioned.d.ts +2 -0
- package/dist/Versioned.d.ts.map +1 -0
- package/dist/Versioned.js +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/package.json +26 -195
- package/src/Fx/Fx.ts +164 -0
- package/src/Fx/TypeId.ts +25 -0
- package/src/Fx/combinators/additive.ts +142 -0
- package/src/Fx/combinators/catch.ts +421 -0
- package/src/Fx/combinators/causes.ts +23 -0
- package/src/Fx/combinators/changesWithEffect.ts +66 -0
- package/src/Fx/combinators/compact.ts +15 -0
- package/src/Fx/combinators/continueWith.ts +78 -0
- package/src/Fx/combinators/dropUntil.ts +47 -0
- package/src/Fx/combinators/ensuring.ts +23 -0
- package/src/Fx/combinators/exhaustLatestMap.ts +74 -0
- package/src/Fx/combinators/exhaustLatestMapEffect.ts +25 -0
- package/src/Fx/combinators/exhaustMap.ts +36 -0
- package/src/Fx/combinators/exhaustMapEffect.ts +23 -0
- package/src/Fx/combinators/exit.ts +15 -0
- package/src/Fx/combinators/filter.ts +22 -0
- package/src/Fx/combinators/filterEffect.ts +31 -0
- package/src/Fx/combinators/filterMap.ts +23 -0
- package/src/Fx/combinators/filterMapEffect.ts +32 -0
- package/src/Fx/combinators/filterMapLoop.ts +35 -0
- package/src/Fx/combinators/filterMapLoopCause.ts +36 -0
- package/src/Fx/combinators/filterMapLoopCauseEffect.ts +46 -0
- package/src/Fx/combinators/filterMapLoopEffect.ts +36 -0
- package/src/Fx/combinators/flatMap.ts +51 -0
- package/src/Fx/combinators/flatMapConcurrently.ts +39 -0
- package/src/Fx/combinators/flatMapConcurrentlyEffect.ts +26 -0
- package/src/Fx/combinators/flatMapEffect.ts +42 -0
- package/src/Fx/combinators/flip.ts +14 -0
- package/src/Fx/combinators/gen.ts +24 -0
- package/src/Fx/combinators/genScoped.ts +24 -0
- package/src/Fx/combinators/index.ts +61 -0
- package/src/Fx/combinators/keyed.ts +369 -0
- package/src/Fx/combinators/loop.ts +27 -0
- package/src/Fx/combinators/loopCause.ts +34 -0
- package/src/Fx/combinators/loopCauseEffect.ts +36 -0
- package/src/Fx/combinators/loopEffect.ts +34 -0
- package/src/Fx/combinators/map.ts +22 -0
- package/src/Fx/combinators/mapBoth.ts +40 -0
- package/src/Fx/combinators/mapEffect.ts +32 -0
- package/src/Fx/combinators/mapError.ts +28 -0
- package/src/Fx/combinators/mergeAll.ts +22 -0
- package/src/Fx/combinators/mergeOrdered.ts +123 -0
- package/src/Fx/combinators/onError.ts +40 -0
- package/src/Fx/combinators/onExit.ts +82 -0
- package/src/Fx/combinators/onInterrupt.ts +87 -0
- package/src/Fx/combinators/provide.ts +124 -0
- package/src/Fx/combinators/result.ts +39 -0
- package/src/Fx/combinators/scan.ts +82 -0
- package/src/Fx/combinators/skip.ts +41 -0
- package/src/Fx/combinators/skipRepeats.ts +15 -0
- package/src/Fx/combinators/skipRepeatsWith.ts +40 -0
- package/src/Fx/combinators/skipWhile.ts +100 -0
- package/src/Fx/combinators/slice.ts +55 -0
- package/src/Fx/combinators/switchMap.ts +55 -0
- package/src/Fx/combinators/switchMapEffect.ts +25 -0
- package/src/Fx/combinators/take.ts +38 -0
- package/src/Fx/combinators/takeUntil.ts +88 -0
- package/src/Fx/combinators/takeWhile.ts +47 -0
- package/src/Fx/combinators/tapEffect.ts +39 -0
- package/src/Fx/combinators/tuple.ts +79 -0
- package/src/Fx/combinators/unwrap.ts +21 -0
- package/src/Fx/combinators/unwrapScoped.ts +26 -0
- package/src/Fx/combinators/when.ts +64 -0
- package/src/Fx/combinators/withSpan.ts +24 -0
- package/src/Fx/combinators/zip.ts +175 -0
- package/src/Fx/constructors/at.ts +23 -0
- package/src/Fx/constructors/die.ts +17 -0
- package/src/Fx/constructors/empty.ts +10 -0
- package/src/Fx/constructors/fail.ts +14 -0
- package/src/Fx/constructors/failCause.ts +14 -0
- package/src/Fx/constructors/fn.ts +245 -0
- package/src/Fx/constructors/fromEffect.ts +24 -0
- package/src/Fx/constructors/fromFailures.ts +19 -0
- package/src/Fx/constructors/fromIterable.ts +15 -0
- package/src/Fx/constructors/fromSchedule.ts +18 -0
- package/src/Fx/constructors/fromYieldable.ts +17 -0
- package/src/Fx/constructors/index.ts +15 -0
- package/src/Fx/constructors/interrupt.ts +13 -0
- package/src/Fx/constructors/make.ts +103 -0
- package/src/Fx/constructors/periodic.ts +15 -0
- package/src/Fx/constructors/succeed.ts +37 -0
- package/src/Fx/constructors/suspend.ts +6 -0
- package/src/Fx/index.ts +6 -0
- package/src/Fx/internal/DeferredRef.ts +87 -0
- package/src/Fx/internal/UnionToTuple.ts +12 -0
- package/src/Fx/internal/diff.ts +191 -0
- package/src/Fx/internal/equivalence.ts +12 -0
- package/src/Fx/internal/multicast.ts +51 -0
- package/src/Fx/internal/ring-buffer.ts +60 -0
- package/src/Fx/internal/scope.ts +58 -0
- package/src/Fx/internal/yieldable.ts +31 -0
- package/src/Fx/run/collect.ts +79 -0
- package/src/Fx/run/first.ts +20 -0
- package/src/Fx/run/fork.ts +40 -0
- package/src/Fx/run/index.ts +5 -0
- package/src/Fx/run/observe.ts +114 -0
- package/src/Fx/run/runPromise.ts +32 -0
- package/src/Fx/stream.ts +42 -0
- package/src/Fx.additive-combinators.test.ts +126 -0
- package/src/Fx.catch-additive.test.ts +206 -0
- package/src/Fx.catch.test.ts +60 -0
- package/src/Fx.dropUntil.test.ts +61 -0
- package/src/Fx.fn.test.ts +51 -0
- package/src/Fx.lifecycle.test.ts +79 -0
- package/src/Fx.mapError-mapBoth.test.ts +101 -0
- package/src/Fx.provide-combinators.test.ts +94 -0
- package/src/Fx.result-changesWithEffect.test.ts +112 -0
- package/src/Fx.scan.test.ts +73 -0
- package/src/Fx.takeWhile-skipWhile.test.ts +84 -0
- package/src/Fx.test.ts +71 -0
- package/src/Fx.ts +1 -2591
- package/src/Fx.zip-merge-additive.test.ts +171 -0
- package/src/Fx.zip.test.ts +133 -0
- package/src/Push/Push.ts +1072 -0
- package/src/Push/index.ts +1 -0
- package/src/Push.additive.test.ts +256 -0
- package/src/Push.test.ts +26 -0
- package/src/Push.ts +1 -480
- package/src/RefSubject/RefArray.ts +512 -0
- package/src/RefSubject/RefBigDecimal.test.ts +56 -0
- package/src/RefSubject/RefBigDecimal.ts +295 -0
- package/src/RefSubject/RefBigInt.test.ts +56 -0
- package/src/RefSubject/RefBigInt.ts +189 -0
- package/src/RefSubject/RefBoolean.test.ts +57 -0
- package/src/RefSubject/RefBoolean.ts +185 -0
- package/src/RefSubject/RefCause.test.ts +53 -0
- package/src/RefSubject/RefCause.ts +146 -0
- package/src/RefSubject/RefChunk.ts +510 -0
- package/src/RefSubject/RefDateTime.test.ts +43 -0
- package/src/RefSubject/RefDateTime.ts +264 -0
- package/src/RefSubject/RefDuration.test.ts +49 -0
- package/src/RefSubject/RefDuration.ts +188 -0
- package/src/RefSubject/RefGraph.ts +650 -0
- package/src/RefSubject/RefHashMap.ts +465 -0
- package/src/RefSubject/RefHashRing.ts +262 -0
- package/src/RefSubject/RefHashSet.ts +308 -0
- package/src/RefSubject/RefIterable.ts +445 -0
- package/src/RefSubject/RefOption.test.ts +67 -0
- package/src/RefSubject/RefOption.ts +193 -0
- package/src/RefSubject/RefRecord.ts +612 -0
- package/src/RefSubject/RefResult.test.ts +63 -0
- package/src/RefSubject/RefResult.ts +209 -0
- package/src/RefSubject/RefString.test.ts +61 -0
- package/src/RefSubject/RefString.ts +256 -0
- package/src/RefSubject/RefStruct.test.ts +60 -0
- package/src/RefSubject/RefStruct.ts +253 -0
- package/src/RefSubject/RefSubject.ts +2646 -0
- package/src/RefSubject/RefTrie.ts +356 -0
- package/src/RefSubject/RefTuple.test.ts +60 -0
- package/src/RefSubject/RefTuple.ts +231 -0
- package/src/RefSubject/index.ts +21 -0
- package/src/RefSubject.additive-parity.test.ts +101 -0
- package/src/RefSubject.test.ts +65 -0
- package/src/RefSubject.ts +1 -2488
- package/src/Sink/Sink.ts +159 -0
- package/src/Sink/combinators.ts +1115 -0
- package/src/Sink/index.ts +2 -0
- package/src/Sink.combinators.test.ts +88 -0
- package/src/Sink.reduce-collect-head-last.test.ts +107 -0
- package/src/Sink.ts +1 -1044
- package/src/Subject/Subject.ts +441 -0
- package/src/Subject/index.ts +1 -0
- package/src/Subject.test.ts +47 -0
- package/src/Subject.ts +1 -330
- package/src/Versioned/Versioned.ts +597 -0
- package/src/Versioned/index.ts +1 -0
- package/src/Versioned.filterMap.test.ts +91 -0
- package/src/Versioned.test.ts +23 -0
- package/src/Versioned.ts +1 -357
- package/src/index.ts +7 -130
- package/AsyncData/package.json +0 -6
- package/Emitter/package.json +0 -6
- package/Form/package.json +0 -6
- package/FormEntry/package.json +0 -6
- package/Fx/package.json +0 -6
- package/Idle/package.json +0 -6
- package/LICENSE +0 -21
- package/Match/package.json +0 -6
- package/Pull/package.json +0 -6
- package/Push/package.json +0 -6
- package/RefArray/package.json +0 -6
- package/RefChunk/package.json +0 -6
- package/RefHashMap/package.json +0 -6
- package/RefHashSet/package.json +0 -6
- package/RefSubject/package.json +0 -6
- package/Sink/package.json +0 -6
- package/Stream/package.json +0 -6
- package/Subject/package.json +0 -6
- package/TypeId/package.json +0 -6
- package/Typeclass/package.json +0 -6
- package/Versioned/package.json +0 -6
- package/dist/cjs/AsyncData.js +0 -188
- package/dist/cjs/AsyncData.js.map +0 -1
- package/dist/cjs/Emitter.js +0 -44
- package/dist/cjs/Emitter.js.map +0 -1
- package/dist/cjs/Form.js +0 -178
- package/dist/cjs/Form.js.map +0 -1
- package/dist/cjs/FormEntry.js +0 -110
- package/dist/cjs/FormEntry.js.map +0 -1
- package/dist/cjs/Fx.js +0 -998
- package/dist/cjs/Fx.js.map +0 -1
- package/dist/cjs/Idle.js +0 -190
- package/dist/cjs/Idle.js.map +0 -1
- package/dist/cjs/Match.js +0 -191
- package/dist/cjs/Match.js.map +0 -1
- package/dist/cjs/Pull.js +0 -52
- package/dist/cjs/Pull.js.map +0 -1
- package/dist/cjs/Push.js +0 -168
- package/dist/cjs/Push.js.map +0 -1
- package/dist/cjs/RefArray.js +0 -253
- package/dist/cjs/RefArray.js.map +0 -1
- package/dist/cjs/RefChunk.js +0 -212
- package/dist/cjs/RefChunk.js.map +0 -1
- package/dist/cjs/RefHashMap.js +0 -198
- package/dist/cjs/RefHashMap.js.map +0 -1
- package/dist/cjs/RefHashSet.js +0 -99
- package/dist/cjs/RefHashSet.js.map +0 -1
- package/dist/cjs/RefSubject.js +0 -1115
- package/dist/cjs/RefSubject.js.map +0 -1
- package/dist/cjs/Sink.js +0 -662
- package/dist/cjs/Sink.js.map +0 -1
- package/dist/cjs/Stream.js +0 -87
- package/dist/cjs/Stream.js.map +0 -1
- package/dist/cjs/Subject.js +0 -205
- package/dist/cjs/Subject.js.map +0 -1
- package/dist/cjs/TypeId.js +0 -32
- package/dist/cjs/TypeId.js.map +0 -1
- package/dist/cjs/Typeclass.js +0 -380
- package/dist/cjs/Typeclass.js.map +0 -1
- package/dist/cjs/Versioned.js +0 -172
- package/dist/cjs/Versioned.js.map +0 -1
- package/dist/cjs/index.js +0 -89
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/internal/DeferredRef.js +0 -67
- package/dist/cjs/internal/DeferredRef.js.map +0 -1
- package/dist/cjs/internal/UnionToTuple.js +0 -6
- package/dist/cjs/internal/UnionToTuple.js.map +0 -1
- package/dist/cjs/internal/bounds.js +0 -26
- package/dist/cjs/internal/bounds.js.map +0 -1
- package/dist/cjs/internal/core.js +0 -1783
- package/dist/cjs/internal/core.js.map +0 -1
- package/dist/cjs/internal/diff.js +0 -122
- package/dist/cjs/internal/diff.js.map +0 -1
- package/dist/cjs/internal/effect-loop-operator.js +0 -288
- package/dist/cjs/internal/effect-loop-operator.js.map +0 -1
- package/dist/cjs/internal/effect-operator.js +0 -156
- package/dist/cjs/internal/effect-operator.js.map +0 -1
- package/dist/cjs/internal/effect-producer.js +0 -74
- package/dist/cjs/internal/effect-producer.js.map +0 -1
- package/dist/cjs/internal/helpers.js +0 -317
- package/dist/cjs/internal/helpers.js.map +0 -1
- package/dist/cjs/internal/keyed.js +0 -168
- package/dist/cjs/internal/keyed.js.map +0 -1
- package/dist/cjs/internal/loop-operator.js +0 -213
- package/dist/cjs/internal/loop-operator.js.map +0 -1
- package/dist/cjs/internal/operator.js +0 -79
- package/dist/cjs/internal/operator.js.map +0 -1
- package/dist/cjs/internal/protos.js +0 -48
- package/dist/cjs/internal/protos.js.map +0 -1
- package/dist/cjs/internal/provide.js +0 -100
- package/dist/cjs/internal/provide.js.map +0 -1
- package/dist/cjs/internal/requestIdleCallback.js +0 -22
- package/dist/cjs/internal/requestIdleCallback.js.map +0 -1
- package/dist/cjs/internal/share.js +0 -74
- package/dist/cjs/internal/share.js.map +0 -1
- package/dist/cjs/internal/strategies.js +0 -34
- package/dist/cjs/internal/strategies.js.map +0 -1
- package/dist/cjs/internal/sync-operator.js +0 -120
- package/dist/cjs/internal/sync-operator.js.map +0 -1
- package/dist/cjs/internal/sync-producer.js +0 -118
- package/dist/cjs/internal/sync-producer.js.map +0 -1
- package/dist/cjs/internal/withKey.js +0 -63
- package/dist/cjs/internal/withKey.js.map +0 -1
- package/dist/dts/AsyncData.d.ts +0 -179
- package/dist/dts/AsyncData.d.ts.map +0 -1
- package/dist/dts/Emitter.d.ts +0 -24
- package/dist/dts/Emitter.d.ts.map +0 -1
- package/dist/dts/Form.d.ts +0 -145
- package/dist/dts/Form.d.ts.map +0 -1
- package/dist/dts/FormEntry.d.ts +0 -65
- package/dist/dts/FormEntry.d.ts.map +0 -1
- package/dist/dts/Fx.d.ts +0 -1678
- package/dist/dts/Fx.d.ts.map +0 -1
- package/dist/dts/Idle.d.ts +0 -84
- package/dist/dts/Idle.d.ts.map +0 -1
- package/dist/dts/Match.d.ts +0 -60
- package/dist/dts/Match.d.ts.map +0 -1
- package/dist/dts/Pull.d.ts +0 -37
- package/dist/dts/Pull.d.ts.map +0 -1
- package/dist/dts/Push.d.ts +0 -176
- package/dist/dts/Push.d.ts.map +0 -1
- package/dist/dts/RefArray.d.ts +0 -278
- package/dist/dts/RefArray.d.ts.map +0 -1
- package/dist/dts/RefChunk.d.ts +0 -230
- package/dist/dts/RefChunk.d.ts.map +0 -1
- package/dist/dts/RefHashMap.d.ts +0 -189
- package/dist/dts/RefHashMap.d.ts.map +0 -1
- package/dist/dts/RefHashSet.d.ts +0 -100
- package/dist/dts/RefHashSet.d.ts.map +0 -1
- package/dist/dts/RefSubject.d.ts +0 -601
- package/dist/dts/RefSubject.d.ts.map +0 -1
- package/dist/dts/Sink.d.ts +0 -252
- package/dist/dts/Sink.d.ts.map +0 -1
- package/dist/dts/Stream.d.ts +0 -66
- package/dist/dts/Stream.d.ts.map +0 -1
- package/dist/dts/Subject.d.ts +0 -61
- package/dist/dts/Subject.d.ts.map +0 -1
- package/dist/dts/TypeId.d.ts +0 -51
- package/dist/dts/TypeId.d.ts.map +0 -1
- package/dist/dts/Typeclass.d.ts +0 -284
- package/dist/dts/Typeclass.d.ts.map +0 -1
- package/dist/dts/Versioned.d.ts +0 -117
- package/dist/dts/Versioned.d.ts.map +0 -1
- package/dist/dts/index.d.ts +0 -111
- package/dist/dts/index.d.ts.map +0 -1
- package/dist/dts/internal/DeferredRef.d.ts +0 -22
- package/dist/dts/internal/DeferredRef.d.ts.map +0 -1
- package/dist/dts/internal/UnionToTuple.d.ts.map +0 -1
- package/dist/dts/internal/bounds.d.ts +0 -9
- package/dist/dts/internal/bounds.d.ts.map +0 -1
- package/dist/dts/internal/core.d.ts +0 -237
- package/dist/dts/internal/core.d.ts.map +0 -1
- package/dist/dts/internal/diff.d.ts +0 -42
- package/dist/dts/internal/diff.d.ts.map +0 -1
- package/dist/dts/internal/effect-loop-operator.d.ts +0 -34
- package/dist/dts/internal/effect-loop-operator.d.ts.map +0 -1
- package/dist/dts/internal/effect-operator.d.ts +0 -40
- package/dist/dts/internal/effect-operator.d.ts.map +0 -1
- package/dist/dts/internal/effect-producer.d.ts +0 -25
- package/dist/dts/internal/effect-producer.d.ts.map +0 -1
- package/dist/dts/internal/helpers.d.ts +0 -60
- package/dist/dts/internal/helpers.d.ts.map +0 -1
- package/dist/dts/internal/keyed.d.ts +0 -4
- package/dist/dts/internal/keyed.d.ts.map +0 -1
- package/dist/dts/internal/loop-operator.d.ts +0 -40
- package/dist/dts/internal/loop-operator.d.ts.map +0 -1
- package/dist/dts/internal/operator.d.ts +0 -16
- package/dist/dts/internal/operator.d.ts.map +0 -1
- package/dist/dts/internal/protos.d.ts +0 -23
- package/dist/dts/internal/protos.d.ts.map +0 -1
- package/dist/dts/internal/provide.d.ts +0 -46
- package/dist/dts/internal/provide.d.ts.map +0 -1
- package/dist/dts/internal/requestIdleCallback.d.ts +0 -3
- package/dist/dts/internal/requestIdleCallback.d.ts.map +0 -1
- package/dist/dts/internal/share.d.ts +0 -33
- package/dist/dts/internal/share.d.ts.map +0 -1
- package/dist/dts/internal/strategies.d.ts +0 -9
- package/dist/dts/internal/strategies.d.ts.map +0 -1
- package/dist/dts/internal/sync-operator.d.ts +0 -32
- package/dist/dts/internal/sync-operator.d.ts.map +0 -1
- package/dist/dts/internal/sync-producer.d.ts +0 -36
- package/dist/dts/internal/sync-producer.d.ts.map +0 -1
- package/dist/dts/internal/withKey.d.ts +0 -4
- package/dist/dts/internal/withKey.d.ts.map +0 -1
- package/dist/esm/AsyncData.js +0 -156
- package/dist/esm/AsyncData.js.map +0 -1
- package/dist/esm/Emitter.js +0 -33
- package/dist/esm/Emitter.js.map +0 -1
- package/dist/esm/Form.js +0 -163
- package/dist/esm/Form.js.map +0 -1
- package/dist/esm/FormEntry.js +0 -100
- package/dist/esm/FormEntry.js.map +0 -1
- package/dist/esm/Fx.js +0 -984
- package/dist/esm/Fx.js.map +0 -1
- package/dist/esm/Idle.js +0 -178
- package/dist/esm/Idle.js.map +0 -1
- package/dist/esm/Match.js +0 -185
- package/dist/esm/Match.js.map +0 -1
- package/dist/esm/Pull.js +0 -41
- package/dist/esm/Pull.js.map +0 -1
- package/dist/esm/Push.js +0 -159
- package/dist/esm/Push.js.map +0 -1
- package/dist/esm/RefArray.js +0 -234
- package/dist/esm/RefArray.js.map +0 -1
- package/dist/esm/RefChunk.js +0 -196
- package/dist/esm/RefChunk.js.map +0 -1
- package/dist/esm/RefHashMap.js +0 -176
- package/dist/esm/RefHashMap.js.map +0 -1
- package/dist/esm/RefHashSet.js +0 -86
- package/dist/esm/RefHashSet.js.map +0 -1
- package/dist/esm/RefSubject.js +0 -1076
- package/dist/esm/RefSubject.js.map +0 -1
- package/dist/esm/Sink.js +0 -673
- package/dist/esm/Sink.js.map +0 -1
- package/dist/esm/Stream.js +0 -76
- package/dist/esm/Stream.js.map +0 -1
- package/dist/esm/Subject.js +0 -198
- package/dist/esm/Subject.js.map +0 -1
- package/dist/esm/TypeId.js +0 -26
- package/dist/esm/TypeId.js.map +0 -1
- package/dist/esm/Typeclass.js +0 -375
- package/dist/esm/Typeclass.js.map +0 -1
- package/dist/esm/Versioned.js +0 -149
- package/dist/esm/Versioned.js.map +0 -1
- package/dist/esm/index.js +0 -111
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/internal/DeferredRef.js +0 -57
- package/dist/esm/internal/DeferredRef.js.map +0 -1
- package/dist/esm/internal/UnionToTuple.js +0 -2
- package/dist/esm/internal/UnionToTuple.js.map +0 -1
- package/dist/esm/internal/bounds.js +0 -13
- package/dist/esm/internal/bounds.js.map +0 -1
- package/dist/esm/internal/core.js +0 -1647
- package/dist/esm/internal/core.js.map +0 -1
- package/dist/esm/internal/diff.js +0 -92
- package/dist/esm/internal/diff.js.map +0 -1
- package/dist/esm/internal/effect-loop-operator.js +0 -269
- package/dist/esm/internal/effect-loop-operator.js.map +0 -1
- package/dist/esm/internal/effect-operator.js +0 -134
- package/dist/esm/internal/effect-operator.js.map +0 -1
- package/dist/esm/internal/effect-producer.js +0 -47
- package/dist/esm/internal/effect-producer.js.map +0 -1
- package/dist/esm/internal/helpers.js +0 -299
- package/dist/esm/internal/helpers.js.map +0 -1
- package/dist/esm/internal/keyed.js +0 -153
- package/dist/esm/internal/keyed.js.map +0 -1
- package/dist/esm/internal/loop-operator.js +0 -186
- package/dist/esm/internal/loop-operator.js.map +0 -1
- package/dist/esm/internal/operator.js +0 -68
- package/dist/esm/internal/operator.js.map +0 -1
- package/dist/esm/internal/protos.js +0 -39
- package/dist/esm/internal/protos.js.map +0 -1
- package/dist/esm/internal/provide.js +0 -72
- package/dist/esm/internal/provide.js.map +0 -1
- package/dist/esm/internal/requestIdleCallback.js +0 -16
- package/dist/esm/internal/requestIdleCallback.js.map +0 -1
- package/dist/esm/internal/share.js +0 -62
- package/dist/esm/internal/share.js.map +0 -1
- package/dist/esm/internal/strategies.js +0 -8
- package/dist/esm/internal/strategies.js.map +0 -1
- package/dist/esm/internal/sync-operator.js +0 -95
- package/dist/esm/internal/sync-operator.js.map +0 -1
- package/dist/esm/internal/sync-producer.js +0 -90
- package/dist/esm/internal/sync-producer.js.map +0 -1
- package/dist/esm/internal/withKey.js +0 -56
- package/dist/esm/internal/withKey.js.map +0 -1
- package/dist/esm/package.json +0 -4
- package/src/AsyncData.ts +0 -453
- package/src/Emitter.ts +0 -59
- package/src/Form.ts +0 -489
- package/src/FormEntry.ts +0 -214
- package/src/Idle.ts +0 -294
- package/src/Match.ts +0 -314
- package/src/Pull.ts +0 -95
- package/src/RefArray.ts +0 -514
- package/src/RefChunk.ts +0 -407
- package/src/RefHashMap.ts +0 -335
- package/src/RefHashSet.ts +0 -179
- package/src/Stream.ts +0 -140
- package/src/TypeId.ts +0 -59
- package/src/Typeclass.ts +0 -459
- package/src/internal/DeferredRef.ts +0 -72
- package/src/internal/UnionToTuple.ts +0 -11
- package/src/internal/bounds.ts +0 -21
- package/src/internal/core.ts +0 -3091
- package/src/internal/diff.ts +0 -171
- package/src/internal/effect-loop-operator.ts +0 -466
- package/src/internal/effect-operator.ts +0 -317
- package/src/internal/effect-producer.ts +0 -125
- package/src/internal/helpers.ts +0 -538
- package/src/internal/keyed.ts +0 -235
- package/src/internal/loop-operator.ts +0 -266
- package/src/internal/operator.ts +0 -87
- package/src/internal/protos.ts +0 -57
- package/src/internal/provide.ts +0 -151
- package/src/internal/requestIdleCallback.ts +0 -19
- package/src/internal/share.ts +0 -97
- package/src/internal/strategies.ts +0 -15
- package/src/internal/sync-operator.ts +0 -166
- package/src/internal/sync-producer.ts +0 -148
- package/src/internal/withKey.ts +0 -82
- /package/dist/{dts → Fx}/internal/UnionToTuple.d.ts +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { dual, flow } from "effect/Function";
|
|
2
|
+
import { fromEffect } from "../constructors/fromEffect.js";
|
|
3
|
+
import { flatMapConcurrently } from "./flatMapConcurrently.js";
|
|
4
|
+
/**
|
|
5
|
+
* Maps each element of an Fx to an Effect, running them concurrently with a limit.
|
|
6
|
+
*
|
|
7
|
+
* @param f - A function that maps an element `A` to an `Effect<B>`.
|
|
8
|
+
* @param concurrency - The maximum number of concurrent effects.
|
|
9
|
+
* @returns An `Fx` that emits the results of the effects.
|
|
10
|
+
* @since 1.0.0
|
|
11
|
+
* @category combinators
|
|
12
|
+
*/
|
|
13
|
+
export const flatMapConcurrentlyEffect = dual(3, (self, f, concurrency) => flatMapConcurrently(self, flow(f, fromEffect), concurrency));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type * as Effect from "effect/Effect";
|
|
2
|
+
import type * as Scope from "effect/Scope";
|
|
3
|
+
import type { Fx } from "../Fx.js";
|
|
4
|
+
/**
|
|
5
|
+
* Type definition for flatMapEffect functions to support variable arguments.
|
|
6
|
+
* @since 1.0.0
|
|
7
|
+
* @category types
|
|
8
|
+
*/
|
|
9
|
+
export type FlatMapEffectLike<Args extends ReadonlyArray<any> = []> = {
|
|
10
|
+
<A, B, E2, R2>(f: (a: A) => Effect.Effect<B, E2, R2>, ...args: Args): <E, R>(self: Fx<A, E, R>) => Fx<B, E | E2, R | R2 | Scope.Scope>;
|
|
11
|
+
<A, E, R, B, E2, R2>(self: Fx<A, E, R>, f: (a: A) => Effect.Effect<B, E2, R2>, ...args: Args): Fx<B, E | E2, R | R2 | Scope.Scope>;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Maps each element of an Fx to an Effect, and merges the results.
|
|
15
|
+
*
|
|
16
|
+
* The effects are run concurrently.
|
|
17
|
+
*
|
|
18
|
+
* @param f - A function that maps an element `A` to an `Effect<B>`.
|
|
19
|
+
* @returns An `Fx` that emits the results of the effects.
|
|
20
|
+
* @since 1.0.0
|
|
21
|
+
* @category combinators
|
|
22
|
+
*/
|
|
23
|
+
export declare const flatMapEffect: FlatMapEffectLike;
|
|
24
|
+
//# sourceMappingURL=flatMapEffect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flatMapEffect.d.ts","sourceRoot":"","sources":["../../../src/Fx/combinators/flatMapEffect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAE7C,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAGnC;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,CAAC,IAAI,SAAS,aAAa,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI;IACpE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EACX,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EACrC,GAAG,IAAI,EAAE,IAAI,GACZ,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAEpE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EACjB,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EACjB,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EACrC,GAAG,IAAI,EAAE,IAAI,GACZ,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,EAAE,iBAM3B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { dual, flow } from "effect/Function";
|
|
2
|
+
import { fromEffect } from "../constructors/fromEffect.js";
|
|
3
|
+
import { flatMap } from "./flatMap.js";
|
|
4
|
+
/**
|
|
5
|
+
* Maps each element of an Fx to an Effect, and merges the results.
|
|
6
|
+
*
|
|
7
|
+
* The effects are run concurrently.
|
|
8
|
+
*
|
|
9
|
+
* @param f - A function that maps an element `A` to an `Effect<B>`.
|
|
10
|
+
* @returns An `Fx` that emits the results of the effects.
|
|
11
|
+
* @since 1.0.0
|
|
12
|
+
* @category combinators
|
|
13
|
+
*/
|
|
14
|
+
export const flatMapEffect = dual(2, (self, f) => flatMap(self, flow(f, fromEffect)));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Fx } from "../Fx.js";
|
|
2
|
+
/**
|
|
3
|
+
* Flips the error and success channels of an Fx.
|
|
4
|
+
*
|
|
5
|
+
* @param fx - The `Fx` stream.
|
|
6
|
+
* @returns An `Fx` where errors are successes and successes are errors.
|
|
7
|
+
* @since 1.0.0
|
|
8
|
+
* @category combinators
|
|
9
|
+
*/
|
|
10
|
+
export declare const flip: <A, E, R>(fx: Fx<A, E, R>) => Fx<E, A, R>;
|
|
11
|
+
//# sourceMappingURL=flip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flip.d.ts","sourceRoot":"","sources":["../../../src/Fx/combinators/flip.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAEnC;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as sinkCore from "../../Sink/combinators.js";
|
|
2
|
+
import { make } from "../constructors/make.js";
|
|
3
|
+
/**
|
|
4
|
+
* Flips the error and success channels of an Fx.
|
|
5
|
+
*
|
|
6
|
+
* @param fx - The `Fx` stream.
|
|
7
|
+
* @returns An `Fx` where errors are successes and successes are errors.
|
|
8
|
+
* @since 1.0.0
|
|
9
|
+
* @category combinators
|
|
10
|
+
*/
|
|
11
|
+
export const flip = (fx) => make((sink) => fx.run(sinkCore.flip(sink)));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import type { Fx } from "../Fx.js";
|
|
3
|
+
/** Extract error type from Yieldable (Effect v4) */
|
|
4
|
+
type _YE<Y> = Y extends Effect.Yieldable<any, any, infer E, any> ? E : never;
|
|
5
|
+
/** Extract services type from Yieldable (Effect v4) */
|
|
6
|
+
type _YS<Y> = Y extends Effect.Yieldable<any, any, any, infer R> ? R : never;
|
|
7
|
+
/**
|
|
8
|
+
* Creates an Fx using a generator function (Effect.gen style).
|
|
9
|
+
*
|
|
10
|
+
* This allows writing Fx code in a synchronous-looking style, using `yield*` to composition.
|
|
11
|
+
* Note: The generator yields Effects, and the result is an Fx.
|
|
12
|
+
*
|
|
13
|
+
* @param f - The generator function.
|
|
14
|
+
* @returns An `Fx` representing the result of the generator.
|
|
15
|
+
* @since 1.0.0
|
|
16
|
+
* @category combinators
|
|
17
|
+
*/
|
|
18
|
+
export declare const gen: <Yield extends Effect.Yieldable<any, any, any, any>, Return extends Fx.Any>(f: () => Generator<Yield, Return, any>) => Fx<Fx.Success<Return>, Fx.Error<Return> | _YE<Yield>, Fx.Services<Return> | _YS<Yield>>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=gen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gen.d.ts","sourceRoot":"","sources":["../../../src/Fx/combinators/gen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAGnC,oDAAoD;AACpD,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAC7E,uDAAuD;AACvD,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAE7E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,GAAG,GAAI,KAAK,SAAS,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,SAAS,EAAE,CAAC,GAAG,EAC3F,GAAG,MAAM,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,KACrC,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAC3D,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import { unwrap } from "./unwrap.js";
|
|
3
|
+
/**
|
|
4
|
+
* Creates an Fx using a generator function (Effect.gen style).
|
|
5
|
+
*
|
|
6
|
+
* This allows writing Fx code in a synchronous-looking style, using `yield*` to composition.
|
|
7
|
+
* Note: The generator yields Effects, and the result is an Fx.
|
|
8
|
+
*
|
|
9
|
+
* @param f - The generator function.
|
|
10
|
+
* @returns An `Fx` representing the result of the generator.
|
|
11
|
+
* @since 1.0.0
|
|
12
|
+
* @category combinators
|
|
13
|
+
*/
|
|
14
|
+
export const gen = (f) => unwrap(Effect.gen(f));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import type * as Scope from "effect/Scope";
|
|
3
|
+
import type { Fx } from "../Fx.js";
|
|
4
|
+
/** Extract error type from Yieldable (Effect v4) */
|
|
5
|
+
type _YE<Y> = Y extends Effect.Yieldable<any, any, infer E, any> ? E : never;
|
|
6
|
+
/** Extract services type from Yieldable (Effect v4) */
|
|
7
|
+
type _YS<Y> = Y extends Effect.Yieldable<any, any, any, infer R> ? R : never;
|
|
8
|
+
/**
|
|
9
|
+
* Creates a scoped Fx using a generator function.
|
|
10
|
+
*
|
|
11
|
+
* Similar to `gen`, but also handles resource management via Scope.
|
|
12
|
+
*
|
|
13
|
+
* @param f - The generator function.
|
|
14
|
+
* @returns An `Fx` representing the result of the generator.
|
|
15
|
+
* @since 1.0.0
|
|
16
|
+
* @category combinators
|
|
17
|
+
*/
|
|
18
|
+
export declare const genScoped: <Yield extends Effect.Yieldable<any, any, any, any>, A, E, R>(f: () => Generator<Yield, Fx<A, E, R>, any>) => Fx<A, E | _YE<Yield>, Exclude<R | _YS<Yield>, Scope.Scope>>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=genScoped.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"genScoped.d.ts","sourceRoot":"","sources":["../../../src/Fx/combinators/genScoped.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAGnC,oDAAoD;AACpD,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAC7E,uDAAuD;AACvD,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAE7E;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,GAAI,KAAK,SAAS,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EACnF,GAAG,MAAM,SAAS,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,KAC1C,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CACzB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import { unwrapScoped } from "./unwrapScoped.js";
|
|
3
|
+
/**
|
|
4
|
+
* Creates a scoped Fx using a generator function.
|
|
5
|
+
*
|
|
6
|
+
* Similar to `gen`, but also handles resource management via Scope.
|
|
7
|
+
*
|
|
8
|
+
* @param f - The generator function.
|
|
9
|
+
* @returns An `Fx` representing the result of the generator.
|
|
10
|
+
* @since 1.0.0
|
|
11
|
+
* @category combinators
|
|
12
|
+
*/
|
|
13
|
+
export const genScoped = (f) => unwrapScoped(Effect.gen(f));
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export * from "./catch.js";
|
|
2
|
+
export * from "./changesWithEffect.js";
|
|
3
|
+
export * from "./causes.js";
|
|
4
|
+
export * from "./compact.js";
|
|
5
|
+
export * from "./continueWith.js";
|
|
6
|
+
export * from "./dropUntil.js";
|
|
7
|
+
export * from "./additive.js";
|
|
8
|
+
export * from "./ensuring.js";
|
|
9
|
+
export * from "./exhaustLatestMap.js";
|
|
10
|
+
export * from "./exhaustLatestMapEffect.js";
|
|
11
|
+
export * from "./exhaustMap.js";
|
|
12
|
+
export * from "./exhaustMapEffect.js";
|
|
13
|
+
export * from "./exit.js";
|
|
14
|
+
export * from "./filter.js";
|
|
15
|
+
export * from "./filterEffect.js";
|
|
16
|
+
export * from "./filterMap.js";
|
|
17
|
+
export * from "./filterMapEffect.js";
|
|
18
|
+
export * from "./filterMapLoop.js";
|
|
19
|
+
export * from "./filterMapLoopCause.js";
|
|
20
|
+
export * from "./filterMapLoopCauseEffect.js";
|
|
21
|
+
export * from "./filterMapLoopEffect.js";
|
|
22
|
+
export * from "./flatMap.js";
|
|
23
|
+
export * from "./flatMapConcurrently.js";
|
|
24
|
+
export * from "./flatMapConcurrentlyEffect.js";
|
|
25
|
+
export * from "./flatMapEffect.js";
|
|
26
|
+
export * from "./flip.js";
|
|
27
|
+
export * from "./gen.js";
|
|
28
|
+
export * from "./genScoped.js";
|
|
29
|
+
export * from "./keyed.js";
|
|
30
|
+
export * from "./loop.js";
|
|
31
|
+
export * from "./loopCause.js";
|
|
32
|
+
export * from "./loopCauseEffect.js";
|
|
33
|
+
export * from "./loopEffect.js";
|
|
34
|
+
export * from "./map.js";
|
|
35
|
+
export * from "./mapBoth.js";
|
|
36
|
+
export * from "./mapEffect.js";
|
|
37
|
+
export * from "./mapError.js";
|
|
38
|
+
export * from "./mergeAll.js";
|
|
39
|
+
export * from "./mergeOrdered.js";
|
|
40
|
+
export * from "./onError.js";
|
|
41
|
+
export * from "./onExit.js";
|
|
42
|
+
export * from "./onInterrupt.js";
|
|
43
|
+
export * from "./provide.js";
|
|
44
|
+
export * from "./result.js";
|
|
45
|
+
export * from "./scan.js";
|
|
46
|
+
export * from "./skip.js";
|
|
47
|
+
export * from "./skipRepeats.js";
|
|
48
|
+
export * from "./skipWhile.js";
|
|
49
|
+
export * from "./skipRepeatsWith.js";
|
|
50
|
+
export * from "./slice.js";
|
|
51
|
+
export * from "./switchMap.js";
|
|
52
|
+
export * from "./switchMapEffect.js";
|
|
53
|
+
export * from "./take.js";
|
|
54
|
+
export * from "./takeUntil.js";
|
|
55
|
+
export * from "./takeWhile.js";
|
|
56
|
+
export * from "./tapEffect.js";
|
|
57
|
+
export * from "./tuple.js";
|
|
58
|
+
export * from "./unwrap.js";
|
|
59
|
+
export * from "./unwrapScoped.js";
|
|
60
|
+
export * from "./when.js";
|
|
61
|
+
export * from "./zip.js";
|
|
62
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Fx/combinators/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export * from "./catch.js";
|
|
2
|
+
export * from "./changesWithEffect.js";
|
|
3
|
+
export * from "./causes.js";
|
|
4
|
+
export * from "./compact.js";
|
|
5
|
+
export * from "./continueWith.js";
|
|
6
|
+
export * from "./dropUntil.js";
|
|
7
|
+
export * from "./additive.js";
|
|
8
|
+
export * from "./ensuring.js";
|
|
9
|
+
export * from "./exhaustLatestMap.js";
|
|
10
|
+
export * from "./exhaustLatestMapEffect.js";
|
|
11
|
+
export * from "./exhaustMap.js";
|
|
12
|
+
export * from "./exhaustMapEffect.js";
|
|
13
|
+
export * from "./exit.js";
|
|
14
|
+
export * from "./filter.js";
|
|
15
|
+
export * from "./filterEffect.js";
|
|
16
|
+
export * from "./filterMap.js";
|
|
17
|
+
export * from "./filterMapEffect.js";
|
|
18
|
+
export * from "./filterMapLoop.js";
|
|
19
|
+
export * from "./filterMapLoopCause.js";
|
|
20
|
+
export * from "./filterMapLoopCauseEffect.js";
|
|
21
|
+
export * from "./filterMapLoopEffect.js";
|
|
22
|
+
export * from "./flatMap.js";
|
|
23
|
+
export * from "./flatMapConcurrently.js";
|
|
24
|
+
export * from "./flatMapConcurrentlyEffect.js";
|
|
25
|
+
export * from "./flatMapEffect.js";
|
|
26
|
+
export * from "./flip.js";
|
|
27
|
+
export * from "./gen.js";
|
|
28
|
+
export * from "./genScoped.js";
|
|
29
|
+
export * from "./keyed.js";
|
|
30
|
+
export * from "./loop.js";
|
|
31
|
+
export * from "./loopCause.js";
|
|
32
|
+
export * from "./loopCauseEffect.js";
|
|
33
|
+
export * from "./loopEffect.js";
|
|
34
|
+
export * from "./map.js";
|
|
35
|
+
export * from "./mapBoth.js";
|
|
36
|
+
export * from "./mapEffect.js";
|
|
37
|
+
export * from "./mapError.js";
|
|
38
|
+
export * from "./mergeAll.js";
|
|
39
|
+
export * from "./mergeOrdered.js";
|
|
40
|
+
export * from "./onError.js";
|
|
41
|
+
export * from "./onExit.js";
|
|
42
|
+
export * from "./onInterrupt.js";
|
|
43
|
+
export * from "./provide.js";
|
|
44
|
+
export * from "./result.js";
|
|
45
|
+
export * from "./scan.js";
|
|
46
|
+
export * from "./skip.js";
|
|
47
|
+
export * from "./skipRepeats.js";
|
|
48
|
+
export * from "./skipWhile.js";
|
|
49
|
+
export * from "./skipRepeatsWith.js";
|
|
50
|
+
export * from "./slice.js";
|
|
51
|
+
export * from "./switchMap.js";
|
|
52
|
+
export * from "./switchMapEffect.js";
|
|
53
|
+
export * from "./take.js";
|
|
54
|
+
export * from "./takeUntil.js";
|
|
55
|
+
export * from "./takeWhile.js";
|
|
56
|
+
export * from "./tapEffect.js";
|
|
57
|
+
export * from "./tuple.js";
|
|
58
|
+
export * from "./unwrap.js";
|
|
59
|
+
export * from "./unwrapScoped.js";
|
|
60
|
+
export * from "./when.js";
|
|
61
|
+
export * from "./zip.js";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as Duration from "effect/Duration";
|
|
2
|
+
import * as Scope from "effect/Scope";
|
|
3
|
+
import * as RefSubject from "../../RefSubject/RefSubject.js";
|
|
4
|
+
import type { Fx } from "../Fx.js";
|
|
5
|
+
/**
|
|
6
|
+
* Configuration options for the `keyed` combinator.
|
|
7
|
+
* @since 1.0.0
|
|
8
|
+
* @category models
|
|
9
|
+
*/
|
|
10
|
+
export interface KeyedOptions<A, B, C, E2, R2> {
|
|
11
|
+
/**
|
|
12
|
+
* Function to extract a unique key from an element.
|
|
13
|
+
*/
|
|
14
|
+
readonly getKey: (a: A) => B;
|
|
15
|
+
/**
|
|
16
|
+
* Function to transform a value into an Fx, receiving a RefSubject of the value.
|
|
17
|
+
* This allows the transformation to react to updates of the same item (same key).
|
|
18
|
+
*/
|
|
19
|
+
readonly onValue: (ref: RefSubject.RefSubject<A>, key: B) => Fx<C, E2, R2 | Scope.Scope>;
|
|
20
|
+
/**
|
|
21
|
+
* Optional debounce duration for emission.
|
|
22
|
+
*/
|
|
23
|
+
readonly debounce?: Duration.Input;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Efficiently transforms a list of values into a list of Fx streams, using keys to track identity.
|
|
27
|
+
*
|
|
28
|
+
* This is crucial for performance when rendering lists or managing collections of stateful entities.
|
|
29
|
+
* When the input list changes:
|
|
30
|
+
* - New keys cause `onValue` to be called.
|
|
31
|
+
* - Existing keys have their `RefSubject` updated with the new value.
|
|
32
|
+
* - Removed keys have their corresponding Fx and scope cleaned up.
|
|
33
|
+
*
|
|
34
|
+
* @param fx - An `Fx` emitting an array of values.
|
|
35
|
+
* @param options - Configuration options.
|
|
36
|
+
* @returns An `Fx` emitting an array of results.
|
|
37
|
+
* @since 1.0.0
|
|
38
|
+
* @category combinators
|
|
39
|
+
*/
|
|
40
|
+
export declare const keyed: {
|
|
41
|
+
<A, B extends PropertyKey, C, E2, R2>(options: KeyedOptions<A, B, C, E2, R2>): <E, R>(fx: Fx<ReadonlyArray<A>, E, R>) => Fx<ReadonlyArray<C>, E | E2, R | R2 | Scope.Scope>;
|
|
42
|
+
<A, E, R, B extends PropertyKey, C, E2, R2>(fx: Fx<ReadonlyArray<A>, E, R>, options: KeyedOptions<A, B, C, E2, R2>): Fx<ReadonlyArray<C>, E | E2, R | R2 | Scope.Scope>;
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=keyed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyed.d.ts","sourceRoot":"","sources":["../../../src/Fx/combinators/keyed.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAQ5C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAItC,OAAO,KAAK,UAAU,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAMnC;;;;GAIG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE;IAC3C;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IACzF;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC;CACpC;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,KAAK,EAAE;IAClB,CAAC,CAAC,EAAE,CAAC,SAAS,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAClC,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,GACrC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAChG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EACxC,EAAE,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAC9B,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,GACrC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;CAetD,CAAC"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import * as Clock from "effect/Clock";
|
|
2
|
+
import * as Duration from "effect/Duration";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Exit from "effect/Exit";
|
|
5
|
+
import * as Fiber from "effect/Fiber";
|
|
6
|
+
import { dual, identity } from "effect/Function";
|
|
7
|
+
import * as Option from "effect/Option";
|
|
8
|
+
import { pipeArguments } from "effect/Pipeable";
|
|
9
|
+
import { MaxOpsBeforeYield } from "effect/Scheduler";
|
|
10
|
+
import * as Scope from "effect/Scope";
|
|
11
|
+
import * as ServiceMap from "effect/ServiceMap";
|
|
12
|
+
import * as SynchronizedRef from "effect/SynchronizedRef";
|
|
13
|
+
import * as RefSubject from "../../RefSubject/RefSubject.js";
|
|
14
|
+
import * as Sink from "../../Sink/Sink.js";
|
|
15
|
+
import { diff, getKeyMap } from "../internal/diff.js";
|
|
16
|
+
import { withScopedFork } from "../internal/scope.js";
|
|
17
|
+
import { FxTypeId } from "../TypeId.js";
|
|
18
|
+
/**
|
|
19
|
+
* Efficiently transforms a list of values into a list of Fx streams, using keys to track identity.
|
|
20
|
+
*
|
|
21
|
+
* This is crucial for performance when rendering lists or managing collections of stateful entities.
|
|
22
|
+
* When the input list changes:
|
|
23
|
+
* - New keys cause `onValue` to be called.
|
|
24
|
+
* - Existing keys have their `RefSubject` updated with the new value.
|
|
25
|
+
* - Removed keys have their corresponding Fx and scope cleaned up.
|
|
26
|
+
*
|
|
27
|
+
* @param fx - An `Fx` emitting an array of values.
|
|
28
|
+
* @param options - Configuration options.
|
|
29
|
+
* @returns An `Fx` emitting an array of results.
|
|
30
|
+
* @since 1.0.0
|
|
31
|
+
* @category combinators
|
|
32
|
+
*/
|
|
33
|
+
export const keyed = dual(2, function keyed(fx, options) {
|
|
34
|
+
return new Keyed(fx, options);
|
|
35
|
+
});
|
|
36
|
+
const StateContext = ServiceMap.Service("@services/StateContext");
|
|
37
|
+
const VARIANCE = {
|
|
38
|
+
_A: identity,
|
|
39
|
+
_E: identity,
|
|
40
|
+
_R: identity,
|
|
41
|
+
};
|
|
42
|
+
class Keyed {
|
|
43
|
+
[FxTypeId] = VARIANCE;
|
|
44
|
+
fx;
|
|
45
|
+
options;
|
|
46
|
+
constructor(fx, options) {
|
|
47
|
+
this.fx = fx;
|
|
48
|
+
this.options = options;
|
|
49
|
+
}
|
|
50
|
+
run(sink) {
|
|
51
|
+
return Effect.withFiber((fiber) => runKeyed(this.fx, this.options, sink, fiber.id)).pipe(Effect.provideService(MaxOpsBeforeYield, Infinity));
|
|
52
|
+
}
|
|
53
|
+
pipe() {
|
|
54
|
+
return pipeArguments(this, arguments);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function emptyKeyedState() {
|
|
58
|
+
return {
|
|
59
|
+
entries: new Map(),
|
|
60
|
+
indices: new Map(),
|
|
61
|
+
previousValues: [],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function runKeyed(fx, options, sink, id) {
|
|
65
|
+
return withDebounceFork((debounceFork, parentScope) => {
|
|
66
|
+
const state = emptyKeyedState();
|
|
67
|
+
const emit = Effect.suspend(() => sink.onSuccess(getReadyIndices(state)));
|
|
68
|
+
const scheduleNextEmit = debounceFork(emit);
|
|
69
|
+
let first = true;
|
|
70
|
+
let previousKeyMap = new Map();
|
|
71
|
+
return fx.run(Sink.make(sink.onFailure, Effect.fn(function* (values) {
|
|
72
|
+
const previous = state.previousValues;
|
|
73
|
+
const keyMap = getKeyMap(values, options.getKey);
|
|
74
|
+
let changed = first;
|
|
75
|
+
first = false;
|
|
76
|
+
for (const patch of diff(previous, values, {
|
|
77
|
+
getKey: options.getKey,
|
|
78
|
+
previousKeyMap,
|
|
79
|
+
keyMap,
|
|
80
|
+
})) {
|
|
81
|
+
if (patch._tag === "Remove") {
|
|
82
|
+
changed = true;
|
|
83
|
+
yield* removeValue(state, patch, state.entries.get(patch.key));
|
|
84
|
+
}
|
|
85
|
+
else if (patch._tag === "Add") {
|
|
86
|
+
changed = true;
|
|
87
|
+
yield* addValue({
|
|
88
|
+
state,
|
|
89
|
+
values,
|
|
90
|
+
patch,
|
|
91
|
+
id,
|
|
92
|
+
parentScope,
|
|
93
|
+
keyedOptions: options,
|
|
94
|
+
sink,
|
|
95
|
+
scheduleNextEmit,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
yield* updateValue(state, values, patch);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
state.previousValues = values;
|
|
103
|
+
previousKeyMap = keyMap;
|
|
104
|
+
if (changed) {
|
|
105
|
+
yield* scheduleNextEmit;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
yield* adjustTime();
|
|
109
|
+
}
|
|
110
|
+
})));
|
|
111
|
+
}, options.debounce || 1);
|
|
112
|
+
}
|
|
113
|
+
class KeyedEntry {
|
|
114
|
+
value;
|
|
115
|
+
index;
|
|
116
|
+
output;
|
|
117
|
+
ref;
|
|
118
|
+
interrupt;
|
|
119
|
+
constructor(value, index, output, ref, interrupt) {
|
|
120
|
+
this.value = value;
|
|
121
|
+
this.index = index;
|
|
122
|
+
this.output = output;
|
|
123
|
+
this.ref = ref;
|
|
124
|
+
this.interrupt = interrupt;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function getReadyIndices({ entries, indices, previousValues, }) {
|
|
128
|
+
const output = [];
|
|
129
|
+
for (let i = 0; i < previousValues.length; ++i) {
|
|
130
|
+
const key = indices.get(i);
|
|
131
|
+
if (key === undefined)
|
|
132
|
+
break;
|
|
133
|
+
const entry = entries.get(key);
|
|
134
|
+
if (Option.isSome(entry.output)) {
|
|
135
|
+
output.push(entry.output.value);
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return output;
|
|
142
|
+
}
|
|
143
|
+
function* addValue(options) {
|
|
144
|
+
const { id, keyedOptions, parentScope, patch, scheduleNextEmit, sink, state, values } = options;
|
|
145
|
+
const { entries, indices } = state;
|
|
146
|
+
const value = values[patch.index];
|
|
147
|
+
const childScope = yield* Scope.fork(parentScope, "sequential");
|
|
148
|
+
const ref = yield* RefSubject.make(Effect.sync(() => entry.value)).pipe(Effect.provideService(Scope.Scope, childScope));
|
|
149
|
+
const entry = new KeyedEntry(value, patch.index, Option.none(), ref, Scope.close(childScope, Exit.interrupt(id)));
|
|
150
|
+
entries.set(patch.key, entry);
|
|
151
|
+
indices.set(patch.index, patch.key);
|
|
152
|
+
yield* Effect.forkIn(keyedOptions
|
|
153
|
+
.onValue(ref, patch.key)
|
|
154
|
+
.run(Sink.make((cause) => sink.onFailure(cause), (output) => {
|
|
155
|
+
entry.output = Option.some(output);
|
|
156
|
+
return scheduleNextEmit;
|
|
157
|
+
}))
|
|
158
|
+
.pipe(Effect.provideService(Scope.Scope, childScope)), parentScope);
|
|
159
|
+
}
|
|
160
|
+
function removeValue({ entries, indices }, patch, entry) {
|
|
161
|
+
entries.delete(patch.key);
|
|
162
|
+
indices.delete(patch.index);
|
|
163
|
+
return entry.interrupt;
|
|
164
|
+
}
|
|
165
|
+
function updateValue({ entries, indices }, values, patch) {
|
|
166
|
+
const key = patch.key;
|
|
167
|
+
const entry = entries.get(key);
|
|
168
|
+
if (patch._tag === "Moved") {
|
|
169
|
+
const currentKey = indices.get(patch.index);
|
|
170
|
+
if (currentKey === key) {
|
|
171
|
+
indices.delete(patch.index);
|
|
172
|
+
}
|
|
173
|
+
indices.set(patch.to, key);
|
|
174
|
+
entry.value = values[(entry.index = patch.to)];
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
entry.value = values[(entry.index = patch.index)];
|
|
178
|
+
}
|
|
179
|
+
return RefSubject.set(entry.ref, entry.value);
|
|
180
|
+
}
|
|
181
|
+
function withDebounceFork(f, duration) {
|
|
182
|
+
return withScopedFork((fork, scope) => Effect.flatMap(SynchronizedRef.make(Option.none()), (ref) => Effect.flatMap(f((effect) => SynchronizedRef.updateEffect(ref, Option.match({
|
|
183
|
+
onNone: () => Effect.asSome(fork(Effect.delay(effect, duration))),
|
|
184
|
+
onSome: (fiber) => Fiber.interrupt(fiber).pipe(Effect.flatMap(() => fork(Effect.delay(effect, duration))), Effect.asSome),
|
|
185
|
+
})), scope), () => SynchronizedRef.updateEffect(ref, Option.match({
|
|
186
|
+
onNone: () => Effect.succeedNone,
|
|
187
|
+
onSome: (fiber) => Fiber.join(fiber).pipe(Effect.as(Option.none())),
|
|
188
|
+
})))), "sequential");
|
|
189
|
+
}
|
|
190
|
+
function* adjustTime() {
|
|
191
|
+
const services = yield* Effect.services();
|
|
192
|
+
const clock = ServiceMap.get(services, Clock.Clock);
|
|
193
|
+
if ("adjust" in clock) {
|
|
194
|
+
yield* clock.adjust(Duration.millis(1));
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
yield* clock.sleep(Duration.millis(1));
|
|
198
|
+
}
|
|
199
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Fx } from "../Fx.js";
|
|
2
|
+
/**
|
|
3
|
+
* Loops over an Fx with an accumulator, producing a new value for each element
|
|
4
|
+
* and updating the accumulator.
|
|
5
|
+
*
|
|
6
|
+
* @param seed - The initial value of the accumulator.
|
|
7
|
+
* @param f - A function that takes the accumulator and an element, returning a tuple of the emitted value and the new accumulator.
|
|
8
|
+
* @returns An `Fx` that emits the transformed values.
|
|
9
|
+
* @since 1.0.0
|
|
10
|
+
* @category combinators
|
|
11
|
+
*/
|
|
12
|
+
export declare const loop: {
|
|
13
|
+
<B, A, C>(seed: B, f: (acc: B, a: A) => readonly [C, B]): <E, R>(self: Fx<A, E, R>) => Fx<C, E, R>;
|
|
14
|
+
<A, E, R, B, C>(self: Fx<A, E, R>, seed: B, f: (acc: B, a: A) => readonly [C, B]): Fx<C, E, R>;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=loop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../../../src/Fx/combinators/loop.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAEnC;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI,EAAE;IACjB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EACN,IAAI,EAAE,CAAC,EACP,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GACnC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAE5C,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAKhG,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { dual } from "effect/Function";
|
|
2
|
+
import * as sinkCore from "../../Sink/combinators.js";
|
|
3
|
+
import { make } from "../constructors/make.js";
|
|
4
|
+
/**
|
|
5
|
+
* Loops over an Fx with an accumulator, producing a new value for each element
|
|
6
|
+
* and updating the accumulator.
|
|
7
|
+
*
|
|
8
|
+
* @param seed - The initial value of the accumulator.
|
|
9
|
+
* @param f - A function that takes the accumulator and an element, returning a tuple of the emitted value and the new accumulator.
|
|
10
|
+
* @returns An `Fx` that emits the transformed values.
|
|
11
|
+
* @since 1.0.0
|
|
12
|
+
* @category combinators
|
|
13
|
+
*/
|
|
14
|
+
export const loop = dual(3, (self, seed, f) => make((sink) => self.run(sinkCore.loop(sink, seed, f))));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as Cause from "effect/Cause";
|
|
2
|
+
import type { Fx } from "../Fx.js";
|
|
3
|
+
/**
|
|
4
|
+
* Loops over the failure causes of an Fx with an accumulator.
|
|
5
|
+
*
|
|
6
|
+
* @param seed - The initial state.
|
|
7
|
+
* @param f - The loop function for causes.
|
|
8
|
+
* @returns An `Fx` with transformed errors.
|
|
9
|
+
* @since 1.0.0
|
|
10
|
+
* @category combinators
|
|
11
|
+
*/
|
|
12
|
+
export declare const loopCause: {
|
|
13
|
+
<B, A, C>(seed: B, f: (acc: B, a: Cause.Cause<A>) => readonly [Cause.Cause<C>, B]): <E, R>(self: Fx<A, E, R>) => Fx<A, C, R>;
|
|
14
|
+
<A, E, R, B, C>(self: Fx<A, E, R>, seed: B, f: (acc: B, a: Cause.Cause<E>) => readonly [Cause.Cause<C>, B]): Fx<A, C, R>;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=loopCause.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loopCause.d.ts","sourceRoot":"","sources":["../../../src/Fx/combinators/loopCause.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAI3C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAEnC;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,EAAE;IACtB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EACN,IAAI,EAAE,CAAC,EACP,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAC7D,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAE5C,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EACZ,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EACjB,IAAI,EAAE,CAAC,EACP,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAC7D,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAQhB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { dual } from "effect/Function";
|
|
2
|
+
import * as sinkCore from "../../Sink/combinators.js";
|
|
3
|
+
import { make } from "../constructors/make.js";
|
|
4
|
+
/**
|
|
5
|
+
* Loops over the failure causes of an Fx with an accumulator.
|
|
6
|
+
*
|
|
7
|
+
* @param seed - The initial state.
|
|
8
|
+
* @param f - The loop function for causes.
|
|
9
|
+
* @returns An `Fx` with transformed errors.
|
|
10
|
+
* @since 1.0.0
|
|
11
|
+
* @category combinators
|
|
12
|
+
*/
|
|
13
|
+
export const loopCause = dual(3, (self, seed, f) => make((sink) => self.run(sinkCore.loopCause(sink, seed, f))));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as Cause from "effect/Cause";
|
|
2
|
+
import type * as Effect from "effect/Effect";
|
|
3
|
+
import type { Fx } from "../Fx.js";
|
|
4
|
+
/**
|
|
5
|
+
* Effectfully loops over the failure causes of an Fx with an accumulator.
|
|
6
|
+
*
|
|
7
|
+
* @param seed - The initial state.
|
|
8
|
+
* @param f - The effectful loop function for causes.
|
|
9
|
+
* @returns An `Fx` with transformed errors.
|
|
10
|
+
* @since 1.0.0
|
|
11
|
+
* @category combinators
|
|
12
|
+
*/
|
|
13
|
+
export declare const loopCauseEffect: {
|
|
14
|
+
<B, A, E, R2, C>(seed: B, f: (acc: B, a: Cause.Cause<A>) => Effect.Effect<readonly [Cause.Cause<C>, B], R2>): <R>(self: Fx<A, E, R>) => Fx<A, C | E, R | R2>;
|
|
15
|
+
<A, E, R, B, R2, C>(self: Fx<A, E, R>, seed: B, f: (acc: B, a: Cause.Cause<E>) => Effect.Effect<readonly [Cause.Cause<C>, B], E, R2>): Fx<A, C, R | R2>;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=loopCauseEffect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loopCauseEffect.d.ts","sourceRoot":"","sources":["../../../src/Fx/combinators/loopCauseEffect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAI7C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAEnC;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE;IAC5B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EACb,IAAI,EAAE,CAAC,EACP,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAChF,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;IAElD,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAChB,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EACjB,IAAI,EAAE,CAAC,EACP,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GACnF,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;CASrB,CAAC"}
|