@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,14 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import { make } from "../constructors/make.js";
|
|
3
|
+
/**
|
|
4
|
+
* Unwraps an Effect that produces an Fx into a single Fx.
|
|
5
|
+
*
|
|
6
|
+
* @param effect - An `Effect` that produces an `Fx`.
|
|
7
|
+
* @returns An `Fx` that runs the effect and then the produced Fx.
|
|
8
|
+
* @since 1.0.0
|
|
9
|
+
* @category combinators
|
|
10
|
+
*/
|
|
11
|
+
export const unwrap = (effect) => make((sink) => Effect.matchCauseEffect(effect, {
|
|
12
|
+
onFailure: (cause) => sink.onFailure(cause),
|
|
13
|
+
onSuccess: (fx) => fx.run(sink),
|
|
14
|
+
}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import type * as Scope from "effect/Scope";
|
|
3
|
+
import type { Fx } from "../Fx.js";
|
|
4
|
+
/**
|
|
5
|
+
* Unwraps an Effect that produces an Fx into a single Fx, managing the scope of the effect.
|
|
6
|
+
*
|
|
7
|
+
* The scope of the effect is closed when the Fx completes or is interrupted.
|
|
8
|
+
*
|
|
9
|
+
* @param effect - An `Effect` that produces an `Fx`.
|
|
10
|
+
* @returns An `Fx` that runs the effect and then the produced Fx.
|
|
11
|
+
* @since 1.0.0
|
|
12
|
+
* @category combinators
|
|
13
|
+
*/
|
|
14
|
+
export declare const unwrapScoped: <A, E, R, E2, R2>(effect: Effect.Effect<Fx<A, E, R>, E2, R2 | Scope.Scope>) => Fx<A, E | E2, Exclude<R | R2, Scope.Scope>>;
|
|
15
|
+
//# sourceMappingURL=unwrapScoped.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unwrapScoped.d.ts","sourceRoot":"","sources":["../../../src/Fx/combinators/unwrapScoped.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAEnC;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAC1C,QAAQ,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,KACvD,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAQ1C,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import { make } from "../constructors/make.js";
|
|
3
|
+
/**
|
|
4
|
+
* Unwraps an Effect that produces an Fx into a single Fx, managing the scope of the effect.
|
|
5
|
+
*
|
|
6
|
+
* The scope of the effect is closed when the Fx completes or is interrupted.
|
|
7
|
+
*
|
|
8
|
+
* @param effect - An `Effect` that produces an `Fx`.
|
|
9
|
+
* @returns An `Fx` that runs the effect and then the produced Fx.
|
|
10
|
+
* @since 1.0.0
|
|
11
|
+
* @category combinators
|
|
12
|
+
*/
|
|
13
|
+
export const unwrapScoped = (effect) => make((sink) => Effect.scoped(Effect.matchCauseEffect(effect, {
|
|
14
|
+
onFailure: (cause) => sink.onFailure(cause),
|
|
15
|
+
onSuccess: (fx) => fx.run(sink),
|
|
16
|
+
})));
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Scope } from "effect/Scope";
|
|
2
|
+
import type { Fx } from "../Fx.js";
|
|
3
|
+
/**
|
|
4
|
+
* Conditionally runs one of two Fx streams based on the boolean value emitted by the condition stream.
|
|
5
|
+
*
|
|
6
|
+
* @param condition - An `Fx` emitting booleans.
|
|
7
|
+
* @param matchers - An object containing `onTrue` and `onFalse` Fx streams.
|
|
8
|
+
* @returns An `Fx` that switches between `onTrue` and `onFalse` based on the condition.
|
|
9
|
+
* @since 1.0.0
|
|
10
|
+
* @category combinators
|
|
11
|
+
*/
|
|
12
|
+
declare const if_: {
|
|
13
|
+
<B, E2, R2, C, E3, R3>(matchers: {
|
|
14
|
+
onTrue: Fx<B, E2, R2>;
|
|
15
|
+
onFalse: Fx<C, E3, R3>;
|
|
16
|
+
}): <E, R>(condition: Fx<boolean, E, R>) => Fx<B | C, E | E2 | E3, R | R2 | R3 | Scope>;
|
|
17
|
+
<E, R, B, E2, R2, C, E3, R3>(condition: Fx<boolean, E, R>, matchers: {
|
|
18
|
+
onTrue: Fx<B, E2, R2>;
|
|
19
|
+
onFalse: Fx<C, E3, R3>;
|
|
20
|
+
}): Fx<B | C, E | E2 | E3, R | R2 | R3 | Scope>;
|
|
21
|
+
};
|
|
22
|
+
export { if_ as if };
|
|
23
|
+
/**
|
|
24
|
+
* Conditionally emits one of two values based on the boolean value emitted by the condition stream.
|
|
25
|
+
*
|
|
26
|
+
* @param condition - An `Fx` emitting booleans.
|
|
27
|
+
* @param matchers - An object containing `onTrue` and `onFalse` values.
|
|
28
|
+
* @returns An `Fx` that emits the matched value.
|
|
29
|
+
* @since 1.0.0
|
|
30
|
+
* @category combinators
|
|
31
|
+
*/
|
|
32
|
+
export declare const when: <E, R, B, C>(condition: Fx<boolean, E, R>, matchers: {
|
|
33
|
+
onTrue: B;
|
|
34
|
+
onFalse: C;
|
|
35
|
+
}) => Fx<B | C, E, R | Scope>;
|
|
36
|
+
//# sourceMappingURL=when.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"when.d.ts","sourceRoot":"","sources":["../../../src/Fx/combinators/when.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAGnC;;;;;;;;GAQG;AACH,QAAA,MAAM,GAAG,EAAE;IACT,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE;QAC/B,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QACtB,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;KACxB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;IAExF,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EACzB,SAAS,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,EAC5B,QAAQ,EAAE;QACR,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QACtB,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;KACxB,GACA,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;CAehD,CAAC;AAEF,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,CAAC;AAErB;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAC7B,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,EAC5B,UAAU;IACR,MAAM,EAAE,CAAC,CAAC;IACV,OAAO,EAAE,CAAC,CAAC;CACZ,KACA,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,KAAK,CAExB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { dual } from "effect/Function";
|
|
2
|
+
import { succeed } from "../constructors/succeed.js";
|
|
3
|
+
import { switchMap } from "./switchMap.js";
|
|
4
|
+
/**
|
|
5
|
+
* Conditionally runs one of two Fx streams based on the boolean value emitted by the condition stream.
|
|
6
|
+
*
|
|
7
|
+
* @param condition - An `Fx` emitting booleans.
|
|
8
|
+
* @param matchers - An object containing `onTrue` and `onFalse` Fx streams.
|
|
9
|
+
* @returns An `Fx` that switches between `onTrue` and `onFalse` based on the condition.
|
|
10
|
+
* @since 1.0.0
|
|
11
|
+
* @category combinators
|
|
12
|
+
*/
|
|
13
|
+
const if_ = dual(2, (condition, matchers) => {
|
|
14
|
+
return switchMap(condition, (pass) => (pass ? matchers.onTrue : matchers.onFalse));
|
|
15
|
+
});
|
|
16
|
+
export { if_ as if };
|
|
17
|
+
/**
|
|
18
|
+
* Conditionally emits one of two values based on the boolean value emitted by the condition stream.
|
|
19
|
+
*
|
|
20
|
+
* @param condition - An `Fx` emitting booleans.
|
|
21
|
+
* @param matchers - An object containing `onTrue` and `onFalse` values.
|
|
22
|
+
* @returns An `Fx` that emits the matched value.
|
|
23
|
+
* @since 1.0.0
|
|
24
|
+
* @category combinators
|
|
25
|
+
*/
|
|
26
|
+
export const when = (condition, matchers) => {
|
|
27
|
+
return if_(condition, { onTrue: succeed(matchers.onTrue), onFalse: succeed(matchers.onFalse) });
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withSpan.d.ts","sourceRoot":"","sources":["../../../src/Fx/combinators/withSpan.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAGxD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAEnC,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAC9B,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EACf,MAAM,MAAM,EACZ,UAAU,kBAAkB,KAC3B,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAaZ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import { make as makeSink } from "../../Sink/Sink.js";
|
|
3
|
+
import { make } from "../constructors/make.js";
|
|
4
|
+
export const withSpan = (fx, name, options) => {
|
|
5
|
+
return make((sink) => Effect.withSpan(fx.run(makeSink((cause) => Effect.withSpan(sink.onFailure(cause), `onFailure(${name})`, options), (value) => Effect.withSpan(sink.onSuccess(value), `onSuccess(${name})`, options))), `Fx(${name})`, options));
|
|
6
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as Duration from "effect/Duration";
|
|
2
|
+
import type { Fx } from "../Fx.js";
|
|
3
|
+
/**
|
|
4
|
+
* Creates an Fx that emits a single value after a specified delay.
|
|
5
|
+
*
|
|
6
|
+
* @param value - The value to emit.
|
|
7
|
+
* @param delay - The duration to wait before emitting.
|
|
8
|
+
* @returns An `Fx` that emits the value after the delay.
|
|
9
|
+
* @since 1.0.0
|
|
10
|
+
* @category constructors
|
|
11
|
+
*/
|
|
12
|
+
export declare const at: {
|
|
13
|
+
(delay: Duration.DurationInput): <A>(value: A) => Fx<A>;
|
|
14
|
+
<A>(value: A, delay: Duration.DurationInput): Fx<A>;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=at.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"at.d.ts","sourceRoot":"","sources":["../../../src/Fx/constructors/at.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAGjD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAGnC;;;;;;;;GAQG;AACH,eAAO,MAAM,EAAE,EAAE;IACf,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IACxD,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;CAKrD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { flatMap, sleep } from "effect/Effect";
|
|
2
|
+
import { dual } from "effect/Function";
|
|
3
|
+
import { make } from "./make.js";
|
|
4
|
+
/**
|
|
5
|
+
* Creates an Fx that emits a single value after a specified delay.
|
|
6
|
+
*
|
|
7
|
+
* @param value - The value to emit.
|
|
8
|
+
* @param delay - The duration to wait before emitting.
|
|
9
|
+
* @returns An `Fx` that emits the value after the delay.
|
|
10
|
+
* @since 1.0.0
|
|
11
|
+
* @category constructors
|
|
12
|
+
*/
|
|
13
|
+
export const at = dual(2, (value, delay) => make((sink) => flatMap(sleep(delay), () => sink.onSuccess(value))));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Fx } from "../Fx.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates an Fx that immediately terminates with a defect (unexpected error).
|
|
4
|
+
*
|
|
5
|
+
* @param defect - The defect value.
|
|
6
|
+
* @returns An `Fx` that dies immediately.
|
|
7
|
+
* @since 1.0.0
|
|
8
|
+
* @category constructors
|
|
9
|
+
*/
|
|
10
|
+
export declare const die: (defect: unknown) => Fx<never, never, never>;
|
|
11
|
+
//# sourceMappingURL=die.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"die.d.ts","sourceRoot":"","sources":["../../../src/Fx/constructors/die.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAGnC;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAG5D,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as Cause from "effect/Cause";
|
|
2
|
+
import { flow } from "effect/Function";
|
|
3
|
+
import { failCause } from "./failCause.js";
|
|
4
|
+
/**
|
|
5
|
+
* Creates an Fx that immediately terminates with a defect (unexpected error).
|
|
6
|
+
*
|
|
7
|
+
* @param defect - The defect value.
|
|
8
|
+
* @returns An `Fx` that dies immediately.
|
|
9
|
+
* @since 1.0.0
|
|
10
|
+
* @category constructors
|
|
11
|
+
*/
|
|
12
|
+
export const die = /*#__PURE__*/ flow(Cause.die, failCause);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../../src/Fx/constructors/empty.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAGnC;;;;GAIG;AACH,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAA0C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Fx } from "../Fx.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates an Fx that immediately fails with the specified error.
|
|
4
|
+
*
|
|
5
|
+
* @param error - The error to fail with.
|
|
6
|
+
* @returns An `Fx` that fails immediately.
|
|
7
|
+
* @since 1.0.0
|
|
8
|
+
* @category constructors
|
|
9
|
+
*/
|
|
10
|
+
export declare const fail: <E>(error: E) => Fx<never, E, never>;
|
|
11
|
+
//# sourceMappingURL=fail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fail.d.ts","sourceRoot":"","sources":["../../../src/Fx/constructors/fail.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAGnC;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,CAA6C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as Cause from "effect/Cause";
|
|
2
|
+
import { flow } from "effect/Function";
|
|
3
|
+
import { failCause } from "./failCause.js";
|
|
4
|
+
/**
|
|
5
|
+
* Creates an Fx that immediately fails with the specified error.
|
|
6
|
+
*
|
|
7
|
+
* @param error - The error to fail with.
|
|
8
|
+
* @returns An `Fx` that fails immediately.
|
|
9
|
+
* @since 1.0.0
|
|
10
|
+
* @category constructors
|
|
11
|
+
*/
|
|
12
|
+
export const fail = /*#__PURE__*/ flow(Cause.fail, failCause);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as Cause from "effect/Cause";
|
|
2
|
+
import type { Fx } from "../Fx.js";
|
|
3
|
+
/**
|
|
4
|
+
* Creates an Fx that immediately terminates with the specified Cause.
|
|
5
|
+
*
|
|
6
|
+
* @param cause - The cause of failure.
|
|
7
|
+
* @returns An `Fx` that terminates with the given cause.
|
|
8
|
+
* @since 1.0.0
|
|
9
|
+
* @category constructors
|
|
10
|
+
*/
|
|
11
|
+
export declare const failCause: <E>(cause: Cause.Cause<E>) => Fx<never, E, never>;
|
|
12
|
+
//# sourceMappingURL=failCause.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"failCause.d.ts","sourceRoot":"","sources":["../../../src/Fx/constructors/failCause.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAGnC;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAG,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,CACD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { make } from "./make.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates an Fx that immediately terminates with the specified Cause.
|
|
4
|
+
*
|
|
5
|
+
* @param cause - The cause of failure.
|
|
6
|
+
* @returns An `Fx` that terminates with the given cause.
|
|
7
|
+
* @since 1.0.0
|
|
8
|
+
* @category constructors
|
|
9
|
+
*/
|
|
10
|
+
export const failCause = (cause) =>
|
|
11
|
+
/*#__PURE__*/ make((sink) => sink.onFailure(cause));
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import type { SpanOptionsNoTrace } from "effect/Tracer";
|
|
3
|
+
import type { unassigned } from "effect/Types";
|
|
4
|
+
import type { Fx } from "../Fx.js";
|
|
5
|
+
/** Extract error type from Yieldable (Effect v4 has no Yieldable.Error) */
|
|
6
|
+
type _YieldableError<Y> = Y extends Effect.Yieldable<any, any, infer E, any> ? E : never;
|
|
7
|
+
/** Extract services type from Yieldable (Effect v4 has no Yieldable.Services) */
|
|
8
|
+
type _YieldableServices<Y> = Y extends Effect.Yieldable<any, any, any, infer R> ? R : never;
|
|
9
|
+
/**
|
|
10
|
+
* @since 1.0.0
|
|
11
|
+
* @category function
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace fn {
|
|
14
|
+
/**
|
|
15
|
+
* @since 1.0.0
|
|
16
|
+
* @category models
|
|
17
|
+
*/
|
|
18
|
+
type Gen = {
|
|
19
|
+
<Eff extends Effect.Yieldable<any, any, any, any>, ReturnFx extends Fx.Any, Args extends Array<any>>(body: (this: unassigned, ...args: Args) => Generator<Eff, ReturnFx>): (...args: Args) => Fx<Fx.Success<ReturnFx>, Fx.Error<ReturnFx> | _YieldableError<Eff>, Fx.Services<ReturnFx> | _YieldableServices<Eff>>;
|
|
20
|
+
<Self, Eff extends Effect.Yieldable<any, any, any, any>, ReturnFx extends Fx.Any, Args extends Array<any>>(body: (this: Self, ...args: Args) => Generator<Eff, ReturnFx>): (this: Self, ...args: Args) => Fx<Fx.Success<ReturnFx>, Fx.Error<ReturnFx> | _YieldableError<Eff>, Fx.Services<ReturnFx> | _YieldableServices<Eff>>;
|
|
21
|
+
<Eff extends Effect.Yieldable<any, any, any, any>, ReturnFx extends Fx.Any, Args extends Array<any>, A>(body: (this: unassigned, ...args: Args) => Generator<Eff, ReturnFx>, a: (_: Fx<Fx.Success<ReturnFx>, Fx.Error<ReturnFx> | _YieldableError<Eff>, Fx.Services<ReturnFx> | _YieldableServices<Eff>>, ...args: Args) => A): (...args: Args) => A;
|
|
22
|
+
<Self, Eff extends Effect.Yieldable<any, any, any, any>, ReturnFx extends Fx.Any, Args extends Array<any>, A>(body: (this: Self, ...args: Args) => Generator<Eff, ReturnFx>, a: (_: Fx<Fx.Success<ReturnFx>, Fx.Error<ReturnFx> | _YieldableError<Eff>, Fx.Services<ReturnFx> | _YieldableServices<Eff>>, ...args: Args) => A): (this: Self, ...args: Args) => A;
|
|
23
|
+
<Eff extends Effect.Yieldable<any, any, any, any>, ReturnFx extends Fx.Any, Args extends Array<any>, A, B>(body: (this: unassigned, ...args: Args) => Generator<Eff, ReturnFx>, a: (_: Fx<Fx.Success<ReturnFx>, Fx.Error<ReturnFx> | _YieldableError<Eff>, Fx.Services<ReturnFx> | _YieldableServices<Eff>>, ...args: Args) => A, b: (_: A, ...args: Args) => B): (...args: Args) => B;
|
|
24
|
+
<Self, Eff extends Effect.Yieldable<any, any, any, any>, ReturnFx extends Fx.Any, Args extends Array<any>, A, B>(body: (this: Self, ...args: Args) => Generator<Eff, ReturnFx>, a: (_: Fx<Fx.Success<ReturnFx>, Fx.Error<ReturnFx> | _YieldableError<Eff>, Fx.Services<ReturnFx> | _YieldableServices<Eff>>, ...args: Args) => A, b: (_: A, ...args: Args) => B): (this: Self, ...args: Args) => B;
|
|
25
|
+
<Eff extends Effect.Yieldable<any, any, any, any>, ReturnFx extends Fx.Any, Args extends Array<any>, A, B, C>(body: (this: unassigned, ...args: Args) => Generator<Eff, ReturnFx>, a: (_: Fx<Fx.Success<ReturnFx>, Fx.Error<ReturnFx> | _YieldableError<Eff>, Fx.Services<ReturnFx> | _YieldableServices<Eff>>, ...args: Args) => A, b: (_: A, ...args: Args) => B, c: (_: B, ...args: Args) => C): (...args: Args) => C;
|
|
26
|
+
<Self, Eff extends Effect.Yieldable<any, any, any, any>, ReturnFx extends Fx.Any, Args extends Array<any>, A, B, C>(body: (this: Self, ...args: Args) => Generator<Eff, ReturnFx>, a: (_: Fx<Fx.Success<ReturnFx>, Fx.Error<ReturnFx> | _YieldableError<Eff>, Fx.Services<ReturnFx> | _YieldableServices<Eff>>, ...args: Args) => A, b: (_: A, ...args: Args) => B, c: (_: B, ...args: Args) => C): (this: Self, ...args: Args) => C;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* @since 1.0.0
|
|
30
|
+
* @category models
|
|
31
|
+
*/
|
|
32
|
+
type NonGen = {
|
|
33
|
+
<Args extends Array<any>, ReturnFx extends Fx.Any>(body: (this: unassigned, ...args: Args) => ReturnFx): (...args: Args) => ReturnFx;
|
|
34
|
+
<Self, Args extends Array<any>, ReturnFx extends Fx.Any>(body: (this: Self, ...args: Args) => ReturnFx): (this: Self, ...args: Args) => ReturnFx;
|
|
35
|
+
<Args extends Array<any>, ReturnFx extends Fx.Any, A>(body: (this: unassigned, ...args: Args) => ReturnFx, a: (_: ReturnFx, ...args: Args) => A): (...args: Args) => A;
|
|
36
|
+
<Self, Args extends Array<any>, ReturnFx extends Fx.Any, A>(body: (this: Self, ...args: Args) => ReturnFx, a: (_: ReturnFx, ...args: Args) => A): (this: Self, ...args: Args) => A;
|
|
37
|
+
<Args extends Array<any>, ReturnFx extends Fx.Any, A, B>(body: (this: unassigned, ...args: Args) => ReturnFx, a: (_: ReturnFx, ...args: Args) => A, b: (_: A, ...args: Args) => B): (...args: Args) => B;
|
|
38
|
+
<Self, Args extends Array<any>, ReturnFx extends Fx.Any, A, B>(body: (this: Self, ...args: Args) => ReturnFx, a: (_: ReturnFx, ...args: Args) => A, b: (_: A, ...args: Args) => B): (this: Self, ...args: Args) => B;
|
|
39
|
+
<Args extends Array<any>, ReturnFx extends Fx.Any, A, B, C>(body: (this: unassigned, ...args: Args) => ReturnFx, a: (_: ReturnFx, ...args: Args) => A, b: (_: A, ...args: Args) => B, c: (_: B, ...args: Args) => C): (...args: Args) => C;
|
|
40
|
+
<Self, Args extends Array<any>, ReturnFx extends Fx.Any, A, B, C>(body: (this: Self, ...args: Args) => ReturnFx, a: (_: ReturnFx, ...args: Args) => A, b: (_: A, ...args: Args) => B, c: (_: B, ...args: Args) => C): (this: Self, ...args: Args) => C;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export declare const fn: fn.Gen & fn.NonGen & {
|
|
44
|
+
(name: string, options?: SpanOptionsNoTrace): fn.Gen & fn.NonGen;
|
|
45
|
+
};
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=fn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fn.d.ts","sourceRoot":"","sources":["../../../src/Fx/constructors/fn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAGnC,2EAA2E;AAC3E,KAAK,eAAe,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AACzF,iFAAiF;AACjF,KAAK,kBAAkB,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAE5F;;;GAGG;AACH,yBAAiB,EAAE,CAAC;IAClB;;;OAGG;IACH,KAAY,GAAG,GAAG;QAChB,CACE,GAAG,SAAS,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAChD,QAAQ,SAAS,EAAE,CAAC,GAAG,EACvB,IAAI,SAAS,KAAK,CAAC,GAAG,CAAC,EAEvB,IAAI,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,IAAI,KAAK,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,GAClE,CACD,GAAG,IAAI,EAAE,IAAI,KACV,EAAE,CACL,EAAE,CAAC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CAAC,MAAM,CAAC;CAqBpE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import { unwrap } from "../combinators/unwrap.js";
|
|
3
|
+
import { isFx } from "../TypeId.js";
|
|
4
|
+
export const fn = function (...args) {
|
|
5
|
+
const [first, ...rest] = args;
|
|
6
|
+
if (typeof first === "string") {
|
|
7
|
+
const fn_ = Effect.fn(first, ...rest);
|
|
8
|
+
return (body, ...pipeables) => fn_(unwrapApply(body), unwrap,
|
|
9
|
+
// @ts-expect-error - It's fine to be variadic
|
|
10
|
+
...pipeables);
|
|
11
|
+
}
|
|
12
|
+
return Effect.fn(unwrapApply(first), unwrap,
|
|
13
|
+
// @ts-expect-error - It's fine to be variadic
|
|
14
|
+
...rest);
|
|
15
|
+
};
|
|
16
|
+
function unwrapApply(fn) {
|
|
17
|
+
return function (...args) {
|
|
18
|
+
const x = fn.apply(this, args);
|
|
19
|
+
if (isFx(x))
|
|
20
|
+
return Effect.succeed(x);
|
|
21
|
+
return x;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import type { Fx } from "../Fx.js";
|
|
3
|
+
/**
|
|
4
|
+
* Creates an Fx from an Effect.
|
|
5
|
+
*
|
|
6
|
+
* If the Effect succeeds, the Fx emits the value and completes.
|
|
7
|
+
* If the Effect fails, the Fx fails with the same error.
|
|
8
|
+
*
|
|
9
|
+
* @param effect - The effect to convert.
|
|
10
|
+
* @returns An `Fx` representing the execution of the effect.
|
|
11
|
+
* @since 1.0.0
|
|
12
|
+
* @category constructors
|
|
13
|
+
*/
|
|
14
|
+
export declare const fromEffect: <A, E = never, R = never>(effect: Effect.Effect<A, E, R>) => Fx<A, E, R>;
|
|
15
|
+
/**
|
|
16
|
+
* An Fx that runs forever without emitting any values.
|
|
17
|
+
* @since 1.0.0
|
|
18
|
+
* @category constructors
|
|
19
|
+
*/
|
|
20
|
+
export declare const never: Fx<never, never, never>;
|
|
21
|
+
//# sourceMappingURL=fromEffect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fromEffect.d.ts","sourceRoot":"","sources":["../../../src/Fx/constructors/fromEffect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAGnC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,KAAK,EAAE,QAAQ,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CACjB,CAAC;AAE/E;;;;GAIG;AACH,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAiD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import { make } from "./make.js";
|
|
3
|
+
/**
|
|
4
|
+
* Creates an Fx from an Effect.
|
|
5
|
+
*
|
|
6
|
+
* If the Effect succeeds, the Fx emits the value and completes.
|
|
7
|
+
* If the Effect fails, the Fx fails with the same error.
|
|
8
|
+
*
|
|
9
|
+
* @param effect - The effect to convert.
|
|
10
|
+
* @returns An `Fx` representing the execution of the effect.
|
|
11
|
+
* @since 1.0.0
|
|
12
|
+
* @category constructors
|
|
13
|
+
*/
|
|
14
|
+
export const fromEffect = (effect) =>
|
|
15
|
+
/*#__PURE__*/ make((sink) => Effect.matchCauseEffect(effect, sink));
|
|
16
|
+
/**
|
|
17
|
+
* An Fx that runs forever without emitting any values.
|
|
18
|
+
* @since 1.0.0
|
|
19
|
+
* @category constructors
|
|
20
|
+
*/
|
|
21
|
+
export const never = make(() => Effect.never);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates an Fx from a collection of failures (errors).
|
|
3
|
+
*
|
|
4
|
+
* @param failures - An iterable of failures.
|
|
5
|
+
* @returns An `Fx` that fails with the combined failures.
|
|
6
|
+
* @since 1.0.0
|
|
7
|
+
* @category constructors
|
|
8
|
+
*/
|
|
9
|
+
export declare const fromFailures: <E>(failures: Iterable<E>) => import("../Fx.js").Fx<never, E, never>;
|
|
10
|
+
//# sourceMappingURL=fromFailures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fromFailures.d.ts","sourceRoot":"","sources":["../../../src/Fx/constructors/fromFailures.ts"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GAdE,CAAC,kEAcgD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as Cause from "effect/Cause";
|
|
2
|
+
import { flow } from "effect/Function";
|
|
3
|
+
import { failCause } from "./failCause.js";
|
|
4
|
+
const fromFailuresCause = (failures) => Array.from(failures).reduce((acc, e) => Cause.combine(acc, Cause.fail(e)), Cause.empty);
|
|
5
|
+
/**
|
|
6
|
+
* Creates an Fx from a collection of failures (errors).
|
|
7
|
+
*
|
|
8
|
+
* @param failures - An iterable of failures.
|
|
9
|
+
* @returns An `Fx` that fails with the combined failures.
|
|
10
|
+
* @since 1.0.0
|
|
11
|
+
* @category constructors
|
|
12
|
+
*/
|
|
13
|
+
export const fromFailures = /*#__PURE__*/ flow(fromFailuresCause, failCause);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Fx } from "../Fx.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates an Fx from an Iterable.
|
|
4
|
+
* Emits each value from the iterable in order and then completes.
|
|
5
|
+
*
|
|
6
|
+
* @param iterable - The iterable to emit values from.
|
|
7
|
+
* @returns An `Fx` that emits the values from the iterable.
|
|
8
|
+
* @since 1.0.0
|
|
9
|
+
* @category constructors
|
|
10
|
+
*/
|
|
11
|
+
export declare const fromIterable: <A>(iterable: Iterable<A>) => Fx<A>;
|
|
12
|
+
//# sourceMappingURL=fromIterable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fromIterable.d.ts","sourceRoot":"","sources":["../../../src/Fx/constructors/fromIterable.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAGnC;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,UAAU,QAAQ,CAAC,CAAC,CAAC,KAAG,EAAE,CAAC,CAAC,CACa,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { forEach } from "effect/Effect";
|
|
2
|
+
import { make } from "./make.js";
|
|
3
|
+
/**
|
|
4
|
+
* Creates an Fx from an Iterable.
|
|
5
|
+
* Emits each value from the iterable in order and then completes.
|
|
6
|
+
*
|
|
7
|
+
* @param iterable - The iterable to emit values from.
|
|
8
|
+
* @returns An `Fx` that emits the values from the iterable.
|
|
9
|
+
* @since 1.0.0
|
|
10
|
+
* @category constructors
|
|
11
|
+
*/
|
|
12
|
+
export const fromIterable = (iterable) => make((sink) => forEach(iterable, sink.onSuccess, { discard: true }));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Schedule } from "effect/Schedule";
|
|
2
|
+
import type { Fx } from "../Fx.js";
|
|
3
|
+
/**
|
|
4
|
+
* Creates an Fx that emits values according to a Schedule.
|
|
5
|
+
* The Fx emits `void` each time the schedule fires.
|
|
6
|
+
*
|
|
7
|
+
* @param schedule - The schedule to follow.
|
|
8
|
+
* @returns An `Fx` that emits periodically according to the schedule.
|
|
9
|
+
* @since 1.0.0
|
|
10
|
+
* @category constructors
|
|
11
|
+
*/
|
|
12
|
+
export declare const fromSchedule: <Error, Env>(schedule: Schedule<unknown, unknown, Error, Env>) => Fx<void, Error, Env>;
|
|
13
|
+
//# sourceMappingURL=fromSchedule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fromSchedule.d.ts","sourceRoot":"","sources":["../../../src/Fx/constructors/fromSchedule.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAGnC;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GAAI,KAAK,EAAE,GAAG,EACrC,UAAU,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,KAC/C,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CACuE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { schedule as schedule_Effect } from "effect/Effect";
|
|
2
|
+
import { make } from "./make.js";
|
|
3
|
+
/**
|
|
4
|
+
* Creates an Fx that emits values according to a Schedule.
|
|
5
|
+
* The Fx emits `void` each time the schedule fires.
|
|
6
|
+
*
|
|
7
|
+
* @param schedule - The schedule to follow.
|
|
8
|
+
* @returns An `Fx` that emits periodically according to the schedule.
|
|
9
|
+
* @since 1.0.0
|
|
10
|
+
* @category constructors
|
|
11
|
+
*/
|
|
12
|
+
export const fromSchedule = (schedule) =>
|
|
13
|
+
/*#__PURE__*/ make((sink) => schedule_Effect(sink.onSuccess(), schedule));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Yieldable } from "effect/Effect";
|
|
2
|
+
import type { Fx } from "../Fx.js";
|
|
3
|
+
/**
|
|
4
|
+
* Creates an Fx from any Yieldable value (e.g., Effect, Promise, etc.).
|
|
5
|
+
*
|
|
6
|
+
* @param yieldable - The yieldable value to convert.
|
|
7
|
+
* @returns An `Fx` that emits the result of the yieldable.
|
|
8
|
+
* @since 1.0.0
|
|
9
|
+
* @category constructors
|
|
10
|
+
*/
|
|
11
|
+
export declare const fromYieldable: <A, E = never, R = never>(yieldable: Yieldable<any, A, E, R>) => Fx<A, E, R>;
|
|
12
|
+
//# sourceMappingURL=fromYieldable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fromYieldable.d.ts","sourceRoot":"","sources":["../../../src/Fx/constructors/fromYieldable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAGnC;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GAAI,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,KAAK,EACnD,WAAW,SAAS,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KACjC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CACwE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { matchCauseEffect } from "effect/Effect";
|
|
2
|
+
import { make } from "./make.js";
|
|
3
|
+
/**
|
|
4
|
+
* Creates an Fx from any Yieldable value (e.g., Effect, Promise, etc.).
|
|
5
|
+
*
|
|
6
|
+
* @param yieldable - The yieldable value to convert.
|
|
7
|
+
* @returns An `Fx` that emits the result of the yieldable.
|
|
8
|
+
* @since 1.0.0
|
|
9
|
+
* @category constructors
|
|
10
|
+
*/
|
|
11
|
+
export const fromYieldable = (yieldable) =>
|
|
12
|
+
/*#__PURE__*/ make((sink) => matchCauseEffect(yieldable.asEffect(), sink));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from "./at.js";
|
|
2
|
+
export * from "./die.js";
|
|
3
|
+
export * from "./empty.js";
|
|
4
|
+
export * from "./fail.js";
|
|
5
|
+
export * from "./failCause.js";
|
|
6
|
+
export * from "./fn.js";
|
|
7
|
+
export * from "./fromEffect.js";
|
|
8
|
+
export * from "./fromFailures.js";
|
|
9
|
+
export * from "./fromIterable.js";
|
|
10
|
+
export * from "./fromSchedule.js";
|
|
11
|
+
export * from "./fromYieldable.js";
|
|
12
|
+
export * from "./interrupt.js";
|
|
13
|
+
export * from "./make.js";
|
|
14
|
+
export * from "./periodic.js";
|
|
15
|
+
export * from "./succeed.js";
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Fx/constructors/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./at.js";
|
|
2
|
+
export * from "./die.js";
|
|
3
|
+
export * from "./empty.js";
|
|
4
|
+
export * from "./fail.js";
|
|
5
|
+
export * from "./failCause.js";
|
|
6
|
+
export * from "./fn.js";
|
|
7
|
+
export * from "./fromEffect.js";
|
|
8
|
+
export * from "./fromFailures.js";
|
|
9
|
+
export * from "./fromIterable.js";
|
|
10
|
+
export * from "./fromSchedule.js";
|
|
11
|
+
export * from "./fromYieldable.js";
|
|
12
|
+
export * from "./interrupt.js";
|
|
13
|
+
export * from "./make.js";
|
|
14
|
+
export * from "./periodic.js";
|
|
15
|
+
export * from "./succeed.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates an Fx that immediately interrupts.
|
|
3
|
+
*
|
|
4
|
+
* @param id - The FiberId responsible for the interruption.
|
|
5
|
+
* @returns An `Fx` that is interrupted.
|
|
6
|
+
* @since 1.0.0
|
|
7
|
+
* @category constructors
|
|
8
|
+
*/
|
|
9
|
+
export declare const interrupt: (fiberId?: number | undefined) => import("../Fx.js").Fx<never, never, never>;
|
|
10
|
+
//# sourceMappingURL=interrupt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interrupt.d.ts","sourceRoot":"","sources":["../../../src/Fx/constructors/interrupt.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,8EAAiD,CAAC"}
|