@fncts/io 0.0.10 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- package/Cached/api.d.ts +2 -3
- package/Channel/api/interruptWhen.d.ts +1 -1
- package/Channel/api/mapOutIOC.d.ts +1 -1
- package/Channel/api/mergeAll.d.ts +1 -1
- package/Channel/api/mergeAllUnboundedWith.d.ts +1 -1
- package/Channel/api/mergeAllWith.d.ts +1 -1
- package/Channel/api/mergeMap.d.ts +1 -1
- package/Channel/api/mergeWith.d.ts +1 -1
- package/Channel/api/runScoped.d.ts +1 -2
- package/Channel/api/toPull.d.ts +1 -2
- package/Channel/api/zipC.d.ts +3 -3
- package/Channel/api.d.ts +48 -49
- package/Channel/core-api.d.ts +10 -10
- package/Channel/definition.d.ts +12 -12
- package/Channel/internal/MergeDecision.d.ts +1 -1
- package/Channel/internal/SingleProducerAsyncInput.d.ts +1 -1
- package/Clock/api.d.ts +1 -1
- package/Fiber/FiberContext.d.ts +3 -3
- package/Fiber/api/awaitAll.d.ts +1 -1
- package/Fiber/api/evalOnIO.d.ts +1 -1
- package/Fiber/api/joinAll.d.ts +1 -1
- package/Fiber/definition.d.ts +1 -1
- package/FiberRef/api/locallyScoped.d.ts +1 -2
- package/FiberRef/api/locallyScopedWith.d.ts +1 -2
- package/FiberRef/constructors.d.ts +1 -2
- package/FiberRef/unsafe.d.ts +6 -0
- package/Future/api.d.ts +1 -1
- package/Future/constructors.d.ts +1 -1
- package/Hub/api.d.ts +6 -7
- package/Hub/definition.d.ts +6 -7
- package/Hub/internal.d.ts +0 -1
- package/IO/api/acquireRelease.d.ts +1 -2
- package/IO/api/acquireReleaseExit.d.ts +1 -2
- package/IO/api/acquireReleaseInterruptible.d.ts +1 -2
- package/IO/api/acquireReleaseInterruptibleExit.d.ts +1 -2
- package/IO/api/addFinalizer.d.ts +1 -2
- package/IO/api/addFinalizerExit.d.ts +1 -2
- package/IO/api/bracket.d.ts +1 -1
- package/IO/api/bracketExit.d.ts +1 -1
- package/IO/api/clockWith.d.ts +1 -1
- package/IO/api/concurrentFinalizers.d.ts +1 -2
- package/IO/api/consoleWith.d.ts +1 -1
- package/IO/api/core-scope.d.ts +1 -1
- package/IO/api/ensuringChildren.d.ts +1 -1
- package/IO/api/environment.d.ts +8 -10
- package/IO/api/forkScoped.d.ts +1 -2
- package/IO/api/interrupt.d.ts +3 -3
- package/IO/api/onExit.d.ts +1 -1
- package/IO/api/onTermination.d.ts +1 -1
- package/IO/api/provideSomeLayer.d.ts +1 -1
- package/IO/api/race.d.ts +1 -1
- package/IO/api/raceFirst.d.ts +1 -1
- package/IO/api/randomWith.d.ts +1 -1
- package/IO/api/repeat.d.ts +3 -3
- package/IO/api/retry.d.ts +3 -3
- package/IO/api/schedule.d.ts +2 -2
- package/IO/api/scope.d.ts +1 -2
- package/IO/api/scopeWith.d.ts +1 -2
- package/IO/api/scoped.d.ts +2 -3
- package/IO/api/sequenceT.d.ts +3 -3
- package/IO/api/stateful.d.ts +1 -2
- package/IO/api/withEarlyRelease.d.ts +1 -2
- package/IO/api/withFinalizer.d.ts +1 -2
- package/IO/api/withFinalizerExit.d.ts +1 -2
- package/IO/api/zipC.d.ts +2 -2
- package/IO/api.d.ts +50 -50
- package/IO/definition.d.ts +28 -24
- package/IO/runtime.d.ts +23 -10
- package/IOEnv/definition.d.ts +2 -3
- package/IOEnv/live.d.ts +1 -1
- package/IOSpec.d.ts +1 -2
- package/Layer/MemoMap.d.ts +2 -3
- package/Layer/api.d.ts +30 -32
- package/Layer/definition.d.ts +7 -8
- package/Queue/api/dimapIO.d.ts +3 -3
- package/Queue/api/filterInputIO.d.ts +4 -4
- package/Queue/api/filterOutputIO.d.ts +6 -6
- package/Queue/api/zipWithIO.d.ts +9 -9
- package/Queue/definition.d.ts +7 -7
- package/Queue/internal.d.ts +1 -1
- package/Random/api.d.ts +4 -4
- package/Random/live.d.ts +1 -1
- package/Ref/Atomic/Atomic.d.ts +3 -3
- package/Ref/Derived.d.ts +3 -3
- package/Ref/DerivedAll.d.ts +3 -3
- package/Ref/Synchronized/api.d.ts +15 -15
- package/Ref/Synchronized/definition.d.ts +2 -2
- package/Ref/api/get.d.ts +1 -1
- package/Ref/api/modify.d.ts +9 -9
- package/Ref/api/set.d.ts +1 -1
- package/Ref/definition.d.ts +13 -13
- package/STM/api/core-api.d.ts +4 -4
- package/STM/api/core-constructors.d.ts +7 -7
- package/STM/api.d.ts +27 -39
- package/STM/definition.d.ts +9 -8
- package/STM/driver.d.ts +1 -1
- package/STM/internal/Journal.d.ts +4 -3
- package/Schedule/Decision.d.ts +10 -4
- package/Schedule/Driver.d.ts +3 -3
- package/Schedule/api.d.ts +55 -43
- package/Schedule/definition.d.ts +1 -1
- package/Scope/Finalizer/definition.d.ts +2 -2
- package/Scope/ReleaseMap/api.d.ts +1 -1
- package/Scope/ReleaseMap/definition.d.ts +1 -1
- package/Scope/api.d.ts +3 -4
- package/ScopedRef/api.d.ts +1 -2
- package/ScopedRef/definition.d.ts +1 -2
- package/Sink/api.d.ts +255 -75
- package/State/api.d.ts +1 -2
- package/Stream/api/zipAllWith.d.ts +1 -1
- package/Stream/api/zipWith.d.ts +1 -1
- package/Stream/api/zipWithChunks.d.ts +1 -1
- package/Stream/api.d.ts +91 -93
- package/Stream/definition.d.ts +3 -3
- package/Stream/internal/Take.d.ts +1 -1
- package/Supervisor/constructors.d.ts +2 -2
- package/TFuture/api.d.ts +1 -1
- package/TFuture/definition.d.ts +1 -1
- package/TReentrantLock/api.d.ts +2 -3
- package/TRef/api.d.ts +11 -11
- package/TRef/constructors.d.ts +2 -2
- package/TSemaphore/api.d.ts +2 -2
- package/TSemaphore/definition.d.ts +1 -1
- package/_cjs/Cached/api.cjs.map +1 -1
- package/_cjs/Channel/api/mapOutIOC.cjs +1 -1
- package/_cjs/Channel/api/mapOutIOC.cjs.map +1 -1
- package/_cjs/Channel/api/mergeAllWith.cjs +3 -3
- package/_cjs/Channel/api/mergeAllWith.cjs.map +1 -1
- package/_cjs/Channel/api.cjs.map +1 -1
- package/_cjs/Channel/definition.cjs.map +1 -1
- package/_cjs/Clock/live.cjs.map +1 -1
- package/_cjs/Fiber/FiberContext.cjs +5 -7
- package/_cjs/Fiber/FiberContext.cjs.map +1 -1
- package/_cjs/FiberRef/unsafe.cjs +9 -1
- package/_cjs/FiberRef/unsafe.cjs.map +1 -1
- package/_cjs/Future/api.cjs.map +1 -1
- package/_cjs/Hub/api.cjs +1 -1
- package/_cjs/Hub/api.cjs.map +1 -1
- package/_cjs/Hub/internal.cjs +4 -12
- package/_cjs/Hub/internal.cjs.map +1 -1
- package/_cjs/IO/api/addFinalizerExit.cjs +4 -8
- package/_cjs/IO/api/addFinalizerExit.cjs.map +1 -1
- package/_cjs/IO/api/ensuringChildren.cjs +1 -1
- package/_cjs/IO/api/ensuringChildren.cjs.map +1 -1
- package/_cjs/IO/api/environment.cjs +2 -3
- package/_cjs/IO/api/environment.cjs.map +1 -1
- package/_cjs/IO/api/interrupt.cjs +1 -1
- package/_cjs/IO/api/interrupt.cjs.map +1 -1
- package/_cjs/IO/api/memoize.cjs +4 -8
- package/_cjs/IO/api/memoize.cjs.map +1 -1
- package/_cjs/IO/api/provideSomeLayer.cjs +1 -2
- package/_cjs/IO/api/provideSomeLayer.cjs.map +1 -1
- package/_cjs/IO/api/scope.cjs +1 -1
- package/_cjs/IO/api/scope.cjs.map +1 -1
- package/_cjs/IO/api/scoped.cjs.map +1 -1
- package/_cjs/IO/api/withChildren.cjs +1 -1
- package/_cjs/IO/api/withChildren.cjs.map +1 -1
- package/_cjs/IO/api.cjs +1 -1
- package/_cjs/IO/api.cjs.map +1 -1
- package/_cjs/IO/definition.cjs +5 -8
- package/_cjs/IO/definition.cjs.map +1 -1
- package/_cjs/IO/runtime.cjs +69 -21
- package/_cjs/IO/runtime.cjs.map +1 -1
- package/_cjs/Layer/MemoMap.cjs +22 -38
- package/_cjs/Layer/MemoMap.cjs.map +1 -1
- package/_cjs/Layer/api.cjs +6 -4
- package/_cjs/Layer/api.cjs.map +1 -1
- package/_cjs/Layer/definition.cjs.map +1 -1
- package/_cjs/Queue/internal.cjs +2 -2
- package/_cjs/Queue/internal.cjs.map +1 -1
- package/_cjs/Queue/strategy.cjs +1 -5
- package/_cjs/Queue/strategy.cjs.map +1 -1
- package/_cjs/Ref/Atomic/Atomic.cjs.map +1 -1
- package/_cjs/Ref/Derived.cjs.map +1 -1
- package/_cjs/Ref/DerivedAll.cjs.map +1 -1
- package/_cjs/Ref/Synchronized/constructors.cjs +7 -11
- package/_cjs/Ref/Synchronized/constructors.cjs.map +1 -1
- package/_cjs/STM/api/core-constructors.cjs.map +1 -1
- package/_cjs/STM/api.cjs +59 -78
- package/_cjs/STM/api.cjs.map +1 -1
- package/_cjs/STM/definition.cjs.map +1 -1
- package/_cjs/STM/driver.cjs +7 -5
- package/_cjs/STM/driver.cjs.map +1 -1
- package/_cjs/STM/internal/Journal.cjs +20 -22
- package/_cjs/STM/internal/Journal.cjs.map +1 -1
- package/_cjs/Schedule/Decision.cjs +17 -0
- package/_cjs/Schedule/Decision.cjs.map +1 -1
- package/_cjs/Schedule/api/driver.cjs +22 -21
- package/_cjs/Schedule/api/driver.cjs.map +1 -1
- package/_cjs/Schedule/api.cjs +91 -66
- package/_cjs/Schedule/api.cjs.map +1 -1
- package/_cjs/Scope/Finalizer/definition.cjs +4 -6
- package/_cjs/Scope/Finalizer/definition.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/definition.cjs +2 -4
- package/_cjs/Scope/ReleaseMap/definition.cjs.map +1 -1
- package/_cjs/Scope/api.cjs +2 -12
- package/_cjs/Scope/api.cjs.map +1 -1
- package/_cjs/ScopedRef/api.cjs +14 -22
- package/_cjs/ScopedRef/api.cjs.map +1 -1
- package/_cjs/Sink/api.cjs +424 -131
- package/_cjs/Sink/api.cjs.map +1 -1
- package/_cjs/Stream/api.cjs +94 -94
- package/_cjs/Stream/api.cjs.map +1 -1
- package/_cjs/Supervisor/constructors.cjs +14 -8
- package/_cjs/Supervisor/constructors.cjs.map +1 -1
- package/_cjs/TFuture/definition.cjs +2 -4
- package/_cjs/TFuture/definition.cjs.map +1 -1
- package/_cjs/TSemaphore/api.cjs +7 -7
- package/_cjs/TSemaphore/api.cjs.map +1 -1
- package/_cjs/TSemaphore/definition.cjs +2 -4
- package/_cjs/TSemaphore/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/dropUntilIO.cjs +38 -0
- package/_cjs/collection/immutable/Conc/dropUntilIO.cjs.map +1 -0
- package/_cjs/collection/immutable/Conc/dropWhileIO.cjs +38 -0
- package/_cjs/collection/immutable/Conc/dropWhileIO.cjs.map +1 -0
- package/_cjs/internal/Scheduler.cjs +64 -14
- package/_cjs/internal/Scheduler.cjs.map +1 -1
- package/_mjs/Cached/api.mjs.map +1 -1
- package/_mjs/Channel/api/mapOutIOC.mjs +1 -1
- package/_mjs/Channel/api/mapOutIOC.mjs.map +1 -1
- package/_mjs/Channel/api/mergeAllWith.mjs +3 -3
- package/_mjs/Channel/api/mergeAllWith.mjs.map +1 -1
- package/_mjs/Channel/api.mjs.map +1 -1
- package/_mjs/Channel/definition.mjs.map +1 -1
- package/_mjs/Clock/live.mjs.map +1 -1
- package/_mjs/Fiber/FiberContext.mjs +5 -6
- package/_mjs/Fiber/FiberContext.mjs.map +1 -1
- package/_mjs/FiberRef/unsafe.mjs +6 -0
- package/_mjs/FiberRef/unsafe.mjs.map +1 -1
- package/_mjs/Future/api.mjs.map +1 -1
- package/_mjs/Hub/api.mjs +1 -1
- package/_mjs/Hub/api.mjs.map +1 -1
- package/_mjs/Hub/internal.mjs +4 -12
- package/_mjs/Hub/internal.mjs.map +1 -1
- package/_mjs/IO/api/addFinalizerExit.mjs +4 -8
- package/_mjs/IO/api/addFinalizerExit.mjs.map +1 -1
- package/_mjs/IO/api/ensuringChildren.mjs +1 -1
- package/_mjs/IO/api/ensuringChildren.mjs.map +1 -1
- package/_mjs/IO/api/environment.mjs +2 -3
- package/_mjs/IO/api/environment.mjs.map +1 -1
- package/_mjs/IO/api/interrupt.mjs +1 -1
- package/_mjs/IO/api/interrupt.mjs.map +1 -1
- package/_mjs/IO/api/memoize.mjs +4 -8
- package/_mjs/IO/api/memoize.mjs.map +1 -1
- package/_mjs/IO/api/provideSomeLayer.mjs +1 -2
- package/_mjs/IO/api/provideSomeLayer.mjs.map +1 -1
- package/_mjs/IO/api/scope.mjs +1 -1
- package/_mjs/IO/api/scope.mjs.map +1 -1
- package/_mjs/IO/api/scoped.mjs.map +1 -1
- package/_mjs/IO/api/withChildren.mjs +1 -1
- package/_mjs/IO/api/withChildren.mjs.map +1 -1
- package/_mjs/IO/api.mjs +1 -1
- package/_mjs/IO/api.mjs.map +1 -1
- package/_mjs/IO/definition.mjs +3 -5
- package/_mjs/IO/definition.mjs.map +1 -1
- package/_mjs/IO/runtime.mjs +61 -18
- package/_mjs/IO/runtime.mjs.map +1 -1
- package/_mjs/Layer/MemoMap.mjs +22 -38
- package/_mjs/Layer/MemoMap.mjs.map +1 -1
- package/_mjs/Layer/api.mjs +5 -4
- package/_mjs/Layer/api.mjs.map +1 -1
- package/_mjs/Layer/definition.mjs.map +1 -1
- package/_mjs/Queue/internal.mjs +2 -2
- package/_mjs/Queue/internal.mjs.map +1 -1
- package/_mjs/Queue/strategy.mjs +1 -5
- package/_mjs/Queue/strategy.mjs.map +1 -1
- package/_mjs/Ref/Atomic/Atomic.mjs.map +1 -1
- package/_mjs/Ref/Derived.mjs.map +1 -1
- package/_mjs/Ref/DerivedAll.mjs.map +1 -1
- package/_mjs/Ref/Synchronized/constructors.mjs +7 -11
- package/_mjs/Ref/Synchronized/constructors.mjs.map +1 -1
- package/_mjs/STM/api/core-constructors.mjs.map +1 -1
- package/_mjs/STM/api.mjs +52 -72
- package/_mjs/STM/api.mjs.map +1 -1
- package/_mjs/STM/definition.mjs.map +1 -1
- package/_mjs/STM/driver.mjs +6 -5
- package/_mjs/STM/driver.mjs.map +1 -1
- package/_mjs/STM/internal/Journal.mjs +20 -21
- package/_mjs/STM/internal/Journal.mjs.map +1 -1
- package/_mjs/Schedule/Decision.mjs +9 -0
- package/_mjs/Schedule/Decision.mjs.map +1 -1
- package/_mjs/Schedule/api/driver.mjs +20 -20
- package/_mjs/Schedule/api/driver.mjs.map +1 -1
- package/_mjs/Schedule/api.mjs +84 -63
- package/_mjs/Schedule/api.mjs.map +1 -1
- package/_mjs/Scope/Finalizer/definition.mjs +4 -5
- package/_mjs/Scope/Finalizer/definition.mjs.map +1 -1
- package/_mjs/Scope/ReleaseMap/definition.mjs +2 -3
- package/_mjs/Scope/ReleaseMap/definition.mjs.map +1 -1
- package/_mjs/Scope/api.mjs +2 -12
- package/_mjs/Scope/api.mjs.map +1 -1
- package/_mjs/ScopedRef/api.mjs +14 -22
- package/_mjs/ScopedRef/api.mjs.map +1 -1
- package/_mjs/Sink/api.mjs +414 -129
- package/_mjs/Sink/api.mjs.map +1 -1
- package/_mjs/Stream/api.mjs +94 -94
- package/_mjs/Stream/api.mjs.map +1 -1
- package/_mjs/Supervisor/constructors.mjs +9 -6
- package/_mjs/Supervisor/constructors.mjs.map +1 -1
- package/_mjs/TFuture/definition.mjs +2 -3
- package/_mjs/TFuture/definition.mjs.map +1 -1
- package/_mjs/TSemaphore/api.mjs +4 -4
- package/_mjs/TSemaphore/api.mjs.map +1 -1
- package/_mjs/TSemaphore/definition.mjs +2 -3
- package/_mjs/TSemaphore/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/dropUntilIO.mjs +26 -0
- package/_mjs/collection/immutable/Conc/dropUntilIO.mjs.map +1 -0
- package/_mjs/collection/immutable/Conc/dropWhileIO.mjs +26 -0
- package/_mjs/collection/immutable/Conc/dropWhileIO.mjs.map +1 -0
- package/_mjs/internal/Scheduler.mjs +62 -15
- package/_mjs/internal/Scheduler.mjs.map +1 -1
- package/_src/Cached/api.ts +3 -3
- package/_src/Channel/api/interruptWhen.ts +1 -1
- package/_src/Channel/api/mapOutIOC.ts +2 -2
- package/_src/Channel/api/mergeAll.ts +1 -1
- package/_src/Channel/api/mergeAllUnboundedWith.ts +1 -1
- package/_src/Channel/api/mergeAllWith.ts +3 -3
- package/_src/Channel/api/mergeMap.ts +1 -1
- package/_src/Channel/api/mergeWith.ts +9 -9
- package/_src/Channel/api/runScoped.ts +1 -1
- package/_src/Channel/api/toPull.ts +1 -1
- package/_src/Channel/api/zipC.ts +3 -3
- package/_src/Channel/api.ts +69 -69
- package/_src/Channel/core-api.ts +11 -11
- package/_src/Channel/definition.ts +12 -12
- package/_src/Channel/internal/MergeDecision.ts +1 -1
- package/_src/Clock/live.ts +1 -1
- package/_src/Fiber/FiberContext.ts +10 -8
- package/_src/Fiber/api/awaitAll.ts +1 -1
- package/_src/Fiber/api/evalOnIO.ts +1 -1
- package/_src/Fiber/api/joinAll.ts +1 -1
- package/_src/Fiber/definition.ts +1 -1
- package/_src/FiberRef/api/locallyScoped.ts +1 -1
- package/_src/FiberRef/api/locallyScopedWith.ts +1 -1
- package/_src/FiberRef/constructors.ts +2 -2
- package/_src/FiberRef/unsafe.ts +7 -0
- package/_src/Future/api.ts +3 -3
- package/_src/Future/constructors.ts +1 -1
- package/_src/Hub/api.ts +11 -11
- package/_src/Hub/definition.ts +6 -6
- package/_src/Hub/internal.ts +15 -15
- package/_src/IO/api/acquireRelease.ts +1 -1
- package/_src/IO/api/acquireReleaseExit.ts +1 -1
- package/_src/IO/api/acquireReleaseInterruptible.ts +1 -1
- package/_src/IO/api/acquireReleaseInterruptibleExit.ts +1 -1
- package/_src/IO/api/addFinalizer.ts +1 -1
- package/_src/IO/api/addFinalizerExit.ts +5 -7
- package/_src/IO/api/bracket.ts +1 -1
- package/_src/IO/api/bracketExit.ts +1 -1
- package/_src/IO/api/concurrentFinalizers.ts +1 -1
- package/_src/IO/api/core-scope.ts +1 -1
- package/_src/IO/api/ensuringChildren.ts +2 -2
- package/_src/IO/api/environment.ts +9 -11
- package/_src/IO/api/forkScoped.ts +1 -1
- package/_src/IO/api/interrupt.ts +3 -3
- package/_src/IO/api/memoize.ts +3 -3
- package/_src/IO/api/onExit.ts +1 -1
- package/_src/IO/api/onTermination.ts +1 -1
- package/_src/IO/api/provideSomeLayer.ts +1 -2
- package/_src/IO/api/race.ts +1 -1
- package/_src/IO/api/raceFirst.ts +1 -1
- package/_src/IO/api/repeat.ts +4 -4
- package/_src/IO/api/retry.ts +4 -4
- package/_src/IO/api/schedule.ts +3 -3
- package/_src/IO/api/scope.ts +1 -1
- package/_src/IO/api/scopeWith.ts +1 -1
- package/_src/IO/api/scoped.ts +2 -2
- package/_src/IO/api/sequenceT.ts +1 -1
- package/_src/IO/api/stateful.ts +1 -1
- package/_src/IO/api/withChildren.ts +1 -1
- package/_src/IO/api/withEarlyRelease.ts +1 -1
- package/_src/IO/api/withFinalizer.ts +1 -1
- package/_src/IO/api/withFinalizerExit.ts +1 -1
- package/_src/IO/api/zipC.ts +2 -2
- package/_src/IO/api.ts +48 -48
- package/_src/IO/definition.ts +29 -24
- package/_src/IO/runtime.ts +66 -12
- package/_src/IOEnv/definition.ts +1 -1
- package/_src/Layer/MemoMap.ts +19 -19
- package/_src/Layer/api.ts +38 -38
- package/_src/Layer/definition.ts +5 -5
- package/_src/Queue/api/dimapIO.ts +10 -10
- package/_src/Queue/api/filterInputIO.ts +4 -4
- package/_src/Queue/api/filterOutputIO.ts +6 -6
- package/_src/Queue/api/zipWithIO.ts +10 -10
- package/_src/Queue/definition.ts +7 -7
- package/_src/Queue/internal.ts +7 -7
- package/_src/Queue/strategy.ts +4 -4
- package/_src/Random/api.ts +1 -1
- package/_src/Ref/Atomic/Atomic.ts +3 -3
- package/_src/Ref/Derived.ts +3 -3
- package/_src/Ref/DerivedAll.ts +3 -3
- package/_src/Ref/Synchronized/api.ts +15 -15
- package/_src/Ref/Synchronized/constructors.ts +4 -4
- package/_src/Ref/Synchronized/definition.ts +2 -2
- package/_src/Ref/api/get.ts +2 -2
- package/_src/Ref/api/modify.ts +9 -9
- package/_src/Ref/api/set.ts +1 -1
- package/_src/Ref/definition.ts +13 -13
- package/_src/STM/api/core-api.ts +6 -6
- package/_src/STM/api/core-constructors.ts +7 -7
- package/_src/STM/api.ts +58 -89
- package/_src/STM/definition.ts +6 -6
- package/_src/STM/driver.ts +3 -3
- package/_src/STM/internal/Journal.ts +25 -16
- package/_src/Schedule/Decision.ts +10 -3
- package/_src/Schedule/Driver.ts +2 -2
- package/_src/Schedule/api/driver.ts +6 -6
- package/_src/Schedule/api.ts +97 -77
- package/_src/Schedule/definition.ts +1 -1
- package/_src/Scope/Finalizer/definition.ts +2 -2
- package/_src/Scope/ReleaseMap/api.ts +1 -1
- package/_src/Scope/ReleaseMap/definition.ts +1 -1
- package/_src/Scope/api.ts +11 -11
- package/_src/ScopedRef/api.ts +12 -17
- package/_src/ScopedRef/definition.ts +1 -1
- package/_src/Sink/api.ts +441 -86
- package/_src/State/api.ts +1 -1
- package/_src/Stream/api/zipAllWith.ts +2 -2
- package/_src/Stream/api/zipWith.ts +1 -1
- package/_src/Stream/api/zipWithChunks.ts +2 -2
- package/_src/Stream/api.ts +150 -149
- package/_src/Stream/definition.ts +3 -3
- package/_src/Stream/internal/Take.ts +1 -1
- package/_src/Supervisor/constructors.ts +7 -3
- package/_src/TFuture/api.ts +1 -1
- package/_src/TFuture/definition.ts +1 -1
- package/_src/TReentrantLock/api.ts +2 -2
- package/_src/TRef/api.ts +11 -11
- package/_src/TRef/constructors.ts +2 -2
- package/_src/TSemaphore/api.ts +2 -2
- package/_src/TSemaphore/definition.ts +1 -1
- package/_src/collection/immutable/Conc/dropUntilIO.ts +24 -0
- package/_src/collection/immutable/Conc/dropWhileIO.ts +26 -0
- package/_src/internal/Scheduler.ts +59 -15
- package/collection/immutable/Conc/dropUntilIO.d.ts +7 -0
- package/collection/immutable/Conc/dropWhileIO.d.ts +7 -0
- package/internal/Scheduler.d.ts +18 -1
- package/package.json +3 -3
package/STM/api.d.ts
CHANGED
@@ -2,8 +2,8 @@ import { Lazy } from "@fncts/base/data/function";
|
|
2
2
|
import { Maybe } from "@fncts/base/data/Maybe";
|
3
3
|
import { Either } from "@fncts/base/data/Either";
|
4
4
|
import { FiberId } from "@fncts/base/data/FiberId";
|
5
|
-
import { IO } from "@fncts/io/IO/definition";
|
6
5
|
import { Environment } from "@fncts/base/data/Environment";
|
6
|
+
import { IO } from "@fncts/io/IO/definition";
|
7
7
|
import { Refinement } from "@fncts/base/data/Refinement";
|
8
8
|
import { Predicate } from "@fncts/base/data/Predicate";
|
9
9
|
import type { Journal } from "./internal/Journal.js";
|
@@ -37,25 +37,25 @@ export declare function absolve<R, E, E1, A>(z: STM<R, E, Either<E1, A>>): STM<R
|
|
37
37
|
* @tsplus static fncts.io.STMOps Effect
|
38
38
|
* @tsplus location "@fncts/io/STM/api"
|
39
39
|
*/
|
40
|
-
export declare function makeEffect<R, E, A>(f: (journal: Journal, fiberId: FiberId, r: R) => A): STM<R, E, A>;
|
40
|
+
export declare function makeEffect<R, E, A>(f: (journal: Journal, fiberId: FiberId, r: Environment<R>) => A): STM<R, E, A>;
|
41
41
|
/**
|
42
42
|
* Retrieves the environment inside an stm.
|
43
43
|
* @tsplus static fncts.io.STMOps environment
|
44
44
|
* @tsplus location "@fncts/io/STM/api"
|
45
45
|
*/
|
46
|
-
export declare function environment<R>(): STM<R, never, R
|
46
|
+
export declare function environment<R>(): STM<R, never, Environment<R>>;
|
47
47
|
/**
|
48
48
|
* Accesses the environment of the transaction.
|
49
49
|
* @tsplus static fncts.io.STMOps environmentWith
|
50
50
|
* @tsplus location "@fncts/io/STM/api"
|
51
51
|
*/
|
52
|
-
export declare function environmentWith<R, A>(f: (r: R) => A): STM<R, never, A>;
|
52
|
+
export declare function environmentWith<R, A>(f: (r: Environment<R>) => A): STM<R, never, A>;
|
53
53
|
/**
|
54
54
|
* Accesses the environment of the transaction to perform a transaction.
|
55
55
|
* @tsplus static fncts.io.STMOps environmentWithSTM
|
56
56
|
* @tsplus location "@fncts/io/STM/api"
|
57
57
|
*/
|
58
|
-
export declare function environmentWithSTM<R0, R, E, A>(f: (r: R0) => STM<R, E, A>): STM<
|
58
|
+
export declare function environmentWithSTM<R0, R, E, A>(f: (r: Environment<R0>) => STM<R, E, A>): STM<R0 | R, E, A>;
|
59
59
|
/**
|
60
60
|
* @tsplus static fncts.io.STMOps atomically
|
61
61
|
* @tsplus getter fncts.io.STM commit
|
@@ -74,7 +74,7 @@ export declare function bimap_<R, E, A, E1, B>(stm: STM<R, E, A>, g: (e: E) => E
|
|
74
74
|
*/
|
75
75
|
export declare function catch_<N extends keyof E, K extends E[N] & string, E, R, A, R1, E1, A1>(stm: STM<R, E, A>, tag: N, k: K, f: (e: Extract<E, {
|
76
76
|
[n in N]: K;
|
77
|
-
}>) => STM<R1, E1, A1>): STM<R
|
77
|
+
}>) => STM<R1, E1, A1>): STM<R | R1, Exclude<E, {
|
78
78
|
[n in N]: K;
|
79
79
|
}> | E1, A | A1>;
|
80
80
|
/**
|
@@ -82,7 +82,7 @@ export declare function catch_<N extends keyof E, K extends E[N] & string, E, R,
|
|
82
82
|
* @tsplus fluent fncts.io.STM catchJust
|
83
83
|
* @tsplus location "@fncts/io/STM/api"
|
84
84
|
*/
|
85
|
-
export declare function catchJust_<R, E, A, R1, E1, B>(stm: STM<R, E, A>, f: (e: E) => Maybe<STM<R1, E1, B>>): STM<R1
|
85
|
+
export declare function catchJust_<R, E, A, R1, E1, B>(stm: STM<R, E, A>, f: (e: E) => Maybe<STM<R1, E1, B>>): STM<R1 | R, E | E1, A | B>;
|
86
86
|
/**
|
87
87
|
* Recovers from specified error.
|
88
88
|
* @tsplus fluent fncts.io.STM catchTag
|
@@ -92,7 +92,7 @@ export declare function catchTag_<K extends E["_tag"] & string, E extends {
|
|
92
92
|
_tag: string;
|
93
93
|
}, R, A, R1, E1, A1>(stm: STM<R, E, A>, k: K, f: (e: Extract<E, {
|
94
94
|
_tag: K;
|
95
|
-
}>) => STM<R1, E1, A1>): STM<R
|
95
|
+
}>) => STM<R1, E1, A1>): STM<R | R1, Exclude<E, {
|
96
96
|
_tag: K;
|
97
97
|
}> | E1, A | A1>;
|
98
98
|
/**
|
@@ -101,13 +101,13 @@ export declare function catchTag_<K extends E["_tag"] & string, E extends {
|
|
101
101
|
* @tsplus fluent fncts.io.STM flatMapError
|
102
102
|
* @tsplus location "@fncts/io/STM/api"
|
103
103
|
*/
|
104
|
-
export declare function chainError_<R, E, A, R2, E2>(stm: STM<R, E, A>, f: (e: E) => STM<R2, never, E2>): STM<R2
|
104
|
+
export declare function chainError_<R, E, A, R2, E2>(stm: STM<R, E, A>, f: (e: E) => STM<R2, never, E2>): STM<R2 | R, E2, A>;
|
105
105
|
/**
|
106
106
|
* Checks the condition, and if it's true, returns unit, otherwise, retries.
|
107
107
|
* @tsplus static fncts.io.STMOps check
|
108
108
|
* @tsplus location "@fncts/io/STM/api"
|
109
109
|
*/
|
110
|
-
export declare function check(predicate: () => boolean): STM<
|
110
|
+
export declare function check(predicate: () => boolean): STM<never, never, void>;
|
111
111
|
/**
|
112
112
|
* Commits this transaction atomically, regardless of whether the transaction
|
113
113
|
* is a success or a failure.
|
@@ -126,7 +126,7 @@ export declare function continueOrFail_<R, E, E1, A, A2>(fa: STM<R, E, A>, e: La
|
|
126
126
|
* @tsplus fluent fncts.io.STM continueOrFailSTM
|
127
127
|
* @tsplus location "@fncts/io/STM/api"
|
128
128
|
*/
|
129
|
-
export declare function continueOrFailSTM_<R, E, E1, A, R2, E2, A2>(fa: STM<R, E, A>, e: Lazy<E1>, pf: (a: A) => Maybe<STM<R2, E2, A2>>): STM<R2
|
129
|
+
export declare function continueOrFailSTM_<R, E, E1, A, R2, E2, A2>(fa: STM<R, E, A>, e: Lazy<E1>, pf: (a: A) => Maybe<STM<R2, E2, A2>>): STM<R2 | R, E | E1 | E2, A2>;
|
130
130
|
/**
|
131
131
|
* Fail with `e` if the supplied `PartialFunction` does not match, otherwise
|
132
132
|
* succeed with the returned value.
|
@@ -140,7 +140,7 @@ export declare function continueOrRetry_<R, E, A, A2>(fa: STM<R, E, A>, pf: (a:
|
|
140
140
|
* @tsplus fluent fncts.io.STM continueOrRetrySTM
|
141
141
|
* @tsplus location "@fncts/io/STM/api"
|
142
142
|
*/
|
143
|
-
export declare function continueOrRetrySTM_<R, E, A, R2, E2, A2>(fa: STM<R, E, A>, pf: (a: A) => Maybe<STM<R2, E2, A2>>): STM<R2
|
143
|
+
export declare function continueOrRetrySTM_<R, E, A, R2, E2, A2>(fa: STM<R, E, A>, pf: (a: A) => Maybe<STM<R2, E2, A2>>): STM<R2 | R, E | E2, A2>;
|
144
144
|
/**
|
145
145
|
* Suspends creation of the specified transaction lazily.
|
146
146
|
* @tsplus static fncts.io.STMOps defer
|
@@ -171,14 +171,14 @@ export declare function filterMap_<R, E, A, B>(stm: STM<R, E, A>, f: (a: A) => M
|
|
171
171
|
* @tsplus fluent fncts.io.STM filterMapSTM
|
172
172
|
* @tsplus location "@fncts/io/STM/api"
|
173
173
|
*/
|
174
|
-
export declare function filterMapSTM_<R, E, A, R1, E1, B>(self: STM<R, E, A>, f: (a: A) => Maybe<STM<R1, E1, B>>): STM<R
|
174
|
+
export declare function filterMapSTM_<R, E, A, R1, E1, B>(self: STM<R, E, A>, f: (a: A) => Maybe<STM<R1, E1, B>>): STM<R | R1, E | E1, B>;
|
175
175
|
/**
|
176
176
|
* Applies `or` if the predicate fails.
|
177
177
|
* @tsplus fluent fncts.io.STM filterOrElse
|
178
178
|
* @tsplus location "@fncts/io/STM/api"
|
179
179
|
*/
|
180
|
-
export declare function filterOrElse_<R, E, A, B extends A, R2, E2, A2>(fa: STM<R, E, A>, p: Refinement<A, B>, or: (a: Exclude<A, B>) => STM<R2, E2, A2>): STM<R
|
181
|
-
export declare function filterOrElse_<R, E, A, R2, E2, A2>(fa: STM<R, E, A>, p: Predicate<A>, or: (a: A) => STM<R2, E2, A2>): STM<R
|
180
|
+
export declare function filterOrElse_<R, E, A, B extends A, R2, E2, A2>(fa: STM<R, E, A>, p: Refinement<A, B>, or: (a: Exclude<A, B>) => STM<R2, E2, A2>): STM<R | R2, E | E2, B | A2>;
|
181
|
+
export declare function filterOrElse_<R, E, A, R2, E2, A2>(fa: STM<R, E, A>, p: Predicate<A>, or: (a: A) => STM<R2, E2, A2>): STM<R | R2, E | E2, A | A2>;
|
182
182
|
/**
|
183
183
|
* Fails with `failWith` if the predicate fails.
|
184
184
|
* @tsplus fluent fncts.io.STM filterOrFail
|
@@ -198,7 +198,7 @@ export declare function filterOrHalt_<R, E, A>(fa: STM<R, E, A>, p: Predicate<A>
|
|
198
198
|
* @tsplus getter fncts.io.STM flatten
|
199
199
|
* @tsplus location "@fncts/io/STM/api"
|
200
200
|
*/
|
201
|
-
export declare function flatten<R, E, R1, E1, B>(stm: STM<R, E, STM<R1, E1, B>>): STM<R1
|
201
|
+
export declare function flatten<R, E, R1, E1, B>(stm: STM<R, E, STM<R1, E1, B>>): STM<R1 | R, E | E1, B>;
|
202
202
|
/**
|
203
203
|
* Unwraps the optional error, defaulting to the provided value.
|
204
204
|
* @tsplus fluent fncts.io.STM flattenErrorOption
|
@@ -217,13 +217,13 @@ export declare function foreach_<A, R, E, B>(it: Iterable<A>, f: (a: A) => STM<R
|
|
217
217
|
* @tsplus static fncts.io.STMOps fromEither
|
218
218
|
* @tsplus location "@fncts/io/STM/api"
|
219
219
|
*/
|
220
|
-
export declare function fromEither<E, A>(e: Lazy<Either<E, A>>): STM<
|
220
|
+
export declare function fromEither<E, A>(e: Lazy<Either<E, A>>): STM<never, E, A>;
|
221
221
|
/**
|
222
222
|
* Lifts an `Either` into a `STM`.
|
223
223
|
* @tsplus static fncts.io.STMOps fromEitherNow
|
224
224
|
* @tsplus location "@fncts/io/STM/api"
|
225
225
|
*/
|
226
|
-
export declare function fromEitherNow<E, A>(e: Either<E, A>): STM<
|
226
|
+
export declare function fromEitherNow<E, A>(e: Either<E, A>): STM<never, E, A>;
|
227
227
|
/**
|
228
228
|
* Unwraps the optional success of this effect, but can fail with an None value.
|
229
229
|
*/
|
@@ -234,26 +234,26 @@ export declare function get<R, E, A>(stm: STM<R, E, Maybe<A>>): STM<R, Maybe<E>,
|
|
234
234
|
* @tsplus fluent fncts.io.STM provideEnvironment
|
235
235
|
* @tsplus location "@fncts/io/STM/api"
|
236
236
|
*/
|
237
|
-
export declare function provideEnvironment_<R, E, A>(stm: STM<R, E, A>, r: R): STM<
|
237
|
+
export declare function provideEnvironment_<R, E, A>(stm: STM<R, E, A>, r: Environment<R>): STM<never, E, A>;
|
238
238
|
/**
|
239
239
|
* Provides some of the environment required to run this effect,
|
240
240
|
* leaving the remainder `R0`.
|
241
241
|
* @tsplus fluent fncts.io.STM contramapEnvironment
|
242
242
|
* @tsplus location "@fncts/io/STM/api"
|
243
243
|
*/
|
244
|
-
export declare function contramapEnvironment_<R, E, A, R0>(self: STM<R, E, A>, f: (r: R0) => R): STM<R0, E, A>;
|
244
|
+
export declare function contramapEnvironment_<R, E, A, R0>(self: STM<R, E, A>, f: (r: Environment<R0>) => Environment<R>): STM<R0, E, A>;
|
245
245
|
/**
|
246
246
|
* Halts the fiber running the effect.
|
247
247
|
* @tsplus static fncts.io.STMOps halt
|
248
248
|
* @tsplus location "@fncts/io/STM/api"
|
249
249
|
*/
|
250
|
-
export declare function halt(u: Lazy<unknown>): STM<
|
250
|
+
export declare function halt(u: Lazy<unknown>): STM<never, never, never>;
|
251
251
|
/**
|
252
252
|
* Halts the fiber running the effect.
|
253
253
|
* @tsplus static fncts.io.STMOps haltNow
|
254
254
|
* @tsplus location "@fncts/io/STM/api"
|
255
255
|
*/
|
256
|
-
export declare function haltNow(u: unknown): STM<
|
256
|
+
export declare function haltNow(u: unknown): STM<never, never, never>;
|
257
257
|
/**
|
258
258
|
* Returns a successful effect with the head of the list if the list is
|
259
259
|
* non-empty or fails with the error `None` if the list is empty.
|
@@ -266,7 +266,7 @@ export declare function head<R, E, A>(stm: STM<R, E, Iterable<A>>): STM<R, Maybe
|
|
266
266
|
* @tsplus static fncts.io.STMOps interrupt
|
267
267
|
* @tsplus location "@fncts/io/STM/api"
|
268
268
|
*/
|
269
|
-
export declare const interrupt: STM<
|
269
|
+
export declare const interrupt: STM<never, never, never>;
|
270
270
|
/**
|
271
271
|
* Returns whether this effect is a failure.
|
272
272
|
* @tsplus getter fncts.io.STM isFailure
|
@@ -279,18 +279,6 @@ export declare function isFailure<R, E, A>(stm: STM<R, E, A>): STM<R, never, boo
|
|
279
279
|
* @tsplus location "@fncts/io/STM/api"
|
280
280
|
*/
|
281
281
|
export declare function isSuccess<R, E, A>(stm: STM<R, E, A>): STM<R, never, boolean>;
|
282
|
-
/**
|
283
|
-
* Depending on provided environment returns either this one or the other effect.
|
284
|
-
* @tsplus fluent fncts.io.STM join
|
285
|
-
* @tsplus location "@fncts/io/STM/api"
|
286
|
-
*/
|
287
|
-
export declare function join_<R, E, A, R1, E1, A1>(stm: STM<R, E, A>, that: STM<R1, E1, A1>): STM<Either<R, R1>, E | E1, A | A1>;
|
288
|
-
/**
|
289
|
-
* Depending on provided environment returns either this one or the other effect.
|
290
|
-
* @tsplus fluent fncts.io.STM joinEither
|
291
|
-
* @tsplus location "@fncts/io/STM/api"
|
292
|
-
*/
|
293
|
-
export declare function joinEither_<R, E, A, R1, E1, A1>(stm: STM<R, E, A>, that: STM<R1, E1, A1>): STM<Either<R, R1>, E | E1, Either<A, A1>>;
|
294
282
|
/**
|
295
283
|
* Returns a successful effect if the value is `Left`, or fails with the error `None`.
|
296
284
|
* @tsplus getter fncts.io.STM left
|
@@ -364,23 +352,23 @@ export declare function swapWith_<R, E, A, R2, E2, A2>(stm: STM<R, E, A>, f: (st
|
|
364
352
|
* @tsplus fluent fncts.io.STM tap
|
365
353
|
* @tsplus location "@fncts/io/STM/api"
|
366
354
|
*/
|
367
|
-
export declare function tap_<R, E, A, R1, E1, B>(stm: STM<R, E, A>, f: (a: A) => STM<R1, E1, B>): STM<R1
|
355
|
+
export declare function tap_<R, E, A, R1, E1, B>(stm: STM<R, E, A>, f: (a: A) => STM<R1, E1, B>): STM<R1 | R, E | E1, A>;
|
368
356
|
/**
|
369
357
|
* Returns an effect with the value on the left part.
|
370
358
|
* @tsplus static fncts.io.STMOps toLeft
|
371
359
|
* @tsplus location "@fncts/io/STM/api"
|
372
360
|
*/
|
373
|
-
export declare function toLeft<A>(a: Lazy<A>): STM<
|
361
|
+
export declare function toLeft<A>(a: Lazy<A>): STM<never, never, Either<A, never>>;
|
374
362
|
/**
|
375
363
|
* Returns an `STM` effect that succeeds with `Unit`.
|
376
364
|
* @tsplus static fncts.io.STMOps unit
|
377
365
|
* @tsplus location "@fncts/io/STM/api"
|
378
366
|
*/
|
379
|
-
export declare const unit: STM<
|
367
|
+
export declare const unit: STM<never, never, void>;
|
380
368
|
/**
|
381
369
|
* Sequentially zips this value with the specified one, combining the values
|
382
370
|
* using the specified combiner function.
|
383
371
|
* @tsplus fluent fncts.io.STM zipWith
|
384
372
|
* @tsplus location "@fncts/io/STM/api"
|
385
373
|
*/
|
386
|
-
export declare function zipWith_<R, E, A, R1, E1, B, C>(self: STM<R, E, A>, that: STM<R1, E1, B>, f: (a: A, b: B) => C): STM<R
|
374
|
+
export declare function zipWith_<R, E, A, R1, E1, B, C>(self: STM<R, E, A>, that: STM<R1, E1, B>, f: (a: A, b: B) => C): STM<R | R1, E | E1, C>;
|
package/STM/definition.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { FiberId } from "@fncts/base/data/FiberId";
|
2
|
+
import { Environment } from "@fncts/base/data/Environment";
|
2
3
|
import type { Journal } from "./internal/Journal.js";
|
3
4
|
import type { _A, _E, _R } from "@fncts/base/types";
|
4
5
|
export declare const enum STMTag {
|
@@ -18,7 +19,7 @@ export declare type STMTypeId = typeof STMTypeId;
|
|
18
19
|
*/
|
19
20
|
export declare abstract class STM<R, E, A> {
|
20
21
|
readonly _typeId: STMTypeId;
|
21
|
-
readonly _R: (
|
22
|
+
readonly _R: () => R;
|
22
23
|
readonly _E: () => E;
|
23
24
|
readonly _A: () => A;
|
24
25
|
}
|
@@ -29,12 +30,12 @@ export declare function unifySTM<X extends STM<any, any, any>>(self: X): STM<_R<
|
|
29
30
|
/**
|
30
31
|
* @tsplus type fncts.io.STM
|
31
32
|
*/
|
32
|
-
export interface USTM<A> extends STM<
|
33
|
+
export interface USTM<A> extends STM<never, never, A> {
|
33
34
|
}
|
34
35
|
export declare class Effect<R, E, A> extends STM<R, E, A> {
|
35
|
-
readonly f: (journal: Journal, fiberId: FiberId, r: R) => A;
|
36
|
+
readonly f: (journal: Journal, fiberId: FiberId, r: Environment<R>) => A;
|
36
37
|
readonly _tag = STMTag.Effect;
|
37
|
-
constructor(f: (journal: Journal, fiberId: FiberId, r: R) => A);
|
38
|
+
constructor(f: (journal: Journal, fiberId: FiberId, r: Environment<R>) => A);
|
38
39
|
}
|
39
40
|
export declare class OnFailure<R, E, A, E1> extends STM<R, E1, A> {
|
40
41
|
readonly stm: STM<R, E, A>;
|
@@ -56,21 +57,21 @@ export declare class OnSuccess<R, E, A, B> extends STM<R, E, B> {
|
|
56
57
|
readonly _tag = STMTag.OnSuccess;
|
57
58
|
constructor(stm: STM<R, E, A>, apply: (a: A) => STM<R, E, B>);
|
58
59
|
}
|
59
|
-
export declare class Succeed<A> extends STM<
|
60
|
+
export declare class Succeed<A> extends STM<never, never, A> {
|
60
61
|
readonly a: () => A;
|
61
62
|
readonly _tag = STMTag.Succeed;
|
62
63
|
constructor(a: () => A);
|
63
64
|
}
|
64
|
-
export declare class SucceedNow<A> extends STM<
|
65
|
+
export declare class SucceedNow<A> extends STM<never, never, A> {
|
65
66
|
readonly a: A;
|
66
67
|
readonly _tag = STMTag.SucceedNow;
|
67
68
|
constructor(a: A);
|
68
69
|
}
|
69
70
|
export declare class ContramapEnvironment<R, E, A, R0> extends STM<R0, E, A> {
|
70
71
|
readonly stm: STM<R, E, A>;
|
71
|
-
readonly f: (_: R0) => R
|
72
|
+
readonly f: (_: Environment<R0>) => Environment<R>;
|
72
73
|
readonly _tag = STMTag.ContramapEnvironment;
|
73
|
-
constructor(stm: STM<R, E, A>, f: (_: R0) => R);
|
74
|
+
constructor(stm: STM<R, E, A>, f: (_: Environment<R0>) => Environment<R>);
|
74
75
|
}
|
75
76
|
export declare function concrete<R, E, A>(_: STM<R, E, A>): asserts _ is Effect<R, E, A> | OnFailure<R, unknown, A, E> | OnSuccess<R, E, unknown, A> | OnRetry<R, E, A> | Succeed<A> | SucceedNow<A> | ContramapEnvironment<unknown, E, A, R>;
|
76
77
|
export declare const FailExceptionTypeId: unique symbol;
|
package/STM/driver.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { STM } from "@fncts/io/STM/definition";
|
2
|
-
import { FiberId } from "@fncts/base/data/FiberId";
|
3
2
|
import { Environment } from "@fncts/base/data/Environment";
|
3
|
+
import { FiberId } from "@fncts/base/data/FiberId";
|
4
4
|
import { TExit } from "@fncts/io/TExit/definition";
|
5
5
|
import type { Journal } from "./internal/Journal.js";
|
6
6
|
export declare class STMDriver<R, E, A> {
|
@@ -6,6 +6,7 @@ import { IO } from "@fncts/io/IO/definition";
|
|
6
6
|
import type { Entry } from "./Entry.js";
|
7
7
|
import type { TryCommit } from "./TryCommit.js";
|
8
8
|
import type { AtomicReference } from "@fncts/base/internal/AtomicReference";
|
9
|
+
import type { Scheduler } from "@fncts/io/internal/Scheduler";
|
9
10
|
import type { Atomic } from "@fncts/io/TRef";
|
10
11
|
import type { TxnId } from "@fncts/io/TxnId";
|
11
12
|
import { CommitState } from "./CommitState.js";
|
@@ -72,7 +73,7 @@ export declare function execTodos(todos: Map<TxnId, Todo>): void;
|
|
72
73
|
* @tsplus fluent fncts.io.Journal completeTodos
|
73
74
|
* @tsplus location "@fncts/io/STM/internal/Journal"
|
74
75
|
*/
|
75
|
-
export declare function completeTodos<E, A>(journal: Journal, exit: Exit<E, A
|
76
|
+
export declare function completeTodos<E, A>(journal: Journal, exit: Exit<E, A>, scheduler: Scheduler): Done<E, A>;
|
76
77
|
/**
|
77
78
|
* For the given transaction id, adds the specified todo effect to all
|
78
79
|
* `TRef` values.
|
@@ -84,8 +85,8 @@ export declare function addTodo(journal: Journal, txnId: TxnId, todoEffect: Todo
|
|
84
85
|
* Finds all the new todo targets that are not already tracked in the `oldJournal`.
|
85
86
|
*/
|
86
87
|
export declare function untrackedTodoTargets(oldJournal: Journal, newJournal: Journal): Journal;
|
87
|
-
export declare function tryCommitSync<R, E, A>(fiberId: FiberId, stm: STM<R, E, A>, r: Environment<R
|
88
|
-
export declare function tryCommitAsync<R, E, A>(journal: Journal | undefined, fiberId: FiberId, stm: STM<R, E, A>, txnId: TxnId, state: AtomicReference<CommitState<E, A>>, r: Environment<R
|
88
|
+
export declare function tryCommitSync<R, E, A>(fiberId: FiberId, stm: STM<R, E, A>, r: Environment<R>, scheduler: Scheduler): TryCommit<E, A>;
|
89
|
+
export declare function tryCommitAsync<R, E, A>(journal: Journal | undefined, fiberId: FiberId, stm: STM<R, E, A>, txnId: TxnId, state: AtomicReference<CommitState<E, A>>, r: Environment<R>, scheduler: Scheduler): (k: (_: IO<R, E, A>) => unknown) => void;
|
89
90
|
/**
|
90
91
|
* Determines if the journal is valid.
|
91
92
|
* @tsplus getter fncts.io.Journal isValid
|
package/Schedule/Decision.d.ts
CHANGED
@@ -1,12 +1,13 @@
|
|
1
|
+
import { Intervals } from "@fncts/base/data/Intervals";
|
1
2
|
import { Interval } from "@fncts/base/data/Interval";
|
2
3
|
export declare const enum DecisionTag {
|
3
4
|
Continue = "Continue",
|
4
5
|
Done = "Done"
|
5
6
|
}
|
6
7
|
export declare class Continue {
|
7
|
-
readonly interval:
|
8
|
+
readonly interval: Intervals;
|
8
9
|
readonly _tag = DecisionTag.Continue;
|
9
|
-
constructor(interval:
|
10
|
+
constructor(interval: Intervals);
|
10
11
|
}
|
11
12
|
export declare class Done {
|
12
13
|
readonly _tag = DecisionTag.Done;
|
@@ -30,9 +31,14 @@ export declare const done: Decision;
|
|
30
31
|
* @tsplus static fncts.io.Schedule.DecisionOps Continue
|
31
32
|
* @tsplus location "@fncts/io/Schedule/Decision"
|
32
33
|
*/
|
33
|
-
export declare function continue_(interval:
|
34
|
+
export declare function continue_(interval: Intervals): Decision;
|
35
|
+
/**
|
36
|
+
* @tsplus static fncts.io.Schedule.DecisionOps continueWith
|
37
|
+
* @tsplus location "@fncts/io/Schedule/Decision"
|
38
|
+
*/
|
39
|
+
export declare function continueWith(interval: Interval): Decision;
|
34
40
|
/**
|
35
41
|
* @tsplus fluent fncts.io.Schedule.Decision match
|
36
42
|
* @tsplus location "@fncts/io/Schedule/Decision"
|
37
43
|
*/
|
38
|
-
export declare function match_<A, B>(self: Decision, onDone: () => A, onContinue: (interval:
|
44
|
+
export declare function match_<A, B>(self: Decision, onDone: () => A, onContinue: (interval: Intervals) => B): A | B;
|
package/Schedule/Driver.d.ts
CHANGED
@@ -7,13 +7,13 @@ import { NoSuchElementError } from "@fncts/base/data/exceptions";
|
|
7
7
|
*/
|
8
8
|
export declare class Driver<State, Env, In, Out> {
|
9
9
|
readonly next: (inp: In, __tsplusTrace?: string) => IO<Env, Nothing, Out>;
|
10
|
-
readonly last: IO<
|
10
|
+
readonly last: IO<never, NoSuchElementError, Out>;
|
11
11
|
readonly reset: UIO<void>;
|
12
12
|
readonly state: UIO<State>;
|
13
|
-
constructor(next: (inp: In, __tsplusTrace?: string) => IO<Env, Nothing, Out>, last: IO<
|
13
|
+
constructor(next: (inp: In, __tsplusTrace?: string) => IO<Env, Nothing, Out>, last: IO<never, NoSuchElementError, Out>, reset: UIO<void>, state: UIO<State>);
|
14
14
|
}
|
15
15
|
/**
|
16
16
|
* @tsplus static fncts.io.Schedule.DriverOps __call
|
17
17
|
* @tsplus location "@fncts/io/Schedule/Driver"
|
18
18
|
*/
|
19
|
-
export declare function makeDriver<State, Env, In, Out>(next: (inp: In, __tsplusTrace?: string) => IO<Env, Nothing, Out>, last: IO<
|
19
|
+
export declare function makeDriver<State, Env, In, Out>(next: (inp: In, __tsplusTrace?: string) => IO<Env, Nothing, Out>, last: IO<never, NoSuchElementError, Out>, reset: UIO<void>, state: UIO<State>): Driver<State, Env, In, Out>;
|