@typed/fx 2.0.0-beta.4 → 2.0.0-beta.6
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 +34 -20
- package/dist/Fx/Fx.d.ts +362 -10
- package/dist/Fx/Fx.d.ts.map +1 -1
- package/dist/Fx/Fx.js +32 -1
- package/dist/Fx/TypeId.d.ts +49 -3
- package/dist/Fx/TypeId.d.ts.map +1 -1
- package/dist/Fx/TypeId.js +39 -2
- package/dist/Fx/combinators/additive.d.ts +156 -5
- package/dist/Fx/combinators/additive.d.ts.map +1 -1
- package/dist/Fx/combinators/additive.js +156 -5
- package/dist/Fx/combinators/catch.d.ts +195 -22
- package/dist/Fx/combinators/catch.d.ts.map +1 -1
- package/dist/Fx/combinators/catch.js +186 -16
- package/dist/Fx/combinators/causes.d.ts +24 -1
- package/dist/Fx/combinators/causes.d.ts.map +1 -1
- package/dist/Fx/combinators/causes.js +24 -1
- package/dist/Fx/combinators/changesWithEffect.d.ts +20 -0
- package/dist/Fx/combinators/changesWithEffect.d.ts.map +1 -1
- package/dist/Fx/combinators/changesWithEffect.js +20 -0
- package/dist/Fx/combinators/compact.d.ts +17 -0
- package/dist/Fx/combinators/compact.d.ts.map +1 -1
- package/dist/Fx/combinators/compact.js +17 -0
- package/dist/Fx/combinators/concatMap.d.ts +86 -0
- package/dist/Fx/combinators/concatMap.d.ts.map +1 -0
- package/dist/Fx/combinators/concatMap.js +86 -0
- package/dist/Fx/combinators/continueWith.d.ts +109 -1
- package/dist/Fx/combinators/continueWith.d.ts.map +1 -1
- package/dist/Fx/combinators/continueWith.js +109 -1
- package/dist/Fx/combinators/debounce.d.ts +34 -0
- package/dist/Fx/combinators/debounce.d.ts.map +1 -0
- package/dist/Fx/combinators/debounce.js +35 -0
- package/dist/Fx/combinators/delay.d.ts +34 -0
- package/dist/Fx/combinators/delay.d.ts.map +1 -0
- package/dist/Fx/combinators/delay.js +31 -0
- package/dist/Fx/combinators/dropUntil.d.ts +42 -0
- package/dist/Fx/combinators/dropUntil.d.ts.map +1 -1
- package/dist/Fx/combinators/dropUntil.js +42 -0
- package/dist/Fx/combinators/during.d.ts +38 -0
- package/dist/Fx/combinators/during.d.ts.map +1 -0
- package/dist/Fx/combinators/during.js +85 -0
- package/dist/Fx/combinators/ensuring.d.ts +33 -3
- package/dist/Fx/combinators/ensuring.d.ts.map +1 -1
- package/dist/Fx/combinators/ensuring.js +33 -3
- package/dist/Fx/combinators/exhaustLatestMap.d.ts +40 -4
- package/dist/Fx/combinators/exhaustLatestMap.d.ts.map +1 -1
- package/dist/Fx/combinators/exhaustLatestMap.js +40 -4
- package/dist/Fx/combinators/exhaustLatestMapEffect.d.ts +39 -3
- package/dist/Fx/combinators/exhaustLatestMapEffect.d.ts.map +1 -1
- package/dist/Fx/combinators/exhaustLatestMapEffect.js +39 -3
- package/dist/Fx/combinators/exhaustMap.d.ts +37 -0
- package/dist/Fx/combinators/exhaustMap.d.ts.map +1 -1
- package/dist/Fx/combinators/exhaustMap.js +37 -0
- package/dist/Fx/combinators/exhaustMapEffect.d.ts +32 -0
- package/dist/Fx/combinators/exhaustMapEffect.d.ts.map +1 -1
- package/dist/Fx/combinators/exhaustMapEffect.js +32 -0
- package/dist/Fx/combinators/exit.d.ts +22 -1
- package/dist/Fx/combinators/exit.d.ts.map +1 -1
- package/dist/Fx/combinators/exit.js +22 -1
- package/dist/Fx/combinators/filter.d.ts +16 -0
- package/dist/Fx/combinators/filter.d.ts.map +1 -1
- package/dist/Fx/combinators/filter.js +16 -0
- package/dist/Fx/combinators/filterEffect.d.ts +21 -0
- package/dist/Fx/combinators/filterEffect.d.ts.map +1 -1
- package/dist/Fx/combinators/filterEffect.js +21 -0
- package/dist/Fx/combinators/filterMap.d.ts +19 -0
- package/dist/Fx/combinators/filterMap.d.ts.map +1 -1
- package/dist/Fx/combinators/filterMap.js +19 -0
- package/dist/Fx/combinators/filterMapEffect.d.ts +20 -0
- package/dist/Fx/combinators/filterMapEffect.d.ts.map +1 -1
- package/dist/Fx/combinators/filterMapEffect.js +20 -0
- package/dist/Fx/combinators/filterMapLoop.d.ts +19 -0
- package/dist/Fx/combinators/filterMapLoop.d.ts.map +1 -1
- package/dist/Fx/combinators/filterMapLoop.js +19 -0
- package/dist/Fx/combinators/filterMapLoopCause.d.ts +20 -0
- package/dist/Fx/combinators/filterMapLoopCause.d.ts.map +1 -1
- package/dist/Fx/combinators/filterMapLoopCause.js +20 -0
- package/dist/Fx/combinators/filterMapLoopCauseEffect.d.ts +20 -0
- package/dist/Fx/combinators/filterMapLoopCauseEffect.d.ts.map +1 -1
- package/dist/Fx/combinators/filterMapLoopCauseEffect.js +20 -0
- package/dist/Fx/combinators/filterMapLoopEffect.d.ts +20 -0
- package/dist/Fx/combinators/filterMapLoopEffect.d.ts.map +1 -1
- package/dist/Fx/combinators/filterMapLoopEffect.js +20 -0
- package/dist/Fx/combinators/flatMap.d.ts +48 -3
- package/dist/Fx/combinators/flatMap.d.ts.map +1 -1
- package/dist/Fx/combinators/flatMap.js +35 -2
- package/dist/Fx/combinators/flatMapConcurrently.d.ts +50 -3
- package/dist/Fx/combinators/flatMapConcurrently.d.ts.map +1 -1
- package/dist/Fx/combinators/flatMapConcurrently.js +47 -1
- package/dist/Fx/combinators/flatMapConcurrentlyEffect.d.ts +47 -3
- package/dist/Fx/combinators/flatMapConcurrentlyEffect.d.ts.map +1 -1
- package/dist/Fx/combinators/flatMapConcurrentlyEffect.js +39 -1
- package/dist/Fx/combinators/flatMapEffect.d.ts +44 -2
- package/dist/Fx/combinators/flatMapEffect.d.ts.map +1 -1
- package/dist/Fx/combinators/flatMapEffect.js +31 -1
- package/dist/Fx/combinators/flip.d.ts +33 -1
- package/dist/Fx/combinators/flip.d.ts.map +1 -1
- package/dist/Fx/combinators/flip.js +33 -1
- package/dist/Fx/combinators/gen.d.ts +28 -9
- package/dist/Fx/combinators/gen.d.ts.map +1 -1
- package/dist/Fx/combinators/gen.js +27 -3
- package/dist/Fx/combinators/genScoped.d.ts +32 -9
- package/dist/Fx/combinators/genScoped.d.ts.map +1 -1
- package/dist/Fx/combinators/genScoped.js +30 -2
- package/dist/Fx/combinators/grouped.d.ts +89 -0
- package/dist/Fx/combinators/grouped.d.ts.map +1 -0
- package/dist/Fx/combinators/grouped.js +146 -0
- package/dist/Fx/combinators/index.d.ts +35 -0
- package/dist/Fx/combinators/index.d.ts.map +1 -1
- package/dist/Fx/combinators/index.js +35 -0
- package/dist/Fx/combinators/keyed.d.ts +121 -7
- package/dist/Fx/combinators/keyed.d.ts.map +1 -1
- package/dist/Fx/combinators/keyed.js +64 -6
- package/dist/Fx/combinators/loop.d.ts +16 -0
- package/dist/Fx/combinators/loop.d.ts.map +1 -1
- package/dist/Fx/combinators/loop.js +16 -0
- package/dist/Fx/combinators/loopCause.d.ts +17 -0
- package/dist/Fx/combinators/loopCause.d.ts.map +1 -1
- package/dist/Fx/combinators/loopCause.js +17 -0
- package/dist/Fx/combinators/loopCauseEffect.d.ts +18 -0
- package/dist/Fx/combinators/loopCauseEffect.d.ts.map +1 -1
- package/dist/Fx/combinators/loopCauseEffect.js +18 -0
- package/dist/Fx/combinators/loopEffect.d.ts +23 -0
- package/dist/Fx/combinators/loopEffect.d.ts.map +1 -1
- package/dist/Fx/combinators/loopEffect.js +23 -0
- package/dist/Fx/combinators/map.d.ts +45 -0
- package/dist/Fx/combinators/map.d.ts.map +1 -1
- package/dist/Fx/combinators/map.js +42 -0
- package/dist/Fx/combinators/mapBoth.d.ts +19 -0
- package/dist/Fx/combinators/mapBoth.d.ts.map +1 -1
- package/dist/Fx/combinators/mapBoth.js +19 -0
- package/dist/Fx/combinators/mapEffect.d.ts +24 -0
- package/dist/Fx/combinators/mapEffect.d.ts.map +1 -1
- package/dist/Fx/combinators/mapEffect.js +24 -0
- package/dist/Fx/combinators/mapError.d.ts +20 -4
- package/dist/Fx/combinators/mapError.d.ts.map +1 -1
- package/dist/Fx/combinators/mapError.js +20 -4
- package/dist/Fx/combinators/mergeAll.d.ts +34 -0
- package/dist/Fx/combinators/mergeAll.d.ts.map +1 -1
- package/dist/Fx/combinators/mergeAll.js +34 -0
- package/dist/Fx/combinators/mergeOrdered.d.ts +35 -3
- package/dist/Fx/combinators/mergeOrdered.d.ts.map +1 -1
- package/dist/Fx/combinators/mergeOrdered.js +35 -3
- package/dist/Fx/combinators/onError.d.ts +33 -3
- package/dist/Fx/combinators/onError.d.ts.map +1 -1
- package/dist/Fx/combinators/onError.js +33 -3
- package/dist/Fx/combinators/onExit.d.ts +28 -2
- package/dist/Fx/combinators/onExit.d.ts.map +1 -1
- package/dist/Fx/combinators/onExit.js +28 -2
- package/dist/Fx/combinators/onInterrupt.d.ts +48 -3
- package/dist/Fx/combinators/onInterrupt.d.ts.map +1 -1
- package/dist/Fx/combinators/onInterrupt.js +48 -3
- package/dist/Fx/combinators/pairwise.d.ts +28 -0
- package/dist/Fx/combinators/pairwise.d.ts.map +1 -0
- package/dist/Fx/combinators/pairwise.js +31 -0
- package/dist/Fx/combinators/provide.d.ts +130 -9
- package/dist/Fx/combinators/provide.d.ts.map +1 -1
- package/dist/Fx/combinators/provide.js +130 -9
- package/dist/Fx/combinators/race.d.ts +92 -0
- package/dist/Fx/combinators/race.d.ts.map +1 -0
- package/dist/Fx/combinators/race.js +149 -0
- package/dist/Fx/combinators/repeat.d.ts +41 -0
- package/dist/Fx/combinators/repeat.d.ts.map +1 -0
- package/dist/Fx/combinators/repeat.js +57 -0
- package/dist/Fx/combinators/result.d.ts +22 -0
- package/dist/Fx/combinators/result.d.ts.map +1 -1
- package/dist/Fx/combinators/result.js +26 -12
- package/dist/Fx/combinators/retry.d.ts +53 -0
- package/dist/Fx/combinators/retry.d.ts.map +1 -0
- package/dist/Fx/combinators/retry.js +71 -0
- package/dist/Fx/combinators/sample.d.ts +31 -0
- package/dist/Fx/combinators/sample.d.ts.map +1 -0
- package/dist/Fx/combinators/sample.js +42 -0
- package/dist/Fx/combinators/scan.d.ts +39 -0
- package/dist/Fx/combinators/scan.d.ts.map +1 -1
- package/dist/Fx/combinators/scan.js +39 -0
- package/dist/Fx/combinators/since.d.ts +30 -0
- package/dist/Fx/combinators/since.d.ts.map +1 -0
- package/dist/Fx/combinators/since.js +39 -0
- package/dist/Fx/combinators/skip.d.ts +31 -0
- package/dist/Fx/combinators/skip.d.ts.map +1 -1
- package/dist/Fx/combinators/skip.js +31 -0
- package/dist/Fx/combinators/skipRepeats.d.ts +16 -0
- package/dist/Fx/combinators/skipRepeats.d.ts.map +1 -1
- package/dist/Fx/combinators/skipRepeats.js +16 -0
- package/dist/Fx/combinators/skipRepeatsWith.d.ts +17 -0
- package/dist/Fx/combinators/skipRepeatsWith.d.ts.map +1 -1
- package/dist/Fx/combinators/skipRepeatsWith.js +17 -0
- package/dist/Fx/combinators/skipWhile.d.ts +68 -0
- package/dist/Fx/combinators/skipWhile.d.ts.map +1 -1
- package/dist/Fx/combinators/skipWhile.js +68 -0
- package/dist/Fx/combinators/slice.d.ts +82 -0
- package/dist/Fx/combinators/slice.d.ts.map +1 -1
- package/dist/Fx/combinators/slice.js +33 -0
- package/dist/Fx/combinators/switchMap.d.ts +38 -0
- package/dist/Fx/combinators/switchMap.d.ts.map +1 -1
- package/dist/Fx/combinators/switchMap.js +38 -0
- package/dist/Fx/combinators/switchMapEffect.d.ts +37 -0
- package/dist/Fx/combinators/switchMapEffect.d.ts.map +1 -1
- package/dist/Fx/combinators/switchMapEffect.js +37 -0
- package/dist/Fx/combinators/take.d.ts +32 -0
- package/dist/Fx/combinators/take.d.ts.map +1 -1
- package/dist/Fx/combinators/take.js +32 -0
- package/dist/Fx/combinators/takeUntil.d.ts +46 -0
- package/dist/Fx/combinators/takeUntil.d.ts.map +1 -1
- package/dist/Fx/combinators/takeUntil.js +46 -0
- package/dist/Fx/combinators/takeWhile.d.ts +31 -0
- package/dist/Fx/combinators/takeWhile.d.ts.map +1 -1
- package/dist/Fx/combinators/takeWhile.js +31 -0
- package/dist/Fx/combinators/tapEffect.d.ts +16 -0
- package/dist/Fx/combinators/tapEffect.d.ts.map +1 -1
- package/dist/Fx/combinators/tapEffect.js +16 -0
- package/dist/Fx/combinators/throttle.d.ts +79 -0
- package/dist/Fx/combinators/throttle.d.ts.map +1 -0
- package/dist/Fx/combinators/throttle.js +99 -0
- package/dist/Fx/combinators/timeout.d.ts +76 -0
- package/dist/Fx/combinators/timeout.d.ts.map +1 -0
- package/dist/Fx/combinators/timeout.js +110 -0
- package/dist/Fx/combinators/tuple.d.ts +30 -0
- package/dist/Fx/combinators/tuple.d.ts.map +1 -1
- package/dist/Fx/combinators/tuple.js +34 -3
- package/dist/Fx/combinators/until.d.ts +27 -0
- package/dist/Fx/combinators/until.d.ts.map +1 -0
- package/dist/Fx/combinators/until.js +56 -0
- package/dist/Fx/combinators/unwrap.d.ts +29 -0
- package/dist/Fx/combinators/unwrap.d.ts.map +1 -1
- package/dist/Fx/combinators/unwrap.js +29 -0
- package/dist/Fx/combinators/unwrapScoped.d.ts +33 -0
- package/dist/Fx/combinators/unwrapScoped.d.ts.map +1 -1
- package/dist/Fx/combinators/unwrapScoped.js +33 -0
- package/dist/Fx/combinators/when.d.ts +35 -0
- package/dist/Fx/combinators/when.d.ts.map +1 -1
- package/dist/Fx/combinators/when.js +36 -1
- package/dist/Fx/combinators/withLatestFrom.d.ts +58 -0
- package/dist/Fx/combinators/withLatestFrom.d.ts.map +1 -0
- package/dist/Fx/combinators/withLatestFrom.js +68 -0
- package/dist/Fx/combinators/withSpan.d.ts +35 -1
- package/dist/Fx/combinators/withSpan.d.ts.map +1 -1
- package/dist/Fx/combinators/withSpan.js +34 -3
- package/dist/Fx/combinators/zip.d.ts +60 -0
- package/dist/Fx/combinators/zip.d.ts.map +1 -1
- package/dist/Fx/combinators/zip.js +60 -0
- package/dist/Fx/constructors/at.d.ts +20 -0
- package/dist/Fx/constructors/at.d.ts.map +1 -1
- package/dist/Fx/constructors/at.js +20 -0
- package/dist/Fx/constructors/die.d.ts +21 -0
- package/dist/Fx/constructors/die.d.ts.map +1 -1
- package/dist/Fx/constructors/die.js +21 -0
- package/dist/Fx/constructors/empty.d.ts +18 -0
- package/dist/Fx/constructors/empty.d.ts.map +1 -1
- package/dist/Fx/constructors/empty.js +18 -0
- package/dist/Fx/constructors/fail.d.ts +21 -0
- package/dist/Fx/constructors/fail.d.ts.map +1 -1
- package/dist/Fx/constructors/fail.js +21 -0
- package/dist/Fx/constructors/failCause.d.ts +22 -0
- package/dist/Fx/constructors/failCause.d.ts.map +1 -1
- package/dist/Fx/constructors/failCause.js +22 -0
- package/dist/Fx/constructors/fn.d.ts +113 -13
- package/dist/Fx/constructors/fn.d.ts.map +1 -1
- package/dist/Fx/constructors/fn.js +36 -0
- package/dist/Fx/constructors/fromEffect.d.ts +43 -1
- package/dist/Fx/constructors/fromEffect.d.ts.map +1 -1
- package/dist/Fx/constructors/fromEffect.js +43 -1
- package/dist/Fx/constructors/fromFailures.d.ts +24 -0
- package/dist/Fx/constructors/fromFailures.d.ts.map +1 -1
- package/dist/Fx/constructors/fromFailures.js +24 -0
- package/dist/Fx/constructors/fromIterable.d.ts +22 -0
- package/dist/Fx/constructors/fromIterable.d.ts.map +1 -1
- package/dist/Fx/constructors/fromIterable.js +22 -0
- package/dist/Fx/constructors/fromSchedule.d.ts +23 -0
- package/dist/Fx/constructors/fromSchedule.d.ts.map +1 -1
- package/dist/Fx/constructors/fromSchedule.js +25 -2
- package/dist/Fx/constructors/index.d.ts +2 -1
- package/dist/Fx/constructors/index.d.ts.map +1 -1
- package/dist/Fx/constructors/index.js +2 -1
- package/dist/Fx/constructors/interrupt.d.ts +21 -1
- package/dist/Fx/constructors/interrupt.d.ts.map +1 -1
- package/dist/Fx/constructors/interrupt.js +21 -1
- package/dist/Fx/constructors/make.d.ts +146 -1
- package/dist/Fx/constructors/make.d.ts.map +1 -1
- package/dist/Fx/constructors/make.js +54 -3
- package/dist/Fx/constructors/periodic.d.ts +29 -0
- package/dist/Fx/constructors/periodic.d.ts.map +1 -1
- package/dist/Fx/constructors/periodic.js +29 -0
- package/dist/Fx/constructors/succeed.d.ts +75 -3
- package/dist/Fx/constructors/succeed.d.ts.map +1 -1
- package/dist/Fx/constructors/succeed.js +75 -3
- package/dist/Fx/constructors/suspend.d.ts +28 -0
- package/dist/Fx/constructors/suspend.d.ts.map +1 -1
- package/dist/Fx/constructors/suspend.js +28 -0
- package/dist/Fx/constructors/sync.d.ts +32 -0
- package/dist/Fx/constructors/sync.d.ts.map +1 -0
- package/dist/Fx/constructors/sync.js +32 -0
- package/dist/Fx/internal/DeferredRef.d.ts +259 -7
- package/dist/Fx/internal/DeferredRef.d.ts.map +1 -1
- package/dist/Fx/internal/DeferredRef.js +260 -9
- package/dist/Fx/internal/UnionToTuple.d.ts +22 -0
- package/dist/Fx/internal/UnionToTuple.d.ts.map +1 -1
- package/dist/Fx/internal/diff.d.ts +586 -0
- package/dist/Fx/internal/diff.d.ts.map +1 -1
- package/dist/Fx/internal/diff.js +120 -9
- package/dist/Fx/internal/effectableEvaluateKey.d.ts +30 -0
- package/dist/Fx/internal/effectableEvaluateKey.d.ts.map +1 -0
- package/dist/Fx/internal/effectableEvaluateKey.js +29 -0
- package/dist/Fx/internal/effectableWithOverride.d.ts +55 -0
- package/dist/Fx/internal/effectableWithOverride.d.ts.map +1 -0
- package/dist/Fx/internal/effectableWithOverride.js +46 -0
- package/dist/Fx/internal/equivalence.d.ts +29 -0
- package/dist/Fx/internal/equivalence.d.ts.map +1 -1
- package/dist/Fx/internal/equivalence.js +29 -0
- package/dist/Fx/internal/multicast.d.ts +145 -2
- package/dist/Fx/internal/multicast.d.ts.map +1 -1
- package/dist/Fx/internal/multicast.js +146 -4
- package/dist/Fx/internal/ring-buffer.d.ts +149 -0
- package/dist/Fx/internal/ring-buffer.d.ts.map +1 -1
- package/dist/Fx/internal/ring-buffer.js +155 -0
- package/dist/Fx/internal/scope.d.ts +184 -0
- package/dist/Fx/internal/scope.d.ts.map +1 -1
- package/dist/Fx/internal/scope.js +150 -0
- package/dist/Fx/internal/yieldable.d.ts +117 -2
- package/dist/Fx/internal/yieldable.d.ts.map +1 -1
- package/dist/Fx/internal/yieldable.js +86 -3
- package/dist/Fx/run/collect.d.ts +89 -0
- package/dist/Fx/run/collect.d.ts.map +1 -1
- package/dist/Fx/run/collect.js +90 -1
- package/dist/Fx/run/first.d.ts +22 -0
- package/dist/Fx/run/first.d.ts.map +1 -1
- package/dist/Fx/run/first.js +22 -0
- package/dist/Fx/run/fork.d.ts +50 -0
- package/dist/Fx/run/fork.d.ts.map +1 -1
- package/dist/Fx/run/fork.js +50 -0
- package/dist/Fx/run/observe.d.ts +106 -0
- package/dist/Fx/run/observe.d.ts.map +1 -1
- package/dist/Fx/run/observe.js +106 -0
- package/dist/Fx/run/runPromise.d.ts +43 -0
- package/dist/Fx/run/runPromise.d.ts.map +1 -1
- package/dist/Fx/run/runPromise.js +43 -0
- package/dist/Fx/stream.d.ts +92 -0
- package/dist/Fx/stream.d.ts.map +1 -1
- package/dist/Fx/stream.js +60 -1
- package/dist/Push/Push.d.ts +1216 -91
- package/dist/Push/Push.d.ts.map +1 -1
- package/dist/Push/Push.js +1012 -83
- package/dist/RefArray.d.ts +2 -0
- package/dist/RefArray.d.ts.map +1 -0
- package/dist/RefArray.js +1 -0
- package/dist/RefBigDecimal.d.ts +2 -0
- package/dist/RefBigDecimal.d.ts.map +1 -0
- package/dist/RefBigDecimal.js +1 -0
- package/dist/RefBigInt.d.ts +2 -0
- package/dist/RefBigInt.d.ts.map +1 -0
- package/dist/RefBigInt.js +1 -0
- package/dist/RefBoolean.d.ts +2 -0
- package/dist/RefBoolean.d.ts.map +1 -0
- package/dist/RefBoolean.js +1 -0
- package/dist/RefCause.d.ts +2 -0
- package/dist/RefCause.d.ts.map +1 -0
- package/dist/RefCause.js +1 -0
- package/dist/RefChunk.d.ts +2 -0
- package/dist/RefChunk.d.ts.map +1 -0
- package/dist/RefChunk.js +1 -0
- package/dist/RefDateTime.d.ts +2 -0
- package/dist/RefDateTime.d.ts.map +1 -0
- package/dist/RefDateTime.js +1 -0
- package/dist/RefDuration.d.ts +2 -0
- package/dist/RefDuration.d.ts.map +1 -0
- package/dist/RefDuration.js +1 -0
- package/dist/RefGraph.d.ts +2 -0
- package/dist/RefGraph.d.ts.map +1 -0
- package/dist/RefGraph.js +1 -0
- package/dist/RefHashMap.d.ts +2 -0
- package/dist/RefHashMap.d.ts.map +1 -0
- package/dist/RefHashMap.js +1 -0
- package/dist/RefHashRing.d.ts +2 -0
- package/dist/RefHashRing.d.ts.map +1 -0
- package/dist/RefHashRing.js +1 -0
- package/dist/RefHashSet.d.ts +2 -0
- package/dist/RefHashSet.d.ts.map +1 -0
- package/dist/RefHashSet.js +1 -0
- package/dist/RefIterable.d.ts +2 -0
- package/dist/RefIterable.d.ts.map +1 -0
- package/dist/RefIterable.js +1 -0
- package/dist/RefOption.d.ts +2 -0
- package/dist/RefOption.d.ts.map +1 -0
- package/dist/RefOption.js +1 -0
- package/dist/RefRecord.d.ts +2 -0
- package/dist/RefRecord.d.ts.map +1 -0
- package/dist/RefRecord.js +1 -0
- package/dist/RefResult.d.ts +2 -0
- package/dist/RefResult.d.ts.map +1 -0
- package/dist/RefResult.js +1 -0
- package/dist/RefString.d.ts +2 -0
- package/dist/RefString.d.ts.map +1 -0
- package/dist/RefString.js +1 -0
- package/dist/RefStruct.d.ts +2 -0
- package/dist/RefStruct.d.ts.map +1 -0
- package/dist/RefStruct.js +1 -0
- package/dist/RefSubject/Hydration.d.ts +504 -0
- package/dist/RefSubject/Hydration.d.ts.map +1 -0
- package/dist/RefSubject/Hydration.js +300 -0
- package/dist/RefSubject/RefArray.d.ts +351 -4
- package/dist/RefSubject/RefArray.d.ts.map +1 -1
- package/dist/RefSubject/RefArray.js +339 -3
- package/dist/RefSubject/RefBigDecimal.d.ts +221 -1
- package/dist/RefSubject/RefBigDecimal.d.ts.map +1 -1
- package/dist/RefSubject/RefBigDecimal.js +210 -1
- package/dist/RefSubject/RefBigInt.d.ts +166 -1
- package/dist/RefSubject/RefBigInt.d.ts.map +1 -1
- package/dist/RefSubject/RefBigInt.js +155 -1
- package/dist/RefSubject/RefBoolean.d.ts +166 -1
- package/dist/RefSubject/RefBoolean.d.ts.map +1 -1
- package/dist/RefSubject/RefBoolean.js +155 -1
- package/dist/RefSubject/RefCause.d.ts +122 -1
- package/dist/RefSubject/RefCause.d.ts.map +1 -1
- package/dist/RefSubject/RefCause.js +111 -1
- package/dist/RefSubject/RefChunk.d.ts +406 -1
- package/dist/RefSubject/RefChunk.d.ts.map +1 -1
- package/dist/RefSubject/RefChunk.js +394 -0
- package/dist/RefSubject/RefDateTime.d.ts +122 -1
- package/dist/RefSubject/RefDateTime.d.ts.map +1 -1
- package/dist/RefSubject/RefDateTime.js +111 -1
- package/dist/RefSubject/RefDuration.d.ts +155 -1
- package/dist/RefSubject/RefDuration.d.ts.map +1 -1
- package/dist/RefSubject/RefDuration.js +144 -1
- package/dist/RefSubject/RefGraph.d.ts +320 -6
- package/dist/RefSubject/RefGraph.d.ts.map +1 -1
- package/dist/RefSubject/RefGraph.js +303 -0
- package/dist/RefSubject/RefHashMap.d.ts +296 -1
- package/dist/RefSubject/RefHashMap.d.ts.map +1 -1
- package/dist/RefSubject/RefHashMap.js +284 -0
- package/dist/RefSubject/RefHashRing.d.ts +146 -2
- package/dist/RefSubject/RefHashRing.d.ts.map +1 -1
- package/dist/RefSubject/RefHashRing.js +133 -0
- package/dist/RefSubject/RefHashSet.d.ts +230 -1
- package/dist/RefSubject/RefHashSet.d.ts.map +1 -1
- package/dist/RefSubject/RefHashSet.js +218 -0
- package/dist/RefSubject/RefIterable.d.ts +327 -1
- package/dist/RefSubject/RefIterable.d.ts.map +1 -1
- package/dist/RefSubject/RefIterable.js +315 -0
- package/dist/RefSubject/RefOption.d.ts +144 -1
- package/dist/RefSubject/RefOption.d.ts.map +1 -1
- package/dist/RefSubject/RefOption.js +133 -1
- package/dist/RefSubject/RefRecord.d.ts +339 -1
- package/dist/RefSubject/RefRecord.d.ts.map +1 -1
- package/dist/RefSubject/RefRecord.js +327 -0
- package/dist/RefSubject/RefResult.d.ts +155 -23
- package/dist/RefSubject/RefResult.d.ts.map +1 -1
- package/dist/RefSubject/RefResult.js +122 -1
- package/dist/RefSubject/RefString.d.ts +188 -1
- package/dist/RefSubject/RefString.d.ts.map +1 -1
- package/dist/RefSubject/RefString.js +177 -1
- package/dist/RefSubject/RefStruct.d.ts +156 -1
- package/dist/RefSubject/RefStruct.d.ts.map +1 -1
- package/dist/RefSubject/RefStruct.js +145 -1
- package/dist/RefSubject/RefSubject.d.ts +1166 -13
- package/dist/RefSubject/RefSubject.d.ts.map +1 -1
- package/dist/RefSubject/RefSubject.js +843 -51
- package/dist/RefSubject/RefTrie.d.ts +290 -4
- package/dist/RefSubject/RefTrie.d.ts.map +1 -1
- package/dist/RefSubject/RefTrie.js +278 -3
- package/dist/RefSubject/RefTuple.d.ts +117 -1
- package/dist/RefSubject/RefTuple.d.ts.map +1 -1
- package/dist/RefSubject/RefTuple.js +106 -1
- package/dist/RefSubject/index.d.ts +1 -0
- package/dist/RefSubject/index.d.ts.map +1 -1
- package/dist/RefSubject/index.js +1 -0
- package/dist/RefSubject.d.ts +2 -1
- package/dist/RefSubject.d.ts.map +1 -1
- package/dist/RefSubject.js +2 -1
- package/dist/RefTrie.d.ts +2 -0
- package/dist/RefTrie.d.ts.map +1 -0
- package/dist/RefTrie.js +1 -0
- package/dist/RefTuple.d.ts +2 -0
- package/dist/RefTuple.d.ts.map +1 -0
- package/dist/RefTuple.js +1 -0
- package/dist/Sink/Sink.d.ts +381 -10
- package/dist/Sink/Sink.d.ts.map +1 -1
- package/dist/Sink/Sink.js +49 -2
- package/dist/Sink/combinators.d.ts +731 -2
- package/dist/Sink/combinators.d.ts.map +1 -1
- package/dist/Sink/combinators.js +706 -4
- package/dist/Subject/Subject.d.ts +1013 -19
- package/dist/Subject/Subject.d.ts.map +1 -1
- package/dist/Subject/Subject.js +901 -36
- package/dist/Versioned/Versioned.d.ts +424 -7
- package/dist/Versioned/Versioned.d.ts.map +1 -1
- package/dist/Versioned/Versioned.js +238 -12
- package/dist/index.d.ts +22 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -3
- package/package.json +123 -14
- package/dist/Fx/constructors/fromYieldable.d.ts +0 -12
- package/dist/Fx/constructors/fromYieldable.d.ts.map +0 -1
- package/dist/Fx/constructors/fromYieldable.js +0 -12
- package/src/Fx/Fx.ts +0 -164
- package/src/Fx/TypeId.ts +0 -25
- package/src/Fx/combinators/additive.ts +0 -142
- package/src/Fx/combinators/catch.ts +0 -416
- package/src/Fx/combinators/causes.ts +0 -23
- package/src/Fx/combinators/changesWithEffect.ts +0 -66
- package/src/Fx/combinators/compact.ts +0 -15
- package/src/Fx/combinators/continueWith.ts +0 -78
- package/src/Fx/combinators/dropUntil.ts +0 -47
- package/src/Fx/combinators/ensuring.ts +0 -23
- package/src/Fx/combinators/exhaustLatestMap.ts +0 -74
- package/src/Fx/combinators/exhaustLatestMapEffect.ts +0 -25
- package/src/Fx/combinators/exhaustMap.ts +0 -36
- package/src/Fx/combinators/exhaustMapEffect.ts +0 -23
- package/src/Fx/combinators/exit.ts +0 -15
- package/src/Fx/combinators/filter.ts +0 -22
- package/src/Fx/combinators/filterEffect.ts +0 -31
- package/src/Fx/combinators/filterMap.ts +0 -23
- package/src/Fx/combinators/filterMapEffect.ts +0 -32
- package/src/Fx/combinators/filterMapLoop.ts +0 -35
- package/src/Fx/combinators/filterMapLoopCause.ts +0 -36
- package/src/Fx/combinators/filterMapLoopCauseEffect.ts +0 -46
- package/src/Fx/combinators/filterMapLoopEffect.ts +0 -36
- package/src/Fx/combinators/flatMap.ts +0 -51
- package/src/Fx/combinators/flatMapConcurrently.ts +0 -39
- package/src/Fx/combinators/flatMapConcurrentlyEffect.ts +0 -26
- package/src/Fx/combinators/flatMapEffect.ts +0 -42
- package/src/Fx/combinators/flip.ts +0 -14
- package/src/Fx/combinators/gen.ts +0 -24
- package/src/Fx/combinators/genScoped.ts +0 -24
- package/src/Fx/combinators/index.ts +0 -61
- package/src/Fx/combinators/keyed.ts +0 -369
- package/src/Fx/combinators/loop.ts +0 -27
- package/src/Fx/combinators/loopCause.ts +0 -34
- package/src/Fx/combinators/loopCauseEffect.ts +0 -36
- package/src/Fx/combinators/loopEffect.ts +0 -34
- package/src/Fx/combinators/map.ts +0 -22
- package/src/Fx/combinators/mapBoth.ts +0 -40
- package/src/Fx/combinators/mapEffect.ts +0 -32
- package/src/Fx/combinators/mapError.ts +0 -28
- package/src/Fx/combinators/mergeAll.ts +0 -22
- package/src/Fx/combinators/mergeOrdered.ts +0 -123
- package/src/Fx/combinators/onError.ts +0 -40
- package/src/Fx/combinators/onExit.ts +0 -82
- package/src/Fx/combinators/onInterrupt.ts +0 -87
- package/src/Fx/combinators/provide.ts +0 -124
- package/src/Fx/combinators/result.ts +0 -39
- package/src/Fx/combinators/scan.ts +0 -82
- package/src/Fx/combinators/skip.ts +0 -41
- package/src/Fx/combinators/skipRepeats.ts +0 -15
- package/src/Fx/combinators/skipRepeatsWith.ts +0 -40
- package/src/Fx/combinators/skipWhile.ts +0 -100
- package/src/Fx/combinators/slice.ts +0 -55
- package/src/Fx/combinators/switchMap.ts +0 -55
- package/src/Fx/combinators/switchMapEffect.ts +0 -25
- package/src/Fx/combinators/take.ts +0 -38
- package/src/Fx/combinators/takeUntil.ts +0 -88
- package/src/Fx/combinators/takeWhile.ts +0 -47
- package/src/Fx/combinators/tapEffect.ts +0 -39
- package/src/Fx/combinators/tuple.ts +0 -79
- package/src/Fx/combinators/unwrap.ts +0 -21
- package/src/Fx/combinators/unwrapScoped.ts +0 -26
- package/src/Fx/combinators/when.ts +0 -64
- package/src/Fx/combinators/withSpan.ts +0 -24
- package/src/Fx/combinators/zip.ts +0 -175
- package/src/Fx/constructors/at.ts +0 -23
- package/src/Fx/constructors/die.ts +0 -17
- package/src/Fx/constructors/empty.ts +0 -10
- package/src/Fx/constructors/fail.ts +0 -14
- package/src/Fx/constructors/failCause.ts +0 -14
- package/src/Fx/constructors/fn.ts +0 -245
- package/src/Fx/constructors/fromEffect.ts +0 -24
- package/src/Fx/constructors/fromFailures.ts +0 -19
- package/src/Fx/constructors/fromIterable.ts +0 -15
- package/src/Fx/constructors/fromSchedule.ts +0 -18
- package/src/Fx/constructors/fromYieldable.ts +0 -17
- package/src/Fx/constructors/index.ts +0 -15
- package/src/Fx/constructors/interrupt.ts +0 -13
- package/src/Fx/constructors/make.ts +0 -103
- package/src/Fx/constructors/periodic.ts +0 -15
- package/src/Fx/constructors/succeed.ts +0 -37
- package/src/Fx/constructors/suspend.ts +0 -6
- package/src/Fx/index.ts +0 -6
- package/src/Fx/internal/DeferredRef.ts +0 -87
- package/src/Fx/internal/UnionToTuple.ts +0 -12
- package/src/Fx/internal/diff.ts +0 -191
- package/src/Fx/internal/equivalence.ts +0 -12
- package/src/Fx/internal/multicast.ts +0 -51
- package/src/Fx/internal/ring-buffer.ts +0 -60
- package/src/Fx/internal/scope.ts +0 -58
- package/src/Fx/internal/yieldable.ts +0 -31
- package/src/Fx/run/collect.ts +0 -79
- package/src/Fx/run/first.ts +0 -20
- package/src/Fx/run/fork.ts +0 -40
- package/src/Fx/run/index.ts +0 -5
- package/src/Fx/run/observe.ts +0 -114
- package/src/Fx/run/runPromise.ts +0 -32
- package/src/Fx/stream.ts +0 -42
- package/src/Fx.additive-combinators.test.ts +0 -126
- package/src/Fx.catch-additive.test.ts +0 -206
- package/src/Fx.catch.test.ts +0 -60
- package/src/Fx.dropUntil.test.ts +0 -61
- package/src/Fx.fn.test.ts +0 -51
- package/src/Fx.lifecycle.test.ts +0 -79
- package/src/Fx.mapError-mapBoth.test.ts +0 -101
- package/src/Fx.provide-combinators.test.ts +0 -94
- package/src/Fx.result-changesWithEffect.test.ts +0 -112
- package/src/Fx.scan.test.ts +0 -73
- package/src/Fx.takeWhile-skipWhile.test.ts +0 -84
- package/src/Fx.test.ts +0 -71
- package/src/Fx.ts +0 -1
- package/src/Fx.zip-merge-additive.test.ts +0 -171
- package/src/Fx.zip.test.ts +0 -133
- package/src/Push/Push.ts +0 -1093
- package/src/Push/index.ts +0 -1
- package/src/Push.additive.test.ts +0 -256
- package/src/Push.test.ts +0 -26
- package/src/Push.ts +0 -1
- package/src/RefSubject/RefArray.ts +0 -516
- package/src/RefSubject/RefBigDecimal.test.ts +0 -56
- package/src/RefSubject/RefBigDecimal.ts +0 -295
- package/src/RefSubject/RefBigInt.test.ts +0 -56
- package/src/RefSubject/RefBigInt.ts +0 -189
- package/src/RefSubject/RefBoolean.test.ts +0 -57
- package/src/RefSubject/RefBoolean.ts +0 -185
- package/src/RefSubject/RefCause.test.ts +0 -53
- package/src/RefSubject/RefCause.ts +0 -146
- package/src/RefSubject/RefChunk.ts +0 -516
- package/src/RefSubject/RefDateTime.test.ts +0 -43
- package/src/RefSubject/RefDateTime.ts +0 -261
- package/src/RefSubject/RefDuration.test.ts +0 -49
- package/src/RefSubject/RefDuration.ts +0 -188
- package/src/RefSubject/RefGraph.ts +0 -649
- package/src/RefSubject/RefHashMap.ts +0 -474
- package/src/RefSubject/RefHashRing.ts +0 -262
- package/src/RefSubject/RefHashSet.ts +0 -308
- package/src/RefSubject/RefIterable.ts +0 -454
- package/src/RefSubject/RefOption.test.ts +0 -67
- package/src/RefSubject/RefOption.ts +0 -193
- package/src/RefSubject/RefRecord.ts +0 -621
- package/src/RefSubject/RefResult.test.ts +0 -63
- package/src/RefSubject/RefResult.ts +0 -209
- package/src/RefSubject/RefString.test.ts +0 -61
- package/src/RefSubject/RefString.ts +0 -256
- package/src/RefSubject/RefStruct.test.ts +0 -60
- package/src/RefSubject/RefStruct.ts +0 -253
- package/src/RefSubject/RefSubject.ts +0 -2642
- package/src/RefSubject/RefTrie.ts +0 -365
- package/src/RefSubject/RefTuple.test.ts +0 -60
- package/src/RefSubject/RefTuple.ts +0 -231
- package/src/RefSubject/index.ts +0 -21
- package/src/RefSubject.additive-parity.test.ts +0 -101
- package/src/RefSubject.test.ts +0 -65
- package/src/RefSubject.ts +0 -1
- package/src/Sink/Sink.ts +0 -159
- package/src/Sink/combinators.ts +0 -1115
- package/src/Sink/index.ts +0 -2
- package/src/Sink.combinators.test.ts +0 -88
- package/src/Sink.reduce-collect-head-last.test.ts +0 -107
- package/src/Sink.ts +0 -1
- package/src/Subject/Subject.ts +0 -440
- package/src/Subject/index.ts +0 -1
- package/src/Subject.test.ts +0 -47
- package/src/Subject.ts +0 -1
- package/src/Versioned/Versioned.ts +0 -595
- package/src/Versioned/index.ts +0 -1
- package/src/Versioned.filterMap.test.ts +0 -91
- package/src/Versioned.test.ts +0 -23
- package/src/Versioned.ts +0 -1
- package/src/index.ts +0 -7
|
@@ -28,6 +28,32 @@ import * as Subject from "../Subject/Subject.js";
|
|
|
28
28
|
/**
|
|
29
29
|
* Creates a Versioned value from its components.
|
|
30
30
|
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* ## Why
|
|
33
|
+
*
|
|
34
|
+
* Builds one Versioned value from independently typed version, update, and current-value channels
|
|
35
|
+
* instead of forcing them into one error or environment type.
|
|
36
|
+
*
|
|
37
|
+
* ## Ownership and lifetime
|
|
38
|
+
*
|
|
39
|
+
* Construction is lazy with respect to the Fx channel. Current reads share in-flight work until
|
|
40
|
+
* interrupt is run; each component retains its declared errors and services.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* import { Effect } from "effect"
|
|
45
|
+
* import * as Fx from "@typed/fx/Fx"
|
|
46
|
+
* import * as Versioned from "@typed/fx/Versioned"
|
|
47
|
+
*
|
|
48
|
+
* const status = Versioned.make(
|
|
49
|
+
* Effect.succeed(1),
|
|
50
|
+
* Fx.succeed("ready"),
|
|
51
|
+
* Effect.succeed("ready")
|
|
52
|
+
* )
|
|
53
|
+
*
|
|
54
|
+
* const snapshot = Effect.all({ value: status, version: status.version })
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
31
57
|
* @param version - An effect that retrieves the current version number.
|
|
32
58
|
* @param fx - The stream of updates.
|
|
33
59
|
* @param effect - An effect that retrieves the current value.
|
|
@@ -36,7 +62,7 @@ import * as Subject from "../Subject/Subject.js";
|
|
|
36
62
|
* @category constructors
|
|
37
63
|
*/
|
|
38
64
|
export function make(version, fx, effect) {
|
|
39
|
-
return new VersionedImpl(version, fx, effect
|
|
65
|
+
return new VersionedImpl(version, fx, effect);
|
|
40
66
|
}
|
|
41
67
|
class VersionedImpl extends YieldableFx {
|
|
42
68
|
version;
|
|
@@ -52,13 +78,24 @@ class VersionedImpl extends YieldableFx {
|
|
|
52
78
|
return this.fx.run(sink);
|
|
53
79
|
}
|
|
54
80
|
toEffect() {
|
|
55
|
-
return this.effect
|
|
81
|
+
return this.effect;
|
|
56
82
|
}
|
|
57
83
|
interrupt = Effect.suspend(() => this.effect.interrupt());
|
|
58
84
|
}
|
|
59
85
|
/**
|
|
60
86
|
* Transforms a Versioned value into another Versioned value.
|
|
61
87
|
*
|
|
88
|
+
* @remarks
|
|
89
|
+
* ## Why
|
|
90
|
+
*
|
|
91
|
+
* Transforms the pushed and sampled channels together while retaining one version source, so both
|
|
92
|
+
* ways of consuming the value stay coherent.
|
|
93
|
+
*
|
|
94
|
+
* ## Ownership and lifetime
|
|
95
|
+
*
|
|
96
|
+
* transform does not take ownership of its inputs. Its observation and current-read channels
|
|
97
|
+
* retain upstream lifetime, typed failures, services, and interruption behavior.
|
|
98
|
+
*
|
|
62
99
|
* @param input - The source Versioned value.
|
|
63
100
|
* @param transformFx - A function to transform the update stream.
|
|
64
101
|
* @param transformGet - A function to transform the current value effect.
|
|
@@ -96,7 +133,7 @@ export class VersionedTransform extends YieldableFx {
|
|
|
96
133
|
return this._fx.run(sink);
|
|
97
134
|
}
|
|
98
135
|
toEffect() {
|
|
99
|
-
const transformed = this._transformEffect(this.input
|
|
136
|
+
const transformed = this._transformEffect(this.input);
|
|
100
137
|
const update = (v) => Effect.tapCause(Effect.tap(transformed, (value) => Effect.sync(() => {
|
|
101
138
|
this._currentValue = Option.some(Exit.succeed(value));
|
|
102
139
|
this._version = v;
|
|
@@ -110,7 +147,7 @@ export class VersionedTransform extends YieldableFx {
|
|
|
110
147
|
}
|
|
111
148
|
return update(version);
|
|
112
149
|
}));
|
|
113
|
-
return multicastEffect
|
|
150
|
+
return multicastEffect;
|
|
114
151
|
}
|
|
115
152
|
interrupt = Effect.suspend(() => {
|
|
116
153
|
if (!this._effect)
|
|
@@ -124,6 +161,33 @@ function isVersionedTransform(u) {
|
|
|
124
161
|
}
|
|
125
162
|
/**
|
|
126
163
|
* Transform a Versioned's output value as both an Fx and Effect.
|
|
164
|
+
* @remarks
|
|
165
|
+
* ## Why
|
|
166
|
+
*
|
|
167
|
+
* Applies corresponding pure projections to pushed and sampled values while leaving the version
|
|
168
|
+
* token unchanged.
|
|
169
|
+
*
|
|
170
|
+
* ## Ownership and lifetime
|
|
171
|
+
*
|
|
172
|
+
* map does not take ownership of its inputs. Its observation and current-read channels retain
|
|
173
|
+
* upstream lifetime, typed failures, services, and interruption behavior.
|
|
174
|
+
*
|
|
175
|
+
* Pure callbacks preserve push order and cardinality. `onFx` applies to every pushed update;
|
|
176
|
+
* `onEffect` applies only when the current value is sampled.
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```ts
|
|
180
|
+
* import { Effect } from "effect"
|
|
181
|
+
* import * as Versioned from "@typed/fx/Versioned"
|
|
182
|
+
*
|
|
183
|
+
* const length = Versioned.map(Versioned.of("typed"), {
|
|
184
|
+
* onFx: (value) => value.length,
|
|
185
|
+
* onEffect: (value) => value.length
|
|
186
|
+
* })
|
|
187
|
+
*
|
|
188
|
+
* const currentLength = Effect.runPromise(length)
|
|
189
|
+
* ```
|
|
190
|
+
*
|
|
127
191
|
* @since 1.18.0
|
|
128
192
|
* @category combinators
|
|
129
193
|
*/
|
|
@@ -132,6 +196,17 @@ export const map = dual(2, function map(versioned, options) {
|
|
|
132
196
|
});
|
|
133
197
|
/**
|
|
134
198
|
* Transform a Versioned's output value as both an Fx and Effect using an Effect.
|
|
199
|
+
* @remarks
|
|
200
|
+
* ## Why
|
|
201
|
+
*
|
|
202
|
+
* Allows pushed and sampled projections to require services or fail, and exposes those additions
|
|
203
|
+
* in the corresponding output channels.
|
|
204
|
+
*
|
|
205
|
+
* ## Ownership and lifetime
|
|
206
|
+
*
|
|
207
|
+
* No subscription starts during transformation. Callback effects run when their push or read
|
|
208
|
+
* channel is consumed and are interrupted with that consumer.
|
|
209
|
+
*
|
|
135
210
|
* @since 1.18.0
|
|
136
211
|
* @category combinators
|
|
137
212
|
*/
|
|
@@ -140,6 +215,17 @@ export const mapEffect = dual(2, function mapEffect(versioned, options) {
|
|
|
140
215
|
});
|
|
141
216
|
/**
|
|
142
217
|
* Filter-maps a Versioned's output as both an Fx and Effect; the Effect value becomes `Option` (Some when the predicate holds, None otherwise).
|
|
218
|
+
* @remarks
|
|
219
|
+
* ## Why
|
|
220
|
+
*
|
|
221
|
+
* Drops absent pushed values while preserving an Option for the current read, making the two
|
|
222
|
+
* absence semantics explicit.
|
|
223
|
+
*
|
|
224
|
+
* ## Ownership and lifetime
|
|
225
|
+
*
|
|
226
|
+
* filterMap does not take ownership of its inputs. Its observation and current-read channels
|
|
227
|
+
* retain upstream lifetime, typed failures, services, and interruption behavior.
|
|
228
|
+
*
|
|
143
229
|
* @since 1.18.0
|
|
144
230
|
* @category combinators
|
|
145
231
|
*/
|
|
@@ -148,6 +234,17 @@ export const filterMap = dual(2, function filterMap(versioned, options) {
|
|
|
148
234
|
});
|
|
149
235
|
/**
|
|
150
236
|
* Filter-maps a Versioned's output as both an Fx and Effect using an Effect; the Effect value becomes `Option`.
|
|
237
|
+
* @remarks
|
|
238
|
+
* ## Why
|
|
239
|
+
*
|
|
240
|
+
* Adds Effectful filtering independently to the push and current-read channels while preserving
|
|
241
|
+
* their separate error and service types.
|
|
242
|
+
*
|
|
243
|
+
* ## Ownership and lifetime
|
|
244
|
+
*
|
|
245
|
+
* No subscription starts during transformation. Callback effects run when their push or read
|
|
246
|
+
* channel is consumed and are interrupted with that consumer.
|
|
247
|
+
*
|
|
151
248
|
* @since 1.18.0
|
|
152
249
|
* @category combinators
|
|
153
250
|
*/
|
|
@@ -156,33 +253,77 @@ export const filterMapEffect = dual(2, function filterMapEffect(versioned, optio
|
|
|
156
253
|
});
|
|
157
254
|
/**
|
|
158
255
|
* Combines multiple Versioned values into a single tuple.
|
|
256
|
+
* @remarks
|
|
257
|
+
* ## Why
|
|
258
|
+
*
|
|
259
|
+
* Combines several Versioned values positionally and uses their versions as one invalidation token
|
|
260
|
+
* for the assembled tuple.
|
|
261
|
+
*
|
|
262
|
+
* ## Ownership and lifetime
|
|
263
|
+
*
|
|
264
|
+
* tuple does not take ownership of its inputs. Its observation and current-read channels retain
|
|
265
|
+
* upstream lifetime, typed failures, services, and interruption behavior.
|
|
266
|
+
*
|
|
159
267
|
* @since 1.0.0
|
|
160
268
|
* @category combinators
|
|
161
269
|
*/
|
|
162
270
|
export function tuple(versioneds) {
|
|
163
|
-
return make(Effect.map(Effect.all(versioneds.map((v) => v.version)), (versions) => versions.reduce(sum, 0)), fxTuple(...versioneds), Effect.all(versioneds.map((v) => v
|
|
271
|
+
return make(Effect.map(Effect.all(versioneds.map((v) => v.version)), (versions) => versions.reduce(sum, 0)), fxTuple(...versioneds), Effect.all(versioneds.map((v) => v), { concurrency: "unbounded" }));
|
|
164
272
|
}
|
|
165
273
|
/**
|
|
166
274
|
* Combines multiple Versioned values into a single struct.
|
|
275
|
+
* @remarks
|
|
276
|
+
* ## Why
|
|
277
|
+
*
|
|
278
|
+
* Combines named Versioned values and preserves each field's pushed value, sampled value, errors,
|
|
279
|
+
* and services in the resulting structure.
|
|
280
|
+
*
|
|
281
|
+
* ## Ownership and lifetime
|
|
282
|
+
*
|
|
283
|
+
* struct does not take ownership of its inputs. Its observation and current-read channels retain
|
|
284
|
+
* upstream lifetime, typed failures, services, and interruption behavior.
|
|
285
|
+
*
|
|
167
286
|
* @since 1.0.0
|
|
168
287
|
* @category combinators
|
|
169
288
|
*/
|
|
170
289
|
export function struct(versioneds) {
|
|
171
|
-
return make(Effect.map(Effect.all(Object.values(versioneds).map((v) => v.version)), (versions) => versions.reduce(sum, 0)), fxStruct(versioneds), Effect.all(mapRecord(versioneds, (v) => v
|
|
290
|
+
return make(Effect.map(Effect.all(Object.values(versioneds).map((v) => v.version)), (versions) => versions.reduce(sum, 0)), fxStruct(versioneds), Effect.all(mapRecord(versioneds, (v) => v), { concurrency: "unbounded" }));
|
|
172
291
|
}
|
|
173
292
|
/**
|
|
174
293
|
* Provides context to a Versioned value.
|
|
294
|
+
* @remarks
|
|
295
|
+
* ## Why
|
|
296
|
+
*
|
|
297
|
+
* Supplies one Layer to all three Versioned channels so service elimination is consistent for
|
|
298
|
+
* version reads, pushed updates, and current reads.
|
|
299
|
+
*
|
|
300
|
+
* ## Ownership and lifetime
|
|
301
|
+
*
|
|
302
|
+
* provide does not take ownership of its inputs. Its observation and current-read channels retain
|
|
303
|
+
* upstream lifetime, typed failures, services, and interruption behavior.
|
|
304
|
+
*
|
|
175
305
|
* @since 1.0.0
|
|
176
306
|
* @category combinators
|
|
177
307
|
*/
|
|
178
308
|
export const provide = (versioned, layer) => {
|
|
179
|
-
return make(Effect.provide(versioned.version, layer), fxProvide(versioned, layer), Effect.provide(versioned
|
|
309
|
+
return make(Effect.provide(versioned.version, layer), fxProvide(versioned, layer), Effect.provide(versioned, layer));
|
|
180
310
|
};
|
|
181
311
|
function mapRecord(record, f) {
|
|
182
312
|
return Object.fromEntries(Object.entries(record).map(([k, v]) => [k, f(v, k)]));
|
|
183
313
|
}
|
|
184
314
|
/**
|
|
185
315
|
* Creates a Versioned value from a constant.
|
|
316
|
+
* @remarks
|
|
317
|
+
* ## Why
|
|
318
|
+
*
|
|
319
|
+
* Creates constant versioned state for composition and testing without starting a fiber or
|
|
320
|
+
* requiring a Scope.
|
|
321
|
+
*
|
|
322
|
+
* ## Ownership and lifetime
|
|
323
|
+
*
|
|
324
|
+
* of does not take ownership of its inputs. Its observation and current-read channels retain
|
|
325
|
+
* upstream lifetime, typed failures, services, and interruption behavior.
|
|
326
|
+
*
|
|
186
327
|
* @since 1.0.0
|
|
187
328
|
* @category constructors
|
|
188
329
|
*/
|
|
@@ -191,6 +332,28 @@ export function of(value) {
|
|
|
191
332
|
}
|
|
192
333
|
/**
|
|
193
334
|
* Holds the latest value of a Versioned stream.
|
|
335
|
+
* @remarks
|
|
336
|
+
* ## Why
|
|
337
|
+
*
|
|
338
|
+
* Retains the latest pushed value for later subscribers while leaving current-value reads
|
|
339
|
+
* delegated to the original Versioned Effect.
|
|
340
|
+
*
|
|
341
|
+
* ## Ownership and lifetime
|
|
342
|
+
*
|
|
343
|
+
* The returned Fx requires Scope; its shared upstream subscription and retained buffer are
|
|
344
|
+
* finalized when that Scope closes. Current reads retain input errors and services.
|
|
345
|
+
*
|
|
346
|
+
* @example
|
|
347
|
+
* ```ts
|
|
348
|
+
* import { Effect } from "effect"
|
|
349
|
+
* import * as Versioned from "@typed/fx/Versioned"
|
|
350
|
+
*
|
|
351
|
+
* const program = Effect.scoped(Effect.gen(function* () {
|
|
352
|
+
* const shared = Versioned.hold(Versioned.of({ status: "ready" as const }))
|
|
353
|
+
* return yield* shared
|
|
354
|
+
* }))
|
|
355
|
+
* ```
|
|
356
|
+
*
|
|
194
357
|
* @since 1.0.0
|
|
195
358
|
* @category combinators
|
|
196
359
|
*/
|
|
@@ -199,6 +362,19 @@ export function hold(versioned) {
|
|
|
199
362
|
}
|
|
200
363
|
/**
|
|
201
364
|
* Multicasts a Versioned stream.
|
|
365
|
+
* @remarks
|
|
366
|
+
* ## Why
|
|
367
|
+
*
|
|
368
|
+
* Shares one upstream push subscription among concurrent observers while retaining the original
|
|
369
|
+
* current-read and version effects. Unlike `hold` and `replay`, `multicast` retains zero values: a
|
|
370
|
+
* late observer receives only pushes that happen after it subscribes.
|
|
371
|
+
*
|
|
372
|
+
* ## Ownership and lifetime
|
|
373
|
+
*
|
|
374
|
+
* The returned Fx requires Scope; that Scope owns and finalizes the shared upstream subscription.
|
|
375
|
+
* There is no replay buffer or held latest value. Current reads bypass the multicast channel and
|
|
376
|
+
* retain the input's errors and services.
|
|
377
|
+
*
|
|
202
378
|
* @since 1.0.0
|
|
203
379
|
* @category combinators
|
|
204
380
|
*/
|
|
@@ -207,6 +383,17 @@ export function multicast(versioned) {
|
|
|
207
383
|
}
|
|
208
384
|
/**
|
|
209
385
|
* Replays the last `bufferSize` values of a Versioned stream.
|
|
386
|
+
* @remarks
|
|
387
|
+
* ## Why
|
|
388
|
+
*
|
|
389
|
+
* Shares an upstream push subscription and replays a bounded number of updates to late observers
|
|
390
|
+
* without changing current-value reads.
|
|
391
|
+
*
|
|
392
|
+
* ## Ownership and lifetime
|
|
393
|
+
*
|
|
394
|
+
* The returned Fx requires Scope; its shared upstream subscription and retained buffer are
|
|
395
|
+
* finalized when that Scope closes. Current reads retain input errors and services.
|
|
396
|
+
*
|
|
210
397
|
* @since 1.0.0
|
|
211
398
|
* @category combinators
|
|
212
399
|
*/
|
|
@@ -218,6 +405,40 @@ const VARIANCE = {
|
|
|
218
405
|
_E: identity,
|
|
219
406
|
_R: identity,
|
|
220
407
|
};
|
|
408
|
+
/**
|
|
409
|
+
* Creates a Context-backed Versioned service facade and Layer constructor.
|
|
410
|
+
*
|
|
411
|
+
* @remarks
|
|
412
|
+
* ## Why
|
|
413
|
+
*
|
|
414
|
+
* Creates an Effect service tag that exposes current reads, pushed updates, and versions through
|
|
415
|
+
* one Layer-provided state dependency.
|
|
416
|
+
*
|
|
417
|
+
* ## Ownership and lifetime
|
|
418
|
+
*
|
|
419
|
+
* Calling Service is pure. The generated make Layer captures required environments and owns the
|
|
420
|
+
* provided state for the Layer Scope.
|
|
421
|
+
*
|
|
422
|
+
* @example
|
|
423
|
+
* ```ts
|
|
424
|
+
* import { Effect } from "effect"
|
|
425
|
+
* import * as Fx from "@typed/fx/Fx"
|
|
426
|
+
* import * as Versioned from "@typed/fx/Versioned"
|
|
427
|
+
*
|
|
428
|
+
* class Status extends Versioned.Service<Status, never, string, never, string>()(
|
|
429
|
+
* "example/Status"
|
|
430
|
+
* ) {}
|
|
431
|
+
*
|
|
432
|
+
* const StatusLive = Status.make(
|
|
433
|
+
* Effect.succeed(1),
|
|
434
|
+
* Fx.succeed("ready"),
|
|
435
|
+
* Effect.succeed("ready")
|
|
436
|
+
* )
|
|
437
|
+
* ```
|
|
438
|
+
*
|
|
439
|
+
* @since 1.0.0
|
|
440
|
+
* @category combinators
|
|
441
|
+
*/
|
|
221
442
|
export function Service() {
|
|
222
443
|
return (id) => {
|
|
223
444
|
const service = Context.Service(id);
|
|
@@ -225,19 +446,24 @@ export function Service() {
|
|
|
225
446
|
return class VersionedService {
|
|
226
447
|
static id = id;
|
|
227
448
|
static service = service;
|
|
228
|
-
static
|
|
449
|
+
static {
|
|
450
|
+
// @effect-diagnostics-next-line floatingEffect:off
|
|
451
|
+
Object.assign(this, service);
|
|
452
|
+
Object.assign(this.prototype, Object.getPrototypeOf(service));
|
|
453
|
+
}
|
|
454
|
+
static make = (version, fx, effect) => Layer.effect(service, Effect.context().pipe(Effect.map((context) => make(Effect.provide(version, context), fxprovideContext(fx, context), Effect.provide(effect, context)))));
|
|
229
455
|
static [FxTypeId] = VARIANCE;
|
|
230
456
|
static pipe = function () {
|
|
231
457
|
return pipeArguments(this, arguments);
|
|
232
458
|
};
|
|
233
|
-
static version = Effect.flatMap(service
|
|
234
|
-
static interrupt = Effect.flatMap(service
|
|
235
|
-
static run = (sink) => Effect.flatMap(service
|
|
459
|
+
static version = Effect.flatMap(service, (v) => v.version);
|
|
460
|
+
static interrupt = Effect.flatMap(service, (v) => v.interrupt);
|
|
461
|
+
static run = (sink) => Effect.flatMap(service, (v) => v.run(sink));
|
|
462
|
+
static override = service;
|
|
236
463
|
static [Symbol.iterator] = function* () {
|
|
237
464
|
const v = yield* service;
|
|
238
465
|
return yield* v;
|
|
239
466
|
};
|
|
240
|
-
static asEffect = () => Effect.flatMap(service.asEffect(), (v) => v.asEffect());
|
|
241
467
|
constructor() {
|
|
242
468
|
return VersionedService;
|
|
243
469
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
export * as Fx from "./Fx.js";
|
|
2
2
|
export * as Push from "./Push.js";
|
|
3
|
-
export * as RefArray from "./
|
|
4
|
-
export * as
|
|
5
|
-
export * as
|
|
3
|
+
export * as RefArray from "./RefArray.js";
|
|
4
|
+
export * as RefBigDecimal from "./RefBigDecimal.js";
|
|
5
|
+
export * as RefBigInt from "./RefBigInt.js";
|
|
6
|
+
export * as RefBoolean from "./RefBoolean.js";
|
|
7
|
+
export * as RefCause from "./RefCause.js";
|
|
8
|
+
export * as RefChunk from "./RefChunk.js";
|
|
9
|
+
export * as RefDateTime from "./RefDateTime.js";
|
|
10
|
+
export * as RefDuration from "./RefDuration.js";
|
|
11
|
+
export * as RefGraph from "./RefGraph.js";
|
|
12
|
+
export * as RefHashMap from "./RefHashMap.js";
|
|
13
|
+
export * as RefHashRing from "./RefHashRing.js";
|
|
14
|
+
export * as RefHashSet from "./RefHashSet.js";
|
|
15
|
+
export * as RefIterable from "./RefIterable.js";
|
|
16
|
+
export * as RefOption from "./RefOption.js";
|
|
17
|
+
export * as RefRecord from "./RefRecord.js";
|
|
18
|
+
export * as RefResult from "./RefResult.js";
|
|
19
|
+
export * as RefString from "./RefString.js";
|
|
20
|
+
export * as RefStruct from "./RefStruct.js";
|
|
21
|
+
export * as RefSubject from "./RefSubject.js";
|
|
22
|
+
export * as RefTrie from "./RefTrie.js";
|
|
23
|
+
export * as RefTuple from "./RefTuple.js";
|
|
24
|
+
export * as Sink from "./Sink.js";
|
|
6
25
|
export * as Subject from "./Subject.js";
|
|
7
26
|
export * as Versioned from "./Versioned.js";
|
|
8
27
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,QAAQ,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
export * as Fx from "./Fx.js";
|
|
2
2
|
export * as Push from "./Push.js";
|
|
3
|
-
export * as RefArray from "./
|
|
4
|
-
export * as
|
|
5
|
-
export * as
|
|
3
|
+
export * as RefArray from "./RefArray.js";
|
|
4
|
+
export * as RefBigDecimal from "./RefBigDecimal.js";
|
|
5
|
+
export * as RefBigInt from "./RefBigInt.js";
|
|
6
|
+
export * as RefBoolean from "./RefBoolean.js";
|
|
7
|
+
export * as RefCause from "./RefCause.js";
|
|
8
|
+
export * as RefChunk from "./RefChunk.js";
|
|
9
|
+
export * as RefDateTime from "./RefDateTime.js";
|
|
10
|
+
export * as RefDuration from "./RefDuration.js";
|
|
11
|
+
export * as RefGraph from "./RefGraph.js";
|
|
12
|
+
export * as RefHashMap from "./RefHashMap.js";
|
|
13
|
+
export * as RefHashRing from "./RefHashRing.js";
|
|
14
|
+
export * as RefHashSet from "./RefHashSet.js";
|
|
15
|
+
export * as RefIterable from "./RefIterable.js";
|
|
16
|
+
export * as RefOption from "./RefOption.js";
|
|
17
|
+
export * as RefRecord from "./RefRecord.js";
|
|
18
|
+
export * as RefResult from "./RefResult.js";
|
|
19
|
+
export * as RefString from "./RefString.js";
|
|
20
|
+
export * as RefStruct from "./RefStruct.js";
|
|
21
|
+
export * as RefSubject from "./RefSubject.js";
|
|
22
|
+
export * as RefTrie from "./RefTrie.js";
|
|
23
|
+
export * as RefTuple from "./RefTuple.js";
|
|
24
|
+
export * as Sink from "./Sink.js";
|
|
6
25
|
export * as Subject from "./Subject.js";
|
|
7
26
|
export * as Versioned from "./Versioned.js";
|
package/package.json
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typed/fx",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.6",
|
|
4
|
+
"description": "Reactive streams and state for Typed applications.",
|
|
5
|
+
"homepage": "https://github.com/TylorS/typed-smol/tree/main/packages/fx#readme",
|
|
6
|
+
"bugs": "https://github.com/TylorS/typed-smol/issues",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/TylorS/typed-smol.git",
|
|
11
|
+
"directory": "packages/fx"
|
|
12
|
+
},
|
|
4
13
|
"files": [
|
|
5
|
-
"dist"
|
|
6
|
-
"src"
|
|
14
|
+
"dist"
|
|
7
15
|
],
|
|
8
16
|
"type": "module",
|
|
9
17
|
"exports": {
|
|
@@ -11,23 +19,124 @@
|
|
|
11
19
|
"types": "./dist/index.d.ts",
|
|
12
20
|
"import": "./dist/index.js"
|
|
13
21
|
},
|
|
14
|
-
"
|
|
15
|
-
"types": "./dist
|
|
16
|
-
"import": "./dist
|
|
22
|
+
"./Fx": {
|
|
23
|
+
"types": "./dist/Fx.d.ts",
|
|
24
|
+
"import": "./dist/Fx.js"
|
|
25
|
+
},
|
|
26
|
+
"./Push": {
|
|
27
|
+
"types": "./dist/Push.d.ts",
|
|
28
|
+
"import": "./dist/Push.js"
|
|
29
|
+
},
|
|
30
|
+
"./RefSubject": {
|
|
31
|
+
"types": "./dist/RefSubject.d.ts",
|
|
32
|
+
"import": "./dist/RefSubject.js"
|
|
33
|
+
},
|
|
34
|
+
"./Sink": {
|
|
35
|
+
"types": "./dist/Sink.d.ts",
|
|
36
|
+
"import": "./dist/Sink.js"
|
|
37
|
+
},
|
|
38
|
+
"./Subject": {
|
|
39
|
+
"types": "./dist/Subject.d.ts",
|
|
40
|
+
"import": "./dist/Subject.js"
|
|
41
|
+
},
|
|
42
|
+
"./Versioned": {
|
|
43
|
+
"types": "./dist/Versioned.d.ts",
|
|
44
|
+
"import": "./dist/Versioned.js"
|
|
45
|
+
},
|
|
46
|
+
"./RefArray": {
|
|
47
|
+
"types": "./dist/RefArray.d.ts",
|
|
48
|
+
"import": "./dist/RefArray.js"
|
|
49
|
+
},
|
|
50
|
+
"./RefBigDecimal": {
|
|
51
|
+
"types": "./dist/RefBigDecimal.d.ts",
|
|
52
|
+
"import": "./dist/RefBigDecimal.js"
|
|
53
|
+
},
|
|
54
|
+
"./RefBigInt": {
|
|
55
|
+
"types": "./dist/RefBigInt.d.ts",
|
|
56
|
+
"import": "./dist/RefBigInt.js"
|
|
57
|
+
},
|
|
58
|
+
"./RefBoolean": {
|
|
59
|
+
"types": "./dist/RefBoolean.d.ts",
|
|
60
|
+
"import": "./dist/RefBoolean.js"
|
|
61
|
+
},
|
|
62
|
+
"./RefCause": {
|
|
63
|
+
"types": "./dist/RefCause.d.ts",
|
|
64
|
+
"import": "./dist/RefCause.js"
|
|
65
|
+
},
|
|
66
|
+
"./RefChunk": {
|
|
67
|
+
"types": "./dist/RefChunk.d.ts",
|
|
68
|
+
"import": "./dist/RefChunk.js"
|
|
69
|
+
},
|
|
70
|
+
"./RefDateTime": {
|
|
71
|
+
"types": "./dist/RefDateTime.d.ts",
|
|
72
|
+
"import": "./dist/RefDateTime.js"
|
|
73
|
+
},
|
|
74
|
+
"./RefDuration": {
|
|
75
|
+
"types": "./dist/RefDuration.d.ts",
|
|
76
|
+
"import": "./dist/RefDuration.js"
|
|
77
|
+
},
|
|
78
|
+
"./RefGraph": {
|
|
79
|
+
"types": "./dist/RefGraph.d.ts",
|
|
80
|
+
"import": "./dist/RefGraph.js"
|
|
81
|
+
},
|
|
82
|
+
"./RefHashMap": {
|
|
83
|
+
"types": "./dist/RefHashMap.d.ts",
|
|
84
|
+
"import": "./dist/RefHashMap.js"
|
|
85
|
+
},
|
|
86
|
+
"./RefHashRing": {
|
|
87
|
+
"types": "./dist/RefHashRing.d.ts",
|
|
88
|
+
"import": "./dist/RefHashRing.js"
|
|
89
|
+
},
|
|
90
|
+
"./RefHashSet": {
|
|
91
|
+
"types": "./dist/RefHashSet.d.ts",
|
|
92
|
+
"import": "./dist/RefHashSet.js"
|
|
93
|
+
},
|
|
94
|
+
"./RefIterable": {
|
|
95
|
+
"types": "./dist/RefIterable.d.ts",
|
|
96
|
+
"import": "./dist/RefIterable.js"
|
|
97
|
+
},
|
|
98
|
+
"./RefOption": {
|
|
99
|
+
"types": "./dist/RefOption.d.ts",
|
|
100
|
+
"import": "./dist/RefOption.js"
|
|
101
|
+
},
|
|
102
|
+
"./RefRecord": {
|
|
103
|
+
"types": "./dist/RefRecord.d.ts",
|
|
104
|
+
"import": "./dist/RefRecord.js"
|
|
105
|
+
},
|
|
106
|
+
"./RefResult": {
|
|
107
|
+
"types": "./dist/RefResult.d.ts",
|
|
108
|
+
"import": "./dist/RefResult.js"
|
|
109
|
+
},
|
|
110
|
+
"./RefString": {
|
|
111
|
+
"types": "./dist/RefString.d.ts",
|
|
112
|
+
"import": "./dist/RefString.js"
|
|
113
|
+
},
|
|
114
|
+
"./RefStruct": {
|
|
115
|
+
"types": "./dist/RefStruct.d.ts",
|
|
116
|
+
"import": "./dist/RefStruct.js"
|
|
117
|
+
},
|
|
118
|
+
"./RefTrie": {
|
|
119
|
+
"types": "./dist/RefTrie.d.ts",
|
|
120
|
+
"import": "./dist/RefTrie.js"
|
|
121
|
+
},
|
|
122
|
+
"./RefTuple": {
|
|
123
|
+
"types": "./dist/RefTuple.d.ts",
|
|
124
|
+
"import": "./dist/RefTuple.js"
|
|
17
125
|
}
|
|
18
126
|
},
|
|
19
127
|
"publishConfig": {
|
|
20
128
|
"access": "public"
|
|
21
129
|
},
|
|
22
|
-
"scripts": {
|
|
23
|
-
"build": "[ -d dist ] || rm -f tsconfig.tsbuildinfo; tsc",
|
|
24
|
-
"test": "vitest run --passWithNoTests"
|
|
25
|
-
},
|
|
26
130
|
"dependencies": {
|
|
27
|
-
"effect": "
|
|
131
|
+
"effect": "4.0.0-rc.112"
|
|
28
132
|
},
|
|
29
133
|
"devDependencies": {
|
|
30
|
-
"typescript": "
|
|
31
|
-
"vitest": "
|
|
134
|
+
"typescript": "7.0.2",
|
|
135
|
+
"vitest": "5.0.0"
|
|
136
|
+
},
|
|
137
|
+
"scripts": {
|
|
138
|
+
"build": "node -e \"const fs=require('node:fs'); fs.rmSync('dist',{recursive:true,force:true}); fs.rmSync('tsconfig.tsbuildinfo',{force:true})\" && tsc",
|
|
139
|
+
"test": "vitest run --config vitest.config.ts",
|
|
140
|
+
"test:types": "pnpm run build && tsc -p tsconfig.type-tests.json && tsc -p tsconfig.tests.json"
|
|
32
141
|
}
|
|
33
|
-
}
|
|
142
|
+
}
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,12 +0,0 @@
|
|
|
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));
|