@fncts/io 0.0.22 → 0.0.23
Sign up to get free protection for your applications and to get access to all the features.
- package/Cached/definition.d.ts +6 -4
- package/Cached/internal.d.ts +4 -4
- package/Channel/api.d.ts +4 -4
- package/Channel/definition.d.ts +35 -14
- package/Channel/internal/ChannelExecutor.d.ts +1 -0
- package/Channel/internal/MergeDecision.d.ts +10 -6
- package/CountdownLatch.d.ts +1 -1
- package/Differ/definition.d.ts +2 -4
- package/Fiber/FiberRuntime.d.ts +9 -11
- package/Fiber/definition.d.ts +12 -6
- package/FiberRef/definition.d.ts +6 -2
- package/FiberRefs/api.d.ts +1 -1
- package/FiberRefs/definition.d.ts +1 -1
- package/Hub/definition.d.ts +29 -15
- package/IO/api/interrupt.d.ts +19 -19
- package/IO/api/onTermination.d.ts +0 -1
- package/IO/api/sequenceT.d.ts +19 -3
- package/IO/api.d.ts +17 -1
- package/IO/definition.d.ts +40 -26
- package/IO.d.ts +0 -1
- package/Layer/definition.d.ts +17 -13
- package/Logger/definition.d.ts +10 -6
- package/MVar/api.d.ts +101 -0
- package/MVar/definition.d.ts +43 -0
- package/MVar.d.ts +2 -0
- package/Push/api.d.ts +7 -4
- package/Push/definition.d.ts +10 -3
- package/Push/internal.d.ts +1 -1
- package/Queue/api/dimapIO.d.ts +17 -13
- package/Queue/definition.d.ts +26 -18
- package/Ref/Derived.d.ts +3 -1
- package/Ref/Synchronized/constructors.d.ts +6 -1
- package/Ref/Synchronized/definition.d.ts +4 -2
- package/Ref/definition.d.ts +36 -25
- package/Ref.d.ts +0 -1
- package/RefSubject/definition.d.ts +17 -11
- package/Reloadable/definition.d.ts +5 -1
- package/STM/api/atomically.d.ts +9 -0
- package/STM/api.d.ts +12 -6
- package/STM/definition.d.ts +28 -15
- package/STM/internal/Entry.d.ts +2 -2
- package/STM/internal/TryCommit.d.ts +2 -2
- package/STM/internal/Versioned.d.ts +1 -1
- package/STM.d.ts +1 -0
- package/Schedule/definition.d.ts +7 -3
- package/Scope/definition.d.ts +1 -1
- package/ScopedRef/definition.d.ts +1 -1
- package/State/api.d.ts +1 -1
- package/State/definition.d.ts +5 -2
- package/State/internal.d.ts +6 -2
- package/Stream/definition.d.ts +26 -5
- package/Stream/internal/Handoff.d.ts +21 -15
- package/Stream/internal/SinkEndReason.d.ts +2 -2
- package/Subject/Atomic.d.ts +8 -4
- package/SupervisorPatch.d.ts +1 -1
- package/TExit/definition.d.ts +5 -5
- package/TRef/definition.d.ts +16 -14
- package/TRef.d.ts +0 -1
- package/_cjs/Cached/definition.cjs +4 -2
- package/_cjs/Cached/definition.cjs.map +1 -1
- package/_cjs/Cached/internal.cjs +7 -6
- package/_cjs/Cached/internal.cjs.map +1 -1
- package/_cjs/Channel/api/mapOutConcurrentIO.cjs +1 -1
- package/_cjs/Channel/api/mergeAllWith.cjs +1 -1
- package/_cjs/Channel/api.cjs +20 -20
- package/_cjs/Channel/api.cjs.map +1 -1
- package/_cjs/Channel/definition.cjs +13 -3
- package/_cjs/Channel/definition.cjs.map +1 -1
- package/_cjs/Channel/internal/ChannelExecutor.cjs +11 -6
- package/_cjs/Channel/internal/ChannelExecutor.cjs.map +1 -1
- package/_cjs/Channel/internal/MergeDecision.cjs +7 -3
- package/_cjs/Channel/internal/MergeDecision.cjs.map +1 -1
- package/_cjs/CountdownLatch.cjs +4 -2
- package/_cjs/CountdownLatch.cjs.map +1 -1
- package/_cjs/Differ/definition.cjs +3 -1
- package/_cjs/Differ/definition.cjs.map +1 -1
- package/_cjs/Fiber/FiberRuntime.cjs +96 -89
- package/_cjs/Fiber/FiberRuntime.cjs.map +1 -1
- package/_cjs/Fiber/definition.cjs +8 -4
- package/_cjs/Fiber/definition.cjs.map +1 -1
- package/_cjs/FiberRef/definition.cjs +8 -4
- package/_cjs/FiberRef/definition.cjs.map +1 -1
- package/_cjs/Future/api.cjs +17 -6
- package/_cjs/Future/api.cjs.map +1 -1
- package/_cjs/Hub/api.cjs +5 -5
- package/_cjs/Hub/api.cjs.map +1 -1
- package/_cjs/Hub/definition.cjs +9 -7
- package/_cjs/Hub/definition.cjs.map +1 -1
- package/_cjs/Hub/internal.cjs +6 -6
- package/_cjs/Hub/internal.cjs.map +1 -1
- package/_cjs/IO/api/asyncIO.cjs +1 -1
- package/_cjs/IO/api/asyncIO.cjs.map +1 -1
- package/_cjs/IO/api/asyncInterrupt.cjs +2 -2
- package/_cjs/IO/api/asyncInterrupt.cjs.map +1 -1
- package/_cjs/IO/api/bracketExit.cjs +1 -1
- package/_cjs/IO/api/bracketExit.cjs.map +1 -1
- package/_cjs/IO/api/foreachConcurrent.cjs +2 -2
- package/_cjs/IO/api/foreachConcurrent.cjs.map +1 -1
- package/_cjs/IO/api/forkIn.cjs +1 -1
- package/_cjs/IO/api/forkIn.cjs.map +1 -1
- package/_cjs/IO/api/forkScoped.cjs +1 -1
- package/_cjs/IO/api/forkScoped.cjs.map +1 -1
- package/_cjs/IO/api/fulfill.cjs +1 -1
- package/_cjs/IO/api/fulfill.cjs.map +1 -1
- package/_cjs/IO/api/interrupt.cjs +52 -43
- package/_cjs/IO/api/interrupt.cjs.map +1 -1
- package/_cjs/IO/api/onTermination.cjs +7 -6
- package/_cjs/IO/api/onTermination.cjs.map +1 -1
- package/_cjs/IO/api/race.cjs +1 -1
- package/_cjs/IO/api/race.cjs.map +1 -1
- package/_cjs/IO/api/sequenceT.cjs +1 -1
- package/_cjs/IO/api/sequenceT.cjs.map +1 -1
- package/_cjs/IO/api/zipConcurrent.cjs +1 -1
- package/_cjs/IO/api/zipConcurrent.cjs.map +1 -1
- package/_cjs/IO/api.cjs +79 -53
- package/_cjs/IO/api.cjs.map +1 -1
- package/_cjs/IO/definition.cjs +26 -21
- package/_cjs/IO/definition.cjs.map +1 -1
- package/_cjs/IO.cjs +0 -11
- package/_cjs/IO.cjs.map +1 -1
- package/_cjs/Layer/MemoMap.cjs +30 -31
- package/_cjs/Layer/MemoMap.cjs.map +1 -1
- package/_cjs/Layer/api.cjs +1 -1
- package/_cjs/Layer/api.cjs.map +1 -1
- package/_cjs/Layer/definition.cjs +12 -10
- package/_cjs/Layer/definition.cjs.map +1 -1
- package/_cjs/Logger/definition.cjs +3 -1
- package/_cjs/Logger/definition.cjs.map +1 -1
- package/_cjs/MVar/api.cjs +170 -0
- package/_cjs/MVar/api.cjs.map +1 -0
- package/_cjs/MVar/definition.cjs +28 -0
- package/_cjs/MVar/definition.cjs.map +1 -0
- package/_cjs/MVar.cjs +28 -0
- package/_cjs/MVar.cjs.map +1 -0
- package/_cjs/Push/api.cjs +39 -36
- package/_cjs/Push/api.cjs.map +1 -1
- package/_cjs/Push/definition.cjs +9 -2
- package/_cjs/Push/definition.cjs.map +1 -1
- package/_cjs/Push/internal.cjs +4 -2
- package/_cjs/Push/internal.cjs.map +1 -1
- package/_cjs/Queue/api/dimapIO.cjs +10 -10
- package/_cjs/Queue/api/dimapIO.cjs.map +1 -1
- package/_cjs/Queue/api/filterInputIO.cjs +4 -4
- package/_cjs/Queue/api/filterInputIO.cjs.map +1 -1
- package/_cjs/Queue/api/filterOutputIO.cjs +7 -7
- package/_cjs/Queue/api/filterOutputIO.cjs.map +1 -1
- package/_cjs/Queue/definition.cjs +3 -1
- package/_cjs/Queue/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 +2 -2
- package/_cjs/Queue/strategy.cjs.map +1 -1
- package/_cjs/Ref/Derived.cjs +8 -4
- package/_cjs/Ref/Derived.cjs.map +1 -1
- package/_cjs/Ref/Synchronized/constructors.cjs +16 -7
- package/_cjs/Ref/Synchronized/constructors.cjs.map +1 -1
- package/_cjs/Ref/Synchronized/definition.cjs +16 -12
- package/_cjs/Ref/Synchronized/definition.cjs.map +1 -1
- package/_cjs/Ref/definition.cjs +3 -2
- package/_cjs/Ref/definition.cjs.map +1 -1
- package/_cjs/Ref.cjs +0 -11
- package/_cjs/Ref.cjs.map +1 -1
- package/_cjs/RefSubject/Synchronized/api.cjs +1 -1
- package/_cjs/RefSubject/definition.cjs +9 -5
- package/_cjs/RefSubject/definition.cjs.map +1 -1
- package/_cjs/Reloadable/definition.cjs +4 -2
- package/_cjs/Reloadable/definition.cjs.map +1 -1
- package/_cjs/STM/api/atomically.cjs +55 -0
- package/_cjs/STM/api/atomically.cjs.map +1 -0
- package/_cjs/STM/api.cjs +65 -91
- package/_cjs/STM/api.cjs.map +1 -1
- package/_cjs/STM/definition.cjs +32 -19
- package/_cjs/STM/definition.cjs.map +1 -1
- package/_cjs/STM/driver.cjs +3 -3
- package/_cjs/STM/driver.cjs.map +1 -1
- package/_cjs/STM/internal/Entry.cjs +6 -3
- package/_cjs/STM/internal/Entry.cjs.map +1 -1
- package/_cjs/STM/internal/TryCommit.cjs +5 -2
- package/_cjs/STM/internal/TryCommit.cjs.map +1 -1
- package/_cjs/STM/internal/Versioned.cjs +3 -1
- package/_cjs/STM/internal/Versioned.cjs.map +1 -1
- package/_cjs/STM.cjs +11 -0
- package/_cjs/STM.cjs.map +1 -1
- package/_cjs/Schedule/definition.cjs +3 -1
- package/_cjs/Schedule/definition.cjs.map +1 -1
- package/_cjs/Scope/api.cjs +1 -2
- package/_cjs/Scope/api.cjs.map +1 -1
- package/_cjs/Scope/definition.cjs +5 -3
- package/_cjs/Scope/definition.cjs.map +1 -1
- package/_cjs/ScopedRef/api.cjs +2 -2
- package/_cjs/ScopedRef/api.cjs.map +1 -1
- package/_cjs/ScopedRef/definition.cjs +3 -1
- package/_cjs/ScopedRef/definition.cjs.map +1 -1
- package/_cjs/State/api.cjs +2 -2
- package/_cjs/State/api.cjs.map +1 -1
- package/_cjs/State/definition.cjs +4 -2
- package/_cjs/State/definition.cjs.map +1 -1
- package/_cjs/State/internal.cjs +7 -3
- package/_cjs/State/internal.cjs.map +1 -1
- package/_cjs/Stream/api.cjs +1 -1
- package/_cjs/Stream/definition.cjs +4 -2
- package/_cjs/Stream/definition.cjs.map +1 -1
- package/_cjs/Stream/internal/Handoff.cjs +37 -37
- package/_cjs/Stream/internal/Handoff.cjs.map +1 -1
- package/_cjs/Stream/internal/SinkEndReason.cjs +6 -3
- package/_cjs/Stream/internal/SinkEndReason.cjs.map +1 -1
- package/_cjs/Subject/Atomic.cjs +6 -4
- package/_cjs/Subject/Atomic.cjs.map +1 -1
- package/_cjs/SubscriptionRef.cjs +1 -1
- package/_cjs/SupervisorPatch.cjs +3 -1
- package/_cjs/SupervisorPatch.cjs.map +1 -1
- package/_cjs/TExit/definition.cjs +25 -24
- package/_cjs/TExit/definition.cjs.map +1 -1
- package/_cjs/TFuture/constructors.cjs +1 -1
- package/_cjs/TReentrantLock/api.cjs +10 -9
- package/_cjs/TReentrantLock/api.cjs.map +1 -1
- package/_cjs/TRef/constructors.cjs +1 -1
- package/_cjs/TRef/definition.cjs +21 -21
- package/_cjs/TRef/definition.cjs.map +1 -1
- package/_cjs/TRef.cjs +0 -11
- package/_cjs/TRef.cjs.map +1 -1
- package/_cjs/TSemaphore/api.cjs +2 -2
- package/_cjs/TSemaphore/api.cjs.map +1 -1
- package/_cjs/TSemaphore/constructors.cjs +1 -1
- package/_cjs/internal/IsFatal.cjs +3 -1
- package/_cjs/internal/IsFatal.cjs.map +1 -1
- package/_mjs/Cached/definition.mjs +4 -2
- package/_mjs/Cached/definition.mjs.map +1 -1
- package/_mjs/Cached/internal.mjs +3 -5
- package/_mjs/Cached/internal.mjs.map +1 -1
- package/_mjs/Channel/api/mapOutConcurrentIO.mjs +1 -1
- package/_mjs/Channel/api/mergeAllWith.mjs +1 -1
- package/_mjs/Channel/api.mjs +15 -14
- package/_mjs/Channel/api.mjs.map +1 -1
- package/_mjs/Channel/definition.mjs +9 -1
- package/_mjs/Channel/definition.mjs.map +1 -1
- package/_mjs/Channel/internal/ChannelExecutor.mjs +11 -6
- package/_mjs/Channel/internal/ChannelExecutor.mjs.map +1 -1
- package/_mjs/Channel/internal/MergeDecision.mjs +4 -1
- package/_mjs/Channel/internal/MergeDecision.mjs.map +1 -1
- package/_mjs/CountdownLatch.mjs +3 -1
- package/_mjs/CountdownLatch.mjs.map +1 -1
- package/_mjs/Differ/definition.mjs +3 -1
- package/_mjs/Differ/definition.mjs.map +1 -1
- package/_mjs/Fiber/FiberRuntime.mjs +97 -90
- package/_mjs/Fiber/FiberRuntime.mjs.map +1 -1
- package/_mjs/Fiber/definition.mjs +5 -2
- package/_mjs/Fiber/definition.mjs.map +1 -1
- package/_mjs/FiberRef/definition.mjs +6 -3
- package/_mjs/FiberRef/definition.mjs.map +1 -1
- package/_mjs/Future/api.mjs +17 -6
- package/_mjs/Future/api.mjs.map +1 -1
- package/_mjs/Hub/api.mjs +6 -6
- package/_mjs/Hub/api.mjs.map +1 -1
- package/_mjs/Hub/definition.mjs +5 -4
- package/_mjs/Hub/definition.mjs.map +1 -1
- package/_mjs/Hub/internal.mjs +6 -6
- package/_mjs/Hub/internal.mjs.map +1 -1
- package/_mjs/IO/api/asyncIO.mjs +1 -1
- package/_mjs/IO/api/asyncIO.mjs.map +1 -1
- package/_mjs/IO/api/asyncInterrupt.mjs +2 -2
- package/_mjs/IO/api/asyncInterrupt.mjs.map +1 -1
- package/_mjs/IO/api/bracketExit.mjs +1 -1
- package/_mjs/IO/api/bracketExit.mjs.map +1 -1
- package/_mjs/IO/api/foreachConcurrent.mjs +2 -2
- package/_mjs/IO/api/foreachConcurrent.mjs.map +1 -1
- package/_mjs/IO/api/forkIn.mjs +1 -1
- package/_mjs/IO/api/forkIn.mjs.map +1 -1
- package/_mjs/IO/api/forkScoped.mjs +1 -1
- package/_mjs/IO/api/forkScoped.mjs.map +1 -1
- package/_mjs/IO/api/fulfill.mjs +1 -1
- package/_mjs/IO/api/fulfill.mjs.map +1 -1
- package/_mjs/IO/api/interrupt.mjs +46 -38
- package/_mjs/IO/api/interrupt.mjs.map +1 -1
- package/_mjs/IO/api/onTermination.mjs +7 -6
- package/_mjs/IO/api/onTermination.mjs.map +1 -1
- package/_mjs/IO/api/race.mjs +1 -1
- package/_mjs/IO/api/race.mjs.map +1 -1
- package/_mjs/IO/api/sequenceT.mjs +1 -1
- package/_mjs/IO/api/sequenceT.mjs.map +1 -1
- package/_mjs/IO/api/zipConcurrent.mjs +1 -1
- package/_mjs/IO/api/zipConcurrent.mjs.map +1 -1
- package/_mjs/IO/api.mjs +73 -50
- package/_mjs/IO/api.mjs.map +1 -1
- package/_mjs/IO/definition.mjs +23 -19
- package/_mjs/IO/definition.mjs.map +1 -1
- package/_mjs/IO.mjs +0 -1
- package/_mjs/IO.mjs.map +1 -1
- package/_mjs/Layer/MemoMap.mjs +28 -29
- package/_mjs/Layer/MemoMap.mjs.map +1 -1
- package/_mjs/Layer/api.mjs +2 -2
- package/_mjs/Layer/api.mjs.map +1 -1
- package/_mjs/Layer/definition.mjs +9 -8
- package/_mjs/Layer/definition.mjs.map +1 -1
- package/_mjs/Logger/definition.mjs +1 -0
- package/_mjs/Logger/definition.mjs.map +1 -1
- package/_mjs/MVar/api.mjs +150 -0
- package/_mjs/MVar/api.mjs.map +1 -0
- package/_mjs/MVar/definition.mjs +18 -0
- package/_mjs/MVar/definition.mjs.map +1 -0
- package/_mjs/MVar.mjs +4 -0
- package/_mjs/MVar.mjs.map +1 -0
- package/_mjs/Push/api.mjs +39 -36
- package/_mjs/Push/api.mjs.map +1 -1
- package/_mjs/Push/definition.mjs +5 -0
- package/_mjs/Push/definition.mjs.map +1 -1
- package/_mjs/Push/internal.mjs +4 -2
- package/_mjs/Push/internal.mjs.map +1 -1
- package/_mjs/Queue/api/dimapIO.mjs +11 -11
- package/_mjs/Queue/api/dimapIO.mjs.map +1 -1
- package/_mjs/Queue/api/filterInputIO.mjs +5 -5
- package/_mjs/Queue/api/filterInputIO.mjs.map +1 -1
- package/_mjs/Queue/api/filterOutputIO.mjs +8 -8
- package/_mjs/Queue/api/filterOutputIO.mjs.map +1 -1
- package/_mjs/Queue/definition.mjs +1 -0
- package/_mjs/Queue/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 +2 -2
- package/_mjs/Queue/strategy.mjs.map +1 -1
- package/_mjs/Ref/Derived.mjs +6 -3
- package/_mjs/Ref/Derived.mjs.map +1 -1
- package/_mjs/Ref/Synchronized/constructors.mjs +15 -7
- package/_mjs/Ref/Synchronized/constructors.mjs.map +1 -1
- package/_mjs/Ref/Synchronized/definition.mjs +13 -10
- package/_mjs/Ref/Synchronized/definition.mjs.map +1 -1
- package/_mjs/Ref/definition.mjs +1 -1
- package/_mjs/Ref/definition.mjs.map +1 -1
- package/_mjs/Ref.mjs +0 -1
- package/_mjs/Ref.mjs.map +1 -1
- package/_mjs/RefSubject/Synchronized/api.mjs +1 -1
- package/_mjs/RefSubject/definition.mjs +10 -3
- package/_mjs/RefSubject/definition.mjs.map +1 -1
- package/_mjs/Reloadable/definition.mjs +2 -1
- package/_mjs/Reloadable/definition.mjs.map +1 -1
- package/_mjs/STM/api/atomically.mjs +47 -0
- package/_mjs/STM/api/atomically.mjs.map +1 -0
- package/_mjs/STM/api.mjs +61 -88
- package/_mjs/STM/api.mjs.map +1 -1
- package/_mjs/STM/definition.mjs +27 -17
- package/_mjs/STM/definition.mjs.map +1 -1
- package/_mjs/STM/driver.mjs +3 -3
- package/_mjs/STM/driver.mjs.map +1 -1
- package/_mjs/STM/internal/Entry.mjs +5 -2
- package/_mjs/STM/internal/Entry.mjs.map +1 -1
- package/_mjs/STM/internal/TryCommit.mjs +6 -2
- package/_mjs/STM/internal/TryCommit.mjs.map +1 -1
- package/_mjs/STM/internal/Versioned.mjs +3 -1
- package/_mjs/STM/internal/Versioned.mjs.map +1 -1
- package/_mjs/STM.mjs +1 -0
- package/_mjs/STM.mjs.map +1 -1
- package/_mjs/Schedule/definition.mjs +1 -0
- package/_mjs/Schedule/definition.mjs.map +1 -1
- package/_mjs/Scope/api.mjs +1 -2
- package/_mjs/Scope/api.mjs.map +1 -1
- package/_mjs/Scope/definition.mjs +4 -2
- package/_mjs/Scope/definition.mjs.map +1 -1
- package/_mjs/ScopedRef/api.mjs +2 -2
- package/_mjs/ScopedRef/api.mjs.map +1 -1
- package/_mjs/ScopedRef/definition.mjs +3 -1
- package/_mjs/ScopedRef/definition.mjs.map +1 -1
- package/_mjs/State/api.mjs +1 -1
- package/_mjs/State/api.mjs.map +1 -1
- package/_mjs/State/definition.mjs +4 -1
- package/_mjs/State/definition.mjs.map +1 -1
- package/_mjs/State/internal.mjs +5 -2
- package/_mjs/State/internal.mjs.map +1 -1
- package/_mjs/Stream/api.mjs +1 -1
- package/_mjs/Stream/definition.mjs +2 -1
- package/_mjs/Stream/definition.mjs.map +1 -1
- package/_mjs/Stream/internal/Handoff.mjs +40 -32
- package/_mjs/Stream/internal/Handoff.mjs.map +1 -1
- package/_mjs/Stream/internal/SinkEndReason.mjs +6 -2
- package/_mjs/Stream/internal/SinkEndReason.mjs.map +1 -1
- package/_mjs/Subject/Atomic.mjs +4 -2
- package/_mjs/Subject/Atomic.mjs.map +1 -1
- package/_mjs/SubscriptionRef.mjs +1 -1
- package/_mjs/SupervisorPatch.mjs +3 -1
- package/_mjs/SupervisorPatch.mjs.map +1 -1
- package/_mjs/TExit/definition.mjs +25 -24
- package/_mjs/TExit/definition.mjs.map +1 -1
- package/_mjs/TFuture/constructors.mjs +1 -1
- package/_mjs/TReentrantLock/api.mjs +10 -9
- package/_mjs/TReentrantLock/api.mjs.map +1 -1
- package/_mjs/TRef/constructors.mjs +1 -1
- package/_mjs/TRef/definition.mjs +19 -20
- package/_mjs/TRef/definition.mjs.map +1 -1
- package/_mjs/TRef.mjs +0 -1
- package/_mjs/TRef.mjs.map +1 -1
- package/_mjs/TSemaphore/api.mjs +2 -2
- package/_mjs/TSemaphore/api.mjs.map +1 -1
- package/_mjs/TSemaphore/constructors.mjs +1 -1
- package/_mjs/internal/IsFatal.mjs +3 -1
- package/_mjs/internal/IsFatal.mjs.map +1 -1
- package/_src/Cached/definition.ts +6 -4
- package/_src/Cached/internal.ts +4 -4
- package/_src/Channel/api.ts +14 -15
- package/_src/Channel/definition.ts +37 -14
- package/_src/Channel/internal/ChannelExecutor.ts +14 -3
- package/_src/Channel/internal/MergeDecision.ts +11 -6
- package/_src/CountdownLatch.ts +1 -1
- package/_src/Differ/definition.ts +2 -4
- package/_src/Fiber/FiberRuntime.ts +54 -50
- package/_src/Fiber/definition.ts +15 -8
- package/_src/FiberRef/definition.ts +9 -4
- package/_src/FiberRefs/api.ts +1 -1
- package/_src/FiberRefs/definition.ts +1 -1
- package/_src/Future/api.ts +14 -5
- package/_src/Hub/api.ts +9 -7
- package/_src/Hub/definition.ts +30 -15
- package/_src/IO/api/interrupt.ts +72 -55
- package/_src/IO/api/onTermination.ts +8 -7
- package/_src/IO/api/sequenceT.ts +4 -6
- package/_src/IO/api.ts +23 -1
- package/_src/IO/definition.ts +36 -27
- package/_src/IO.ts +0 -1
- package/_src/Layer/MemoMap.ts +1 -1
- package/_src/Layer/api.ts +2 -2
- package/_src/Layer/definition.ts +18 -13
- package/_src/Logger/definition.ts +9 -4
- package/_src/MVar/api.ts +185 -0
- package/_src/MVar/definition.ts +45 -0
- package/_src/MVar.ts +4 -0
- package/_src/Push/api.ts +7 -4
- package/_src/Push/definition.ts +12 -3
- package/_src/Push/internal.ts +2 -2
- package/_src/Queue/api/dimapIO.ts +24 -13
- package/_src/Queue/api/filterInputIO.ts +9 -7
- package/_src/Queue/api/filterOutputIO.ts +9 -7
- package/_src/Queue/definition.ts +27 -18
- package/_src/Ref/Derived.ts +4 -1
- package/_src/Ref/Synchronized/constructors.ts +9 -0
- package/_src/Ref/Synchronized/definition.ts +5 -2
- package/_src/Ref/definition.ts +36 -25
- package/_src/Ref.ts +0 -1
- package/_src/RefSubject/definition.ts +19 -12
- package/_src/Reloadable/definition.ts +6 -1
- package/_src/STM/api/atomically.ts +43 -0
- package/_src/STM/api.ts +20 -38
- package/_src/STM/definition.ts +33 -20
- package/_src/STM/driver.ts +3 -3
- package/_src/STM/internal/Entry.ts +2 -2
- package/_src/STM/internal/TryCommit.ts +4 -4
- package/_src/STM/internal/Versioned.ts +1 -1
- package/_src/STM.ts +1 -0
- package/_src/Schedule/definition.ts +8 -3
- package/_src/Scope/definition.ts +2 -2
- package/_src/ScopedRef/definition.ts +1 -1
- package/_src/State/api.ts +1 -1
- package/_src/State/definition.ts +6 -3
- package/_src/State/internal.ts +8 -3
- package/_src/Stream/definition.ts +17 -5
- package/_src/Stream/internal/Handoff.ts +31 -24
- package/_src/Stream/internal/SinkEndReason.ts +2 -2
- package/_src/Subject/Atomic.ts +8 -4
- package/_src/SupervisorPatch.ts +1 -1
- package/_src/TExit/definition.ts +11 -12
- package/_src/TRef/definition.ts +18 -14
- package/_src/TRef.ts +0 -1
- package/_src/global.ts +4 -0
- package/_src/internal/IsFatal.ts +1 -1
- package/global.d.ts +4 -0
- package/internal/IsFatal.d.ts +1 -1
- package/package.json +2 -2
- package/IO/api/onExit.d.ts +0 -7
- package/Ref/symbols.d.ts +0 -30
- package/TRef/symbols.d.ts +0 -20
- package/_cjs/IO/api/onExit.cjs +0 -19
- package/_cjs/IO/api/onExit.cjs.map +0 -1
- package/_cjs/Ref/symbols.cjs +0 -37
- package/_cjs/Ref/symbols.cjs.map +0 -1
- package/_cjs/TRef/symbols.cjs +0 -27
- package/_cjs/TRef/symbols.cjs.map +0 -1
- package/_mjs/IO/api/onExit.mjs +0 -11
- package/_mjs/IO/api/onExit.mjs.map +0 -1
- package/_mjs/Ref/symbols.mjs +0 -25
- package/_mjs/Ref/symbols.mjs.map +0 -1
- package/_mjs/TRef/symbols.mjs +0 -17
- package/_mjs/TRef/symbols.mjs.map +0 -1
- package/_src/IO/api/onExit.ts +0 -11
- package/_src/Ref/symbols.ts +0 -29
- package/_src/TRef/symbols.ts +0 -19
@@ -1,6 +1,11 @@
|
|
1
|
+
import { Ref } from "@fncts/io/Ref/definition";
|
1
2
|
import { Lazy } from "@fncts/base/data/function/definition";
|
2
3
|
import { UIO } from "@fncts/io/IO/definition";
|
3
|
-
|
4
|
+
/**
|
5
|
+
* @tsplus static fncts.io.Ref.SynchronizedOps unsafeMake
|
6
|
+
* @tsplus location "@fncts/io/Ref/Synchronized/constructors"
|
7
|
+
*/
|
8
|
+
export declare function unsafeMakeSynchronized<A>(a: A, __tsplusTrace?: string): Ref.Synchronized<A>;
|
4
9
|
/**
|
5
10
|
* @tsplus static fncts.io.Ref.SynchronizedOps make
|
6
11
|
* @tsplus location "@fncts/io/Ref/Synchronized/constructors"
|
@@ -3,11 +3,13 @@ import { Either } from "@fncts/base/data/Either/definition";
|
|
3
3
|
import type { PRef } from "../definition.js";
|
4
4
|
import { IO } from "@fncts/io/IO";
|
5
5
|
import { RefInternal } from "../definition.js";
|
6
|
+
export declare const SynchronizedTypeId: unique symbol;
|
7
|
+
export type SynchronizedTypeId = typeof SynchronizedTypeId;
|
6
8
|
/**
|
7
9
|
* @tsplus type fncts.io.Ref.Synchronized
|
8
10
|
*/
|
9
11
|
export interface PSynchronized<RA, RB, EA, EB, A, B> extends PRef<RA, RB, EA, EB, A, B> {
|
10
|
-
readonly
|
12
|
+
readonly [SynchronizedTypeId]: SynchronizedTypeId;
|
11
13
|
}
|
12
14
|
/**
|
13
15
|
* @tsplus type fncts.io.Ref.SynchronizedOps
|
@@ -26,7 +28,7 @@ export declare class PSynchronizedInternal<RA, RB, EA, EB, A, B> extends RefInte
|
|
26
28
|
readonly semaphore: TSemaphore;
|
27
29
|
readonly unsafeGet: IO<RB, EB, B>;
|
28
30
|
readonly unsafeSet: (a: A) => IO<RA, EA, void>;
|
29
|
-
readonly
|
31
|
+
readonly [SynchronizedTypeId]: SynchronizedTypeId;
|
30
32
|
constructor(semaphore: TSemaphore, unsafeGet: IO<RB, EB, B>, unsafeSet: (a: A) => IO<RA, EA, void>);
|
31
33
|
get get(): IO<RB, EB, B>;
|
32
34
|
set(a: A, __tsplusTrace?: string): IO<RA, EA, void>;
|
package/Ref/definition.d.ts
CHANGED
@@ -2,7 +2,8 @@ import { IO } from "@fncts/io/IO/definition";
|
|
2
2
|
import { Either } from "@fncts/base/data/Either/definition";
|
3
3
|
import type { Atomic as Atomic_ } from "./Atomic.js";
|
4
4
|
import type * as Synchro from "./Synchronized/definition.js";
|
5
|
-
|
5
|
+
export declare const RefVariance: unique symbol;
|
6
|
+
export type RefVariance = typeof RefVariance;
|
6
7
|
export declare const RefTypeId: unique symbol;
|
7
8
|
export type RefTypeId = typeof RefTypeId;
|
8
9
|
/**
|
@@ -10,12 +11,14 @@ export type RefTypeId = typeof RefTypeId;
|
|
10
11
|
*/
|
11
12
|
export interface PRef<RA, RB, EA, EB, A, B> {
|
12
13
|
readonly [RefTypeId]: RefTypeId;
|
13
|
-
readonly [
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
readonly [RefVariance]: {
|
15
|
+
readonly _RA: (_: never) => RA;
|
16
|
+
readonly _RB: (_: never) => RB;
|
17
|
+
readonly _EA: (_: never) => EA;
|
18
|
+
readonly _EB: (_: never) => EB;
|
19
|
+
readonly _A: (_: A) => void;
|
20
|
+
readonly _B: (_: never) => B;
|
21
|
+
};
|
19
22
|
}
|
20
23
|
export type Ref<A> = PRef<never, never, never, never, A, A>;
|
21
24
|
export type ERef<E, A> = PRef<unknown, unknown, E, E, A, A>;
|
@@ -36,34 +39,42 @@ export interface RefOps {
|
|
36
39
|
}
|
37
40
|
export declare const Ref: RefOps;
|
38
41
|
export interface ReadableRef<RB, EB, B> {
|
39
|
-
readonly [
|
40
|
-
|
41
|
-
|
42
|
+
readonly [RefVariance]: {
|
43
|
+
readonly _RB: (_: never) => RB;
|
44
|
+
readonly _EB: (_: never) => EB;
|
45
|
+
readonly _B: (_: never) => B;
|
46
|
+
};
|
42
47
|
readonly get: IO<RB, EB, B>;
|
43
48
|
}
|
44
49
|
export interface WritableRef<RA, EA, A> {
|
45
|
-
readonly [
|
46
|
-
|
47
|
-
|
50
|
+
readonly [RefVariance]: {
|
51
|
+
readonly _RA: (_: never) => RA;
|
52
|
+
readonly _EA: (_: never) => EA;
|
53
|
+
readonly _A: (_: A) => void;
|
54
|
+
};
|
48
55
|
set(a: A, __tsplusTrace?: string): IO<RA, EA, void>;
|
49
56
|
}
|
50
57
|
export interface ModifiableRef<RA, RB, EA, EB, A, B> {
|
51
|
-
readonly [
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
58
|
+
readonly [RefVariance]: {
|
59
|
+
readonly _RA: (_: never) => RA;
|
60
|
+
readonly _RB: (_: never) => RB;
|
61
|
+
readonly _EA: (_: never) => EA;
|
62
|
+
readonly _EB: (_: never) => EB;
|
63
|
+
readonly _A: (_: A) => void;
|
64
|
+
readonly _B: (_: never) => B;
|
65
|
+
};
|
57
66
|
modify<C>(f: (b: B) => readonly [C, A], __tsplusTrace?: string): IO<RA | RB, EA | EB, C>;
|
58
67
|
}
|
59
68
|
export declare abstract class RefInternal<RA, RB, EA, EB, A, B> implements PRef<RA, RB, EA, EB, A, B>, ReadableRef<RB, EB, B>, WritableRef<RA, EA, A>, ModifiableRef<RA, RB, EA, EB, A, B> {
|
60
69
|
readonly [RefTypeId]: RefTypeId;
|
61
|
-
[
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
70
|
+
[RefVariance]: {
|
71
|
+
readonly _RA: (_: never) => RA;
|
72
|
+
readonly _RB: (_: never) => RB;
|
73
|
+
readonly _EA: (_: never) => EA;
|
74
|
+
readonly _EB: (_: never) => EB;
|
75
|
+
readonly _A: (_: A) => void;
|
76
|
+
readonly _B: (_: never) => B;
|
77
|
+
};
|
67
78
|
/**
|
68
79
|
* Folds over the error and value types of the `Ref`. This is a highly
|
69
80
|
* polymorphic method that is capable of arbitrarily transforming the error
|
package/Ref.d.ts
CHANGED
@@ -4,7 +4,6 @@ export * from "./Ref/constructors.js";
|
|
4
4
|
export * from "./Ref/definition.js";
|
5
5
|
export * from "./Ref/Derived.js";
|
6
6
|
export * from "./Ref/DerivedAll.js";
|
7
|
-
export * from "./Ref/symbols.js";
|
8
7
|
export * from "./Ref/Synchronized.js";
|
9
8
|
export * from "./Ref/Synchronized/api.js";
|
10
9
|
export * from "./Ref/Synchronized/constructors.js";
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { Ref } from "@fncts/io/Ref/definition";
|
2
1
|
import { IO } from "@fncts/io/IO/definition";
|
3
2
|
import { Scope } from "@fncts/io/Scope/definition";
|
4
3
|
import { Cause } from "@fncts/base/data/Cause/definition";
|
@@ -6,11 +5,13 @@ import type { Emitter } from "../Push.js";
|
|
6
5
|
import type { Push } from "../Push.js";
|
7
6
|
import type { ModifiableRef, ReadableRef, WritableRef } from "../Ref.js";
|
8
7
|
import type { SynchronizedRefSubject } from "@fncts/io/RefSubject/Synchronized/definition";
|
8
|
+
import { PushTypeId } from "../Push.js";
|
9
|
+
import { PushVariance } from "../Push.js";
|
10
|
+
import { RefVariance } from "../Ref.js";
|
9
11
|
/**
|
10
12
|
* @tsplus type fncts.io.Push.RefSubject
|
11
13
|
*/
|
12
14
|
export interface RefSubject<out R, in out E, in A, out B> extends Push<R, E, B>, Emitter<R, E, A> {
|
13
|
-
readonly _A: (_: A) => B;
|
14
15
|
}
|
15
16
|
/**
|
16
17
|
* @tsplus type fncts.io.Push.RefSubjectOps
|
@@ -22,15 +23,20 @@ export declare namespace RefSubject {
|
|
22
23
|
type Synchronized<R, E, A, B> = SynchronizedRefSubject<R, E, A, B>;
|
23
24
|
}
|
24
25
|
export declare abstract class RefSubjectInternal<R, E, A, B> implements ReadableRef<R, never, B>, WritableRef<R, never, A>, ModifiableRef<R, R, never, never, A, B>, Push<R, E, B>, Emitter<R, E, A> {
|
25
|
-
[
|
26
|
-
[
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
26
|
+
readonly [PushTypeId]: PushTypeId;
|
27
|
+
[RefVariance]: {
|
28
|
+
readonly _RA: (_: never) => R;
|
29
|
+
readonly _RB: (_: never) => R;
|
30
|
+
readonly _EA: (_: never) => never;
|
31
|
+
readonly _EB: (_: never) => never;
|
32
|
+
readonly _A: (_: A) => void;
|
33
|
+
readonly _B: (_: never) => B;
|
34
|
+
};
|
35
|
+
[PushVariance]: {
|
36
|
+
readonly _R: (_: never) => R;
|
37
|
+
readonly _E: (_: never) => E;
|
38
|
+
readonly _A: (_: A) => B;
|
39
|
+
};
|
34
40
|
abstract get get(): IO<R, never, B>;
|
35
41
|
abstract set(value: A): IO<R, never, void>;
|
36
42
|
abstract modify<C>(f: (b: B) => readonly [C, A], __tsplusTrace?: string): IO<R, never, C>;
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import { ScopedRef } from "@fncts/io/ScopedRef/definition";
|
2
2
|
import { IO, UIO } from "@fncts/io/IO/definition";
|
3
3
|
import { Tag } from "@fncts/base/data/Tag/definition";
|
4
|
+
export declare const ReloadableVariance: unique symbol;
|
5
|
+
export type ReloadableVariance = typeof ReloadableVariance;
|
4
6
|
/**
|
5
7
|
* @tsplus type fncts.io.Reloadable
|
6
8
|
* @tsplus companion fncts.io.ReloadableOps
|
@@ -8,7 +10,9 @@ import { Tag } from "@fncts/base/data/Tag/definition";
|
|
8
10
|
export declare class Reloadable<Service> {
|
9
11
|
readonly scopedRef: ScopedRef<Service>;
|
10
12
|
readonly reload: IO<never, unknown, void>;
|
11
|
-
|
13
|
+
[ReloadableVariance]: {
|
14
|
+
readonly _Service: (_: never) => Service;
|
15
|
+
};
|
12
16
|
constructor(scopedRef: ScopedRef<Service>, reload: IO<never, unknown, void>);
|
13
17
|
get get(): UIO<Service>;
|
14
18
|
get reloadFork(): UIO<void>;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { STM } from "@fncts/io/STM/definition";
|
2
|
+
import { IO } from "@fncts/io/IO/definition";
|
3
|
+
import { Environment } from "@fncts/base/data/Environment/definition";
|
4
|
+
/**
|
5
|
+
* @tsplus static fncts.io.STMOps atomically
|
6
|
+
* @tsplus getter fncts.io.STM commit
|
7
|
+
* @tsplus location "@fncts/io/STM/api/atomically"
|
8
|
+
*/
|
9
|
+
export declare function atomically<R, E, A>(stm: STM<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
|
package/STM/api.d.ts
CHANGED
@@ -56,12 +56,6 @@ export declare function environmentWith<R, A>(f: (r: Environment<R>) => A, __tsp
|
|
56
56
|
* @tsplus location "@fncts/io/STM/api"
|
57
57
|
*/
|
58
58
|
export declare function environmentWithSTM<R0, R, E, A>(f: (r: Environment<R0>) => STM<R, E, A>, __tsplusTrace?: string): STM<R0 | R, E, A>;
|
59
|
-
/**
|
60
|
-
* @tsplus static fncts.io.STMOps atomically
|
61
|
-
* @tsplus getter fncts.io.STM commit
|
62
|
-
* @tsplus location "@fncts/io/STM/api"
|
63
|
-
*/
|
64
|
-
export declare function atomically<R, E, A>(stm: STM<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
|
65
59
|
/**
|
66
60
|
* Returns an `STM` effect whose failure and success channels have been mapped by
|
67
61
|
* the specified pair of functions, `f` and `g`.
|
@@ -372,3 +366,15 @@ export declare const unit: STM<never, never, void>;
|
|
372
366
|
* @tsplus location "@fncts/io/STM/api"
|
373
367
|
*/
|
374
368
|
export declare function zipWith<A, R1, E1, B, C>(that: STM<R1, E1, B>, f: (a: A, b: B) => C, __tsplusTrace?: string): <R, E>(self: STM<R, E, A>) => STM<R1 | R, E1 | E, C>;
|
369
|
+
/**
|
370
|
+
* @tsplus pipeable fncts.io.STM zipLeft
|
371
|
+
* @tsplus opipeable-operator fncts.io.STM <
|
372
|
+
* @tsplus location "@fncts/io/STM/api"
|
373
|
+
*/
|
374
|
+
export declare function zipLeft<R1, E1, B>(that: STM<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: STM<R, E, A>) => STM<R1 | R, E1 | E, A>;
|
375
|
+
/**
|
376
|
+
* @tsplus pipeable fncts.io.STM zipRight
|
377
|
+
* @tsplus pipeable-operator fncts.io.STM >
|
378
|
+
* @tsplus location "@fncts/io/STM/api"
|
379
|
+
*/
|
380
|
+
export declare function zipRight<R1, E1, B>(that: STM<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: STM<R, E, A>) => STM<R1 | R, E1 | E, B>;
|
package/STM/definition.d.ts
CHANGED
@@ -2,6 +2,7 @@ import { FiberId } from "@fncts/base/data/FiberId/definition";
|
|
2
2
|
import { Environment } from "@fncts/base/data/Environment/definition";
|
3
3
|
import type { Journal } from "./internal/Journal.js";
|
4
4
|
import type { _A, _E, _R } from "@fncts/base/types";
|
5
|
+
import { IOOpCode, IOTypeId, IOVariance } from "@fncts/io/IO/definition";
|
5
6
|
export declare const enum STMTag {
|
6
7
|
Effect = "Effect",
|
7
8
|
OnFailure = "OnFailure",
|
@@ -11,6 +12,8 @@ export declare const enum STMTag {
|
|
11
12
|
SucceedNow = "SucceedNow",
|
12
13
|
ContramapEnvironment = "ContramapEnvironment"
|
13
14
|
}
|
15
|
+
export declare const STMVariance: unique symbol;
|
16
|
+
export type STMVariance = typeof STMVariance;
|
14
17
|
export declare const STMTypeId: unique symbol;
|
15
18
|
export type STMTypeId = typeof STMTypeId;
|
16
19
|
/**
|
@@ -18,10 +21,20 @@ export type STMTypeId = typeof STMTypeId;
|
|
18
21
|
* @tsplus companion fncts.io.STMOps
|
19
22
|
*/
|
20
23
|
export declare abstract class STM<R, E, A> {
|
21
|
-
readonly
|
22
|
-
readonly
|
23
|
-
readonly
|
24
|
-
readonly
|
24
|
+
readonly [IOTypeId]: IOTypeId;
|
25
|
+
readonly ioOpCode = IOOpCode.Commit;
|
26
|
+
readonly trace?: string;
|
27
|
+
readonly [STMTypeId]: STMTypeId;
|
28
|
+
[IOVariance]: {
|
29
|
+
_R: () => R;
|
30
|
+
_E: () => E;
|
31
|
+
_A: () => A;
|
32
|
+
};
|
33
|
+
[STMVariance]: {
|
34
|
+
_R: () => R;
|
35
|
+
_E: () => E;
|
36
|
+
_A: () => A;
|
37
|
+
};
|
25
38
|
}
|
26
39
|
/**
|
27
40
|
* @tsplus unify fncts.io.STM
|
@@ -34,43 +47,43 @@ export interface USTM<A> extends STM<never, never, A> {
|
|
34
47
|
}
|
35
48
|
export declare class Effect<R, E, A> extends STM<R, E, A> {
|
36
49
|
readonly f: (journal: Journal, fiberId: FiberId, r: Environment<R>) => A;
|
37
|
-
readonly
|
50
|
+
readonly stmOpCode = STMTag.Effect;
|
38
51
|
constructor(f: (journal: Journal, fiberId: FiberId, r: Environment<R>) => A);
|
39
52
|
}
|
40
53
|
export declare class OnFailure<R, E, A, E1> extends STM<R, E1, A> {
|
41
54
|
readonly stm: STM<R, E, A>;
|
42
55
|
readonly onFailure: (e: E) => STM<R, E1, A>;
|
43
|
-
readonly
|
56
|
+
readonly stmOpCode = STMTag.OnFailure;
|
44
57
|
constructor(stm: STM<R, E, A>, onFailure: (e: E) => STM<R, E1, A>);
|
45
58
|
apply(a: A): STM<R, E, A>;
|
46
59
|
}
|
47
60
|
export declare class OnRetry<R, E, A> extends STM<R, E, A> {
|
48
61
|
readonly stm: STM<R, E, A>;
|
49
62
|
readonly onRetry: STM<R, E, A>;
|
50
|
-
readonly
|
63
|
+
readonly stmOpCode = STMTag.OnRetry;
|
51
64
|
constructor(stm: STM<R, E, A>, onRetry: STM<R, E, A>);
|
52
65
|
apply(a: A): STM<R, E, A>;
|
53
66
|
}
|
54
67
|
export declare class OnSuccess<R, E, A, B> extends STM<R, E, B> {
|
55
68
|
readonly stm: STM<R, E, A>;
|
56
69
|
readonly apply: (a: A) => STM<R, E, B>;
|
57
|
-
readonly
|
70
|
+
readonly stmOpCode = STMTag.OnSuccess;
|
58
71
|
constructor(stm: STM<R, E, A>, apply: (a: A) => STM<R, E, B>);
|
59
72
|
}
|
60
73
|
export declare class Succeed<A> extends STM<never, never, A> {
|
61
74
|
readonly a: () => A;
|
62
|
-
readonly
|
75
|
+
readonly stmOpCode = STMTag.Succeed;
|
63
76
|
constructor(a: () => A);
|
64
77
|
}
|
65
78
|
export declare class SucceedNow<A> extends STM<never, never, A> {
|
66
79
|
readonly a: A;
|
67
|
-
readonly
|
80
|
+
readonly stmOpCode = STMTag.SucceedNow;
|
68
81
|
constructor(a: A);
|
69
82
|
}
|
70
83
|
export declare class ContramapEnvironment<R, E, A, R0> extends STM<R0, E, A> {
|
71
84
|
readonly stm: STM<R, E, A>;
|
72
85
|
readonly f: (_: Environment<R0>) => Environment<R>;
|
73
|
-
readonly
|
86
|
+
readonly stmOpCode = STMTag.ContramapEnvironment;
|
74
87
|
constructor(stm: STM<R, E, A>, f: (_: Environment<R0>) => Environment<R>);
|
75
88
|
}
|
76
89
|
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>;
|
@@ -78,7 +91,7 @@ export declare const FailExceptionTypeId: unique symbol;
|
|
78
91
|
export type FailExceptionTypeId = typeof FailExceptionTypeId;
|
79
92
|
export declare class FailException<E> {
|
80
93
|
readonly e: E;
|
81
|
-
readonly
|
94
|
+
readonly [FailExceptionTypeId]: FailExceptionTypeId;
|
82
95
|
constructor(e: E);
|
83
96
|
}
|
84
97
|
export declare function isFailException(u: unknown): u is FailException<unknown>;
|
@@ -86,7 +99,7 @@ export declare const HaltExceptionTypeId: unique symbol;
|
|
86
99
|
export type HaltExceptionTypeId = typeof HaltExceptionTypeId;
|
87
100
|
export declare class HaltException<E> {
|
88
101
|
readonly e: E;
|
89
|
-
readonly
|
102
|
+
readonly [HaltExceptionTypeId]: HaltExceptionTypeId;
|
90
103
|
constructor(e: E);
|
91
104
|
}
|
92
105
|
export declare function isHaltException(u: unknown): u is HaltException<unknown>;
|
@@ -94,13 +107,13 @@ export declare const InterruptExceptionTypeId: unique symbol;
|
|
94
107
|
export type InterruptExceptionTypeId = typeof InterruptExceptionTypeId;
|
95
108
|
export declare class InterruptException {
|
96
109
|
readonly fiberId: FiberId;
|
97
|
-
readonly
|
110
|
+
readonly [InterruptExceptionTypeId]: InterruptExceptionTypeId;
|
98
111
|
constructor(fiberId: FiberId);
|
99
112
|
}
|
100
113
|
export declare function isInterruptException(u: unknown): u is InterruptException;
|
101
114
|
export declare const RetryExceptionTypeId: unique symbol;
|
102
115
|
export type RetryExceptionTypeId = typeof RetryExceptionTypeId;
|
103
116
|
export declare class RetryException {
|
104
|
-
readonly
|
117
|
+
readonly [RetryExceptionTypeId]: RetryExceptionTypeId;
|
105
118
|
}
|
106
119
|
export declare function isRetryException(u: unknown): u is RetryException;
|
package/STM/internal/Entry.d.ts
CHANGED
@@ -8,7 +8,7 @@ export type EntryTypeId = typeof EntryTypeId;
|
|
8
8
|
*/
|
9
9
|
export declare class Entry {
|
10
10
|
readonly use: <X>(f: <S>(entry: ConcreteEntry<S>) => X) => X;
|
11
|
-
readonly
|
11
|
+
readonly [EntryTypeId]: EntryTypeId;
|
12
12
|
constructor(use: <X>(f: <S>(entry: ConcreteEntry<S>) => X) => X);
|
13
13
|
}
|
14
14
|
/**
|
@@ -24,7 +24,7 @@ export declare class ConcreteEntry<S> {
|
|
24
24
|
protected newValue: S;
|
25
25
|
readonly isNew: boolean;
|
26
26
|
private _isChanged;
|
27
|
-
readonly
|
27
|
+
readonly [ConcreteEntryTypeId]: ConcreteEntryTypeId;
|
28
28
|
constructor(tref: Atomic<S>, expected: Versioned<S>, newValue: S, isNew: boolean, _isChanged: boolean);
|
29
29
|
unsafeSet(value: unknown): void;
|
30
30
|
unsafeGet<B>(): B;
|
@@ -9,13 +9,13 @@ export declare const enum TryCommitTag {
|
|
9
9
|
}
|
10
10
|
export declare class Done<E, A> {
|
11
11
|
readonly exit: Exit<E, A>;
|
12
|
-
readonly
|
12
|
+
readonly [TryCommitTypeId]: TryCommitTypeId;
|
13
13
|
readonly _tag = TryCommitTag.Done;
|
14
14
|
constructor(exit: Exit<E, A>);
|
15
15
|
}
|
16
16
|
export declare class Suspend {
|
17
17
|
readonly journal: Journal;
|
18
|
-
readonly
|
18
|
+
readonly [TryCommitTypeId]: TryCommitTypeId;
|
19
19
|
readonly _tag = TryCommitTag.Suspend;
|
20
20
|
constructor(journal: Journal);
|
21
21
|
}
|
@@ -2,6 +2,6 @@ export declare const VersionedTypeId: unique symbol;
|
|
2
2
|
export type VersionedTypeId = typeof VersionedTypeId;
|
3
3
|
export declare class Versioned<A> {
|
4
4
|
readonly value: A;
|
5
|
-
readonly
|
5
|
+
readonly [VersionedTypeId]: VersionedTypeId;
|
6
6
|
constructor(value: A);
|
7
7
|
}
|
package/STM.d.ts
CHANGED
package/Schedule/definition.d.ts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
import { IO } from "@fncts/io/IO/definition";
|
2
2
|
import type { Decision } from "./Decision.js";
|
3
3
|
import type { Driver as Driver_ } from "./Driver.js";
|
4
|
+
export declare const ScheduleVariance: unique symbol;
|
5
|
+
export type ScheduleVariance = typeof ScheduleVariance;
|
4
6
|
/**
|
5
7
|
* A `Schedule<Env, In, Out>` defines a recurring schedule, which consumes
|
6
8
|
* values of type `In`, and which returns values of type `Out`.
|
@@ -32,9 +34,11 @@ import type { Driver as Driver_ } from "./Driver.js";
|
|
32
34
|
* @tsplus companion fncts.io.ScheduleOps
|
33
35
|
*/
|
34
36
|
export declare abstract class Schedule<Env, In, Out> {
|
35
|
-
|
36
|
-
|
37
|
-
|
37
|
+
[ScheduleVariance]: {
|
38
|
+
readonly _Env: (_: never) => Env;
|
39
|
+
readonly _In: (_: In) => void;
|
40
|
+
readonly _Out: (_: never) => Out;
|
41
|
+
};
|
38
42
|
readonly _State: unknown;
|
39
43
|
abstract readonly initial: this["_State"];
|
40
44
|
abstract step(now: number, inp: In, state: this["_State"], __tsplusTrace?: string): IO<Env, never, readonly [this["_State"], Out, Decision]>;
|
package/Scope/definition.d.ts
CHANGED
@@ -9,7 +9,7 @@ export type ScopeTypeId = typeof ScopeTypeId;
|
|
9
9
|
* @tsplus companion fncts.io.ScopeOps
|
10
10
|
*/
|
11
11
|
export declare abstract class Scope {
|
12
|
-
readonly
|
12
|
+
readonly [ScopeTypeId]: ScopeTypeId;
|
13
13
|
abstract addFinalizerExit(finalizer: Finalizer): UIO<void>;
|
14
14
|
abstract fork: UIO<Scope.Closeable>;
|
15
15
|
}
|
@@ -7,7 +7,7 @@ export type ScopedRefTypeId = typeof ScopedRefTypeId;
|
|
7
7
|
* @tsplus companion fncts.io.ScopedRefOps
|
8
8
|
*/
|
9
9
|
export declare abstract class ScopedRef<A> {
|
10
|
-
readonly
|
10
|
+
readonly [ScopedRefTypeId]: ScopedRefTypeId;
|
11
11
|
abstract set<R, E>(acquire: IO<R | Scope, E, A>, __tsplusTrace?: string): IO<Exclude<R, Scope>, E, void>;
|
12
12
|
abstract get: UIO<A>;
|
13
13
|
}
|
package/State/api.d.ts
CHANGED
@@ -6,7 +6,7 @@ import type { State } from "./definition.js";
|
|
6
6
|
* @tsplus getter fncts.io.State get
|
7
7
|
* @tsplus location "@fncts/io/State/api"
|
8
8
|
*/
|
9
|
-
export declare function
|
9
|
+
export declare function get<S>(self: State<S>, __tsplusTrace?: string): UIO<S>;
|
10
10
|
/**
|
11
11
|
* @tsplus static fncts.io.StateOps initial
|
12
12
|
* @tsplus location "@fncts/io/State/api"
|
package/State/definition.d.ts
CHANGED
@@ -1,12 +1,15 @@
|
|
1
1
|
import type { StateInternal } from "./internal.js";
|
2
|
+
import { StateVariance } from "./internal.js";
|
2
3
|
import { StateTypeId } from "./internal.js";
|
3
4
|
/**
|
4
5
|
* @tsplus type fncts.io.State
|
5
6
|
* @tsplus companion fncts.io.StateOps
|
6
7
|
*/
|
7
8
|
export declare abstract class State<S> {
|
8
|
-
readonly
|
9
|
-
|
9
|
+
readonly [StateTypeId]: StateTypeId;
|
10
|
+
[StateVariance]: {
|
11
|
+
readonly _S: (_: S) => S;
|
12
|
+
};
|
10
13
|
}
|
11
14
|
/**
|
12
15
|
* @tsplus macro remove
|
package/State/internal.d.ts
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
import { UIO } from "@fncts/io/IO/definition";
|
2
|
+
export declare const StateVariance: unique symbol;
|
3
|
+
export type StateVariance = typeof StateVariance;
|
2
4
|
export declare const StateTypeId: unique symbol;
|
3
5
|
export type StateTypeId = typeof StateTypeId;
|
4
6
|
export declare abstract class StateInternal<S> {
|
5
|
-
|
6
|
-
|
7
|
+
readonly [StateTypeId]: StateTypeId;
|
8
|
+
[StateVariance]: {
|
9
|
+
readonly _S: (_: S) => S;
|
10
|
+
};
|
7
11
|
abstract get: UIO<S>;
|
8
12
|
abstract set(s: S, __tsplusTrace?: string): UIO<void>;
|
9
13
|
abstract update(f: (s: S) => S, __tsplusTrace?: string): UIO<void>;
|
package/Stream/definition.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Channel } from "@fncts/io/Channel";
|
2
2
|
import { Conc } from "@fncts/base/collection/immutable/Conc";
|
3
|
-
|
3
|
+
export declare const StreamVariance: unique symbol;
|
4
|
+
export type StreamVariance = typeof StreamVariance;
|
4
5
|
export declare const StreamTypeId: unique symbol;
|
5
6
|
export type StreamTypeId = typeof StreamTypeId;
|
6
7
|
/**
|
@@ -26,13 +27,33 @@ export type StreamTypeId = typeof StreamTypeId;
|
|
26
27
|
export declare class Stream<R, E, A> {
|
27
28
|
readonly channel: Channel<R, unknown, unknown, unknown, E, Conc<A>, unknown>;
|
28
29
|
readonly [StreamTypeId]: StreamTypeId;
|
29
|
-
|
30
|
-
|
31
|
-
|
30
|
+
[StreamVariance]: {
|
31
|
+
readonly _R: (_: never) => R;
|
32
|
+
readonly _E: (_: never) => E;
|
33
|
+
readonly _A: (_: never) => A;
|
34
|
+
};
|
32
35
|
constructor(channel: Channel<R, unknown, unknown, unknown, E, Conc<A>, unknown>);
|
33
36
|
}
|
34
37
|
/**
|
35
38
|
* @tsplus unify fncts.io.Stream
|
36
39
|
*/
|
37
|
-
export declare function unifyStream<X extends Stream<any, any, any>>(_: X): Stream<
|
40
|
+
export declare function unifyStream<X extends Stream<any, any, any>>(_: X): Stream<[
|
41
|
+
X
|
42
|
+
] extends [{
|
43
|
+
[StreamVariance]: {
|
44
|
+
_R: (_: never) => infer R;
|
45
|
+
};
|
46
|
+
}] ? R : never, [
|
47
|
+
X
|
48
|
+
] extends [{
|
49
|
+
[StreamVariance]: {
|
50
|
+
_E: (_: never) => infer E;
|
51
|
+
};
|
52
|
+
}] ? E : never, [
|
53
|
+
X
|
54
|
+
] extends [{
|
55
|
+
[StreamVariance]: {
|
56
|
+
_A: (_: never) => infer A;
|
57
|
+
};
|
58
|
+
}] ? A : never>;
|
38
59
|
export declare const DEFAULT_CHUNK_SIZE = 4096;
|
@@ -13,20 +13,22 @@ export declare class Handoff<A> {
|
|
13
13
|
readonly ref: Ref<State<A>>;
|
14
14
|
constructor(ref: Ref<State<A>>);
|
15
15
|
}
|
16
|
+
declare const enum HandoffStateTag {
|
17
|
+
Empty = 0,
|
18
|
+
Full = 1
|
19
|
+
}
|
16
20
|
export declare const StateTypeId: unique symbol;
|
17
|
-
export declare const EmptyTypeId: unique symbol;
|
18
21
|
export declare class Empty {
|
19
22
|
readonly notifyConsumer: Future<never, void>;
|
20
|
-
readonly
|
21
|
-
readonly _tag
|
23
|
+
readonly [StateTypeId]: typeof StateTypeId;
|
24
|
+
readonly _tag = HandoffStateTag.Empty;
|
22
25
|
constructor(notifyConsumer: Future<never, void>);
|
23
26
|
}
|
24
|
-
export declare const FullTypeId: unique symbol;
|
25
27
|
export declare class Full<A> {
|
26
28
|
readonly a: A;
|
27
29
|
readonly notifyProducer: Future<never, void>;
|
28
|
-
readonly
|
29
|
-
readonly _tag
|
30
|
+
readonly [StateTypeId]: typeof StateTypeId;
|
31
|
+
readonly _tag = HandoffStateTag.Full;
|
30
32
|
constructor(a: A, notifyProducer: Future<never, void>);
|
31
33
|
}
|
32
34
|
export type State<A> = Empty | Full<A>;
|
@@ -51,28 +53,31 @@ export declare function take<A>(handoff: Handoff<A>): UIO<A>;
|
|
51
53
|
*/
|
52
54
|
export declare function poll<A>(handoff: Handoff<A>): UIO<Maybe<A>>;
|
53
55
|
export declare const HandoffSignalTypeId: unique symbol;
|
54
|
-
|
55
|
-
|
56
|
+
declare const enum HandoffSignalTag {
|
57
|
+
Emit = 0,
|
58
|
+
Halt = 1,
|
59
|
+
End = 2
|
60
|
+
}
|
56
61
|
export declare class Emit<A> {
|
57
62
|
readonly els: Conc<A>;
|
58
|
-
readonly
|
59
|
-
readonly _tag
|
63
|
+
readonly [HandoffSignalTypeId]: typeof HandoffSignalTypeId;
|
64
|
+
readonly _tag = HandoffSignalTag.Emit;
|
60
65
|
constructor(els: Conc<A>);
|
61
66
|
}
|
62
67
|
export declare const HaltTypeId: unique symbol;
|
63
68
|
export type HaltTypeId = typeof HaltTypeId;
|
64
69
|
export declare class Halt<E> {
|
65
70
|
readonly error: Cause<E>;
|
66
|
-
readonly
|
67
|
-
readonly _tag
|
71
|
+
readonly [HandoffSignalTypeId]: typeof HandoffSignalTypeId;
|
72
|
+
readonly _tag = HandoffSignalTag.Halt;
|
68
73
|
constructor(error: Cause<E>);
|
69
74
|
}
|
70
75
|
export declare const EndTypeId: unique symbol;
|
71
76
|
export type EndTypeId = typeof EndTypeId;
|
72
77
|
export declare class End {
|
73
78
|
readonly reason: SinkEndReason;
|
74
|
-
readonly
|
75
|
-
readonly _tag
|
79
|
+
readonly [HandoffSignalTypeId]: typeof HandoffSignalTypeId;
|
80
|
+
readonly _tag = HandoffSignalTag.End;
|
76
81
|
constructor(reason: SinkEndReason);
|
77
82
|
}
|
78
83
|
/**
|
@@ -99,7 +104,7 @@ export declare function halt<E>(error: Cause<E>): HandoffSignal<E, never>;
|
|
99
104
|
* @tsplus static fncts.io.Stream.HandoffSignalOps End
|
100
105
|
* @tsplus location "@fncts/io/Stream/internal/Handoff"
|
101
106
|
*/
|
102
|
-
export declare function end
|
107
|
+
export declare function end(reason: SinkEndReason): HandoffSignal<never, never>;
|
103
108
|
/**
|
104
109
|
* @tsplus pipeable fncts.io.Stream.HandoffSignal match
|
105
110
|
* @tsplus location "@fncts/io/Stream/internal/Handoff"
|
@@ -109,3 +114,4 @@ export declare function matchSignal<E, A, B, D, F>(cases: {
|
|
109
114
|
Halt: (_: Halt<E>) => D;
|
110
115
|
End: (_: End) => F;
|
111
116
|
}): (signal: HandoffSignal<E, A>) => B | D | F;
|
117
|
+
export {};
|