@typed/fx 1.32.0 → 2.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +344 -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/catch.d.ts +53 -0
- package/dist/Fx/combinators/catch.d.ts.map +1 -0
- package/dist/Fx/combinators/catch.js +69 -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/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/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 +22 -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 +52 -0
- package/dist/Fx/combinators/index.d.ts.map +1 -0
- package/dist/Fx/combinators/index.js +51 -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/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/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 +23 -0
- package/dist/Fx/combinators/provide.d.ts.map +1 -0
- package/dist/Fx/combinators/provide.js +27 -0
- package/dist/Fx/combinators/skip.d.ts +14 -0
- package/dist/Fx/combinators/skip.d.ts.map +1 -0
- package/dist/Fx/combinators/skip.js +11 -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/slice.d.ts +23 -0
- package/dist/Fx/combinators/slice.d.ts.map +1 -0
- package/dist/Fx/combinators/slice.js +12 -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 +14 -0
- package/dist/Fx/combinators/take.d.ts.map +1 -0
- package/dist/Fx/combinators/take.js +11 -0
- package/dist/Fx/combinators/takeUntil.d.ts +28 -0
- package/dist/Fx/combinators/takeUntil.d.ts.map +1 -0
- package/dist/Fx/combinators/takeUntil.js +31 -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/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/{esm → Fx}/internal/DeferredRef.js +21 -15
- package/dist/Fx/internal/UnionToTuple.d.ts.map +1 -0
- package/dist/Fx/internal/UnionToTuple.js +1 -0
- package/dist/{dts → Fx}/internal/diff.d.ts +3 -1
- package/dist/Fx/internal/diff.d.ts.map +1 -0
- package/dist/{esm → Fx}/internal/diff.js +37 -23
- 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 +312 -0
- package/dist/Push/Push.d.ts.map +1 -0
- package/dist/Push/Push.js +289 -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/{dts → RefSubject}/RefArray.d.ts +68 -18
- package/dist/RefSubject/RefArray.d.ts.map +1 -0
- package/dist/{esm → RefSubject}/RefArray.js +80 -12
- 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/{dts → RefSubject}/RefChunk.d.ts +157 -71
- package/dist/RefSubject/RefChunk.d.ts.map +1 -0
- package/dist/{esm → RefSubject}/RefChunk.js +142 -52
- 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 +1010 -0
- package/dist/RefSubject/RefSubject.d.ts.map +1 -0
- package/dist/RefSubject/RefSubject.js +1310 -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 +171 -0
- package/dist/Sink/combinators.d.ts.map +1 -0
- package/dist/{esm/Sink.js → Sink/combinators.js} +265 -352
- 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 +176 -0
- package/dist/Versioned/Versioned.d.ts.map +1 -0
- package/dist/Versioned/Versioned.js +228 -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 +19 -192
- package/src/Fx/Fx.ts +164 -0
- package/src/Fx/TypeId.ts +25 -0
- package/src/Fx/combinators/catch.ts +165 -0
- package/src/Fx/combinators/causes.ts +23 -0
- package/src/Fx/combinators/compact.ts +15 -0
- package/src/Fx/combinators/continueWith.ts +78 -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 +36 -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 +51 -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/mapEffect.ts +32 -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 +62 -0
- package/src/Fx/combinators/skip.ts +20 -0
- package/src/Fx/combinators/skipRepeats.ts +15 -0
- package/src/Fx/combinators/skipRepeatsWith.ts +40 -0
- package/src/Fx/combinators/slice.ts +32 -0
- package/src/Fx/combinators/switchMap.ts +55 -0
- package/src/Fx/combinators/switchMapEffect.ts +25 -0
- package/src/Fx/combinators/take.ts +17 -0
- package/src/Fx/combinators/takeUntil.ts +50 -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/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.catch.test.ts +61 -0
- package/src/Fx.fn.test.ts +51 -0
- package/src/Fx.lifecycle.test.ts +80 -0
- package/src/Fx.test.ts +71 -0
- package/src/Fx.ts +1 -2591
- package/src/Push/Push.ts +903 -0
- package/src/Push/index.ts +1 -0
- package/src/Push.test.ts +26 -0
- package/src/Push.ts +1 -480
- package/src/{RefArray.ts → RefSubject/RefArray.ts} +246 -248
- 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 +2545 -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.test.ts +65 -0
- package/src/RefSubject.ts +1 -2488
- package/src/Sink/Sink.ts +159 -0
- package/src/Sink/combinators.ts +993 -0
- package/src/Sink/index.ts +2 -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 +521 -0
- package/src/Versioned/index.ts +1 -0
- package/src/Versioned.test.ts +23 -0
- package/src/Versioned.ts +1 -357
- package/src/index.ts +7 -130
- package/tsconfig.json +6 -0
- 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.map +0 -1
- 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.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.map +0 -1
- 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.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.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.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/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,22 @@
|
|
|
1
|
+
import { dual } from "effect/Function";
|
|
2
|
+
import * as sinkCore from "../../Sink/combinators.js";
|
|
3
|
+
import { make } from "../constructors/make.js";
|
|
4
|
+
import type { Fx } from "../Fx.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Filters elements of an Fx using a predicate function.
|
|
8
|
+
*
|
|
9
|
+
* @param f - A predicate function.
|
|
10
|
+
* @returns An `Fx` that emits only the elements for which `f` returns `true`.
|
|
11
|
+
* @since 1.0.0
|
|
12
|
+
* @category combinators
|
|
13
|
+
*/
|
|
14
|
+
export const filter: {
|
|
15
|
+
<A>(f: (a: A) => boolean): <E, R>(self: Fx<A, E, R>) => Fx<A, E, R>;
|
|
16
|
+
|
|
17
|
+
<A, E, R>(self: Fx<A, E, R>, f: (a: A) => boolean): Fx<A, E, R>;
|
|
18
|
+
} = dual(
|
|
19
|
+
2,
|
|
20
|
+
<A, E, R>(self: Fx<A, E, R>, f: (a: A) => boolean): Fx<A, E, R> =>
|
|
21
|
+
make<A, E, R>((sink) => self.run(sinkCore.filter(sink, f))),
|
|
22
|
+
);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type * as Effect from "effect/Effect";
|
|
2
|
+
import { dual } from "effect/Function";
|
|
3
|
+
import * as sinkCore from "../../Sink/combinators.js";
|
|
4
|
+
import { make } from "../constructors/make.js";
|
|
5
|
+
import type { Fx } from "../Fx.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Filters elements of an Fx using an effectful predicate function.
|
|
9
|
+
*
|
|
10
|
+
* @param f - An effectful predicate function.
|
|
11
|
+
* @returns An `Fx` that emits only the elements for which `f` returns `true`.
|
|
12
|
+
* @since 1.0.0
|
|
13
|
+
* @category combinators
|
|
14
|
+
*/
|
|
15
|
+
export const filterEffect: {
|
|
16
|
+
<A, E2, R2>(
|
|
17
|
+
f: (a: A) => Effect.Effect<boolean, E2, R2>,
|
|
18
|
+
): <E, R>(self: Fx<A, E | E2, R>) => Fx<A, E | E2, R | R2>;
|
|
19
|
+
|
|
20
|
+
<A, E, R, E2, R2>(
|
|
21
|
+
self: Fx<A, E | E2, R>,
|
|
22
|
+
f: (a: A) => Effect.Effect<boolean, E2, R2>,
|
|
23
|
+
): Fx<A, E | E2, R | R2>;
|
|
24
|
+
} = dual(
|
|
25
|
+
2,
|
|
26
|
+
<A, E, R, E2, R2>(
|
|
27
|
+
self: Fx<A, E, R>,
|
|
28
|
+
f: (a: A) => Effect.Effect<boolean, E2, R2>,
|
|
29
|
+
): Fx<A, E | E2, R | R2> =>
|
|
30
|
+
make<A, E | E2, R | R2>((sink) => self.run(sinkCore.filterEffect(f)(sink))),
|
|
31
|
+
);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { dual } from "effect/Function";
|
|
2
|
+
import type * as Option from "effect/Option";
|
|
3
|
+
import * as sinkCore from "../../Sink/combinators.js";
|
|
4
|
+
import { make } from "../constructors/make.js";
|
|
5
|
+
import type { Fx } from "../Fx.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Maps and filters elements of an Fx in a single operation.
|
|
9
|
+
*
|
|
10
|
+
* @param f - A function that returns an `Option` for each element.
|
|
11
|
+
* @returns An `Fx` that emits values for which `f` returns `Some`.
|
|
12
|
+
* @since 1.0.0
|
|
13
|
+
* @category combinators
|
|
14
|
+
*/
|
|
15
|
+
export const filterMap: {
|
|
16
|
+
<A, B>(f: (a: A) => Option.Option<B>): <E, R>(self: Fx<A, E, R>) => Fx<B, E, R>;
|
|
17
|
+
|
|
18
|
+
<A, E, R, B>(self: Fx<A, E, R>, f: (a: A) => Option.Option<B>): Fx<B, E, R>;
|
|
19
|
+
} = dual(
|
|
20
|
+
2,
|
|
21
|
+
<A, E, R, B>(self: Fx<A, E, R>, f: (a: A) => Option.Option<B>): Fx<B, E, R> =>
|
|
22
|
+
make<B, E, R>((sink) => self.run(sinkCore.filterMap(sink, f))),
|
|
23
|
+
);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type * as Effect from "effect/Effect";
|
|
2
|
+
import { dual } from "effect/Function";
|
|
3
|
+
import type * as Option from "effect/Option";
|
|
4
|
+
import * as sinkCore from "../../Sink/combinators.js";
|
|
5
|
+
import { make } from "../constructors/make.js";
|
|
6
|
+
import type { Fx } from "../Fx.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Maps and filters elements of an Fx using an effectful function.
|
|
10
|
+
*
|
|
11
|
+
* @param f - An effectful function that returns an `Option` for each element.
|
|
12
|
+
* @returns An `Fx` that emits values for which `f` returns `Some`.
|
|
13
|
+
* @since 1.0.0
|
|
14
|
+
* @category combinators
|
|
15
|
+
*/
|
|
16
|
+
export const filterMapEffect: {
|
|
17
|
+
<A, B, E2, R2>(
|
|
18
|
+
f: (a: A) => Effect.Effect<Option.Option<B>, E2, R2>,
|
|
19
|
+
): <E, R>(self: Fx<A, E | E2, R>) => Fx<B, E | E2, R | R2>;
|
|
20
|
+
|
|
21
|
+
<A, E, R, B, E2, R2>(
|
|
22
|
+
self: Fx<A, E | E2, R>,
|
|
23
|
+
f: (a: A) => Effect.Effect<Option.Option<B>, E2, R2>,
|
|
24
|
+
): Fx<B, E | E2, R | R2>;
|
|
25
|
+
} = dual(
|
|
26
|
+
2,
|
|
27
|
+
<A, E, R, B, E2, R2>(
|
|
28
|
+
self: Fx<A, E, R>,
|
|
29
|
+
f: (a: A) => Effect.Effect<Option.Option<B>, E2, R2>,
|
|
30
|
+
): Fx<B, E | E2, R | R2> =>
|
|
31
|
+
make<B, E | E2, R | R2>((sink) => self.run(sinkCore.filterMapEffect(f)(sink))),
|
|
32
|
+
);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { dual } from "effect/Function";
|
|
2
|
+
import type * as Option from "effect/Option";
|
|
3
|
+
import * as sinkCore from "../../Sink/combinators.js";
|
|
4
|
+
import { make } from "../constructors/make.js";
|
|
5
|
+
import type { Fx } from "../Fx.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Loops over an Fx with an accumulator, producing an optional new value for each element.
|
|
9
|
+
* If the function returns `None`, the element is filtered out.
|
|
10
|
+
*
|
|
11
|
+
* @param seed - The initial state.
|
|
12
|
+
* @param f - The loop function returning `Option<C>` and the new state.
|
|
13
|
+
* @returns An `Fx` emitting the transformed values.
|
|
14
|
+
* @since 1.0.0
|
|
15
|
+
* @category combinators
|
|
16
|
+
*/
|
|
17
|
+
export const filterMapLoop: {
|
|
18
|
+
<B, A, C>(
|
|
19
|
+
seed: B,
|
|
20
|
+
f: (acc: B, a: A) => readonly [Option.Option<C>, B],
|
|
21
|
+
): <E, R>(self: Fx<A, E, R>) => Fx<C, E, R>;
|
|
22
|
+
|
|
23
|
+
<A, E, R, B, C>(
|
|
24
|
+
self: Fx<A, E, R>,
|
|
25
|
+
seed: B,
|
|
26
|
+
f: (acc: B, a: A) => readonly [Option.Option<C>, B],
|
|
27
|
+
): Fx<C, E, R>;
|
|
28
|
+
} = dual(
|
|
29
|
+
3,
|
|
30
|
+
<A, E, R, B, C>(
|
|
31
|
+
self: Fx<A, E, R>,
|
|
32
|
+
seed: B,
|
|
33
|
+
f: (acc: B, a: A) => readonly [Option.Option<C>, B],
|
|
34
|
+
): Fx<C, E, R> => make<C, E, R>((sink) => self.run(sinkCore.filterMapLoop(sink, seed, f))),
|
|
35
|
+
);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type * as Cause from "effect/Cause";
|
|
2
|
+
import { dual } from "effect/Function";
|
|
3
|
+
import type * as Option from "effect/Option";
|
|
4
|
+
import * as sinkCore from "../../Sink/combinators.js";
|
|
5
|
+
import { make } from "../constructors/make.js";
|
|
6
|
+
import type { Fx } from "../Fx.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Loops over the failure causes of an Fx with an accumulator, potentially transforming or filtering them.
|
|
10
|
+
* This allows for complex error handling logic that maintains state across failures.
|
|
11
|
+
*
|
|
12
|
+
* @param seed - The initial state.
|
|
13
|
+
* @param f - The loop function for causes.
|
|
14
|
+
* @returns An `Fx` with transformed errors.
|
|
15
|
+
* @since 1.0.0
|
|
16
|
+
* @category combinators
|
|
17
|
+
*/
|
|
18
|
+
export const filterMapLoopCause: {
|
|
19
|
+
<B, A, C>(
|
|
20
|
+
seed: B,
|
|
21
|
+
f: (acc: B, a: Cause.Cause<A>) => readonly [Option.Option<Cause.Cause<C>>, B],
|
|
22
|
+
): <E, R>(self: Fx<A, E, R>) => Fx<A, C, R>;
|
|
23
|
+
|
|
24
|
+
<A, E, R, B, C>(
|
|
25
|
+
self: Fx<A, E, R>,
|
|
26
|
+
seed: B,
|
|
27
|
+
f: (acc: B, a: Cause.Cause<E>) => readonly [Option.Option<Cause.Cause<C>>, B],
|
|
28
|
+
): Fx<A, C, R>;
|
|
29
|
+
} = dual(
|
|
30
|
+
3,
|
|
31
|
+
<A, E, R, B, C>(
|
|
32
|
+
self: Fx<A, E, R>,
|
|
33
|
+
seed: B,
|
|
34
|
+
f: (acc: B, a: Cause.Cause<E>) => readonly [Option.Option<Cause.Cause<C>>, B],
|
|
35
|
+
): Fx<A, C, R> => make<A, C, R>((sink) => self.run(sinkCore.filterMapLoopCause(sink, seed, f))),
|
|
36
|
+
);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type * as Cause from "effect/Cause";
|
|
2
|
+
import type * as Effect from "effect/Effect";
|
|
3
|
+
import { dual } from "effect/Function";
|
|
4
|
+
import type * as Option from "effect/Option";
|
|
5
|
+
import * as sinkCore from "../../Sink/combinators.js";
|
|
6
|
+
import { make } from "../constructors/make.js";
|
|
7
|
+
import type { Fx } from "../Fx.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Effectfully loops over the failure causes of an Fx with an accumulator.
|
|
11
|
+
*
|
|
12
|
+
* @param seed - The initial state.
|
|
13
|
+
* @param f - The effectful loop function for causes.
|
|
14
|
+
* @returns An `Fx` with transformed errors.
|
|
15
|
+
* @since 1.0.0
|
|
16
|
+
* @category combinators
|
|
17
|
+
*/
|
|
18
|
+
export const filterMapLoopCauseEffect: {
|
|
19
|
+
<B, A, E2, R2, C>(
|
|
20
|
+
seed: B,
|
|
21
|
+
f: (
|
|
22
|
+
acc: B,
|
|
23
|
+
a: Cause.Cause<A>,
|
|
24
|
+
) => Effect.Effect<readonly [Option.Option<Cause.Cause<C>>, B], E2, R2>,
|
|
25
|
+
): <E, R>(self: Fx<A, E | E2, R>) => Fx<A, C | E2, R | R2>;
|
|
26
|
+
|
|
27
|
+
<A, E, R, B, R2, C>(
|
|
28
|
+
self: Fx<A, E, R>,
|
|
29
|
+
seed: B,
|
|
30
|
+
f: (
|
|
31
|
+
acc: B,
|
|
32
|
+
a: Cause.Cause<E>,
|
|
33
|
+
) => Effect.Effect<readonly [Option.Option<Cause.Cause<C>>, B], C, R2>,
|
|
34
|
+
): Fx<A, C, R | R2>;
|
|
35
|
+
} = dual(
|
|
36
|
+
3,
|
|
37
|
+
<A, E, R, B, R2, C>(
|
|
38
|
+
self: Fx<A, E, R>,
|
|
39
|
+
seed: B,
|
|
40
|
+
f: (
|
|
41
|
+
acc: B,
|
|
42
|
+
a: Cause.Cause<E>,
|
|
43
|
+
) => Effect.Effect<readonly [Option.Option<Cause.Cause<C>>, B], C, R2>,
|
|
44
|
+
): Fx<A, C, R | R2> =>
|
|
45
|
+
make<A, C, R | R2>((sink) => self.run(sinkCore.filterMapLoopCauseEffect(sink, seed, f))),
|
|
46
|
+
);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type * as Effect from "effect/Effect";
|
|
2
|
+
import { dual } from "effect/Function";
|
|
3
|
+
import type * as Option from "effect/Option";
|
|
4
|
+
import * as sinkCore from "../../Sink/combinators.js";
|
|
5
|
+
import { make } from "../constructors/make.js";
|
|
6
|
+
import type { Fx } from "../Fx.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Effectfully loops over an Fx with an accumulator, producing an optional new value.
|
|
10
|
+
*
|
|
11
|
+
* @param seed - The initial state.
|
|
12
|
+
* @param f - The effectful loop function.
|
|
13
|
+
* @returns An `Fx` emitting the transformed values.
|
|
14
|
+
* @since 1.0.0
|
|
15
|
+
* @category combinators
|
|
16
|
+
*/
|
|
17
|
+
export const filterMapLoopEffect: {
|
|
18
|
+
<B, A, E2, R2, C>(
|
|
19
|
+
seed: B,
|
|
20
|
+
f: (acc: B, a: A) => Effect.Effect<readonly [Option.Option<C>, B], E2, R2>,
|
|
21
|
+
): <E, R>(self: Fx<A, E | E2, R>) => Fx<C, E | E2, R | R2>;
|
|
22
|
+
|
|
23
|
+
<A, E, R, B, R2, C>(
|
|
24
|
+
self: Fx<A, E, R>,
|
|
25
|
+
seed: B,
|
|
26
|
+
f: (acc: B, a: A) => Effect.Effect<readonly [Option.Option<C>, B], E, R2>,
|
|
27
|
+
): Fx<C, E, R | R2>;
|
|
28
|
+
} = dual(
|
|
29
|
+
3,
|
|
30
|
+
<A, E, R, B, R2, C>(
|
|
31
|
+
self: Fx<A, E, R>,
|
|
32
|
+
seed: B,
|
|
33
|
+
f: (acc: B, a: A) => Effect.Effect<readonly [Option.Option<C>, B], E, R2>,
|
|
34
|
+
): Fx<C, E, R | R2> =>
|
|
35
|
+
make<C, E, R | R2>((sink) => self.run(sinkCore.filterMapLoopEffect(sink, seed, f))),
|
|
36
|
+
);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as FiberSet from "effect/FiberSet";
|
|
3
|
+
import { dual } from "effect/Function";
|
|
4
|
+
import type * as Scope from "effect/Scope";
|
|
5
|
+
import { make as makeSink } from "../../Sink/Sink.js";
|
|
6
|
+
import { make } from "../constructors/make.js";
|
|
7
|
+
import type { Fx } from "../Fx.js";
|
|
8
|
+
import { extendScope } from "../internal/scope.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Type definition for flatMap functions to support variable arguments.
|
|
12
|
+
* @since 1.0.0
|
|
13
|
+
* @category types
|
|
14
|
+
*/
|
|
15
|
+
export type FlatMapLike<Args extends ReadonlyArray<any> = []> = {
|
|
16
|
+
<A, B, E2, R2>(
|
|
17
|
+
f: (a: A) => Fx<B, E2, R2>,
|
|
18
|
+
...args: Args
|
|
19
|
+
): <E, R>(self: Fx<A, E, R>) => Fx<B, E | E2, R | R2 | Scope.Scope>;
|
|
20
|
+
|
|
21
|
+
<A, E, R, B, E2, R2>(
|
|
22
|
+
self: Fx<A, E, R>,
|
|
23
|
+
f: (a: A) => Fx<B, E2, R2>,
|
|
24
|
+
...args: Args
|
|
25
|
+
): Fx<B, E | E2, R | R2 | Scope.Scope>;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Maps each element of an Fx to a new Fx, and merges the results.
|
|
30
|
+
*
|
|
31
|
+
* The inner Fx streams are run concurrently. This is equivalent to `mergeMap` in RxJS.
|
|
32
|
+
*
|
|
33
|
+
* @param f - A function that maps an element `A` to a new `Fx<B>`.
|
|
34
|
+
* @returns An `Fx` that emits values from all inner streams.
|
|
35
|
+
* @since 1.0.0
|
|
36
|
+
* @category combinators
|
|
37
|
+
*/
|
|
38
|
+
export const flatMap: FlatMapLike = dual(
|
|
39
|
+
2,
|
|
40
|
+
<A, E, R, B, E2, R2>(
|
|
41
|
+
self: Fx<A, E, R>,
|
|
42
|
+
f: (a: A) => Fx<B, E2, R2>,
|
|
43
|
+
): Fx<B, E | E2, R | R2 | Scope.Scope> =>
|
|
44
|
+
make<B, E | E2, R | R2 | Scope.Scope>(
|
|
45
|
+
Effect.fn(function* (sink) {
|
|
46
|
+
const set = yield* FiberSet.make<void, never>();
|
|
47
|
+
yield* self.run(makeSink(sink.onFailure, (a) => FiberSet.run(set, f(a).run(sink))));
|
|
48
|
+
yield* FiberSet.awaitEmpty(set);
|
|
49
|
+
}, extendScope),
|
|
50
|
+
),
|
|
51
|
+
);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as FiberSet from "effect/FiberSet";
|
|
3
|
+
import { dual } from "effect/Function";
|
|
4
|
+
import type * as Scope from "effect/Scope";
|
|
5
|
+
import { make as makeSink } from "../../Sink/Sink.js";
|
|
6
|
+
import { make } from "../constructors/make.js";
|
|
7
|
+
import type { Fx } from "../Fx.js";
|
|
8
|
+
import { extendScope } from "../internal/scope.js";
|
|
9
|
+
import type { FlatMapLike } from "./flatMap.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Maps each element of an Fx to a new Fx, running them concurrently with a limit.
|
|
13
|
+
*
|
|
14
|
+
* @param f - A function that maps an element `A` to a new `Fx<B>`.
|
|
15
|
+
* @param concurrency - The maximum number of concurrent inner streams.
|
|
16
|
+
* @returns An `Fx` that emits values from the inner streams.
|
|
17
|
+
* @since 1.0.0
|
|
18
|
+
* @category combinators
|
|
19
|
+
*/
|
|
20
|
+
export const flatMapConcurrently: FlatMapLike<[concurrency: number]> = dual(
|
|
21
|
+
3,
|
|
22
|
+
<A, E, R, B, E2, R2>(
|
|
23
|
+
self: Fx<A, E, R>,
|
|
24
|
+
f: (a: A) => Fx<B, E2, R2>,
|
|
25
|
+
concurrency: number,
|
|
26
|
+
): Fx<B, E | E2, R | R2 | Scope.Scope> =>
|
|
27
|
+
make<B, E | E2, R | R2 | Scope.Scope>(
|
|
28
|
+
Effect.fn(function* (sink) {
|
|
29
|
+
const semaphore = yield* Effect.makeSemaphore(concurrency);
|
|
30
|
+
const lock = semaphore.withPermits(1);
|
|
31
|
+
const set = yield* FiberSet.make<void, never>();
|
|
32
|
+
yield* self.run(makeSink(sink.onFailure, (a) => FiberSet.run(set, lock(f(a).run(sink)))));
|
|
33
|
+
yield* FiberSet.awaitEmpty(set);
|
|
34
|
+
}, extendScope),
|
|
35
|
+
),
|
|
36
|
+
);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type * as Effect from "effect/Effect";
|
|
2
|
+
import { dual, flow } from "effect/Function";
|
|
3
|
+
import type * as Scope from "effect/Scope";
|
|
4
|
+
import { fromEffect } from "../constructors/fromEffect.js";
|
|
5
|
+
import type { Fx } from "../Fx.js";
|
|
6
|
+
import { flatMapConcurrently } from "./flatMapConcurrently.js";
|
|
7
|
+
import type { FlatMapEffectLike } from "./flatMapEffect.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Maps each element of an Fx to an Effect, running them concurrently with a limit.
|
|
11
|
+
*
|
|
12
|
+
* @param f - A function that maps an element `A` to an `Effect<B>`.
|
|
13
|
+
* @param concurrency - The maximum number of concurrent effects.
|
|
14
|
+
* @returns An `Fx` that emits the results of the effects.
|
|
15
|
+
* @since 1.0.0
|
|
16
|
+
* @category combinators
|
|
17
|
+
*/
|
|
18
|
+
export const flatMapConcurrentlyEffect: FlatMapEffectLike<[concurrency: number]> = dual(
|
|
19
|
+
3,
|
|
20
|
+
<A, E, R, B, E2, R2>(
|
|
21
|
+
self: Fx<A, E, R>,
|
|
22
|
+
f: (a: A) => Effect.Effect<B, E2, R2>,
|
|
23
|
+
concurrency: number,
|
|
24
|
+
): Fx<B, E | E2, R | R2 | Scope.Scope> =>
|
|
25
|
+
flatMapConcurrently(self, flow(f, fromEffect), concurrency),
|
|
26
|
+
);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type * as Effect from "effect/Effect";
|
|
2
|
+
import { dual, flow } from "effect/Function";
|
|
3
|
+
import type * as Scope from "effect/Scope";
|
|
4
|
+
import { fromEffect } from "../constructors/fromEffect.js";
|
|
5
|
+
import type { Fx } from "../Fx.js";
|
|
6
|
+
import { flatMap } from "./flatMap.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Type definition for flatMapEffect functions to support variable arguments.
|
|
10
|
+
* @since 1.0.0
|
|
11
|
+
* @category types
|
|
12
|
+
*/
|
|
13
|
+
export type FlatMapEffectLike<Args extends ReadonlyArray<any> = []> = {
|
|
14
|
+
<A, B, E2, R2>(
|
|
15
|
+
f: (a: A) => Effect.Effect<B, E2, R2>,
|
|
16
|
+
...args: Args
|
|
17
|
+
): <E, R>(self: Fx<A, E, R>) => Fx<B, E | E2, R | R2 | Scope.Scope>;
|
|
18
|
+
|
|
19
|
+
<A, E, R, B, E2, R2>(
|
|
20
|
+
self: Fx<A, E, R>,
|
|
21
|
+
f: (a: A) => Effect.Effect<B, E2, R2>,
|
|
22
|
+
...args: Args
|
|
23
|
+
): Fx<B, E | E2, R | R2 | Scope.Scope>;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Maps each element of an Fx to an Effect, and merges the results.
|
|
28
|
+
*
|
|
29
|
+
* The effects are run concurrently.
|
|
30
|
+
*
|
|
31
|
+
* @param f - A function that maps an element `A` to an `Effect<B>`.
|
|
32
|
+
* @returns An `Fx` that emits the results of the effects.
|
|
33
|
+
* @since 1.0.0
|
|
34
|
+
* @category combinators
|
|
35
|
+
*/
|
|
36
|
+
export const flatMapEffect: FlatMapEffectLike = dual(
|
|
37
|
+
2,
|
|
38
|
+
<A, E, R, B, E2, R2>(
|
|
39
|
+
self: Fx<A, E, R>,
|
|
40
|
+
f: (a: A) => Effect.Effect<B, E2, R2>,
|
|
41
|
+
): Fx<B, E | E2, R | R2 | Scope.Scope> => flatMap(self, flow(f, fromEffect)),
|
|
42
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as sinkCore from "../../Sink/combinators.js";
|
|
2
|
+
import { make } from "../constructors/make.js";
|
|
3
|
+
import type { Fx } from "../Fx.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Flips the error and success channels of an Fx.
|
|
7
|
+
*
|
|
8
|
+
* @param fx - The `Fx` stream.
|
|
9
|
+
* @returns An `Fx` where errors are successes and successes are errors.
|
|
10
|
+
* @since 1.0.0
|
|
11
|
+
* @category combinators
|
|
12
|
+
*/
|
|
13
|
+
export const flip = <A, E, R>(fx: Fx<A, E, R>): Fx<E, A, R> =>
|
|
14
|
+
make<E, A, R>((sink) => fx.run(sinkCore.flip(sink)));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import type { Fx } from "../Fx.js";
|
|
3
|
+
import { unwrap } from "./unwrap.js";
|
|
4
|
+
|
|
5
|
+
/** Extract error type from Yieldable (Effect v4) */
|
|
6
|
+
type _YE<Y> = Y extends Effect.Yieldable<any, any, infer E, any> ? E : never;
|
|
7
|
+
/** Extract services type from Yieldable (Effect v4) */
|
|
8
|
+
type _YS<Y> = Y extends Effect.Yieldable<any, any, any, infer R> ? R : never;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Creates an Fx using a generator function (Effect.gen style).
|
|
12
|
+
*
|
|
13
|
+
* This allows writing Fx code in a synchronous-looking style, using `yield*` to composition.
|
|
14
|
+
* Note: The generator yields Effects, and the result is an Fx.
|
|
15
|
+
*
|
|
16
|
+
* @param f - The generator function.
|
|
17
|
+
* @returns An `Fx` representing the result of the generator.
|
|
18
|
+
* @since 1.0.0
|
|
19
|
+
* @category combinators
|
|
20
|
+
*/
|
|
21
|
+
export const gen = <Yield extends Effect.Yieldable<any, any, any, any>, Return extends Fx.Any>(
|
|
22
|
+
f: () => Generator<Yield, Return, any>,
|
|
23
|
+
): Fx<Fx.Success<Return>, Fx.Error<Return> | _YE<Yield>, Fx.Services<Return> | _YS<Yield>> =>
|
|
24
|
+
unwrap(Effect.gen(f)) as any;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import type * as Scope from "effect/Scope";
|
|
3
|
+
import type { Fx } from "../Fx.js";
|
|
4
|
+
import { unwrapScoped } from "./unwrapScoped.js";
|
|
5
|
+
|
|
6
|
+
/** Extract error type from Yieldable (Effect v4) */
|
|
7
|
+
type _YE<Y> = Y extends Effect.Yieldable<any, any, infer E, any> ? E : never;
|
|
8
|
+
/** Extract services type from Yieldable (Effect v4) */
|
|
9
|
+
type _YS<Y> = Y extends Effect.Yieldable<any, any, any, infer R> ? R : never;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Creates a scoped Fx using a generator function.
|
|
13
|
+
*
|
|
14
|
+
* Similar to `gen`, but also handles resource management via Scope.
|
|
15
|
+
*
|
|
16
|
+
* @param f - The generator function.
|
|
17
|
+
* @returns An `Fx` representing the result of the generator.
|
|
18
|
+
* @since 1.0.0
|
|
19
|
+
* @category combinators
|
|
20
|
+
*/
|
|
21
|
+
export const genScoped = <Yield extends Effect.Yieldable<any, any, any, any>, A, E, R>(
|
|
22
|
+
f: () => Generator<Yield, Fx<A, E, R>, any>,
|
|
23
|
+
): Fx<A, E | _YE<Yield>, Exclude<R | _YS<Yield>, Scope.Scope>> =>
|
|
24
|
+
unwrapScoped(Effect.gen(f)) as any;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export * from "./catch.js";
|
|
2
|
+
export * from "./causes.js";
|
|
3
|
+
export * from "./compact.js";
|
|
4
|
+
export * from "./continueWith.js";
|
|
5
|
+
export * from "./ensuring.js";
|
|
6
|
+
export * from "./exhaustLatestMap.js";
|
|
7
|
+
export * from "./exhaustLatestMapEffect.js";
|
|
8
|
+
export * from "./exhaustMap.js";
|
|
9
|
+
export * from "./exhaustMapEffect.js";
|
|
10
|
+
export * from "./exit.js";
|
|
11
|
+
export * from "./filter.js";
|
|
12
|
+
export * from "./filterEffect.js";
|
|
13
|
+
export * from "./filterMap.js";
|
|
14
|
+
export * from "./filterMapEffect.js";
|
|
15
|
+
export * from "./filterMapLoop.js";
|
|
16
|
+
export * from "./filterMapLoopCause.js";
|
|
17
|
+
export * from "./filterMapLoopCauseEffect.js";
|
|
18
|
+
export * from "./filterMapLoopEffect.js";
|
|
19
|
+
export * from "./flatMap.js";
|
|
20
|
+
export * from "./flatMapConcurrently.js";
|
|
21
|
+
export * from "./flatMapConcurrentlyEffect.js";
|
|
22
|
+
export * from "./flatMapEffect.js";
|
|
23
|
+
export * from "./flip.js";
|
|
24
|
+
export * from "./gen.js";
|
|
25
|
+
export * from "./genScoped.js";
|
|
26
|
+
export * from "./keyed.js";
|
|
27
|
+
export * from "./loop.js";
|
|
28
|
+
export * from "./loopCause.js";
|
|
29
|
+
export * from "./loopCauseEffect.js";
|
|
30
|
+
export * from "./loopEffect.js";
|
|
31
|
+
export * from "./map.js";
|
|
32
|
+
export * from "./mapEffect.js";
|
|
33
|
+
export * from "./mergeAll.js";
|
|
34
|
+
export * from "./mergeOrdered.js";
|
|
35
|
+
export * from "./onError.js";
|
|
36
|
+
export * from "./onExit.js";
|
|
37
|
+
export * from "./onInterrupt.js";
|
|
38
|
+
export * from "./provide.js";
|
|
39
|
+
export * from "./skip.js";
|
|
40
|
+
export * from "./skipRepeats.js";
|
|
41
|
+
export * from "./skipRepeatsWith.js";
|
|
42
|
+
export * from "./slice.js";
|
|
43
|
+
export * from "./switchMap.js";
|
|
44
|
+
export * from "./switchMapEffect.js";
|
|
45
|
+
export * from "./take.js";
|
|
46
|
+
export * from "./takeUntil.js";
|
|
47
|
+
export * from "./tapEffect.js";
|
|
48
|
+
export * from "./tuple.js";
|
|
49
|
+
export * from "./unwrap.js";
|
|
50
|
+
export * from "./unwrapScoped.js";
|
|
51
|
+
export * from "./when.js";
|