@fncts/io 0.0.48 → 0.0.49
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/Cached/api.d.ts +1 -1
- package/Channel/api.d.ts +80 -80
- package/Channel/core-api.d.ts +26 -26
- package/Console/definition.d.ts +1 -0
- package/CountdownLatch.d.ts +1 -0
- package/Fiber/FiberMessage.d.ts +6 -28
- package/Fiber/FiberRuntime.d.ts +108 -77
- package/Fiber/api/interruptAs.d.ts +2 -2
- package/Fiber/definition.d.ts +2 -0
- package/FiberScope/definition.d.ts +3 -0
- package/FiberSet.d.ts +2 -1
- package/Future/State.d.ts +59 -0
- package/Future/api.d.ts +8 -3
- package/Future/constructors.d.ts +1 -1
- package/Future/definition.d.ts +1 -17
- package/Future.d.ts +1 -0
- package/Hub/api.d.ts +15 -15
- package/IO/api/array.d.ts +22 -0
- package/IO/api/awaitAllChildren.d.ts +6 -0
- package/IO/api/cachedInvalidate.d.ts +15 -0
- package/IO/api/forkDaemon.d.ts +1 -1
- package/IO/api/onTermination.d.ts +1 -2
- package/IO/api/transplant.d.ts +11 -1
- package/IO/api.d.ts +247 -225
- package/IO/definition.d.ts +12 -25
- package/IO.d.ts +3 -1
- package/Random/definition.d.ts +1 -0
- package/Ref/Synchronized/api.d.ts +1 -1
- package/Semaphore/Reservation.d.ts +15 -0
- package/Semaphore/constructors.d.ts +13 -0
- package/Semaphore/definition.d.ts +29 -0
- package/Semaphore.d.ts +3 -40
- package/Stream/api.d.ts +164 -164
- package/_cjs/Cached/api.cjs +1 -2
- package/_cjs/Cached/api.cjs.map +1 -1
- package/_cjs/Cached/internal.cjs +1 -2
- package/_cjs/Cached/internal.cjs.map +1 -1
- package/_cjs/Channel/api/interruptWhen.cjs +1 -2
- package/_cjs/Channel/api/interruptWhen.cjs.map +1 -1
- package/_cjs/Channel/api/mapOutConcurrentIO.cjs +2 -3
- package/_cjs/Channel/api/mapOutConcurrentIO.cjs.map +1 -1
- package/_cjs/Channel/api/mergeAll.cjs +1 -2
- package/_cjs/Channel/api/mergeAll.cjs.map +1 -1
- package/_cjs/Channel/api/mergeAllUnboundedWith.cjs +1 -2
- package/_cjs/Channel/api/mergeAllUnboundedWith.cjs.map +1 -1
- package/_cjs/Channel/api/mergeAllWith.cjs +2 -3
- package/_cjs/Channel/api/mergeAllWith.cjs.map +1 -1
- package/_cjs/Channel/api/mergeMap.cjs +1 -2
- package/_cjs/Channel/api/mergeMap.cjs.map +1 -1
- package/_cjs/Channel/api/mergeWith.cjs +1 -2
- package/_cjs/Channel/api/mergeWith.cjs.map +1 -1
- package/_cjs/Channel/api/run.cjs +1 -2
- package/_cjs/Channel/api/run.cjs.map +1 -1
- package/_cjs/Channel/api/runCollect.cjs +1 -2
- package/_cjs/Channel/api/runCollect.cjs.map +1 -1
- package/_cjs/Channel/api/runDrain.cjs +1 -2
- package/_cjs/Channel/api/runDrain.cjs.map +1 -1
- package/_cjs/Channel/api/runScoped.cjs +3 -4
- package/_cjs/Channel/api/runScoped.cjs.map +1 -1
- package/_cjs/Channel/api/toPull.cjs +2 -3
- package/_cjs/Channel/api/toPull.cjs.map +1 -1
- package/_cjs/Channel/api/zipConcurrent.cjs +1 -2
- package/_cjs/Channel/api/zipConcurrent.cjs.map +1 -1
- package/_cjs/Channel/api.cjs +206 -207
- package/_cjs/Channel/api.cjs.map +1 -1
- package/_cjs/Channel/core-api.cjs +43 -42
- package/_cjs/Channel/core-api.cjs.map +1 -1
- package/_cjs/Channel/internal/ChannelExecutor.cjs +4 -5
- package/_cjs/Channel/internal/ChannelExecutor.cjs.map +1 -1
- package/_cjs/Channel/internal/ChannelState.cjs +1 -2
- package/_cjs/Channel/internal/ChannelState.cjs.map +1 -1
- package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs +1 -2
- package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs.map +1 -1
- package/_cjs/Clock/api.cjs +1 -2
- package/_cjs/Clock/api.cjs.map +1 -1
- package/_cjs/Clock/definition.cjs +1 -2
- package/_cjs/Clock/definition.cjs.map +1 -1
- package/_cjs/Clock/live.cjs +1 -2
- package/_cjs/Clock/live.cjs.map +1 -1
- package/_cjs/Console/api.cjs +1 -2
- package/_cjs/Console/api.cjs.map +1 -1
- package/_cjs/Console/definition.cjs +2 -2
- package/_cjs/Console/definition.cjs.map +1 -1
- package/_cjs/Console/live.cjs +1 -2
- package/_cjs/Console/live.cjs.map +1 -1
- package/_cjs/CountdownLatch.cjs +3 -3
- package/_cjs/CountdownLatch.cjs.map +1 -1
- package/_cjs/Differ/api.cjs +1 -2
- package/_cjs/Differ/api.cjs.map +1 -1
- package/_cjs/Fiber/FiberMessage.cjs +3 -24
- package/_cjs/Fiber/FiberMessage.cjs.map +1 -1
- package/_cjs/Fiber/FiberRuntime.cjs +879 -636
- package/_cjs/Fiber/FiberRuntime.cjs.map +1 -1
- package/_cjs/Fiber/api/awaitAll.cjs +1 -2
- package/_cjs/Fiber/api/awaitAll.cjs.map +1 -1
- package/_cjs/Fiber/api/collectAll.cjs +2 -3
- package/_cjs/Fiber/api/collectAll.cjs.map +1 -1
- package/_cjs/Fiber/api/fromIO.cjs +1 -2
- package/_cjs/Fiber/api/fromIO.cjs.map +1 -1
- package/_cjs/Fiber/api/interrupt.cjs +2 -3
- package/_cjs/Fiber/api/interrupt.cjs.map +1 -1
- package/_cjs/Fiber/api/interruptAll.cjs +2 -3
- package/_cjs/Fiber/api/interruptAll.cjs.map +1 -1
- package/_cjs/Fiber/api/interruptAs.cjs +5 -10
- package/_cjs/Fiber/api/interruptAs.cjs.map +1 -1
- package/_cjs/Fiber/api/interruptFork.cjs +2 -3
- package/_cjs/Fiber/api/interruptFork.cjs.map +1 -1
- package/_cjs/Fiber/api/join.cjs +1 -2
- package/_cjs/Fiber/api/join.cjs.map +1 -1
- package/_cjs/Fiber/api/joinAll.cjs +1 -2
- package/_cjs/Fiber/api/joinAll.cjs.map +1 -1
- package/_cjs/Fiber/api/mapFiber.cjs +1 -2
- package/_cjs/Fiber/api/mapFiber.cjs.map +1 -1
- package/_cjs/Fiber/api/mapIO.cjs +2 -3
- package/_cjs/Fiber/api/mapIO.cjs.map +1 -1
- package/_cjs/Fiber/api/zipWith.cjs +2 -3
- package/_cjs/Fiber/api/zipWith.cjs.map +1 -1
- package/_cjs/Fiber/constructors.cjs +2 -3
- package/_cjs/Fiber/constructors.cjs.map +1 -1
- package/_cjs/Fiber/definition.cjs +6 -4
- package/_cjs/Fiber/definition.cjs.map +1 -1
- package/_cjs/FiberRef/api/locallyScoped.cjs +1 -2
- package/_cjs/FiberRef/api/locallyScoped.cjs.map +1 -1
- package/_cjs/FiberRef/api/locallyScopedWith.cjs +1 -2
- package/_cjs/FiberRef/api/locallyScopedWith.cjs.map +1 -1
- package/_cjs/FiberRef/constructors.cjs +1 -2
- package/_cjs/FiberRef/constructors.cjs.map +1 -1
- package/_cjs/FiberRef/definition.cjs +1 -2
- package/_cjs/FiberRef/definition.cjs.map +1 -1
- package/_cjs/FiberRef/operations.cjs +1 -2
- package/_cjs/FiberRef/operations.cjs.map +1 -1
- package/_cjs/FiberRef/unsafe.cjs +1 -2
- package/_cjs/FiberRef/unsafe.cjs.map +1 -1
- package/_cjs/FiberRefs/Patch.cjs +1 -2
- package/_cjs/FiberRefs/Patch.cjs.map +1 -1
- package/_cjs/FiberRefs/api.cjs +1 -2
- package/_cjs/FiberRefs/api.cjs.map +1 -1
- package/_cjs/FiberRefs/definition.cjs +1 -2
- package/_cjs/FiberRefs/definition.cjs.map +1 -1
- package/_cjs/FiberScope/definition.cjs +29 -6
- package/_cjs/FiberScope/definition.cjs.map +1 -1
- package/_cjs/FiberSet.cjs +16 -15
- package/_cjs/FiberSet.cjs.map +1 -1
- package/_cjs/FiberStatus/definition.cjs +1 -2
- package/_cjs/FiberStatus/definition.cjs.map +1 -1
- package/_cjs/Future/State.cjs +108 -0
- package/_cjs/Future/State.cjs.map +1 -0
- package/_cjs/Future/api.cjs +71 -64
- package/_cjs/Future/api.cjs.map +1 -1
- package/_cjs/Future/constructors.cjs +3 -4
- package/_cjs/Future/constructors.cjs.map +1 -1
- package/_cjs/Future/definition.cjs +1 -15
- package/_cjs/Future/definition.cjs.map +1 -1
- package/_cjs/Future.cjs +11 -0
- package/_cjs/Future.cjs.map +1 -1
- package/_cjs/Hub/api.cjs +56 -57
- package/_cjs/Hub/api.cjs.map +1 -1
- package/_cjs/Hub/internal.cjs +1 -2
- package/_cjs/Hub/internal.cjs.map +1 -1
- package/_cjs/IO/api/acquireRelease.cjs +1 -2
- package/_cjs/IO/api/acquireRelease.cjs.map +1 -1
- package/_cjs/IO/api/acquireReleaseExit.cjs +1 -2
- package/_cjs/IO/api/acquireReleaseExit.cjs.map +1 -1
- package/_cjs/IO/api/acquireReleaseInterruptible.cjs +1 -2
- package/_cjs/IO/api/acquireReleaseInterruptible.cjs.map +1 -1
- package/_cjs/IO/api/acquireReleaseInterruptibleExit.cjs +1 -2
- package/_cjs/IO/api/acquireReleaseInterruptibleExit.cjs.map +1 -1
- package/_cjs/IO/api/addFinalizer.cjs +1 -2
- package/_cjs/IO/api/addFinalizer.cjs.map +1 -1
- package/_cjs/IO/api/addFinalizerExit.cjs +1 -2
- package/_cjs/IO/api/addFinalizerExit.cjs.map +1 -1
- package/_cjs/IO/api/all.cjs +1 -2
- package/_cjs/IO/api/all.cjs.map +1 -1
- package/_cjs/IO/api/array.cjs +51 -0
- package/_cjs/IO/api/array.cjs.map +1 -0
- package/_cjs/IO/api/asyncIO.cjs +1 -2
- package/_cjs/IO/api/asyncIO.cjs.map +1 -1
- package/_cjs/IO/api/asyncInterrupt.cjs +1 -2
- package/_cjs/IO/api/asyncInterrupt.cjs.map +1 -1
- package/_cjs/IO/api/awaitAllChildren.cjs +17 -0
- package/_cjs/IO/api/awaitAllChildren.cjs.map +1 -0
- package/_cjs/IO/api/blocking.cjs +1 -2
- package/_cjs/IO/api/blocking.cjs.map +1 -1
- package/_cjs/IO/api/bracket.cjs +1 -2
- package/_cjs/IO/api/bracket.cjs.map +1 -1
- package/_cjs/IO/api/bracketExit.cjs +1 -2
- package/_cjs/IO/api/bracketExit.cjs.map +1 -1
- package/_cjs/IO/api/cachedInvalidate.cjs +47 -0
- package/_cjs/IO/api/cachedInvalidate.cjs.map +1 -0
- package/_cjs/IO/api/clockWith.cjs +1 -2
- package/_cjs/IO/api/clockWith.cjs.map +1 -1
- package/_cjs/IO/api/concurrency.cjs +1 -2
- package/_cjs/IO/api/concurrency.cjs.map +1 -1
- package/_cjs/IO/api/concurrentFinalizers.cjs +1 -2
- package/_cjs/IO/api/concurrentFinalizers.cjs.map +1 -1
- package/_cjs/IO/api/consoleWith.cjs +1 -2
- package/_cjs/IO/api/consoleWith.cjs.map +1 -1
- package/_cjs/IO/api/daemonChildren.cjs +1 -2
- package/_cjs/IO/api/daemonChildren.cjs.map +1 -1
- package/_cjs/IO/api/delay.cjs +1 -2
- package/_cjs/IO/api/delay.cjs.map +1 -1
- package/_cjs/IO/api/descriptor.cjs +1 -2
- package/_cjs/IO/api/descriptor.cjs.map +1 -1
- package/_cjs/IO/api/diffFiberRefs.cjs +1 -2
- package/_cjs/IO/api/diffFiberRefs.cjs.map +1 -1
- package/_cjs/IO/api/disconnect.cjs +2 -3
- package/_cjs/IO/api/disconnect.cjs.map +1 -1
- package/_cjs/IO/api/ensuringChildren.cjs +1 -2
- package/_cjs/IO/api/ensuringChildren.cjs.map +1 -1
- package/_cjs/IO/api/environment.cjs +1 -2
- package/_cjs/IO/api/environment.cjs.map +1 -1
- package/_cjs/IO/api/foreachConcurrent.cjs +36 -30
- package/_cjs/IO/api/foreachConcurrent.cjs.map +1 -1
- package/_cjs/IO/api/foreachExec.cjs +1 -2
- package/_cjs/IO/api/foreachExec.cjs.map +1 -1
- package/_cjs/IO/api/fork.cjs +2 -3
- package/_cjs/IO/api/fork.cjs.map +1 -1
- package/_cjs/IO/api/forkAll.cjs +1 -2
- package/_cjs/IO/api/forkAll.cjs.map +1 -1
- package/_cjs/IO/api/forkDaemon.cjs +5 -6
- package/_cjs/IO/api/forkDaemon.cjs.map +1 -1
- package/_cjs/IO/api/forkIn.cjs +1 -2
- package/_cjs/IO/api/forkIn.cjs.map +1 -1
- package/_cjs/IO/api/forkScoped.cjs +1 -2
- package/_cjs/IO/api/forkScoped.cjs.map +1 -1
- package/_cjs/IO/api/fulfill.cjs +1 -2
- package/_cjs/IO/api/fulfill.cjs.map +1 -1
- package/_cjs/IO/api/interrupt.cjs +4 -5
- package/_cjs/IO/api/interrupt.cjs.map +1 -1
- package/_cjs/IO/api/memoize.cjs +1 -2
- package/_cjs/IO/api/memoize.cjs.map +1 -1
- package/_cjs/IO/api/onTermination.cjs +2 -3
- package/_cjs/IO/api/onTermination.cjs.map +1 -1
- package/_cjs/IO/api/once.cjs +1 -2
- package/_cjs/IO/api/once.cjs.map +1 -1
- package/_cjs/IO/api/patchFiberRefs.cjs +1 -2
- package/_cjs/IO/api/patchFiberRefs.cjs.map +1 -1
- package/_cjs/IO/api/provideLayer.cjs +1 -2
- package/_cjs/IO/api/provideLayer.cjs.map +1 -1
- package/_cjs/IO/api/provideScope.cjs +1 -2
- package/_cjs/IO/api/provideScope.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/provideSomeRuntime.cjs +1 -2
- package/_cjs/IO/api/provideSomeRuntime.cjs.map +1 -1
- package/_cjs/IO/api/race.cjs +2 -3
- package/_cjs/IO/api/race.cjs.map +1 -1
- package/_cjs/IO/api/raceFirst.cjs +1 -2
- package/_cjs/IO/api/raceFirst.cjs.map +1 -1
- package/_cjs/IO/api/raceWith.cjs +1 -2
- package/_cjs/IO/api/raceWith.cjs.map +1 -1
- package/_cjs/IO/api/randomWith.cjs +1 -2
- package/_cjs/IO/api/randomWith.cjs.map +1 -1
- package/_cjs/IO/api/repeat.cjs +1 -2
- package/_cjs/IO/api/repeat.cjs.map +1 -1
- package/_cjs/IO/api/retry.cjs +1 -2
- package/_cjs/IO/api/retry.cjs.map +1 -1
- package/_cjs/IO/api/schedule.cjs +1 -2
- package/_cjs/IO/api/schedule.cjs.map +1 -1
- package/_cjs/IO/api/scope.cjs +1 -2
- package/_cjs/IO/api/scope.cjs.map +1 -1
- package/_cjs/IO/api/scopeWith.cjs +1 -2
- package/_cjs/IO/api/scopeWith.cjs.map +1 -1
- package/_cjs/IO/api/scoped.cjs +1 -2
- package/_cjs/IO/api/scoped.cjs.map +1 -1
- package/_cjs/IO/api/sleep.cjs +1 -2
- package/_cjs/IO/api/sleep.cjs.map +1 -1
- package/_cjs/IO/api/stateful.cjs +1 -2
- package/_cjs/IO/api/stateful.cjs.map +1 -1
- package/_cjs/IO/api/supervised.cjs +1 -2
- package/_cjs/IO/api/supervised.cjs.map +1 -1
- package/_cjs/IO/api/timeout.cjs +9 -11
- package/_cjs/IO/api/timeout.cjs.map +1 -1
- package/_cjs/IO/api/transplant.cjs +22 -7
- package/_cjs/IO/api/transplant.cjs.map +1 -1
- package/_cjs/IO/api/whenFiberRef.cjs +1 -2
- package/_cjs/IO/api/whenFiberRef.cjs.map +1 -1
- package/_cjs/IO/api/whenRef.cjs +1 -2
- package/_cjs/IO/api/whenRef.cjs.map +1 -1
- package/_cjs/IO/api/withChildren.cjs +1 -2
- package/_cjs/IO/api/withChildren.cjs.map +1 -1
- package/_cjs/IO/api/withEarlyRelease.cjs +1 -2
- package/_cjs/IO/api/withEarlyRelease.cjs.map +1 -1
- package/_cjs/IO/api/withFinalizer.cjs +1 -2
- package/_cjs/IO/api/withFinalizer.cjs.map +1 -1
- package/_cjs/IO/api/withFinalizerExit.cjs +1 -2
- package/_cjs/IO/api/withFinalizerExit.cjs.map +1 -1
- package/_cjs/IO/api/zipConcurrent.cjs +5 -6
- package/_cjs/IO/api/zipConcurrent.cjs.map +1 -1
- package/_cjs/IO/api.cjs +522 -473
- package/_cjs/IO/api.cjs.map +1 -1
- package/_cjs/IO/definition.cjs +2 -3
- package/_cjs/IO/definition.cjs.map +1 -1
- package/_cjs/IO/runtime.cjs +9 -10
- package/_cjs/IO/runtime.cjs.map +1 -1
- package/_cjs/IO.cjs +33 -11
- package/_cjs/IO.cjs.map +1 -1
- package/_cjs/IOEnv/definition.cjs +1 -2
- package/_cjs/IOEnv/definition.cjs.map +1 -1
- package/_cjs/IOEnv/live.cjs +1 -2
- package/_cjs/IOEnv/live.cjs.map +1 -1
- package/_cjs/IOEnv/services.cjs +1 -2
- package/_cjs/IOEnv/services.cjs.map +1 -1
- package/_cjs/Layer/MemoMap.cjs +1 -2
- package/_cjs/Layer/MemoMap.cjs.map +1 -1
- package/_cjs/Layer/api.cjs +1 -2
- package/_cjs/Layer/api.cjs.map +1 -1
- package/_cjs/Logger/api.cjs +1 -2
- package/_cjs/Logger/api.cjs.map +1 -1
- package/_cjs/Logger/constructors.cjs +1 -2
- package/_cjs/Logger/constructors.cjs.map +1 -1
- package/_cjs/MVar/api.cjs +1 -2
- package/_cjs/MVar/api.cjs.map +1 -1
- package/_cjs/Push/api.cjs +2 -3
- package/_cjs/Push/api.cjs.map +1 -1
- package/_cjs/Push/internal.cjs +1 -2
- package/_cjs/Push/internal.cjs.map +1 -1
- package/_cjs/Queue/api/dimapIO.cjs +1 -2
- package/_cjs/Queue/api/dimapIO.cjs.map +1 -1
- package/_cjs/Queue/api/filterInputIO.cjs +1 -2
- package/_cjs/Queue/api/filterInputIO.cjs.map +1 -1
- package/_cjs/Queue/api/filterOutputIO.cjs +1 -2
- package/_cjs/Queue/api/filterOutputIO.cjs.map +1 -1
- package/_cjs/Queue/api/poll.cjs +1 -2
- package/_cjs/Queue/api/poll.cjs.map +1 -1
- package/_cjs/Queue/api/takeBetween.cjs +1 -2
- package/_cjs/Queue/api/takeBetween.cjs.map +1 -1
- package/_cjs/Queue/api/takeN.cjs +1 -2
- package/_cjs/Queue/api/takeN.cjs.map +1 -1
- package/_cjs/Queue/api/zipWithIO.cjs +1 -2
- package/_cjs/Queue/api/zipWithIO.cjs.map +1 -1
- package/_cjs/Queue/constructors.cjs +1 -2
- package/_cjs/Queue/constructors.cjs.map +1 -1
- package/_cjs/Queue/internal.cjs +1 -2
- package/_cjs/Queue/internal.cjs.map +1 -1
- package/_cjs/Queue/strategy.cjs +1 -2
- package/_cjs/Queue/strategy.cjs.map +1 -1
- package/_cjs/Random/api.cjs +1 -2
- package/_cjs/Random/api.cjs.map +1 -1
- package/_cjs/Random/definition.cjs +2 -2
- package/_cjs/Random/definition.cjs.map +1 -1
- package/_cjs/Random/live.cjs +1 -2
- package/_cjs/Random/live.cjs.map +1 -1
- package/_cjs/Ref/Atomic.cjs +1 -2
- package/_cjs/Ref/Atomic.cjs.map +1 -1
- package/_cjs/Ref/Derived.cjs +1 -2
- package/_cjs/Ref/Derived.cjs.map +1 -1
- package/_cjs/Ref/DerivedAll.cjs +1 -2
- package/_cjs/Ref/DerivedAll.cjs.map +1 -1
- package/_cjs/Ref/Synchronized/api.cjs +2 -3
- package/_cjs/Ref/Synchronized/api.cjs.map +1 -1
- package/_cjs/Ref/Synchronized/constructors.cjs +2 -3
- package/_cjs/Ref/Synchronized/constructors.cjs.map +1 -1
- package/_cjs/Ref/Synchronized/definition.cjs +2 -3
- package/_cjs/Ref/Synchronized/definition.cjs.map +1 -1
- package/_cjs/Ref/api/collect.cjs +1 -2
- package/_cjs/Ref/api/collect.cjs.map +1 -1
- package/_cjs/Ref/api/dimap.cjs +1 -2
- package/_cjs/Ref/api/dimap.cjs.map +1 -1
- package/_cjs/Ref/api/filter.cjs +1 -2
- package/_cjs/Ref/api/filter.cjs.map +1 -1
- package/_cjs/Ref/api/modify.cjs +1 -2
- package/_cjs/Ref/api/modify.cjs.map +1 -1
- package/_cjs/Ref/api.cjs +1 -2
- package/_cjs/Ref/api.cjs.map +1 -1
- package/_cjs/Ref/constructors.cjs +1 -2
- package/_cjs/Ref/constructors.cjs.map +1 -1
- package/_cjs/RefSubject/Atomic.cjs +1 -2
- package/_cjs/RefSubject/Atomic.cjs.map +1 -1
- package/_cjs/RefSubject/Synchronized/api.cjs +1 -2
- package/_cjs/RefSubject/Synchronized/api.cjs.map +1 -1
- package/_cjs/RefSubject/Synchronized/definition.cjs +1 -2
- package/_cjs/RefSubject/Synchronized/definition.cjs.map +1 -1
- package/_cjs/RefSubject/api.cjs +1 -2
- package/_cjs/RefSubject/api.cjs.map +1 -1
- package/_cjs/Reloadable/api.cjs +1 -2
- package/_cjs/Reloadable/api.cjs.map +1 -1
- package/_cjs/Reloadable/constructors.cjs +1 -2
- package/_cjs/Reloadable/constructors.cjs.map +1 -1
- package/_cjs/Reloadable/definition.cjs +1 -2
- package/_cjs/Reloadable/definition.cjs.map +1 -1
- package/_cjs/RuntimeFlags/Patch.cjs +1 -2
- package/_cjs/RuntimeFlags/Patch.cjs.map +1 -1
- package/_cjs/RuntimeFlags/RuntimeFlags.cjs +1 -2
- package/_cjs/RuntimeFlags/RuntimeFlags.cjs.map +1 -1
- package/_cjs/STM/api/atomically.cjs +1 -2
- package/_cjs/STM/api/atomically.cjs.map +1 -1
- package/_cjs/STM/api/core-api.cjs +1 -2
- package/_cjs/STM/api/core-api.cjs.map +1 -1
- package/_cjs/STM/api.cjs +1 -2
- package/_cjs/STM/api.cjs.map +1 -1
- package/_cjs/STM/definition.cjs +2 -3
- package/_cjs/STM/definition.cjs.map +1 -1
- package/_cjs/STM/driver.cjs +1 -2
- package/_cjs/STM/driver.cjs.map +1 -1
- package/_cjs/STM/internal/CommitState.cjs +1 -2
- package/_cjs/STM/internal/CommitState.cjs.map +1 -1
- package/_cjs/STM/internal/Journal.cjs +1 -2
- package/_cjs/STM/internal/Journal.cjs.map +1 -1
- package/_cjs/Schedule/Decision.cjs +1 -2
- package/_cjs/Schedule/Decision.cjs.map +1 -1
- package/_cjs/Schedule/api/driver.cjs +1 -2
- package/_cjs/Schedule/api/driver.cjs.map +1 -1
- package/_cjs/Schedule/api.cjs +1 -2
- package/_cjs/Schedule/api.cjs.map +1 -1
- package/_cjs/Scope/Finalizer/definition.cjs +1 -2
- package/_cjs/Scope/Finalizer/definition.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs +1 -2
- package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/api.cjs +1 -2
- package/_cjs/Scope/ReleaseMap/api.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/constructors.cjs +1 -2
- package/_cjs/Scope/ReleaseMap/constructors.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/definition.cjs +1 -2
- package/_cjs/Scope/ReleaseMap/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 +1 -2
- package/_cjs/Scope/definition.cjs.map +1 -1
- package/_cjs/ScopedRef/api.cjs +2 -3
- package/_cjs/ScopedRef/api.cjs.map +1 -1
- package/_cjs/Semaphore/Reservation.cjs +24 -0
- package/_cjs/Semaphore/Reservation.cjs.map +1 -0
- package/_cjs/Semaphore/constructors.cjs +25 -0
- package/_cjs/Semaphore/constructors.cjs.map +1 -0
- package/_cjs/Semaphore/definition.cjs +149 -0
- package/_cjs/Semaphore/definition.cjs.map +1 -0
- package/_cjs/Semaphore.cjs +31 -138
- package/_cjs/Semaphore.cjs.map +1 -1
- package/_cjs/Sink/api.cjs +1 -2
- package/_cjs/Sink/api.cjs.map +1 -1
- package/_cjs/State/api.cjs +1 -2
- package/_cjs/State/api.cjs.map +1 -1
- package/_cjs/Stream/api/zipAllWith.cjs +1 -2
- package/_cjs/Stream/api/zipAllWith.cjs.map +1 -1
- package/_cjs/Stream/api/zipWith.cjs +1 -2
- package/_cjs/Stream/api/zipWith.cjs.map +1 -1
- package/_cjs/Stream/api/zipWithChunks.cjs +1 -2
- package/_cjs/Stream/api/zipWithChunks.cjs.map +1 -1
- package/_cjs/Stream/api.cjs +702 -703
- package/_cjs/Stream/api.cjs.map +1 -1
- package/_cjs/Stream/internal/Handoff.cjs +1 -2
- package/_cjs/Stream/internal/Handoff.cjs.map +1 -1
- package/_cjs/Stream/internal/Pull.cjs +1 -2
- package/_cjs/Stream/internal/Pull.cjs.map +1 -1
- package/_cjs/Stream/internal/Take.cjs +1 -2
- package/_cjs/Stream/internal/Take.cjs.map +1 -1
- package/_cjs/Stream/internal/util.cjs +1 -2
- package/_cjs/Stream/internal/util.cjs.map +1 -1
- package/_cjs/Subject/Atomic.cjs +1 -2
- package/_cjs/Subject/Atomic.cjs.map +1 -1
- package/_cjs/Subject/api.cjs +1 -2
- package/_cjs/Subject/api.cjs.map +1 -1
- package/_cjs/SubscriptionRef.cjs +2 -3
- package/_cjs/SubscriptionRef.cjs.map +1 -1
- package/_cjs/Supervisor/api.cjs +1 -2
- package/_cjs/Supervisor/api.cjs.map +1 -1
- package/_cjs/Supervisor/constructors.cjs +1 -2
- package/_cjs/Supervisor/constructors.cjs.map +1 -1
- package/_cjs/Supervisor/definition.cjs +1 -2
- package/_cjs/Supervisor/definition.cjs.map +1 -1
- package/_cjs/SupervisorPatch.cjs +1 -2
- package/_cjs/SupervisorPatch.cjs.map +1 -1
- package/_cjs/TExit/definition.cjs +1 -2
- package/_cjs/TExit/definition.cjs.map +1 -1
- package/_cjs/TFuture/api.cjs +1 -2
- package/_cjs/TFuture/api.cjs.map +1 -1
- package/_cjs/TFuture/constructors.cjs +1 -2
- package/_cjs/TFuture/constructors.cjs.map +1 -1
- package/_cjs/TFuture/definition.cjs +1 -2
- package/_cjs/TFuture/definition.cjs.map +1 -1
- package/_cjs/TReentrantLock/api.cjs +1 -2
- package/_cjs/TReentrantLock/api.cjs.map +1 -1
- package/_cjs/TReentrantLock/definition.cjs +1 -2
- package/_cjs/TReentrantLock/definition.cjs.map +1 -1
- package/_cjs/TRef/api.cjs +1 -2
- package/_cjs/TRef/api.cjs.map +1 -1
- package/_cjs/TRef/constructors.cjs +1 -2
- package/_cjs/TRef/constructors.cjs.map +1 -1
- package/_cjs/TRef/definition.cjs +1 -2
- package/_cjs/TRef/definition.cjs.map +1 -1
- package/_cjs/TSemaphore/api.cjs +1 -2
- package/_cjs/TSemaphore/api.cjs.map +1 -1
- package/_cjs/TSemaphore/constructors.cjs +1 -2
- package/_cjs/TSemaphore/constructors.cjs.map +1 -1
- package/_cjs/TSemaphore/definition.cjs +1 -2
- package/_cjs/TSemaphore/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/dropUntilIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/dropUntilIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/dropWhileIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/dropWhileIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/filterIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/filterIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/findIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/findIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/mapIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/mapIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/takeWhileIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/takeWhileIO.cjs.map +1 -1
- package/_cjs/data/Exit/foreachIO.cjs +1 -2
- package/_cjs/data/Exit/foreachIO.cjs.map +1 -1
- package/_cjs/internal/HashedPair.cjs +1 -2
- package/_cjs/internal/HashedPair.cjs.map +1 -1
- package/_cjs/internal/Hub.cjs +1 -2
- package/_cjs/internal/Hub.cjs.map +1 -1
- package/_cjs/internal/MutableQueue.cjs +1 -2
- package/_cjs/internal/MutableQueue.cjs.map +1 -1
- package/_cjs/internal/Scheduler.cjs +1 -2
- package/_cjs/internal/Scheduler.cjs.map +1 -1
- package/_cjs/internal/StackTraceBuilder.cjs +1 -2
- package/_cjs/internal/StackTraceBuilder.cjs.map +1 -1
- package/_mjs/Cached/api.mjs.map +1 -1
- package/_mjs/Channel/api/mapOutConcurrentIO.mjs +1 -1
- package/_mjs/Channel/api/mergeAllWith.mjs +1 -1
- package/_mjs/Channel/api/runScoped.mjs +2 -2
- package/_mjs/Channel/api/runScoped.mjs.map +1 -1
- package/_mjs/Channel/api/toPull.mjs +1 -1
- package/_mjs/Channel/api/toPull.mjs.map +1 -1
- package/_mjs/Channel/api.mjs +205 -205
- package/_mjs/Channel/api.mjs.map +1 -1
- package/_mjs/Channel/core-api.mjs +43 -42
- package/_mjs/Channel/core-api.mjs.map +1 -1
- package/_mjs/Channel/internal/ChannelExecutor.mjs +3 -3
- package/_mjs/Channel/internal/ChannelExecutor.mjs.map +1 -1
- package/_mjs/Console/definition.mjs +1 -0
- package/_mjs/Console/definition.mjs.map +1 -1
- package/_mjs/CountdownLatch.mjs +2 -1
- package/_mjs/CountdownLatch.mjs.map +1 -1
- package/_mjs/Fiber/FiberMessage.mjs +2 -20
- package/_mjs/Fiber/FiberMessage.mjs.map +1 -1
- package/_mjs/Fiber/FiberRuntime.mjs +877 -633
- package/_mjs/Fiber/FiberRuntime.mjs.map +1 -1
- package/_mjs/Fiber/api/collectAll.mjs +1 -1
- package/_mjs/Fiber/api/collectAll.mjs.map +1 -1
- package/_mjs/Fiber/api/interrupt.mjs +1 -1
- package/_mjs/Fiber/api/interrupt.mjs.map +1 -1
- package/_mjs/Fiber/api/interruptAll.mjs +1 -1
- package/_mjs/Fiber/api/interruptAll.mjs.map +1 -1
- package/_mjs/Fiber/api/interruptAs.mjs +4 -7
- package/_mjs/Fiber/api/interruptAs.mjs.map +1 -1
- package/_mjs/Fiber/api/interruptFork.mjs +1 -1
- package/_mjs/Fiber/api/interruptFork.mjs.map +1 -1
- package/_mjs/Fiber/api/mapIO.mjs +1 -1
- package/_mjs/Fiber/api/mapIO.mjs.map +1 -1
- package/_mjs/Fiber/api/zipWith.mjs +1 -1
- package/_mjs/Fiber/api/zipWith.mjs.map +1 -1
- package/_mjs/Fiber/constructors.mjs +1 -1
- package/_mjs/Fiber/constructors.mjs.map +1 -1
- package/_mjs/Fiber/definition.mjs +5 -2
- package/_mjs/Fiber/definition.mjs.map +1 -1
- package/_mjs/FiberScope/definition.mjs +28 -4
- package/_mjs/FiberScope/definition.mjs.map +1 -1
- package/_mjs/FiberSet.mjs +14 -12
- package/_mjs/FiberSet.mjs.map +1 -1
- package/_mjs/Future/State.mjs +96 -0
- package/_mjs/Future/State.mjs.map +1 -0
- package/_mjs/Future/api.mjs +67 -61
- package/_mjs/Future/api.mjs.map +1 -1
- package/_mjs/Future/constructors.mjs +3 -3
- package/_mjs/Future/constructors.mjs.map +1 -1
- package/_mjs/Future/definition.mjs +0 -12
- package/_mjs/Future/definition.mjs.map +1 -1
- package/_mjs/Future.mjs +1 -0
- package/_mjs/Future.mjs.map +1 -1
- package/_mjs/Hub/api.mjs +55 -55
- package/_mjs/Hub/api.mjs.map +1 -1
- package/_mjs/IO/api/array.mjs +42 -0
- package/_mjs/IO/api/array.mjs.map +1 -0
- package/_mjs/IO/api/asyncInterrupt.mjs.map +1 -1
- package/_mjs/IO/api/awaitAllChildren.mjs +10 -0
- package/_mjs/IO/api/awaitAllChildren.mjs.map +1 -0
- package/_mjs/IO/api/cachedInvalidate.mjs +39 -0
- package/_mjs/IO/api/cachedInvalidate.mjs.map +1 -0
- package/_mjs/IO/api/disconnect.mjs +1 -1
- package/_mjs/IO/api/disconnect.mjs.map +1 -1
- package/_mjs/IO/api/foreachConcurrent.mjs +35 -28
- package/_mjs/IO/api/foreachConcurrent.mjs.map +1 -1
- package/_mjs/IO/api/fork.mjs +1 -1
- package/_mjs/IO/api/fork.mjs.map +1 -1
- package/_mjs/IO/api/forkDaemon.mjs +4 -4
- package/_mjs/IO/api/forkDaemon.mjs.map +1 -1
- package/_mjs/IO/api/interrupt.mjs +3 -3
- package/_mjs/IO/api/onTermination.mjs +1 -1
- 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/timeout.mjs +8 -9
- package/_mjs/IO/api/timeout.mjs.map +1 -1
- package/_mjs/IO/api/transplant.mjs +19 -5
- package/_mjs/IO/api/transplant.mjs.map +1 -1
- package/_mjs/IO/api/zipConcurrent.mjs +4 -4
- package/_mjs/IO/api/zipConcurrent.mjs.map +1 -1
- package/_mjs/IO/api.mjs +515 -468
- package/_mjs/IO/api.mjs.map +1 -1
- package/_mjs/IO/definition.mjs +1 -1
- package/_mjs/IO/definition.mjs.map +1 -1
- package/_mjs/IO/runtime.mjs +8 -8
- package/_mjs/IO/runtime.mjs.map +1 -1
- package/_mjs/IO.mjs +3 -1
- package/_mjs/IO.mjs.map +1 -1
- package/_mjs/IOEnv/definition.mjs.map +1 -1
- package/_mjs/Push/api.mjs +1 -1
- package/_mjs/Random/definition.mjs +1 -0
- package/_mjs/Random/definition.mjs.map +1 -1
- package/_mjs/Ref/Synchronized/api.mjs +1 -1
- package/_mjs/Ref/Synchronized/api.mjs.map +1 -1
- package/_mjs/Ref/Synchronized/constructors.mjs +1 -1
- package/_mjs/Ref/Synchronized/definition.mjs +1 -1
- package/_mjs/Ref/Synchronized/definition.mjs.map +1 -1
- package/_mjs/STM/definition.mjs +1 -1
- package/_mjs/ScopedRef/api.mjs +1 -1
- package/_mjs/ScopedRef/api.mjs.map +1 -1
- package/_mjs/Semaphore/Reservation.mjs +16 -0
- package/_mjs/Semaphore/Reservation.mjs.map +1 -0
- package/_mjs/Semaphore/constructors.mjs +17 -0
- package/_mjs/Semaphore/constructors.mjs.map +1 -0
- package/_mjs/Semaphore/definition.mjs +141 -0
- package/_mjs/Semaphore/definition.mjs.map +1 -0
- package/_mjs/Semaphore.mjs +4 -133
- package/_mjs/Semaphore.mjs.map +1 -1
- package/_mjs/Stream/api.mjs +701 -701
- package/_mjs/Stream/api.mjs.map +1 -1
- package/_mjs/SubscriptionRef.mjs +1 -1
- package/_src/Cached/api.ts +3 -3
- package/_src/Channel/api/toPull.ts +1 -1
- package/_src/Channel/api.ts +273 -272
- package/_src/Channel/core-api.ts +57 -55
- package/_src/Channel/internal/ChannelExecutor.ts +3 -3
- package/_src/Console/definition.ts +1 -0
- package/_src/CountdownLatch.ts +2 -0
- package/_src/Fiber/FiberMessage.ts +3 -28
- package/_src/Fiber/FiberRuntime.ts +988 -616
- package/_src/Fiber/api/interruptAs.ts +4 -3
- package/_src/Fiber/constructors.ts +1 -1
- package/_src/Fiber/definition.ts +4 -0
- package/_src/FiberScope/definition.ts +40 -2
- package/_src/FiberSet.ts +6 -2
- package/_src/Future/State.ts +128 -0
- package/_src/Future/api.ts +62 -51
- package/_src/Future/constructors.ts +4 -2
- package/_src/Future/definition.ts +2 -17
- package/_src/Future.ts +4 -3
- package/_src/Hub/api.ts +61 -61
- package/_src/IO/api/addFinalizerExit.ts +4 -4
- package/_src/IO/api/array.ts +49 -0
- package/_src/IO/api/asyncInterrupt.ts +1 -1
- package/_src/IO/api/awaitAllChildren.ts +6 -0
- package/_src/IO/api/cachedInvalidate.ts +42 -0
- package/_src/IO/api/foreachConcurrent.ts +39 -23
- package/_src/IO/api/fork.ts +1 -1
- package/_src/IO/api/forkDaemon.ts +2 -2
- package/_src/IO/api/memoize.ts +3 -3
- package/_src/IO/api/onTermination.ts +2 -2
- package/_src/IO/api/transplant.ts +26 -3
- package/_src/IO/api/zipConcurrent.ts +2 -2
- package/_src/IO/api.ts +547 -525
- package/_src/IO/definition.ts +4 -28
- package/_src/IO/runtime.ts +0 -1
- package/_src/IO.ts +65 -63
- package/_src/IOEnv/definition.ts +1 -4
- package/_src/Random/definition.ts +1 -0
- package/_src/Ref/Synchronized/api.ts +2 -2
- package/_src/Ref/Synchronized/definition.ts +1 -1
- package/_src/Semaphore/Reservation.ts +15 -0
- package/_src/Semaphore/constructors.ts +14 -0
- package/_src/Semaphore/definition.ts +180 -0
- package/_src/Semaphore.ts +5 -159
- package/_src/Stream/api.ts +679 -679
- package/package.json +4 -4
- package/IO/api/sequenceT.d.ts +0 -26
- package/_cjs/IO/api/sequenceT.cjs +0 -18
- package/_cjs/IO/api/sequenceT.cjs.map +0 -1
- package/_mjs/IO/api/sequenceT.mjs +0 -10
- package/_mjs/IO/api/sequenceT.mjs.map +0 -1
- package/_src/IO/api/sequenceT.ts +0 -16
package/IO/api.d.ts
CHANGED
@@ -1,21 +1,20 @@
|
|
1
|
-
import { FiberId } from "@fncts/base/data/FiberId/definition";
|
2
1
|
import { Lazy } from "@fncts/base/data/function/definition";
|
3
2
|
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
3
|
+
import { FiberId } from "@fncts/base/data/FiberId/definition";
|
4
4
|
import { Cause } from "@fncts/base/data/Cause/definition";
|
5
5
|
import { InterruptStatus } from "@fncts/io/InterruptStatus";
|
6
6
|
import { URIO, FIO, UIO } from "@fncts/io/IO/definition";
|
7
7
|
import { Either } from "@fncts/base/data/Either/definition";
|
8
|
+
import { Exit } from "@fncts/base/data/Exit/definition";
|
8
9
|
import { Conc, ConcBuilder } from "@fncts/base/collection/immutable/Conc";
|
9
10
|
import { Refinement } from "@fncts/base/data/Refinement/definition";
|
10
11
|
import { Predicate } from "@fncts/base/data/Predicate/definition";
|
11
|
-
import {
|
12
|
+
import { ReadonlyNonEmptyArray } from "@fncts/base/collection/immutable/ReadonlyNonEmptyArray/definition";
|
12
13
|
import { Eval } from "@fncts/base/control/Eval/definition";
|
13
|
-
import { Exit } from "@fncts/base/data/Exit/definition";
|
14
14
|
import { NoSuchElementError } from "@fncts/base/data/exceptions";
|
15
15
|
import { FiberRefs } from "@fncts/io/FiberRefs";
|
16
16
|
import { Trace } from "@fncts/base/data/Trace/definition";
|
17
17
|
import { List } from "@fncts/base/collection/immutable/List/definition";
|
18
|
-
import { ImmutableArray } from "@fncts/base/collection/immutable/ImmutableArray/definition";
|
19
18
|
import type { Running } from "../FiberStatus.js";
|
20
19
|
import type { ShowOptions } from "@fncts/base/data/Showable.js";
|
21
20
|
import type * as P from "@fncts/base/typeclass";
|
@@ -24,12 +23,6 @@ import type { FiberRuntime } from "@fncts/io/Fiber/FiberRuntime";
|
|
24
23
|
import type { RuntimeFlags } from "@fncts/io/RuntimeFlags";
|
25
24
|
import { pipe } from "@fncts/base/data/function";
|
26
25
|
import { IO } from "@fncts/io/IO/definition";
|
27
|
-
/**
|
28
|
-
* Imports an asynchronous side-effect into a `IO`
|
29
|
-
* @tsplus static fncts.io.IOOps async
|
30
|
-
* @tsplus location "@fncts/io/IO/api"
|
31
|
-
*/
|
32
|
-
export declare function async<R, E, A>(register: (resolve: (_: IO<R, E, A>) => void) => void, blockingOn?: FiberId, __tsplusTrace?: string): IO<R, E, A>;
|
33
26
|
/**
|
34
27
|
* Attempts to convert defects into a failure, throwing away all information
|
35
28
|
* about the cause of the failure.
|
@@ -37,19 +30,6 @@ export declare function async<R, E, A>(register: (resolve: (_: IO<R, E, A>) => v
|
|
37
30
|
* @tsplus location "@fncts/io/IO/api"
|
38
31
|
*/
|
39
32
|
export declare function absorbWith<R, E, A>(f: (e: E) => unknown, __tsplusTrace?: string): (ma: IO<R, E, A>) => IO<R, unknown, A>;
|
40
|
-
/**
|
41
|
-
* @tsplus pipeable fncts.io.IO zipLeft
|
42
|
-
* @tsplus pipeable-operator fncts.io.IO <
|
43
|
-
* @tsplus location "@fncts/io/IO/api"
|
44
|
-
*/
|
45
|
-
export declare function zipLeft<R1, E1, B>(fb: IO<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R1 | R, E1 | E, A>;
|
46
|
-
/**
|
47
|
-
* Combine two effectful actions, keeping only the result of the second
|
48
|
-
* @tsplus pipeable fncts.io.IO zipRight
|
49
|
-
* @tsplus pipeable-operator fncts.io.IO >
|
50
|
-
* @tsplus location "@fncts/io/IO/api"
|
51
|
-
*/
|
52
|
-
export declare function zipRight<R1, E1, B>(fb: IO<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R1 | R, E1 | E, B>;
|
53
33
|
/**
|
54
34
|
* @tsplus pipeable fncts.io.IO as
|
55
35
|
* @tsplus location "@fncts/io/IO/api"
|
@@ -60,25 +40,31 @@ export declare function as<B>(b: Lazy<B>, __tsplusTrace?: string): <R, E, A>(sel
|
|
60
40
|
* @tsplus getter fncts.io.IO asJust
|
61
41
|
* @tsplus location "@fncts/io/IO/api"
|
62
42
|
*/
|
63
|
-
export declare function asJust<R, E, A>(
|
43
|
+
export declare function asJust<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, E, Maybe<A>>;
|
64
44
|
/**
|
65
45
|
* Maps the error value of this IO to an optional value.
|
66
46
|
* @tsplus getter fncts.io.IO asJustError
|
67
47
|
* @tsplus location "@fncts/io/IO/api"
|
68
48
|
*/
|
69
|
-
export declare function asJustError<R, E, A>(
|
49
|
+
export declare function asJustError<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, Maybe<E>, A>;
|
70
50
|
/**
|
71
51
|
* @tsplus getter fncts.io.IO asUnit
|
72
52
|
* @tsplus location "@fncts/io/IO/api"
|
73
53
|
*/
|
74
54
|
export declare function asUnit<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, E, void>;
|
55
|
+
/**
|
56
|
+
* Imports an asynchronous side-effect into a `IO`
|
57
|
+
* @tsplus static fncts.io.IOOps async
|
58
|
+
* @tsplus location "@fncts/io/IO/api"
|
59
|
+
*/
|
60
|
+
export declare function async<R, E, A>(register: (resolve: (_: IO<R, E, A>) => void) => void, blockingOn?: FiberId, __tsplusTrace?: string): IO<R, E, A>;
|
75
61
|
/**
|
76
62
|
* Returns an IO whose failure and success channels have been mapped by
|
77
63
|
* the specified pair of functions, `f` and `g`.
|
78
64
|
* @tsplus pipeable fncts.io.IO bimap
|
79
65
|
* @tsplus location "@fncts/io/IO/api"
|
80
66
|
*/
|
81
|
-
export declare function bimap<E, A, E1, B>(
|
67
|
+
export declare function bimap<E, A, E1, B>(onFailure: (e: E) => E1, onSuccess: (a: A) => B, __tsplusTrace?: string): <R>(self: IO<R, E, A>) => IO<R, E1, B>;
|
82
68
|
/**
|
83
69
|
* Returns an IO that effectfully "peeks" at the failure or success of
|
84
70
|
* this effect.
|
@@ -86,39 +72,31 @@ export declare function bimap<E, A, E1, B>(f: (e: E) => E1, g: (a: A) => B, __ts
|
|
86
72
|
* @tsplus location "@fncts/io/IO/api"
|
87
73
|
*/
|
88
74
|
export declare function bitap<E, A, R1, E1, R2, E2>(onFailure: (e: E) => IO<R1, E1, any>, onSuccess: (a: A) => IO<R2, E2, any>, __tsplusTrace?: string): <R>(self: IO<R, E, A>) => IO<R | R1 | R2, E | E1 | E2, A>;
|
89
|
-
/**
|
90
|
-
* Recovers from the specified error
|
91
|
-
* @tsplus pipeable fncts.io.IO catch
|
92
|
-
* @tsplus location "@fncts/io/IO/api"
|
93
|
-
*/
|
94
|
-
export declare function catchTagWith<N extends keyof E, K extends E[N] & string, E, R1, E1, A1>(tag: N, k: K, f: (e: Extract<E, {
|
95
|
-
[n in N]: K;
|
96
|
-
}>) => IO<R1, E1, A1>, __tsplusTrace?: string): <R, A>(ma: IO<R, E, A>) => IO<R | R1, Exclude<E, { [n in N]: K; }> | E1, A | A1>;
|
97
75
|
/**
|
98
76
|
* Recovers from all errors
|
99
77
|
* @tsplus pipeable fncts.io.IO catchAll
|
100
78
|
* @tsplus location "@fncts/io/IO/api"
|
101
79
|
*/
|
102
|
-
export declare function catchAll<E, R1, E1, A1>(
|
80
|
+
export declare function catchAll<E, R1, E1, A1>(onFailure: (e: E) => IO<R1, E1, A1>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, E1, A | A1>;
|
103
81
|
/**
|
104
82
|
*
|
105
83
|
* Recovers from all errors with provided cause.
|
106
84
|
* @tsplus pipeable fncts.io.IO catchAllCause
|
107
85
|
* @tsplus location "@fncts/io/IO/api"
|
108
86
|
*/
|
109
|
-
export declare function catchAllCause<R, E, A, R1, E1, A1>(
|
87
|
+
export declare function catchAllCause<R, E, A, R1, E1, A1>(onFailure: (_: Cause<E>) => IO<R1, E1, A1>, __tsplusTrace?: string): (self: IO<R, E, A>) => IO<R | R1, E1, A | A1>;
|
110
88
|
/**
|
111
89
|
* Recovers from some or all of the error cases.
|
112
90
|
* @tsplus pipeable fncts.io.IO catchJust
|
113
91
|
* @tsplus location "@fncts/io/IO/api"
|
114
92
|
*/
|
115
|
-
export declare function catchJust<E, R1, E1, A1>(
|
93
|
+
export declare function catchJust<E, R1, E1, A1>(onFailure: (e: E) => Maybe<IO<R1, E1, A1>>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, E | E1, A | A1>;
|
116
94
|
/**
|
117
95
|
* Recovers from some or all of the error cases with provided cause.
|
118
96
|
* @tsplus pipeable fncts.io.IO catchJustCause
|
119
97
|
* @tsplus location "@fncts/io/IO/api"
|
120
98
|
*/
|
121
|
-
export declare function catchJustCause<E, R1, E1, A1>(
|
99
|
+
export declare function catchJustCause<E, R1, E1, A1>(onFailure: (_: Cause<E>) => Maybe<IO<R1, E1, A1>>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, E | E1, A | A1>;
|
122
100
|
/**
|
123
101
|
* Recovers from some or all of the defects with provided partial function.
|
124
102
|
*
|
@@ -129,29 +107,37 @@ export declare function catchJustCause<E, R1, E1, A1>(f: (_: Cause<E>) => Maybe<
|
|
129
107
|
* @tsplus pipeable fncts.io.IO catchJustDefect
|
130
108
|
* @tsplus location "@fncts/io/IO/api"
|
131
109
|
*/
|
132
|
-
export declare function catchJustDefect<R1, E1, A1>(
|
110
|
+
export declare function catchJustDefect<R1, E1, A1>(onFailure: (_: unknown) => Maybe<IO<R1, E1, A1>>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R | R1, E | E1, A | A1>;
|
133
111
|
/**
|
134
112
|
* Recovers from the specified error
|
135
113
|
* @tsplus pipeable IO catchTag
|
136
114
|
* @tsplus location "@fncts/io/IO/api"
|
137
115
|
*/
|
138
|
-
export declare function catchTag<
|
116
|
+
export declare function catchTag<T extends E["_tag"] & string, E extends {
|
139
117
|
_tag: string;
|
140
|
-
}, R1, E1, A1>(
|
141
|
-
_tag:
|
142
|
-
}>) => IO<R1, E1, A1>, __tsplusTrace?: string): <R, A>(
|
143
|
-
_tag:
|
118
|
+
}, R1, E1, A1>(tag: T, onFailure: (e: Extract<E, {
|
119
|
+
_tag: T;
|
120
|
+
}>) => IO<R1, E1, A1>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, Exclude<E, {
|
121
|
+
_tag: T;
|
144
122
|
}> | E1, A | A1>;
|
123
|
+
/**
|
124
|
+
* Recovers from the specified error
|
125
|
+
* @tsplus pipeable fncts.io.IO catch
|
126
|
+
* @tsplus location "@fncts/io/IO/api"
|
127
|
+
*/
|
128
|
+
export declare function catchTagWith<K extends keyof E, T extends E[K] & string, E, R1, E1, A1>(tagKey: K, tag: T, onFailure: (e: Extract<E, {
|
129
|
+
[n in K]: T;
|
130
|
+
}>) => IO<R1, E1, A1>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, Exclude<E, { [n in K]: T; }> | E1, A | A1>;
|
145
131
|
/**
|
146
132
|
* @tsplus getter fncts.io.IO cause
|
147
133
|
* @tsplus location "@fncts/io/IO/api"
|
148
134
|
*/
|
149
|
-
export declare function cause<R, E, A>(
|
135
|
+
export declare function cause<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, Cause<E>>;
|
150
136
|
/**
|
151
137
|
* @tsplus pipeable fncts.io.IO causeAsError
|
152
138
|
* @tsplus location "@fncts/io/IO/api"
|
153
139
|
*/
|
154
|
-
export declare function causeAsError(__tsplusTrace?: string): <R, E, A>(
|
140
|
+
export declare function causeAsError(__tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R, Cause<E>, A>;
|
155
141
|
/**
|
156
142
|
* Checks the interrupt status, and produces the IO returned by the
|
157
143
|
* specified callback.
|
@@ -160,28 +146,20 @@ export declare function causeAsError(__tsplusTrace?: string): <R, E, A>(ma: IO<R
|
|
160
146
|
*/
|
161
147
|
export declare function checkInterruptible<R, E, A>(f: (i: InterruptStatus) => IO<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
|
162
148
|
/**
|
163
|
-
*
|
164
|
-
* the passing of its value to the specified continuation function `f`,
|
165
|
-
* followed by the effect that it returns.
|
166
|
-
* @tsplus pipeable fncts.io.IO flatMap
|
167
|
-
* @tsplus location "@fncts/io/IO/api"
|
168
|
-
*/
|
169
|
-
export declare function flatMap<A, R1, E1, B>(f: (a: A) => IO<R1, E1, B>, __tsplusTrace?: string): <R, E>(ma: IO<R, E, A>) => IO<R | R1, E | E1, B>;
|
170
|
-
/**
|
171
|
-
* @tsplus pipeable fncts.io.IO flatMapError
|
149
|
+
* @tsplus pipeable fncts.io.IO collect
|
172
150
|
* @tsplus location "@fncts/io/IO/api"
|
173
151
|
*/
|
174
|
-
export declare function
|
152
|
+
export declare function collect<A, E1, A1>(f: Lazy<E1>, pf: (a: A) => Maybe<A1>, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R, E | E1, A1>;
|
175
153
|
/**
|
176
|
-
* @tsplus pipeable fncts.io.IO
|
154
|
+
* @tsplus pipeable fncts.io.IO collectIO
|
177
155
|
* @tsplus location "@fncts/io/IO/api"
|
178
156
|
*/
|
179
|
-
export declare function
|
157
|
+
export declare function collectIO<A, R1, E1, A1, E2>(onNothing: Lazy<E2>, pf: (a: A) => Maybe<IO<R1, E1, A1>>, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R | R1, E | E1 | E2, A1>;
|
180
158
|
/**
|
181
|
-
* @tsplus
|
159
|
+
* @tsplus static fncts.io.IOOps if
|
182
160
|
* @tsplus location "@fncts/io/IO/api"
|
183
161
|
*/
|
184
|
-
export declare function
|
162
|
+
export declare function cond<R, E, A, R1, E1, A1>(b: boolean, onTrue: Lazy<IO<R, E, A>>, onFalse: Lazy<IO<R1, E1, A1>>, __tsplusTrace?: string): IO<R | R1, E | E1, A | A1>;
|
185
163
|
/**
|
186
164
|
* @tsplus static fncts.io.IOOps condIO
|
187
165
|
* @tsplus location "@fncts/io/IO/api"
|
@@ -202,7 +180,7 @@ export declare function defer<R = never, E = never, A = never>(io: Lazy<IO<R, E,
|
|
202
180
|
* @tsplus static fncts.io.IOOps deferTry
|
203
181
|
* @tsplus location "@fncts/io/IO/api"
|
204
182
|
*/
|
205
|
-
export declare function deferTry<R = never, E = never, A = never>(io:
|
183
|
+
export declare function deferTry<R = never, E = never, A = never>(io: Lazy<IO<R, E, A>>, __tsplusTrace?: string): IO<R, unknown, A>;
|
206
184
|
/**
|
207
185
|
* Returns a lazily constructed effect, whose construction may itself require effects,
|
208
186
|
* translating any thrown exceptions into typed failed effects and mapping the error.
|
@@ -211,43 +189,44 @@ export declare function deferTry<R = never, E = never, A = never>(io: () => IO<R
|
|
211
189
|
* @tsplus static IOOps deferTryCatch
|
212
190
|
* @tsplus location "@fncts/io/IO/api"
|
213
191
|
*/
|
214
|
-
export declare function deferTryCatch<R, E, A, E1>(io:
|
192
|
+
export declare function deferTryCatch<R, E, A, E1>(io: Lazy<IO<R, E, A>>, onThrow: (error: unknown) => E1, __tsplusTrace?: string): IO<R, E | E1, A>;
|
215
193
|
/**
|
216
194
|
* Folds an `IO` that may fail with `E` or succeed with `A` into one that never fails but succeeds with `Either<E, A>`
|
217
195
|
* @tsplus getter fncts.io.IO either
|
218
196
|
* @tsplus location "@fncts/io/IO/api"
|
219
197
|
*/
|
220
|
-
export declare function either<R, E, A>(
|
198
|
+
export declare function either<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): URIO<R, Either<E, A>>;
|
221
199
|
/**
|
222
200
|
* @tsplus pipeable fncts.io.IO errorAsCause
|
223
201
|
* @tsplus location "@fncts/io/IO/api"
|
224
202
|
*/
|
225
|
-
export declare function errorAsCause(__tsplusTrace?: string): <R, E, A>(
|
203
|
+
export declare function errorAsCause(__tsplusTrace?: string): <R, E, A>(self: IO<R, Cause<E>, A>) => IO<R, E, A>;
|
226
204
|
/**
|
227
205
|
* @tsplus getter fncts.io.IO eventually
|
228
206
|
* @tsplus location "@fncts/io/IO/api"
|
229
207
|
*/
|
230
|
-
export declare function eventually<R, E, A>(
|
208
|
+
export declare function eventually<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, A>;
|
231
209
|
/**
|
232
|
-
* @tsplus pipeable fncts.io.IO
|
210
|
+
* @tsplus pipeable fncts.io.IO exitWith
|
233
211
|
* @tsplus location "@fncts/io/IO/api"
|
234
212
|
*/
|
235
|
-
export declare function
|
213
|
+
export declare function exitWith<E, A, R1, E1, B>(f: (exit: Exit<E, A>) => IO<R1, E1, B>, __tsplusTrace?: string): <R>(self: IO<R, E, A>) => IO<R | R1, E1, B>;
|
236
214
|
/**
|
237
|
-
* @tsplus
|
215
|
+
* @tsplus pipeable fncts.io.IO extend
|
238
216
|
* @tsplus location "@fncts/io/IO/api"
|
239
217
|
*/
|
240
|
-
export declare function
|
218
|
+
export declare function extend<R, E, A, B>(f: (io: IO<R, E, A>) => B, __tsplusTrace?: string): (self: IO<R, E, A>) => IO<R, E, B>;
|
241
219
|
/**
|
242
|
-
* @tsplus static fncts.io.IOOps
|
220
|
+
* @tsplus static fncts.io.IOOps fail
|
243
221
|
* @tsplus location "@fncts/io/IO/api"
|
244
222
|
*/
|
245
|
-
export declare function
|
223
|
+
export declare function fail<E>(e: Lazy<E>, __tsplusTrace?: string): FIO<E, never>;
|
246
224
|
/**
|
247
|
-
*
|
225
|
+
* Returns an effect that models failure with the specified lazily-evaluated `Cause`.
|
226
|
+
* @tsplus static fncts.io.IOOps failCause
|
248
227
|
* @tsplus location "@fncts/io/IO/api"
|
249
228
|
*/
|
250
|
-
export declare function
|
229
|
+
export declare function failCause<E = never, A = never>(cause: Lazy<Cause<E>>, __tsplusTrace?: string): FIO<E, A>;
|
251
230
|
/**
|
252
231
|
* Creates a `IO` that has failed with the specified `Cause`
|
253
232
|
* @tsplus static fncts.io.IOOps failCauseNow
|
@@ -255,11 +234,10 @@ export declare function refailCause<E>(cause: Cause<E>, __tsplusTrace?: string):
|
|
255
234
|
*/
|
256
235
|
export declare function failCauseNow<E>(cause: Cause<E>, __tsplusTrace?: string): FIO<E, never>;
|
257
236
|
/**
|
258
|
-
*
|
259
|
-
* @tsplus static fncts.io.IOOps failCause
|
237
|
+
* @tsplus static fncts.io.IOOps failNow
|
260
238
|
* @tsplus location "@fncts/io/IO/api"
|
261
239
|
*/
|
262
|
-
export declare function
|
240
|
+
export declare function failNow<E>(e: E, __tsplusTrace?: string): FIO<E, never>;
|
263
241
|
/**
|
264
242
|
* Returns the `FiberId` of the `Fiber` on which this `IO` is running
|
265
243
|
* @tsplus static fncts.io.IOOps fiberId
|
@@ -308,20 +286,33 @@ export declare function filterOrElse<A, R1, E1, A1>(predicate: Predicate<A>, or:
|
|
308
286
|
*/
|
309
287
|
export declare function filterOrFail<A, B extends A, E1>(refinement: Refinement<A, B>, failWith: (a: Exclude<A, B>) => E1): <R, E>(fa: IO<R, E, A>) => IO<R, E | E1, B>;
|
310
288
|
export declare function filterOrFail<A, E1>(predicate: Predicate<A>, failWith: (a: A) => E1): <R, E>(fa: IO<R, E, A>) => IO<R, E | E1, A>;
|
289
|
+
/**
|
290
|
+
* Halts with specified `unknown` if the predicate fails.
|
291
|
+
* @tsplus pipeable fncts.io.IO filterOrHalt
|
292
|
+
* @tsplus location "@fncts/io/IO/api"
|
293
|
+
*/
|
294
|
+
export declare function filterOrHalt<A, B extends A>(refinement: Refinement<A, B>, haltWith: (a: Exclude<A, B>) => unknown, __tsplusTrace?: string): <R, E>(fa: IO<R, E, A>) => IO<R, E, A>;
|
295
|
+
export declare function filterOrHalt<A>(predicate: Predicate<A>, haltWith: (a: A) => unknown, __tsplusTrace?: string): <R, E>(fa: IO<R, E, A>) => IO<R, E, A>;
|
311
296
|
/**
|
312
297
|
* Returns an `IO` that yields the value of the first
|
313
298
|
* `IO` to succeed.
|
314
299
|
* @tsplus static fncts.io.IOOps firstSuccess
|
315
300
|
* @tsplus location "@fncts/io/IO/api"
|
316
301
|
*/
|
317
|
-
export declare function firstSuccess<R, E, A>(
|
302
|
+
export declare function firstSuccess<R, E, A>(ios: ReadonlyNonEmptyArray<IO<R, E, A>>, __tsplusTrace?: string): IO<R, E, A>;
|
318
303
|
/**
|
319
|
-
*
|
320
|
-
*
|
304
|
+
* Returns an IO that models the execution of this effect, followed by
|
305
|
+
* the passing of its value to the specified continuation function `f`,
|
306
|
+
* followed by the effect that it returns.
|
307
|
+
* @tsplus pipeable fncts.io.IO flatMap
|
321
308
|
* @tsplus location "@fncts/io/IO/api"
|
322
309
|
*/
|
323
|
-
export declare function
|
324
|
-
|
310
|
+
export declare function flatMap<A, R1, E1, B>(f: (a: A) => IO<R1, E1, B>, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R | R1, E | E1, B>;
|
311
|
+
/**
|
312
|
+
* @tsplus pipeable fncts.io.IO flatMapError
|
313
|
+
* @tsplus location "@fncts/io/IO/api"
|
314
|
+
*/
|
315
|
+
export declare function flatMapError<R1, E, E1>(f: (e: E) => IO<R1, never, E1>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, E1, A>;
|
325
316
|
/**
|
326
317
|
* @tsplus getter fncts.io.IO flatten
|
327
318
|
* @tsplus location "@fncts/io/IO/api"
|
@@ -330,19 +321,22 @@ export declare function flatten<R, E, R1, E1, A>(self: IO<R, E, IO<R1, E1, A>>,
|
|
330
321
|
/**
|
331
322
|
* Folds an `Iterable<A>` using an effectful function f, working sequentially from left to right.
|
332
323
|
* @tsplus static fncts.io.IOOps foldLeft
|
324
|
+
* @tsplus fluent fncts.Iterable foldLeftIO
|
333
325
|
* @tsplus location "@fncts/io/IO/api"
|
334
326
|
*/
|
335
327
|
export declare function foldLeft<A, B, R, E>(as: Iterable<A>, b: B, f: (b: B, a: A) => IO<R, E, B>, __tsplusTrace?: string): IO<R, E, B>;
|
336
328
|
/**
|
337
329
|
* Combines an array of `IO`s using a `Monoid`
|
338
330
|
* @tsplus static fncts.io.IOOps foldMap
|
331
|
+
* @tsplus fluent fncts.Iterable foldMapIO
|
339
332
|
* @tsplus location "@fncts/io/IO/api"
|
340
333
|
*/
|
341
|
-
export declare function foldMap<R, E, A, M>(
|
334
|
+
export declare function foldMap<R, E, A, M>(ios: Iterable<IO<R, E, A>>, f: (a: A) => M,
|
342
335
|
/** @tsplus auto */ M: P.Monoid<M>): IO<R, E, M>;
|
343
336
|
/**
|
344
337
|
* Performs a right-associative fold of an `Iterable<A>`
|
345
338
|
* @tsplus static fncts.io.IOOps foldRight
|
339
|
+
* @tsplus fluent fncts.Iterable foldRightIO
|
346
340
|
* @tsplus location "@fncts/io/IO/api"
|
347
341
|
*/
|
348
342
|
export declare function foldRight<A, B, R, E>(as: Iterable<A>, b: UIO<B>, f: (a: A, b: IO<R, E, B>) => IO<R, E, B>, __tsplusTrace?: string): IO<R, E, B>;
|
@@ -353,9 +347,18 @@ export declare function foldRight<A, B, R, E>(as: Iterable<A>, b: UIO<B>, f: (a:
|
|
353
347
|
* For a parallel version of this method, see `foreachC`.
|
354
348
|
* If you do not need the results, see `foreachUnit` for a more efficient implementation.
|
355
349
|
* @tsplus static fncts.io.IOOps foreach
|
350
|
+
* @tsplus fluent fncts.Iterable foreachIO
|
356
351
|
* @tsplus location "@fncts/io/IO/api"
|
357
352
|
*/
|
358
353
|
export declare function foreach<A, R, E, B>(as: Iterable<A>, f: (a: A) => IO<R, E, B>, __tsplusTrace?: string): IO<R, E, Conc<B>>;
|
354
|
+
/**
|
355
|
+
* Applies the function `f` to each element of the `Iterable<A>` and runs
|
356
|
+
* produced IOs sequentially.
|
357
|
+
* @tsplus static fncts.io.IOOps foreachDiscard
|
358
|
+
* @tsplus fluent fncts.Iterable foreachDiscardIO
|
359
|
+
* @tsplus location "@fncts/io/IO/api"
|
360
|
+
*/
|
361
|
+
export declare function foreachDiscard<A, R, E, B>(as: Iterable<A>, f: (a: A) => IO<R, E, B>, __tsplusTrace?: string): IO<R, E, void>;
|
359
362
|
/**
|
360
363
|
* Applies the function `f` to each element of the `Iterable<A>` and
|
361
364
|
* returns the results in a new `Conc<B>`.
|
@@ -363,21 +366,16 @@ export declare function foreach<A, R, E, B>(as: Iterable<A>, f: (a: A) => IO<R,
|
|
363
366
|
* For a parallel version of this method, see `foreachC`.
|
364
367
|
* If you do not need the results, see `foreachUnit` for a more efficient implementation.
|
365
368
|
* @tsplus static fncts.io.IOOps foreachWithIndex
|
369
|
+
* @tsplus fluent fncts.Iterable foreachWithIndexIO
|
366
370
|
* @tsplus location "@fncts/io/IO/api"
|
367
371
|
*/
|
368
372
|
export declare function foreachWithIndex<A, R, E, B>(as: Iterable<A>, f: (i: number, a: A) => IO<R, E, B>, __tsplusTrace?: string): IO<R, E, Conc<B>>;
|
369
373
|
/**
|
370
374
|
* @tsplus static fncts.io.IOOps foreachWithIndexDiscard
|
375
|
+
* @tsplus fluent fncts.Iterable foreachWithIndexDiscardIO
|
371
376
|
* @tsplus location "@fncts/io/IO/api"
|
372
377
|
*/
|
373
378
|
export declare function foreachWithIndexDiscard<A, R, E, B>(as: Iterable<A>, f: (i: number, a: A) => IO<R, E, B>, __tsplusTrace?: string): IO<R, E, void>;
|
374
|
-
/**
|
375
|
-
* Applies the function `f` to each element of the `Iterable<A>` and runs
|
376
|
-
* produced IOs sequentially.
|
377
|
-
* @tsplus static fncts.io.IOOps foreachDiscard
|
378
|
-
* @tsplus location "@fncts/io/IO/api"
|
379
|
-
*/
|
380
|
-
export declare function foreachDiscard<A, R, E, B>(as: Iterable<A>, f: (a: A) => IO<R, E, B>, __tsplusTrace?: string): IO<R, E, void>;
|
381
379
|
/**
|
382
380
|
* Repeats this effect forever (until the first failure).
|
383
381
|
* @tsplus getter fncts.io.IO forever
|
@@ -432,18 +430,18 @@ export declare function fromMaybe<A>(maybe: Lazy<Maybe<A>>, __tsplusTrace?: stri
|
|
432
430
|
export declare function fromMaybeNow<A = never>(maybe: Maybe<A>, __tsplusTrace?: string): IO<never, NoSuchElementError, A>;
|
433
431
|
/**
|
434
432
|
* Create an IO that when executed will construct `promise` and wait for its result,
|
435
|
-
* errors will
|
436
|
-
* @tsplus static fncts.io.IOOps
|
433
|
+
* errors will produce failure as `unknown`
|
434
|
+
* @tsplus static fncts.io.IOOps fromPromise
|
437
435
|
* @tsplus location "@fncts/io/IO/api"
|
438
436
|
*/
|
439
|
-
export declare function
|
437
|
+
export declare function fromPromise<A>(promise: Lazy<Promise<A>>, __tsplusTrace?: string): FIO<unknown, A>;
|
440
438
|
/**
|
441
439
|
* Create an IO that when executed will construct `promise` and wait for its result,
|
442
|
-
* errors will
|
443
|
-
* @tsplus static fncts.io.IOOps
|
440
|
+
* errors will be handled using `onReject`
|
441
|
+
* @tsplus static fncts.io.IOOps fromPromiseCatch
|
444
442
|
* @tsplus location "@fncts/io/IO/api"
|
445
443
|
*/
|
446
|
-
export declare function
|
444
|
+
export declare function fromPromiseCatch<E, A>(promise: Lazy<Promise<A>>, onReject: (reason: unknown) => E, __tsplusTrace?: string): FIO<E, A>;
|
447
445
|
/**
|
448
446
|
* Like fromPromise but produces a defect in case of errors
|
449
447
|
* @tsplus static fncts.io.IOOps fromPromiseHalt
|
@@ -456,6 +454,11 @@ export declare function fromPromiseHalt<A>(promise: Lazy<Promise<A>>, __tsplusTr
|
|
456
454
|
* @tsplus location "@fncts/io/IO/api"
|
457
455
|
*/
|
458
456
|
export declare function get<R, E, A>(ma: IO<R, E, Maybe<A>>, __tsplusTrace?: string): IO<R, Maybe<E>, A>;
|
457
|
+
/**
|
458
|
+
* @tsplus static fncts.io.IOOps getFiberRefs
|
459
|
+
* @tsplus location "@fncts/io/IO/api"
|
460
|
+
*/
|
461
|
+
export declare function getFiberRefs(__tsplusTrace?: string): UIO<FiberRefs>;
|
459
462
|
/**
|
460
463
|
* Extracts the optional value, or returns the given 'orElse'.
|
461
464
|
* @tsplus pipeable fncts.io.IO getOrElse
|
@@ -468,12 +471,6 @@ export declare function getOrElse<B>(orElse: Lazy<B>, __tsplusTrace?: string): <
|
|
468
471
|
* @tsplus location "@fncts/io/IO/api"
|
469
472
|
*/
|
470
473
|
export declare function getOrElseIO<R1, E1, B>(orElse: Lazy<IO<R1, E1, B>>, __tsplusTrace?: string): <R, E, A>(ma: IO<R, E, Maybe<A>>) => IO<R | R1, E | E1, A | B>;
|
471
|
-
/**
|
472
|
-
* Lifts a Maybe into an IO. If the option is `Nothing`, fail with `onNothing`.
|
473
|
-
* @tsplus static fncts.io.IOOps getOrFailWith
|
474
|
-
* @tsplus location "@fncts/io/IO/api"
|
475
|
-
*/
|
476
|
-
export declare function getOrFailWith<E, A>(maybe: Maybe<A>, onNothing: Lazy<E>, __tsplusTrace?: string): FIO<E, A>;
|
477
474
|
/**
|
478
475
|
* Lifts a Maybe into a IO, if the Maybe is `Nothing` it fails with Unit.
|
479
476
|
* @tsplus static fncts.io.IOOps getOrFailUnit
|
@@ -481,10 +478,11 @@ export declare function getOrFailWith<E, A>(maybe: Maybe<A>, onNothing: Lazy<E>,
|
|
481
478
|
*/
|
482
479
|
export declare function getOrFailUnit<A>(option: Maybe<A>, __tsplusTrace?: string): FIO<void, A>;
|
483
480
|
/**
|
484
|
-
*
|
481
|
+
* Lifts a Maybe into an IO. If the option is `Nothing`, fail with `onNothing`.
|
482
|
+
* @tsplus static fncts.io.IOOps getOrFailWith
|
485
483
|
* @tsplus location "@fncts/io/IO/api"
|
486
484
|
*/
|
487
|
-
export declare function
|
485
|
+
export declare function getOrFailWith<E, A>(maybe: Maybe<A>, onNothing: Lazy<E>, __tsplusTrace?: string): FIO<E, A>;
|
488
486
|
/**
|
489
487
|
* Creates an `IO` that halts with the specified lazily-evaluated defect.
|
490
488
|
* This method can be used for terminating a fiber because a defect has been
|
@@ -506,28 +504,23 @@ export declare function haltNow(e: unknown, __tsplusTrace?: string): UIO<never>;
|
|
506
504
|
* @tsplus location "@fncts/io/IO/api"
|
507
505
|
*/
|
508
506
|
export declare function ifIO<R1, E1, B, R2, E2, C>(onFalse: Lazy<IO<R1, E1, B>>, onTrue: Lazy<IO<R2, E2, C>>, __tsplusTrace?: string): <R, E>(self: IO<R, E, boolean>) => IO<R | R1 | R2, E | E1 | E2, B | C>;
|
509
|
-
/**
|
510
|
-
* @tsplus static fncts.io.IOOps if
|
511
|
-
* @tsplus location "@fncts/io/IO/api"
|
512
|
-
*/
|
513
|
-
export declare function cond<R, E, A, R1, E1, A1>(b: boolean, onTrue: Lazy<IO<R, E, A>>, onFalse: Lazy<IO<R1, E1, A1>>, __tsplusTrace?: string): IO<R | R1, E | E1, A | A1>;
|
514
507
|
/**
|
515
508
|
* @tsplus getter fncts.io.IO ignore
|
516
509
|
* @tsplus location "@fncts/io/IO/api"
|
517
510
|
*/
|
518
|
-
export declare function ignore<R, E, A>(
|
511
|
+
export declare function ignore<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): URIO<R, void>;
|
519
512
|
/**
|
520
513
|
* Folds a `IO` to a boolean describing whether or not it is a failure
|
521
514
|
* @tsplus getter fncts.io.IO isFailure
|
522
515
|
* @tsplus location "@fncts/io/IO/api"
|
523
516
|
*/
|
524
|
-
export declare function isFailure<R, E, A>(
|
517
|
+
export declare function isFailure<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, boolean>;
|
525
518
|
/**
|
526
519
|
* Folds a `IO` to a boolean describing whether or not it is a success
|
527
520
|
* @tsplus getter fncts.io.IO isSuccess
|
528
521
|
* @tsplus location "@fncts/io/IO/api"
|
529
522
|
*/
|
530
|
-
export declare function isSuccess<R, E, A>(
|
523
|
+
export declare function isSuccess<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, boolean>;
|
531
524
|
/**
|
532
525
|
* Iterates with the specified effectual function. The moral equivalent of:
|
533
526
|
*
|
@@ -544,27 +537,22 @@ export declare function isSuccess<R, E, A>(ma: IO<R, E, A>, __tsplusTrace?: stri
|
|
544
537
|
* @tsplus location "@fncts/io/IO/api"
|
545
538
|
*/
|
546
539
|
export declare function iterate<R, E, A>(initial: A, cont: (a: A) => boolean, body: (a: A) => IO<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
|
547
|
-
/**
|
548
|
-
* Returns an IO with the value on the left part.
|
549
|
-
* @tsplus static fncts.io.IOOps left
|
550
|
-
* @tsplus location "@fncts/io/IO/api"
|
551
|
-
*/
|
552
|
-
export declare function left<A>(a: Lazy<A>, __tsplusTrace?: string): UIO<Either<A, never>>;
|
553
540
|
/**
|
554
541
|
* @tsplus getter fncts.io.IO just
|
555
542
|
* @tsplus location "@fncts/io/IO/api"
|
556
543
|
*/
|
557
544
|
export declare function just<R, E, A>(self: IO<R, E, Maybe<A>>): IO<R, Maybe<E>, A>;
|
558
545
|
/**
|
559
|
-
*
|
546
|
+
* Returns an IO with the value on the left part.
|
547
|
+
* @tsplus static fncts.io.IOOps left
|
560
548
|
* @tsplus location "@fncts/io/IO/api"
|
561
549
|
*/
|
562
|
-
export declare function
|
550
|
+
export declare function left<A>(a: Lazy<A>, __tsplusTrace?: string): UIO<Either<A, never>>;
|
563
551
|
/**
|
564
|
-
* @tsplus static fncts.io.IOOps
|
552
|
+
* @tsplus static fncts.io.IOOps log
|
565
553
|
* @tsplus location "@fncts/io/IO/api"
|
566
554
|
*/
|
567
|
-
export declare function
|
555
|
+
export declare function log(message: Lazy<string>, __tsplusTrace?: string): UIO<void>;
|
568
556
|
/**
|
569
557
|
* Loops with the specified effectual function, collecting the results into a
|
570
558
|
* list. The moral equivalent of:
|
@@ -605,7 +593,7 @@ export declare function loopUnit<A, R, E>(initial: A, cont: (a: A) => boolean, i
|
|
605
593
|
* @tsplus pipeable fncts.io.IO map
|
606
594
|
* @tsplus location "@fncts/io/IO/api"
|
607
595
|
*/
|
608
|
-
export declare function map<A, B>(f: (a: A) => B, __tsplusTrace?: string): <R, E>(
|
596
|
+
export declare function map<A, B>(f: (a: A) => B, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R, E, B>;
|
609
597
|
/**
|
610
598
|
* Map covariantly over the first argument.
|
611
599
|
*
|
@@ -615,12 +603,7 @@ export declare function map<A, B>(f: (a: A) => B, __tsplusTrace?: string): <R, E
|
|
615
603
|
* @tsplus pipeable fncts.io.IO mapError
|
616
604
|
* @tsplus location "@fncts/io/IO/api"
|
617
605
|
*/
|
618
|
-
export declare function mapError<E, E1>(f: (e: E) => E1, __tsplusTrace?: string): <R, A>(
|
619
|
-
/**
|
620
|
-
* @tsplus static fncts.io.IOOps mapTryCatch
|
621
|
-
* @tsplus location "@fncts/io/IO/api"
|
622
|
-
*/
|
623
|
-
export declare function mapTryCatch<R, E, A, E1, B>(io: IO<R, E, A>, f: (a: A) => B, onThrow: (u: unknown) => E1, __tsplusTrace?: string): IO<R, E | E1, B>;
|
606
|
+
export declare function mapError<E, E1>(f: (e: E) => E1, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R, E1, A>;
|
624
607
|
/**
|
625
608
|
* Returns an IO with its full cause of failure mapped using
|
626
609
|
* the specified function. This can be used to transform errors
|
@@ -628,7 +611,21 @@ export declare function mapTryCatch<R, E, A, E1, B>(io: IO<R, E, A>, f: (a: A) =
|
|
628
611
|
* @tsplus pipeable fncts.io.IO mapErrorCause
|
629
612
|
* @tsplus location "@fncts/io/IO/api"
|
630
613
|
*/
|
631
|
-
export declare function mapErrorCause<E, E1>(f: (cause: Cause<E>) => Cause<E1>, __tsplusTrace?: string): <R, A>(
|
614
|
+
export declare function mapErrorCause<E, E1>(f: (cause: Cause<E>) => Cause<E1>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R, E1, A>;
|
615
|
+
/**
|
616
|
+
* @tsplus static fncts.io.IOOps mapTryCatch
|
617
|
+
* @tsplus pipeable fncts.io.IO mapTryCatch
|
618
|
+
* @tsplus location "@fncts/io/IO/api"
|
619
|
+
*/
|
620
|
+
export declare function mapTryCatch<A, E1, B>(f: (a: A) => B, onThrow: (u: unknown) => E1, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R, E | E1, B>;
|
621
|
+
/**
|
622
|
+
* Folds over the failure value or the success value to yield an IO that
|
623
|
+
* does not fail, but succeeds with the value returned by the left or right
|
624
|
+
* function passed to `match_`.
|
625
|
+
* @tsplus pipeable fncts.io.IO match
|
626
|
+
* @tsplus location "@fncts/io/IO/api"
|
627
|
+
*/
|
628
|
+
export declare function match<E, A, B, C>(onFailure: (e: E) => B, onSuccess: (a: A) => C, __tsplusTrace?: string): <R>(self: IO<R, E, A>) => IO<R, never, B | C>;
|
632
629
|
/**
|
633
630
|
* A more powerful version of `match_` that allows recovering from any kind of failure except interruptions.
|
634
631
|
* @tsplus pipeable fncts.io.IO matchCause
|
@@ -646,47 +643,71 @@ export declare function matchCauseIO<E, A, R1, E1, A1, R2, E2, A2>(onFailure: (c
|
|
646
643
|
* @tsplus location "@fncts/io/IO/api"
|
647
644
|
*/
|
648
645
|
export declare function matchIO<R1, R2, E, E1, E2, A, A1, A2>(onFailure: (e: E) => IO<R1, E1, A1>, onSuccess: (a: A) => IO<R2, E2, A2>, __tsplusTrace?: string): <R>(self: IO<R, E, A>) => IO<R | R1 | R2, E1 | E2, A1 | A2>;
|
649
|
-
/**
|
650
|
-
* Folds over the failure value or the success value to yield an IO that
|
651
|
-
* does not fail, but succeeds with the value returned by the left or right
|
652
|
-
* function passed to `match_`.
|
653
|
-
* @tsplus pipeable fncts.io.IO match
|
654
|
-
* @tsplus location "@fncts/io/IO/api"
|
655
|
-
*/
|
656
|
-
export declare function match<E, A, B, C>(onFailure: (e: E) => B, onSuccess: (a: A) => C, __tsplusTrace?: string): <R>(self: IO<R, E, A>) => IO<R, never, B | C>;
|
657
646
|
/**
|
658
647
|
* A version of `matchIO` that gives you the (optional) trace of the error.
|
659
648
|
* @tsplus pipeable fncts.io.IO matchTraceIO
|
660
649
|
* @tsplus location "@fncts/io/IO/api"
|
661
650
|
*/
|
662
|
-
export declare function matchTraceIO<E, A, R1, E1, A1, R2, E2, A2>(onFailure: (e: E, trace: Trace) => IO<R1, E1, A1>, onSuccess: (a: A) => IO<R2, E2, A2>, __tsplusTrace?: string): <R>(
|
651
|
+
export declare function matchTraceIO<E, A, R1, E1, A1, R2, E2, A2>(onFailure: (e: E, trace: Trace) => IO<R1, E1, A1>, onSuccess: (a: A) => IO<R2, E2, A2>, __tsplusTrace?: string): <R>(self: IO<R, E, A>) => IO<R | R1 | R2, E1 | E2, A1 | A2>;
|
663
652
|
/**
|
664
653
|
* @tsplus getter fncts.io.IO maybe
|
665
654
|
* @tsplus location "@fncts/io/IO/api"
|
666
655
|
*/
|
667
|
-
export declare function maybe<R, E, A>(
|
656
|
+
export declare function maybe<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): URIO<R, Maybe<A>>;
|
668
657
|
/**
|
669
658
|
* @tsplus getter fncts.io.IO merge
|
670
659
|
* @tsplus location "@fncts/io/IO/api"
|
671
660
|
*/
|
672
|
-
export declare function merge<R, E, A>(
|
661
|
+
export declare function merge<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, A | E>;
|
673
662
|
/**
|
674
663
|
* Merges an `Iterable<IO>` to a single IO, working sequentially.
|
675
664
|
* @tsplus static fncts.io.IOOps mergeAll
|
676
665
|
* @tsplus location "@fncts/io/IO/api"
|
677
666
|
*/
|
678
|
-
export declare function mergeAll<R, E, A, B>(
|
667
|
+
export declare function mergeAll<R, E, A, B>(ios: Iterable<IO<R, E, A>>, b: B, f: (b: B, a: A) => B, __tsplusTrace?: string): IO<R, E, B>;
|
668
|
+
/**
|
669
|
+
* @tsplus static fncts.io.IOOps refailCause
|
670
|
+
* @tsplus location "@fncts/io/IO/api"
|
671
|
+
*/
|
672
|
+
export declare function refailCause<E>(cause: Lazy<Cause<E>>, __tsplusTrace?: string): FIO<E, never>;
|
673
|
+
/**
|
674
|
+
* @tsplus static fncts.io.IOOps refailCauseNow
|
675
|
+
* @tsplus location "@fncts/io/IO/api"
|
676
|
+
*/
|
677
|
+
export declare function refailCauseNow<E>(cause: Cause<E>, __tsplusTrace?: string): FIO<E, never>;
|
678
|
+
/**
|
679
|
+
* @tsplus static fncts.io.IOOps show
|
680
|
+
* @tsplus location "@fncts/io/IO/api"
|
681
|
+
*/
|
682
|
+
export declare function show(message: Lazy<unknown>, options?: Partial<ShowOptions>, __tsplusTrace?: string): UIO<void>;
|
679
683
|
/**
|
680
684
|
* @tsplus static fncts.io.IOOps nothing
|
681
685
|
* @tsplus location "@fncts/io/IO/api"
|
682
686
|
*/
|
683
687
|
export declare const nothing: IO<never, never, import("@fncts/base/data/Maybe.js").Maybe<never>>;
|
688
|
+
/**
|
689
|
+
* Returns an `IO` that submerges an `Either` into the `IO`.
|
690
|
+
* @tsplus getter fncts.io.IO absolve
|
691
|
+
* @tsplus location "@fncts/io/IO/api"
|
692
|
+
*/
|
693
|
+
export declare function absolve<R, E, E1, A>(self: IO<R, E, Either<E1, A>>, __tsplusTrace?: string): IO<R, E | E1, A>;
|
694
|
+
/**
|
695
|
+
* @tsplus static fncts.io.IOOps attempt
|
696
|
+
* @tsplus location "@fncts/io/IO/api"
|
697
|
+
*/
|
698
|
+
export declare function attempt<A>(effect: Lazy<A>, __tsplusTrace?: string): FIO<unknown, A>;
|
699
|
+
/**
|
700
|
+
* Exposes all parallel errors in a single call
|
701
|
+
* @tsplus pipeable fncts.io.IO concurrentErrors
|
702
|
+
* @tsplus location "@fncts/io/IO/api"
|
703
|
+
*/
|
704
|
+
export declare function concurrentErrors(__tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R, List<E>, A>;
|
684
705
|
/**
|
685
706
|
* Converts an option on errors into an option on values.
|
686
707
|
* @tsplus getter fncts.io.IO optional
|
687
708
|
* @tsplus location "@fncts/io/IO/api"
|
688
709
|
*/
|
689
|
-
export declare function optional<R, E, A>(
|
710
|
+
export declare function optional<R, E, A>(self: IO<R, Maybe<E>, A>, __tsplusTrace?: string): IO<R, E, Maybe<A>>;
|
690
711
|
/**
|
691
712
|
* Returns the logical disjunction of the `Boolean` value returned by this
|
692
713
|
* effect and the `Boolean` value returned by the specified effect. This
|
@@ -696,12 +717,12 @@ export declare function optional<R, E, A>(ma: IO<R, Maybe<E>, A>, __tsplusTrace?
|
|
696
717
|
* @tsplus pipeable-operator fncts.io.IO ||
|
697
718
|
* @tsplus location "@fncts/io/IO/api"
|
698
719
|
*/
|
699
|
-
export declare function or<R1, E1>(
|
720
|
+
export declare function or<R1, E1>(or: IO<R1, E1, boolean>, __tsplusTrace?: string): <R, E>(self: IO<R, E, boolean>) => IO<R | R1, E | E1, boolean>;
|
700
721
|
/**
|
701
722
|
* @tsplus pipeable fncts.io.IO orElse
|
702
723
|
* @tsplus location "@fncts/io/IO/api"
|
703
724
|
*/
|
704
|
-
export declare function orElse<R1, E1, A1>(that: Lazy<IO<R1, E1, A1>>, __tsplusTrace?: string): <R, E, A>(
|
725
|
+
export declare function orElse<R1, E1, A1>(that: Lazy<IO<R1, E1, A1>>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R | R1, E1, A | A1>;
|
705
726
|
/**
|
706
727
|
* @tsplus pipeable fncts.io.IO orElseEither
|
707
728
|
* @tsplus location "@fncts/io/IO/api"
|
@@ -711,38 +732,32 @@ export declare function orElseEither<R1, E1, A1>(that: Lazy<IO<R1, E1, A1>>, __t
|
|
711
732
|
* @tsplus pipeable fncts.io.IO orElseFail
|
712
733
|
* @tsplus location "@fncts/io/IO/api"
|
713
734
|
*/
|
714
|
-
export declare function orElseFail<E1>(e: Lazy<E1>, __tsplusTrace?: string): <R, E, A>(
|
735
|
+
export declare function orElseFail<E1>(e: Lazy<E1>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R, E1, A>;
|
715
736
|
/**
|
716
737
|
* @tsplus pipeable fncts.io.IO orElseMaybe
|
717
738
|
* @tsplus location "@fncts/io/IO/api"
|
718
739
|
*/
|
719
|
-
export declare function orElseMaybe<R1, E1, A1>(that: Lazy<IO<R1, Maybe<E1>, A1>>, __tsplusTrace?: string): <R, E, A>(
|
740
|
+
export declare function orElseMaybe<R1, E1, A1>(that: Lazy<IO<R1, Maybe<E1>, A1>>, __tsplusTrace?: string): <R, E, A>(self: IO<R, Maybe<E>, A>) => IO<R | R1, Maybe<E | E1>, A | A1>;
|
720
741
|
/**
|
721
742
|
* @tsplus pipeable fncts.io.IO orElseSucceed
|
722
743
|
* @tsplus location "@fncts/io/IO/api"
|
723
744
|
*/
|
724
|
-
export declare function orElseSucceed<A1>(a: Lazy<A1>, __tsplusTrace?: string): <R, E, A>(
|
745
|
+
export declare function orElseSucceed<A1>(a: Lazy<A1>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R, E, A | A1>;
|
725
746
|
/**
|
726
747
|
* @tsplus getter fncts.io.IO orHalt
|
727
748
|
* @tsplus location "@fncts/io/IO/api"
|
728
749
|
*/
|
729
|
-
export declare function orHalt<R, E, A>(
|
750
|
+
export declare function orHalt<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, A>;
|
730
751
|
/**
|
731
752
|
* @tsplus getter fncts.io.IO orHaltKeep
|
732
753
|
* @tsplus location "@fncts/io/IO/api"
|
733
754
|
*/
|
734
|
-
export declare function orHaltKeep<R, E, A>(
|
755
|
+
export declare function orHaltKeep<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, A>;
|
735
756
|
/**
|
736
757
|
* @tsplus pipeable fncts.io.IO orHaltWith
|
737
758
|
* @tsplus location "@fncts/io/IO/api"
|
738
759
|
*/
|
739
|
-
export declare function orHaltWith<E>(f: (e: E) => unknown, __tsplusTrace?: string): <R, A>(
|
740
|
-
/**
|
741
|
-
* Exposes all parallel errors in a single call
|
742
|
-
* @tsplus pipeable fncts.io.IO concurrentErrors
|
743
|
-
* @tsplus location "@fncts/io/IO/api"
|
744
|
-
*/
|
745
|
-
export declare function concurrentErrors(__tsplusTrace?: string): <R, E, A>(io: IO<R, E, A>) => IO<R, List<E>, A>;
|
760
|
+
export declare function orHaltWith<E>(f: (e: E) => unknown, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R, never, A>;
|
746
761
|
/**
|
747
762
|
* Feeds elements of type `A` to a function `f` that returns an IO.
|
748
763
|
* Collects all successes and failures in a separated fashion.
|
@@ -755,21 +770,21 @@ export declare function partition<R, E, A, B>(as: Iterable<A>, f: (a: A) => IO<R
|
|
755
770
|
* @tsplus pipeable fncts.io.IO refineOrHalt
|
756
771
|
* @tsplus location "@fncts/io/IO/api"
|
757
772
|
*/
|
758
|
-
export declare function refineOrHalt<E, E1>(pf: (e: E) => Maybe<E1>, __tsplusTrace?: string): <R, A>(
|
773
|
+
export declare function refineOrHalt<E, E1>(pf: (e: E) => Maybe<E1>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R, E1, A>;
|
759
774
|
/**
|
760
775
|
* Keeps some of the errors, and terminates the fiber with the rest, using
|
761
776
|
* the specified function to convert the `E` into a `Throwable`.
|
762
777
|
* @tsplus pipeable fncts.io.IO refineOrHaltWith
|
763
778
|
* @tsplus location "@fncts/io/IO/api"
|
764
779
|
*/
|
765
|
-
export declare function refineOrHaltWith<E, E1>(pf: (e: E) => Maybe<E1>, f: (e: E) => unknown, __tsplusTrace?: string): <R, A>(
|
780
|
+
export declare function refineOrHaltWith<E, E1>(pf: (e: E) => Maybe<E1>, f: (e: E) => unknown, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R, E1, A>;
|
766
781
|
/**
|
767
782
|
* Fail with the returned value if the partial function `pf` matches, otherwise
|
768
783
|
* continue with the held value.
|
769
784
|
* @tsplus pipeable fncts.io.IO reject
|
770
785
|
* @tsplus location "@fncts/io/IO/api"
|
771
786
|
*/
|
772
|
-
export declare function reject<A, E1>(pf: (a: A) => Maybe<E1>, __tsplusTrace?: string): <R, E>(
|
787
|
+
export declare function reject<A, E1>(pf: (a: A) => Maybe<E1>, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R, E | E1, A>;
|
773
788
|
/**
|
774
789
|
* Continue with the returned computation if the partial function `pf` matches,
|
775
790
|
* translating the successful match into a failure, otherwise continue with
|
@@ -777,95 +792,95 @@ export declare function reject<A, E1>(pf: (a: A) => Maybe<E1>, __tsplusTrace?: s
|
|
777
792
|
* @tsplus pipeable fncts.io.IO rejectIO
|
778
793
|
* @tsplus location "@fncts/io/IO/api"
|
779
794
|
*/
|
780
|
-
export declare function rejectIO<A, R1, E1>(pf: (a: A) => Maybe<IO<R1, E1, E1>>, __tsplusTrace?: string): <R, E>(
|
795
|
+
export declare function rejectIO<A, R1, E1>(pf: (a: A) => Maybe<IO<R1, E1, E1>>, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R | R1, E | E1, A>;
|
781
796
|
/**
|
782
797
|
* Repeats this effect the specified number of times.
|
783
798
|
* @tsplus pipeable fncts.io.IO repeatN
|
784
799
|
* @tsplus location "@fncts/io/IO/api"
|
785
800
|
*/
|
786
|
-
export declare function repeatN_(n: number, __tsplusTrace?: string): <R, E, A>(
|
801
|
+
export declare function repeatN_(n: number, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R, E, A>;
|
787
802
|
/**
|
788
803
|
* Repeats this effect until its result satisfies the specified predicate.
|
789
804
|
* @tsplus pipeable fncts.io.IO repeatUntil
|
790
805
|
* @tsplus location "@fncts/io/IO/api"
|
791
806
|
*/
|
792
|
-
export declare function repeatUntil<A>(f: (a: A) => boolean, __tsplusTrace?: string): <R, E>(
|
807
|
+
export declare function repeatUntil<A>(f: (a: A) => boolean, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R, E, A>;
|
793
808
|
/**
|
794
809
|
* Repeats this effect until its error satisfies the specified effectful predicate.
|
795
810
|
* @tsplus pipeable fncts.io.IO repeatUntilIO
|
796
811
|
* @tsplus location "@fncts/io/IO/api"
|
797
812
|
*/
|
798
|
-
export declare function repeatUntilIO<A, R1, E1>(f: (a: A) => IO<R1, E1, boolean>, __tsplusTrace?: string): <R, E>(
|
813
|
+
export declare function repeatUntilIO<A, R1, E1>(f: (a: A) => IO<R1, E1, boolean>, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R | R1, E | E1, A>;
|
799
814
|
/**
|
800
815
|
* Repeats this effect while its error satisfies the specified predicate.
|
801
816
|
* @tsplus pipeable fncts.io.IO repeatWhile
|
802
817
|
* @tsplus location "@fncts/io/IO/api"
|
803
818
|
*/
|
804
|
-
export declare function repeatWhile<A>(f: (a: A) => boolean, __tsplusTrace?: string): <R, E>(
|
819
|
+
export declare function repeatWhile<A>(f: (a: A) => boolean, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R, E, A>;
|
805
820
|
/**
|
806
821
|
* Repeats this effect while its error satisfies the specified effectful predicate.
|
807
822
|
* @tsplus pipeable fncts.io.IO repeatWhileIO
|
808
823
|
* @tsplus location "@fncts/io/IO/api"
|
809
824
|
*/
|
810
|
-
export declare function repeatWhileIO<A, R1, E1>(f: (a: A) => IO<R1, E1, boolean>, __tsplusTrace?: string): <R, E>(
|
825
|
+
export declare function repeatWhileIO<A, R1, E1>(f: (a: A) => IO<R1, E1, boolean>, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R | R1, E | E1, A>;
|
811
826
|
/**
|
812
827
|
* @tsplus pipeable fncts.io.IO replicate
|
813
828
|
* @tsplus location "@fncts/io/IO/api"
|
814
829
|
*/
|
815
|
-
export declare function replicate(n: number, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) =>
|
830
|
+
export declare function replicate(n: number, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => ReadonlyArray<IO<R, E, A>>;
|
816
831
|
/**
|
817
832
|
* @tsplus pipeable fncts.io.IO require
|
818
833
|
* @tsplus location "@fncts/io/IO/api"
|
819
834
|
*/
|
820
|
-
export declare function require<E>(error: Lazy<E>, __tsplusTrace?: string): <R, A>(
|
835
|
+
export declare function require<E>(error: Lazy<E>, __tsplusTrace?: string): <R, A>(self: IO<R, E, Maybe<A>>) => IO<R, E, A>;
|
821
836
|
/**
|
822
837
|
* Returns an IO that semantically runs the IO on a fiber,
|
823
838
|
* producing an `Exit` for the completion value of the fiber.
|
824
839
|
* @tsplus getter fncts.io.IO result
|
825
840
|
* @tsplus location "@fncts/io/IO/api"
|
826
841
|
*/
|
827
|
-
export declare function result<R, E, A>(
|
842
|
+
export declare function result<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, never, Exit<E, A>>;
|
828
843
|
/**
|
829
844
|
* Recover from the unchecked failure of the `IO`. (opposite of `orHalt`)
|
830
845
|
* @tsplus getter fncts.io.IO resurrect
|
831
846
|
* @tsplus location "@fncts/io/IO/api"
|
832
847
|
*/
|
833
|
-
export declare function resurrect<R, E, A>(
|
848
|
+
export declare function resurrect<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, unknown, A>;
|
834
849
|
/**
|
835
850
|
* Retries this effect until its error satisfies the specified predicate.
|
836
851
|
* @tsplus pipeable fncts.io.IO retryUntil
|
837
852
|
* @tsplus location "@fncts/io/IO/api"
|
838
853
|
*/
|
839
|
-
export declare function retryUntil<E>(f: (e: E) => boolean, __tsplusTrace?: string): <R, A>(
|
854
|
+
export declare function retryUntil<E>(f: (e: E) => boolean, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R, E, A>;
|
840
855
|
/**
|
841
856
|
* Retries this effect until its error satisfies the specified effectful predicate.
|
842
857
|
* @tsplus pipeable fncts.io.IO retryUntilIO
|
843
858
|
* @tsplus location "@fncts/io/IO/api"
|
844
859
|
*/
|
845
|
-
export declare function retryUntilIO<E, R1, E1>(f: (e: E) => IO<R1, E1, boolean>, __tsplusTrace?: string): <R, A>(
|
860
|
+
export declare function retryUntilIO<E, R1, E1>(f: (e: E) => IO<R1, E1, boolean>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, E | E1, A>;
|
846
861
|
/**
|
847
862
|
* Retries this effect while its error satisfies the specified predicate.
|
848
863
|
* @tsplus pipeable fncts.io.IO retryWhile
|
849
864
|
* @tsplus location "@fncts/io/IO/api"
|
850
865
|
*/
|
851
|
-
export declare function retryWhile<E>(f: (e: E) => boolean, __tsplusTrace?: string): <R, A>(
|
866
|
+
export declare function retryWhile<E>(f: (e: E) => boolean, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R, E, A>;
|
852
867
|
/**
|
853
868
|
* Retries this effect while its error satisfies the specified effectful predicate.
|
854
869
|
* @tsplus pipeable fncts.io.IO retryWhileIO
|
855
870
|
* @tsplus location "@fncts/io/IO/api"
|
856
871
|
*/
|
857
|
-
export declare function retryWhileIO<E, R1, E1>(f: (e: E) => IO<R1, E1, boolean>, __tsplusTrace?: string): <R, A>(
|
872
|
+
export declare function retryWhileIO<E, R1, E1>(f: (e: E) => IO<R1, E1, boolean>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, E | E1, A>;
|
858
873
|
/**
|
859
874
|
* Exposes the full cause of failure of this effect.
|
860
875
|
* @tsplus getter fncts.io.IO sandbox
|
861
876
|
* @tsplus location "@fncts/io/IO/api"
|
862
877
|
*/
|
863
|
-
export declare function sandbox<R, E, A>(
|
878
|
+
export declare function sandbox<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, Cause<E>, A>;
|
864
879
|
/**
|
865
880
|
* @tsplus pipeable fncts.io.IO sandboxWith
|
866
881
|
* @tsplus location "@fncts/io/IO/api"
|
867
882
|
*/
|
868
|
-
export declare function sandboxWith<R, E, A, E1>(f: (_: IO<R, Cause<E>, A>) => IO<R, Cause<E1>, A>, __tsplusTrace?: string): (
|
883
|
+
export declare function sandboxWith<R, E, A, E1>(f: (_: IO<R, Cause<E>, A>) => IO<R, Cause<E1>, A>, __tsplusTrace?: string): (self: IO<R, E, A>) => IO<R, E1, A>;
|
869
884
|
/**
|
870
885
|
* @tsplus static fncts.io.IOOps sequenceIterable
|
871
886
|
* @tsplus location "@fncts/io/IO/api"
|
@@ -876,12 +891,6 @@ export declare function sequenceIterable<R, E, A>(as: Iterable<IO<R, E, A>>, __t
|
|
876
891
|
* @tsplus location "@fncts/io/IO/api"
|
877
892
|
*/
|
878
893
|
export declare function sequenceIterableDiscard<R, E, A>(as: Iterable<IO<R, E, A>>, __tsplusTrace?: string): IO<R, E, void>;
|
879
|
-
/**
|
880
|
-
* Creates a `IO` that has succeeded with a pure value
|
881
|
-
* @tsplus static fncts.io.IOOps succeedNow
|
882
|
-
* @tsplus location "@fncts/io/IO/api"
|
883
|
-
*/
|
884
|
-
export declare function succeedNow<A>(value: A, __tsplusTrace?: string): IO<never, never, A>;
|
885
894
|
/**
|
886
895
|
* Imports a total synchronous effect into a pure `IO` value.
|
887
896
|
* The effect must not throw any exceptions. If you wonder if the effect
|
@@ -891,6 +900,12 @@ export declare function succeedNow<A>(value: A, __tsplusTrace?: string): IO<neve
|
|
891
900
|
* @tsplus location "@fncts/io/IO/api"
|
892
901
|
*/
|
893
902
|
export declare function succeed<A>(effect: Lazy<A>, __tsplusTrace?: string): UIO<A>;
|
903
|
+
/**
|
904
|
+
* Creates a `IO` that has succeeded with a pure value
|
905
|
+
* @tsplus static fncts.io.IOOps succeedNow
|
906
|
+
* @tsplus location "@fncts/io/IO/api"
|
907
|
+
*/
|
908
|
+
export declare function succeedNow<A>(value: A, __tsplusTrace?: string): IO<never, never, A>;
|
894
909
|
/**
|
895
910
|
* @tsplus pipeable fncts.io.IO summarized
|
896
911
|
* @tsplus location "@fncts/io/IO/api"
|
@@ -901,36 +916,13 @@ export declare function summarized<R1, E1, B, C>(summary: IO<R1, E1, B>, f: (sta
|
|
901
916
|
* @tsplus getter fncts.io.IO swap
|
902
917
|
* @tsplus location "@fncts/io/IO/api"
|
903
918
|
*/
|
904
|
-
export declare function swap<R, E, A>(
|
919
|
+
export declare function swap<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, A, E>;
|
905
920
|
/**
|
906
921
|
* Swaps the error/value parameters, applies the function `f` and flips the parameters back
|
907
922
|
* @tsplus pipeable fncts.io.IO swapWith
|
908
923
|
* @tsplus location "@fncts/io/IO/api"
|
909
924
|
*/
|
910
|
-
export declare function swapWith<R, E, A, R1, E1, A1>(f: (ma: IO<R, A, E>) => IO<R1, A1, E1>, __tsplusTrace?: string): (
|
911
|
-
/**
|
912
|
-
* A more powerful variation of `timed` that allows specifying the clock.
|
913
|
-
* @tsplus pipeable fncts.io.IO timedWith
|
914
|
-
* @tsplus location "@fncts/io/IO/api"
|
915
|
-
*/
|
916
|
-
export declare function timedWith<R1, E1>(msTime: IO<R1, E1, number>, __tsplusTrace?: string): <R, E, A>(ma: IO<R, E, A>) => IO<R1 | R, E1 | E, readonly [number, A]>;
|
917
|
-
/**
|
918
|
-
* @tsplus static fncts.io.IOOps attempt
|
919
|
-
* @tsplus location "@fncts/io/IO/api"
|
920
|
-
*/
|
921
|
-
export declare function attempt<A>(effect: Lazy<A>, __tsplusTrace?: string): FIO<unknown, A>;
|
922
|
-
/**
|
923
|
-
* Creates a `IO` that has succeeded with a pure value
|
924
|
-
* @tsplus static fncts.io.IOOps tryCatch
|
925
|
-
* @tsplus location "@fncts/io/IO/api"
|
926
|
-
*/
|
927
|
-
export declare function tryCatch<E, A>(effect: Lazy<A>, onThrow: (error: unknown) => E, __tsplusTrace?: string): FIO<E, A>;
|
928
|
-
/**
|
929
|
-
* Returns an `IO` that submerges an `Either` into the `IO`.
|
930
|
-
* @tsplus getter fncts.io.IO absolve
|
931
|
-
* @tsplus location "@fncts/io/IO/api"
|
932
|
-
*/
|
933
|
-
export declare function absolve<R, E, E1, A>(ma: IO<R, E, Either<E1, A>>, __tsplusTrace?: string): IO<R, E | E1, A>;
|
925
|
+
export declare function swapWith<R, E, A, R1, E1, A1>(f: (ma: IO<R, A, E>) => IO<R1, A1, E1>, __tsplusTrace?: string): (self: IO<R, E, A>) => IO<R1, E1, A1>;
|
934
926
|
/**
|
935
927
|
* Composes computations in sequence, using the return value of one computation as input for the next
|
936
928
|
* and keeping only the result of the first
|
@@ -946,7 +938,7 @@ export declare function tap<A, R1, E1, B>(f: (a: A) => IO<R1, E1, B>, __tsplusTr
|
|
946
938
|
* @tsplus pipeable fncts.io.IO tapCause
|
947
939
|
* @tsplus location "@fncts/io/IO/api"
|
948
940
|
*/
|
949
|
-
export declare function tapCause<R, E, E2>(f: (e: Cause<E2>) => IO<R, E, any>, __tsplusTrace?: string): <R2, A2>(
|
941
|
+
export declare function tapCause<R, E, E2>(f: (e: Cause<E2>) => IO<R, E, any>, __tsplusTrace?: string): <R2, A2>(self: IO<R2, E2, A2>) => IO<R2 | R, E | E2, A2>;
|
950
942
|
/**
|
951
943
|
* Returns an IO that effectfully "peeks" at the failure of this effect.
|
952
944
|
* @tsplus pipeable fncts.io.IO tapError
|
@@ -960,11 +952,23 @@ export declare function tapError<E, R1, E1>(f: (e: E) => IO<R1, E1, any>, __tspl
|
|
960
952
|
* @tsplus location "@fncts/io/IO/api"
|
961
953
|
*/
|
962
954
|
export declare function tapErrorCause<E, R1, E1>(f: (e: Cause<E>) => IO<R1, E1, any>, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R | R1, E | E1, A>;
|
955
|
+
/**
|
956
|
+
* A more powerful variation of `timed` that allows specifying the clock.
|
957
|
+
* @tsplus pipeable fncts.io.IO timedWith
|
958
|
+
* @tsplus location "@fncts/io/IO/api"
|
959
|
+
*/
|
960
|
+
export declare function timedWith<R1, E1>(msTime: IO<R1, E1, number>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R1 | R, E1 | E, readonly [number, A]>;
|
961
|
+
/**
|
962
|
+
* Creates a `IO` that has succeeded with a pure value
|
963
|
+
* @tsplus static fncts.io.IOOps tryCatch
|
964
|
+
* @tsplus location "@fncts/io/IO/api"
|
965
|
+
*/
|
966
|
+
export declare function tryCatch<E, A>(effect: Lazy<A>, onThrow: (error: unknown) => E, __tsplusTrace?: string): FIO<E, A>;
|
963
967
|
/**
|
964
968
|
* @tsplus pipeable fncts.io.IO tryOrElse
|
965
969
|
* @tsplus location "@fncts/io/IO/api"
|
966
970
|
*/
|
967
|
-
export declare function tryOrElse<A, R1, E1, A1, R2, E2, A2>(that: Lazy<IO<R1, E1, A1>>, onSuccess: (a: A) => IO<R2, E2, A2>, __tsplusTrace?: string): <R, E>(
|
971
|
+
export declare function tryOrElse<A, R1, E1, A1, R2, E2, A2>(that: Lazy<IO<R1, E1, A1>>, onSuccess: (a: A) => IO<R2, E2, A2>, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R | R1 | R2, E1 | E2, A1 | A2>;
|
968
972
|
/**
|
969
973
|
* @tsplus static fncts.io.IOOps unit
|
970
974
|
* @tsplus location "@fncts/io/IO/api"
|
@@ -982,13 +986,13 @@ export declare function unjust<R, E, A>(self: IO<R, Maybe<E>, A>, __tsplusTrace?
|
|
982
986
|
* @tsplus pipeable fncts.io.IO unrefineWith
|
983
987
|
* @tsplus location "@fncts/io/IO/api"
|
984
988
|
*/
|
985
|
-
export declare function unrefineWith<E, E1, E2>(pf: (u: unknown) => Maybe<E1>, f: (e: E) => E2, __tsplusTrace?: string): <R, A>(
|
989
|
+
export declare function unrefineWith<E, E1, E2>(pf: (u: unknown) => Maybe<E1>, f: (e: E) => E2, __tsplusTrace?: string): <R, A>(self: IO<R, E, A>) => IO<R, E1 | E2, A>;
|
986
990
|
/**
|
987
991
|
* The inverse operation `sandbox`
|
988
992
|
* @tsplus getter fncts.io.IO unsandbox
|
989
993
|
* @tsplus location "@fncts/io/IO/api"
|
990
994
|
*/
|
991
|
-
export declare function unsandbox<R, E, A>(
|
995
|
+
export declare function unsandbox<R, E, A>(self: IO<R, Cause<E>, A>, __tsplusTrace?: string): IO<R, E, A>;
|
992
996
|
/**
|
993
997
|
* Updates the `FiberRef` values for the fiber running this effect using the
|
994
998
|
* specified function
|
@@ -1001,33 +1005,38 @@ export declare function updateFiberRefs(f: (fiberId: FiberId.Runtime, fiberRefs:
|
|
1001
1005
|
* @tsplus location "@fncts/io/IO/api"
|
1002
1006
|
*/
|
1003
1007
|
export declare const via: typeof pipe;
|
1008
|
+
/**
|
1009
|
+
* @tsplus static fncts.io.IOOps stackTrace
|
1010
|
+
* @tsplus location "@fncts/io/IO/api"
|
1011
|
+
*/
|
1012
|
+
export declare function stackTrace(__tsplusTrace?: string): UIO<Trace>;
|
1013
|
+
/**
|
1014
|
+
* @tsplus static fncts.io.IOOps updateRuntimeFlags
|
1015
|
+
* @tsplus location "@fncts/io/IO/api"
|
1016
|
+
*/
|
1017
|
+
export declare function updateRuntimeFlags(patch: RuntimeFlags.Patch, __tsplusTrace?: string): IO<never, never, void>;
|
1004
1018
|
/**
|
1005
1019
|
* @tsplus pipeable fncts.io.IO when
|
1006
1020
|
* @tsplus location "@fncts/io/IO/api"
|
1007
1021
|
*/
|
1008
|
-
export declare function when(b: Lazy<boolean>, __tsplusTrace?: string): <R, E, A>(
|
1022
|
+
export declare function when(b: Lazy<boolean>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R, E, void>;
|
1009
1023
|
/**
|
1010
1024
|
* The moral equivalent of `if (p) exp` when `p` has side-effects
|
1011
1025
|
* @tsplus pipeable fncts.io.IO whenIO
|
1012
1026
|
* @tsplus static fncts.io.IOOps whenIO
|
1013
1027
|
* @tsplus location "@fncts/io/IO/api"
|
1014
1028
|
*/
|
1015
|
-
export declare function whenIO<R1, E1>(mb: IO<R1, E1, boolean>, __tsplusTrace?: string): <R, E, A>(
|
1016
|
-
/**
|
1017
|
-
* @tsplus static fncts.io.IOOps withFiberRuntime
|
1018
|
-
* @tsplus location "@fncts/io/IO/api"
|
1019
|
-
*/
|
1020
|
-
export declare function withFiberRuntime<R, E, A>(onState: (fiber: FiberRuntime<E, A>, status: Running) => IO<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
|
1029
|
+
export declare function whenIO<R1, E1>(mb: IO<R1, E1, boolean>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R1 | R, E | E1, Maybe<A>>;
|
1021
1030
|
/**
|
1022
|
-
* @tsplus static fncts.io.IOOps
|
1031
|
+
* @tsplus static fncts.io.IOOps whileLoop
|
1023
1032
|
* @tsplus location "@fncts/io/IO/api"
|
1024
1033
|
*/
|
1025
|
-
export declare function
|
1034
|
+
export declare function whileLoop<R, E, A>(check: Lazy<boolean>, body: Lazy<IO<R, E, A>>, process: (a: A) => any, __tsPlusTrace?: string): IO<R, E, void>;
|
1026
1035
|
/**
|
1027
|
-
* @tsplus static fncts.io.IOOps
|
1036
|
+
* @tsplus static fncts.io.IOOps withFiberRuntime
|
1028
1037
|
* @tsplus location "@fncts/io/IO/api"
|
1029
1038
|
*/
|
1030
|
-
export declare function
|
1039
|
+
export declare function withFiberRuntime<R, E, A>(onState: (fiber: FiberRuntime<E, A>, status: Running) => IO<R, E, A>, __tsplusTrace?: string): IO<R, E, A>;
|
1031
1040
|
/**
|
1032
1041
|
* Returns an effect that yields to the runtime system, starting on a fresh
|
1033
1042
|
* stack. Manual use of this method can improve fairness, at the cost of
|
@@ -1041,11 +1050,28 @@ export declare const yieldNow: UIO<void>;
|
|
1041
1050
|
* @tsplus location "@fncts/io/IO/api"
|
1042
1051
|
*/
|
1043
1052
|
export declare function zip<R1, E1, B>(that: IO<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R | R1, E | E1, readonly [A, B]>;
|
1053
|
+
/**
|
1054
|
+
* @tsplus pipeable fncts.io.IO zipLeft
|
1055
|
+
* @tsplus pipeable-operator fncts.io.IO <
|
1056
|
+
* @tsplus location "@fncts/io/IO/api"
|
1057
|
+
*/
|
1058
|
+
export declare function zipLeft<R1, E1, B>(fb: IO<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R1 | R, E1 | E, A>;
|
1059
|
+
/**
|
1060
|
+
* Combine two effectful actions, keeping only the result of the second
|
1061
|
+
* @tsplus pipeable fncts.io.IO zipRight
|
1062
|
+
* @tsplus pipeable-operator fncts.io.IO >
|
1063
|
+
* @tsplus location "@fncts/io/IO/api"
|
1064
|
+
*/
|
1065
|
+
export declare function zipRight<R1, E1, B>(fb: IO<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: IO<R, E, A>) => IO<R1 | R, E1 | E, B>;
|
1044
1066
|
/**
|
1045
1067
|
* @tsplus pipeable fncts.io.IO zipWith
|
1046
1068
|
* @tsplus location "@fncts/io/IO/api"
|
1047
1069
|
*/
|
1048
1070
|
export declare function zipWith<A, R1, E1, B, C>(that: IO<R1, E1, B>, f: (a: A, b: B) => C, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R | R1, E | E1, C>;
|
1071
|
+
/**
|
1072
|
+
* @internal
|
1073
|
+
*/
|
1074
|
+
export declare const __adapter: (_: any) => any;
|
1049
1075
|
export declare class GenIO<R, E, A> {
|
1050
1076
|
readonly effect: IO<R, E, A>;
|
1051
1077
|
readonly _trace?: string | undefined;
|
@@ -1055,10 +1081,6 @@ export declare class GenIO<R, E, A> {
|
|
1055
1081
|
constructor(effect: IO<R, E, A>, _trace?: string | undefined);
|
1056
1082
|
[Symbol.iterator](): Generator<GenIO<R, E, A>, A, any>;
|
1057
1083
|
}
|
1058
|
-
/**
|
1059
|
-
* @internal
|
1060
|
-
*/
|
1061
|
-
export declare const __adapter: (_: any) => any;
|
1062
1084
|
/**
|
1063
1085
|
* @tsplus static fncts.io.IOOps gen
|
1064
1086
|
* @gen
|