effect 3.8.4 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Array.js +24 -3
- package/dist/cjs/Array.js.map +1 -1
- package/dist/cjs/BigDecimal.js +5 -3
- package/dist/cjs/BigDecimal.js.map +1 -1
- package/dist/cjs/BigInt.js.map +1 -1
- package/dist/cjs/Boolean.js.map +1 -1
- package/dist/cjs/Cause.js.map +1 -1
- package/dist/cjs/Channel.js.map +1 -1
- package/dist/cjs/ChildExecutorDecision.js.map +1 -1
- package/dist/cjs/Chunk.js +3 -0
- package/dist/cjs/Chunk.js.map +1 -1
- package/dist/cjs/Config.js.map +1 -1
- package/dist/cjs/ConfigError.js.map +1 -1
- package/dist/cjs/ConfigProvider.js.map +1 -1
- package/dist/cjs/ConfigProviderPathPatch.js.map +1 -1
- package/dist/cjs/Console.js.map +1 -1
- package/dist/cjs/Context.js.map +1 -1
- package/dist/cjs/Cron.js +3 -0
- package/dist/cjs/Cron.js.map +1 -1
- package/dist/cjs/Data.js.map +1 -1
- package/dist/cjs/DateTime.js +6 -0
- package/dist/cjs/DateTime.js.map +1 -1
- package/dist/cjs/Deferred.js.map +1 -1
- package/dist/cjs/Differ.js.map +1 -1
- package/dist/cjs/Duration.js +3 -0
- package/dist/cjs/Duration.js.map +1 -1
- package/dist/cjs/Effect.js +122 -35
- package/dist/cjs/Effect.js.map +1 -1
- package/dist/cjs/Either.js.map +1 -1
- package/dist/cjs/Equivalence.js.map +1 -1
- package/dist/cjs/ExecutionStrategy.js.map +1 -1
- package/dist/cjs/Exit.js.map +1 -1
- package/dist/cjs/Fiber.js.map +1 -1
- package/dist/cjs/FiberHandle.js +3 -0
- package/dist/cjs/FiberHandle.js.map +1 -1
- package/dist/cjs/FiberId.js.map +1 -1
- package/dist/cjs/FiberMap.js +3 -0
- package/dist/cjs/FiberMap.js.map +1 -1
- package/dist/cjs/FiberRef.js.map +1 -1
- package/dist/cjs/FiberRefs.js.map +1 -1
- package/dist/cjs/FiberRefsPatch.js.map +1 -1
- package/dist/cjs/FiberSet.js +3 -0
- package/dist/cjs/FiberSet.js.map +1 -1
- package/dist/cjs/Function.js.map +1 -1
- package/dist/cjs/GroupBy.js.map +1 -1
- package/dist/cjs/Hash.js.map +1 -1
- package/dist/cjs/HashMap.js.map +1 -1
- package/dist/cjs/HashSet.js.map +1 -1
- package/dist/cjs/Inspectable.js +15 -1
- package/dist/cjs/Inspectable.js.map +1 -1
- package/dist/cjs/Iterable.js.map +1 -1
- package/dist/cjs/KeyedPool.js.map +1 -1
- package/dist/cjs/Layer.js.map +1 -1
- package/dist/cjs/List.js +6 -0
- package/dist/cjs/List.js.map +1 -1
- package/dist/cjs/LogLevel.js.map +1 -1
- package/dist/cjs/Logger.js.map +1 -1
- package/dist/cjs/Mailbox.js.map +1 -1
- package/dist/cjs/ManagedRuntime.js +16 -1
- package/dist/cjs/ManagedRuntime.js.map +1 -1
- package/dist/cjs/MergeDecision.js.map +1 -1
- package/dist/cjs/MergeState.js.map +1 -1
- package/dist/cjs/MergeStrategy.js.map +1 -1
- package/dist/cjs/Metric.js.map +1 -1
- package/dist/cjs/MetricHook.js.map +1 -1
- package/dist/cjs/MetricKey.js.map +1 -1
- package/dist/cjs/MetricPolling.js.map +1 -1
- package/dist/cjs/MetricState.js.map +1 -1
- package/dist/cjs/Micro.js +6 -0
- package/dist/cjs/Micro.js.map +1 -1
- package/dist/cjs/MutableHashMap.js +3 -0
- package/dist/cjs/MutableHashMap.js.map +1 -1
- package/dist/cjs/MutableHashSet.js +3 -0
- package/dist/cjs/MutableHashSet.js.map +1 -1
- package/dist/cjs/MutableList.js +3 -0
- package/dist/cjs/MutableList.js.map +1 -1
- package/dist/cjs/MutableQueue.js +3 -0
- package/dist/cjs/MutableQueue.js.map +1 -1
- package/dist/cjs/MutableRef.js +3 -0
- package/dist/cjs/MutableRef.js.map +1 -1
- package/dist/cjs/Number.js.map +1 -1
- package/dist/cjs/Option.js.map +1 -1
- package/dist/cjs/Order.js.map +1 -1
- package/dist/cjs/Ordering.js.map +1 -1
- package/dist/cjs/Pipeable.js.map +1 -1
- package/dist/cjs/Pool.js.map +1 -1
- package/dist/cjs/Predicate.js +18 -2
- package/dist/cjs/Predicate.js.map +1 -1
- package/dist/cjs/PubSub.js.map +1 -1
- package/dist/cjs/Queue.js.map +1 -1
- package/dist/cjs/RcMap.js.map +1 -1
- package/dist/cjs/Readable.js.map +1 -1
- package/dist/cjs/Record.js.map +1 -1
- package/dist/cjs/RedBlackTree.js.map +1 -1
- package/dist/cjs/Ref.js.map +1 -1
- package/dist/cjs/RegExp.js +20 -1
- package/dist/cjs/RegExp.js.map +1 -1
- package/dist/cjs/Request.js.map +1 -1
- package/dist/cjs/RequestResolver.js.map +1 -1
- package/dist/cjs/Resource.js.map +1 -1
- package/dist/cjs/Runtime.js.map +1 -1
- package/dist/cjs/RuntimeFlags.js.map +1 -1
- package/dist/cjs/RuntimeFlagsPatch.js.map +1 -1
- package/dist/cjs/STM.js.map +1 -1
- package/dist/cjs/Schedule.js.map +1 -1
- package/dist/cjs/ScheduleInterval.js.map +1 -1
- package/dist/cjs/ScheduleIntervals.js.map +1 -1
- package/dist/cjs/Scheduler.js.map +1 -1
- package/dist/cjs/Scope.js.map +1 -1
- package/dist/cjs/ScopedRef.js.map +1 -1
- package/dist/cjs/Sink.js.map +1 -1
- package/dist/cjs/SortedMap.js +3 -0
- package/dist/cjs/SortedMap.js.map +1 -1
- package/dist/cjs/SortedSet.js +3 -0
- package/dist/cjs/SortedSet.js.map +1 -1
- package/dist/cjs/Stream.js +17 -3
- package/dist/cjs/Stream.js.map +1 -1
- package/dist/cjs/StreamHaltStrategy.js.map +1 -1
- package/dist/cjs/String.js.map +1 -1
- package/dist/cjs/Struct.js.map +1 -1
- package/dist/cjs/Subscribable.js.map +1 -1
- package/dist/cjs/SubscriptionRef.js.map +1 -1
- package/dist/cjs/SynchronizedRef.js.map +1 -1
- package/dist/cjs/TArray.js.map +1 -1
- package/dist/cjs/TDeferred.js.map +1 -1
- package/dist/cjs/TMap.js.map +1 -1
- package/dist/cjs/TPriorityQueue.js.map +1 -1
- package/dist/cjs/TPubSub.js.map +1 -1
- package/dist/cjs/TQueue.js.map +1 -1
- package/dist/cjs/TReentrantLock.js.map +1 -1
- package/dist/cjs/TRef.js.map +1 -1
- package/dist/cjs/TSemaphore.js.map +1 -1
- package/dist/cjs/TSet.js.map +1 -1
- package/dist/cjs/Take.js.map +1 -1
- package/dist/cjs/TestAnnotationMap.js.map +1 -1
- package/dist/cjs/TestClock.js.map +1 -1
- package/dist/cjs/TestServices.js.map +1 -1
- package/dist/cjs/Trie.js.map +1 -1
- package/dist/cjs/Tuple.js +21 -2
- package/dist/cjs/Tuple.js.map +1 -1
- package/dist/cjs/Unify.js.map +1 -1
- package/dist/cjs/UpstreamPullRequest.js.map +1 -1
- package/dist/cjs/UpstreamPullStrategy.js.map +1 -1
- package/dist/cjs/Utils.js +1 -14
- package/dist/cjs/Utils.js.map +1 -1
- package/dist/cjs/internal/cause.js +3 -0
- package/dist/cjs/internal/cause.js.map +1 -1
- package/dist/cjs/internal/context.js +6 -1
- package/dist/cjs/internal/context.js.map +1 -1
- package/dist/cjs/internal/core-effect.js.map +1 -1
- package/dist/cjs/internal/core.js +16 -3
- package/dist/cjs/internal/core.js.map +1 -1
- package/dist/cjs/internal/effect/circular.js +5 -1
- package/dist/cjs/internal/effect/circular.js.map +1 -1
- package/dist/cjs/internal/fiberId.js +9 -0
- package/dist/cjs/internal/fiberId.js.map +1 -1
- package/dist/cjs/internal/hashMap.js +3 -0
- package/dist/cjs/internal/hashMap.js.map +1 -1
- package/dist/cjs/internal/hashSet.js +3 -0
- package/dist/cjs/internal/hashSet.js.map +1 -1
- package/dist/cjs/internal/layer.js +33 -19
- package/dist/cjs/internal/layer.js.map +1 -1
- package/dist/cjs/internal/mailbox.js +3 -0
- package/dist/cjs/internal/mailbox.js.map +1 -1
- package/dist/cjs/internal/managedRuntime/circular.js +10 -0
- package/dist/cjs/internal/managedRuntime/circular.js.map +1 -0
- package/dist/cjs/internal/managedRuntime.js +23 -9
- package/dist/cjs/internal/managedRuntime.js.map +1 -1
- package/dist/cjs/internal/option.js +3 -0
- package/dist/cjs/internal/option.js.map +1 -1
- package/dist/cjs/internal/pool.js +6 -1
- package/dist/cjs/internal/pool.js.map +1 -1
- package/dist/cjs/internal/redBlackTree.js +3 -0
- package/dist/cjs/internal/redBlackTree.js.map +1 -1
- package/dist/cjs/internal/resource.js +15 -5
- package/dist/cjs/internal/resource.js.map +1 -1
- package/dist/cjs/internal/runtime.js +4 -1
- package/dist/cjs/internal/runtime.js.map +1 -1
- package/dist/cjs/internal/scopedRef.js +11 -8
- package/dist/cjs/internal/scopedRef.js.map +1 -1
- package/dist/cjs/internal/stm/core.js +1 -2
- package/dist/cjs/internal/stm/core.js.map +1 -1
- package/dist/cjs/internal/stream.js +12 -3
- package/dist/cjs/internal/stream.js.map +1 -1
- package/dist/cjs/internal/trie.js +3 -0
- package/dist/cjs/internal/trie.js.map +1 -1
- package/dist/cjs/internal/version.js +1 -1
- package/dist/dts/Array.d.ts +2735 -2
- package/dist/dts/Array.d.ts.map +1 -1
- package/dist/dts/BigDecimal.d.ts +558 -1
- package/dist/dts/BigDecimal.d.ts.map +1 -1
- package/dist/dts/BigInt.d.ts +490 -0
- package/dist/dts/BigInt.d.ts.map +1 -1
- package/dist/dts/Boolean.d.ts +228 -0
- package/dist/dts/Boolean.d.ts.map +1 -1
- package/dist/dts/Cause.d.ts +172 -0
- package/dist/dts/Cause.d.ts.map +1 -1
- package/dist/dts/Channel.d.ts +750 -0
- package/dist/dts/Channel.d.ts.map +1 -1
- package/dist/dts/ChildExecutorDecision.d.ts +12 -0
- package/dist/dts/ChildExecutorDecision.d.ts.map +1 -1
- package/dist/dts/Chunk.d.ts +791 -0
- package/dist/dts/Chunk.d.ts.map +1 -1
- package/dist/dts/Config.d.ts +174 -0
- package/dist/dts/Config.d.ts.map +1 -1
- package/dist/dts/ConfigError.d.ts +16 -0
- package/dist/dts/ConfigError.d.ts.map +1 -1
- package/dist/dts/ConfigProvider.d.ts +84 -0
- package/dist/dts/ConfigProvider.d.ts.map +1 -1
- package/dist/dts/ConfigProviderPathPatch.d.ts +32 -0
- package/dist/dts/ConfigProviderPathPatch.d.ts.map +1 -1
- package/dist/dts/Console.d.ts +24 -0
- package/dist/dts/Console.d.ts.map +1 -1
- package/dist/dts/Context.d.ts +234 -3
- package/dist/dts/Context.d.ts.map +1 -1
- package/dist/dts/Cron.d.ts +12 -0
- package/dist/dts/Cron.d.ts.map +1 -1
- package/dist/dts/Data.d.ts +165 -0
- package/dist/dts/Data.d.ts.map +1 -1
- package/dist/dts/DateTime.d.ts +878 -0
- package/dist/dts/DateTime.d.ts.map +1 -1
- package/dist/dts/Deferred.d.ts +171 -1
- package/dist/dts/Deferred.d.ts.map +1 -1
- package/dist/dts/Differ.d.ts +78 -0
- package/dist/dts/Differ.d.ts.map +1 -1
- package/dist/dts/Duration.d.ts +130 -0
- package/dist/dts/Duration.d.ts.map +1 -1
- package/dist/dts/Effect.d.ts +4350 -13
- package/dist/dts/Effect.d.ts.map +1 -1
- package/dist/dts/Either.d.ts +620 -0
- package/dist/dts/Either.d.ts.map +1 -1
- package/dist/dts/Equivalence.d.ts +24 -0
- package/dist/dts/Equivalence.d.ts.map +1 -1
- package/dist/dts/ExecutionStrategy.d.ts +14 -0
- package/dist/dts/ExecutionStrategy.d.ts.map +1 -1
- package/dist/dts/Exit.d.ts +252 -0
- package/dist/dts/Exit.d.ts.map +1 -1
- package/dist/dts/Fiber.d.ts +182 -0
- package/dist/dts/Fiber.d.ts.map +1 -1
- package/dist/dts/FiberHandle.d.ts +42 -0
- package/dist/dts/FiberHandle.d.ts.map +1 -1
- package/dist/dts/FiberId.d.ts +24 -0
- package/dist/dts/FiberId.d.ts.map +1 -1
- package/dist/dts/FiberMap.d.ts +102 -0
- package/dist/dts/FiberMap.d.ts.map +1 -1
- package/dist/dts/FiberRef.d.ts +80 -0
- package/dist/dts/FiberRef.d.ts.map +1 -1
- package/dist/dts/FiberRefs.d.ts +84 -0
- package/dist/dts/FiberRefs.d.ts.map +1 -1
- package/dist/dts/FiberRefsPatch.d.ts +30 -0
- package/dist/dts/FiberRefsPatch.d.ts.map +1 -1
- package/dist/dts/FiberSet.d.ts +38 -0
- package/dist/dts/FiberSet.d.ts.map +1 -1
- package/dist/dts/Function.d.ts +144 -28
- package/dist/dts/Function.d.ts.map +1 -1
- package/dist/dts/GroupBy.d.ts +38 -0
- package/dist/dts/GroupBy.d.ts.map +1 -1
- package/dist/dts/Hash.d.ts +8 -0
- package/dist/dts/Hash.d.ts.map +1 -1
- package/dist/dts/HashMap.d.ts +315 -0
- package/dist/dts/HashMap.d.ts.map +1 -1
- package/dist/dts/HashSet.d.ts +284 -0
- package/dist/dts/HashSet.d.ts.map +1 -1
- package/dist/dts/Inspectable.d.ts +15 -0
- package/dist/dts/Inspectable.d.ts.map +1 -1
- package/dist/dts/Iterable.d.ts +454 -0
- package/dist/dts/Iterable.d.ts.map +1 -1
- package/dist/dts/KeyedPool.d.ts +34 -0
- package/dist/dts/KeyedPool.d.ts.map +1 -1
- package/dist/dts/Layer.d.ts +460 -5
- package/dist/dts/Layer.d.ts.map +1 -1
- package/dist/dts/List.d.ts +430 -0
- package/dist/dts/List.d.ts.map +1 -1
- package/dist/dts/LogLevel.d.ts +46 -0
- package/dist/dts/LogLevel.d.ts.map +1 -1
- package/dist/dts/Logger.d.ts +194 -0
- package/dist/dts/Logger.d.ts.map +1 -1
- package/dist/dts/Mailbox.d.ts +16 -0
- package/dist/dts/Mailbox.d.ts.map +1 -1
- package/dist/dts/ManagedRuntime.d.ts +41 -2
- package/dist/dts/ManagedRuntime.d.ts.map +1 -1
- package/dist/dts/MergeDecision.d.ts +8 -0
- package/dist/dts/MergeDecision.d.ts.map +1 -1
- package/dist/dts/MergeState.d.ts +8 -0
- package/dist/dts/MergeState.d.ts.map +1 -1
- package/dist/dts/MergeStrategy.d.ts +12 -0
- package/dist/dts/MergeStrategy.d.ts.map +1 -1
- package/dist/dts/Metric.d.ts +410 -0
- package/dist/dts/Metric.d.ts.map +1 -1
- package/dist/dts/MetricHook.d.ts +24 -0
- package/dist/dts/MetricHook.d.ts.map +1 -1
- package/dist/dts/MetricKey.d.ts +48 -0
- package/dist/dts/MetricKey.d.ts.map +1 -1
- package/dist/dts/MetricPolling.d.ts +40 -0
- package/dist/dts/MetricPolling.d.ts.map +1 -1
- package/dist/dts/MetricState.d.ts +16 -0
- package/dist/dts/MetricState.d.ts.map +1 -1
- package/dist/dts/Micro.d.ts +1110 -0
- package/dist/dts/Micro.d.ts.map +1 -1
- package/dist/dts/MutableHashMap.d.ts +50 -0
- package/dist/dts/MutableHashMap.d.ts.map +1 -1
- package/dist/dts/MutableHashSet.d.ts +24 -0
- package/dist/dts/MutableHashSet.d.ts.map +1 -1
- package/dist/dts/MutableList.d.ts +36 -0
- package/dist/dts/MutableList.d.ts.map +1 -1
- package/dist/dts/MutableQueue.d.ts +62 -0
- package/dist/dts/MutableQueue.d.ts.map +1 -1
- package/dist/dts/MutableRef.d.ts +56 -0
- package/dist/dts/MutableRef.d.ts.map +1 -1
- package/dist/dts/Number.d.ts +474 -0
- package/dist/dts/Number.d.ts.map +1 -1
- package/dist/dts/Option.d.ts +1019 -0
- package/dist/dts/Option.d.ts.map +1 -1
- package/dist/dts/Order.d.ts +24 -0
- package/dist/dts/Order.d.ts.map +1 -1
- package/dist/dts/Ordering.d.ts +66 -0
- package/dist/dts/Ordering.d.ts.map +1 -1
- package/dist/dts/Pipeable.d.ts +21 -21
- package/dist/dts/Pipeable.d.ts.map +1 -1
- package/dist/dts/Pool.d.ts +37 -1
- package/dist/dts/Pool.d.ts.map +1 -1
- package/dist/dts/Predicate.d.ts +513 -0
- package/dist/dts/Predicate.d.ts.map +1 -1
- package/dist/dts/PubSub.d.ts +28 -0
- package/dist/dts/PubSub.d.ts.map +1 -1
- package/dist/dts/Queue.d.ts +106 -2
- package/dist/dts/Queue.d.ts.map +1 -1
- package/dist/dts/RcMap.d.ts +70 -0
- package/dist/dts/RcMap.d.ts.map +1 -1
- package/dist/dts/Readable.d.ts +16 -0
- package/dist/dts/Readable.d.ts.map +1 -1
- package/dist/dts/Record.d.ts +800 -0
- package/dist/dts/Record.d.ts.map +1 -1
- package/dist/dts/RedBlackTree.d.ts +300 -0
- package/dist/dts/RedBlackTree.d.ts.map +1 -1
- package/dist/dts/Ref.d.ts +88 -0
- package/dist/dts/Ref.d.ts.map +1 -1
- package/dist/dts/RegExp.d.ts +12 -2
- package/dist/dts/RegExp.d.ts.map +1 -1
- package/dist/dts/Request.d.ts +76 -0
- package/dist/dts/Request.d.ts.map +1 -1
- package/dist/dts/RequestResolver.d.ts +144 -0
- package/dist/dts/RequestResolver.d.ts.map +1 -1
- package/dist/dts/Resource.d.ts +21 -1
- package/dist/dts/Resource.d.ts.map +1 -1
- package/dist/dts/Runtime.d.ts +126 -0
- package/dist/dts/Runtime.d.ts.map +1 -1
- package/dist/dts/RuntimeFlags.d.ts +100 -0
- package/dist/dts/RuntimeFlags.d.ts.map +1 -1
- package/dist/dts/RuntimeFlagsPatch.d.ts +112 -0
- package/dist/dts/RuntimeFlagsPatch.d.ts.map +1 -1
- package/dist/dts/STM.d.ts +1090 -0
- package/dist/dts/STM.d.ts.map +1 -1
- package/dist/dts/Schedule.d.ts +704 -0
- package/dist/dts/Schedule.d.ts.map +1 -1
- package/dist/dts/ScheduleInterval.d.ts +68 -0
- package/dist/dts/ScheduleInterval.d.ts.map +1 -1
- package/dist/dts/ScheduleIntervals.d.ts +50 -0
- package/dist/dts/ScheduleIntervals.d.ts.map +1 -1
- package/dist/dts/Scope.d.ts +36 -0
- package/dist/dts/Scope.d.ts.map +1 -1
- package/dist/dts/ScopedRef.d.ts +43 -1
- package/dist/dts/ScopedRef.d.ts.map +1 -1
- package/dist/dts/Sink.d.ts +464 -0
- package/dist/dts/Sink.d.ts.map +1 -1
- package/dist/dts/SortedMap.d.ts +76 -0
- package/dist/dts/SortedMap.d.ts.map +1 -1
- package/dist/dts/SortedSet.d.ts +142 -0
- package/dist/dts/SortedSet.d.ts.map +1 -1
- package/dist/dts/Stream.d.ts +4998 -1
- package/dist/dts/Stream.d.ts.map +1 -1
- package/dist/dts/StreamHaltStrategy.d.ts +12 -0
- package/dist/dts/StreamHaltStrategy.d.ts.map +1 -1
- package/dist/dts/String.d.ts +200 -0
- package/dist/dts/String.d.ts.map +1 -1
- package/dist/dts/Struct.d.ts +84 -0
- package/dist/dts/Struct.d.ts.map +1 -1
- package/dist/dts/Subscribable.d.ts +16 -0
- package/dist/dts/Subscribable.d.ts.map +1 -1
- package/dist/dts/SubscriptionRef.d.ts +152 -0
- package/dist/dts/SubscriptionRef.d.ts.map +1 -1
- package/dist/dts/SynchronizedRef.d.ts +152 -0
- package/dist/dts/SynchronizedRef.d.ts.map +1 -1
- package/dist/dts/TArray.d.ts +426 -0
- package/dist/dts/TArray.d.ts.map +1 -1
- package/dist/dts/TDeferred.d.ts +24 -0
- package/dist/dts/TDeferred.d.ts.map +1 -1
- package/dist/dts/TMap.d.ts +366 -0
- package/dist/dts/TMap.d.ts.map +1 -1
- package/dist/dts/TPriorityQueue.d.ts +60 -0
- package/dist/dts/TPriorityQueue.d.ts.map +1 -1
- package/dist/dts/TPubSub.d.ts +28 -0
- package/dist/dts/TPubSub.d.ts.map +1 -1
- package/dist/dts/TQueue.d.ts +108 -0
- package/dist/dts/TQueue.d.ts.map +1 -1
- package/dist/dts/TReentrantLock.d.ts +36 -0
- package/dist/dts/TReentrantLock.d.ts.map +1 -1
- package/dist/dts/TRef.d.ts +88 -0
- package/dist/dts/TRef.d.ts.map +1 -1
- package/dist/dts/TSemaphore.d.ts +40 -0
- package/dist/dts/TSemaphore.d.ts.map +1 -1
- package/dist/dts/TSet.d.ts +254 -0
- package/dist/dts/TSet.d.ts.map +1 -1
- package/dist/dts/Take.d.ts +56 -0
- package/dist/dts/Take.d.ts.map +1 -1
- package/dist/dts/TestAnnotationMap.d.ts.map +1 -1
- package/dist/dts/TestClock.d.ts.map +1 -1
- package/dist/dts/TestServices.d.ts.map +1 -1
- package/dist/dts/Trie.d.ts +906 -0
- package/dist/dts/Trie.d.ts.map +1 -1
- package/dist/dts/Tuple.d.ts +203 -0
- package/dist/dts/Tuple.d.ts.map +1 -1
- package/dist/dts/Types.d.ts +39 -0
- package/dist/dts/Types.d.ts.map +1 -1
- package/dist/dts/Unify.d.ts +26 -13
- package/dist/dts/Unify.d.ts.map +1 -1
- package/dist/dts/UpstreamPullRequest.d.ts +12 -0
- package/dist/dts/UpstreamPullRequest.d.ts.map +1 -1
- package/dist/dts/UpstreamPullStrategy.d.ts +12 -0
- package/dist/dts/UpstreamPullStrategy.d.ts.map +1 -1
- package/dist/dts/Utils.d.ts.map +1 -1
- package/dist/dts/internal/core.d.ts.map +1 -1
- package/dist/dts/internal/hashMap.d.ts.map +1 -1
- package/dist/dts/internal/layer.d.ts.map +1 -1
- package/dist/dts/internal/managedRuntime/circular.d.ts +2 -0
- package/dist/dts/internal/managedRuntime/circular.d.ts.map +1 -0
- package/dist/dts/internal/stream.d.ts.map +1 -1
- package/dist/esm/Array.js +21 -0
- package/dist/esm/Array.js.map +1 -1
- package/dist/esm/BigDecimal.js +6 -3
- package/dist/esm/BigDecimal.js.map +1 -1
- package/dist/esm/BigInt.js.map +1 -1
- package/dist/esm/Boolean.js.map +1 -1
- package/dist/esm/Cause.js.map +1 -1
- package/dist/esm/Channel.js.map +1 -1
- package/dist/esm/ChildExecutorDecision.js.map +1 -1
- package/dist/esm/Chunk.js +4 -1
- package/dist/esm/Chunk.js.map +1 -1
- package/dist/esm/Config.js.map +1 -1
- package/dist/esm/ConfigError.js.map +1 -1
- package/dist/esm/ConfigProvider.js.map +1 -1
- package/dist/esm/ConfigProviderPathPatch.js.map +1 -1
- package/dist/esm/Console.js.map +1 -1
- package/dist/esm/Context.js.map +1 -1
- package/dist/esm/Cron.js +4 -1
- package/dist/esm/Cron.js.map +1 -1
- package/dist/esm/Data.js.map +1 -1
- package/dist/esm/DateTime.js +6 -0
- package/dist/esm/DateTime.js.map +1 -1
- package/dist/esm/Deferred.js.map +1 -1
- package/dist/esm/Differ.js.map +1 -1
- package/dist/esm/Duration.js +4 -1
- package/dist/esm/Duration.js.map +1 -1
- package/dist/esm/Effect.js +116 -30
- package/dist/esm/Effect.js.map +1 -1
- package/dist/esm/Either.js.map +1 -1
- package/dist/esm/Equivalence.js.map +1 -1
- package/dist/esm/ExecutionStrategy.js.map +1 -1
- package/dist/esm/Exit.js.map +1 -1
- package/dist/esm/Fiber.js.map +1 -1
- package/dist/esm/FiberHandle.js +3 -0
- package/dist/esm/FiberHandle.js.map +1 -1
- package/dist/esm/FiberId.js.map +1 -1
- package/dist/esm/FiberMap.js +3 -0
- package/dist/esm/FiberMap.js.map +1 -1
- package/dist/esm/FiberRef.js.map +1 -1
- package/dist/esm/FiberRefs.js.map +1 -1
- package/dist/esm/FiberRefsPatch.js.map +1 -1
- package/dist/esm/FiberSet.js +3 -0
- package/dist/esm/FiberSet.js.map +1 -1
- package/dist/esm/Function.js.map +1 -1
- package/dist/esm/GroupBy.js.map +1 -1
- package/dist/esm/Hash.js.map +1 -1
- package/dist/esm/HashMap.js.map +1 -1
- package/dist/esm/HashSet.js.map +1 -1
- package/dist/esm/Inspectable.js +14 -0
- package/dist/esm/Inspectable.js.map +1 -1
- package/dist/esm/Iterable.js.map +1 -1
- package/dist/esm/KeyedPool.js.map +1 -1
- package/dist/esm/Layer.js.map +1 -1
- package/dist/esm/List.js +7 -1
- package/dist/esm/List.js.map +1 -1
- package/dist/esm/LogLevel.js.map +1 -1
- package/dist/esm/Logger.js.map +1 -1
- package/dist/esm/Mailbox.js.map +1 -1
- package/dist/esm/ManagedRuntime.js +15 -0
- package/dist/esm/ManagedRuntime.js.map +1 -1
- package/dist/esm/MergeDecision.js.map +1 -1
- package/dist/esm/MergeState.js.map +1 -1
- package/dist/esm/MergeStrategy.js.map +1 -1
- package/dist/esm/Metric.js.map +1 -1
- package/dist/esm/MetricHook.js.map +1 -1
- package/dist/esm/MetricKey.js.map +1 -1
- package/dist/esm/MetricPolling.js.map +1 -1
- package/dist/esm/MetricState.js.map +1 -1
- package/dist/esm/Micro.js +7 -1
- package/dist/esm/Micro.js.map +1 -1
- package/dist/esm/MutableHashMap.js +4 -1
- package/dist/esm/MutableHashMap.js.map +1 -1
- package/dist/esm/MutableHashSet.js +4 -1
- package/dist/esm/MutableHashSet.js.map +1 -1
- package/dist/esm/MutableList.js +4 -1
- package/dist/esm/MutableList.js.map +1 -1
- package/dist/esm/MutableQueue.js +4 -1
- package/dist/esm/MutableQueue.js.map +1 -1
- package/dist/esm/MutableRef.js +4 -1
- package/dist/esm/MutableRef.js.map +1 -1
- package/dist/esm/Number.js.map +1 -1
- package/dist/esm/Option.js.map +1 -1
- package/dist/esm/Order.js.map +1 -1
- package/dist/esm/Ordering.js.map +1 -1
- package/dist/esm/Pipeable.js.map +1 -1
- package/dist/esm/Pool.js.map +1 -1
- package/dist/esm/Predicate.js +15 -0
- package/dist/esm/Predicate.js.map +1 -1
- package/dist/esm/PubSub.js.map +1 -1
- package/dist/esm/Queue.js.map +1 -1
- package/dist/esm/RcMap.js.map +1 -1
- package/dist/esm/Readable.js.map +1 -1
- package/dist/esm/Record.js.map +1 -1
- package/dist/esm/RedBlackTree.js.map +1 -1
- package/dist/esm/Ref.js.map +1 -1
- package/dist/esm/RegExp.js +16 -0
- package/dist/esm/RegExp.js.map +1 -1
- package/dist/esm/Request.js.map +1 -1
- package/dist/esm/RequestResolver.js.map +1 -1
- package/dist/esm/Resource.js.map +1 -1
- package/dist/esm/Runtime.js.map +1 -1
- package/dist/esm/RuntimeFlags.js.map +1 -1
- package/dist/esm/RuntimeFlagsPatch.js.map +1 -1
- package/dist/esm/STM.js.map +1 -1
- package/dist/esm/Schedule.js.map +1 -1
- package/dist/esm/ScheduleInterval.js.map +1 -1
- package/dist/esm/ScheduleIntervals.js.map +1 -1
- package/dist/esm/Scheduler.js.map +1 -1
- package/dist/esm/Scope.js.map +1 -1
- package/dist/esm/ScopedRef.js.map +1 -1
- package/dist/esm/Sink.js.map +1 -1
- package/dist/esm/SortedMap.js +4 -1
- package/dist/esm/SortedMap.js.map +1 -1
- package/dist/esm/SortedSet.js +4 -1
- package/dist/esm/SortedSet.js.map +1 -1
- package/dist/esm/Stream.js +14 -0
- package/dist/esm/Stream.js.map +1 -1
- package/dist/esm/StreamHaltStrategy.js.map +1 -1
- package/dist/esm/String.js.map +1 -1
- package/dist/esm/Struct.js.map +1 -1
- package/dist/esm/Subscribable.js.map +1 -1
- package/dist/esm/SubscriptionRef.js.map +1 -1
- package/dist/esm/SynchronizedRef.js.map +1 -1
- package/dist/esm/TArray.js.map +1 -1
- package/dist/esm/TDeferred.js.map +1 -1
- package/dist/esm/TMap.js.map +1 -1
- package/dist/esm/TPriorityQueue.js.map +1 -1
- package/dist/esm/TPubSub.js.map +1 -1
- package/dist/esm/TQueue.js.map +1 -1
- package/dist/esm/TReentrantLock.js.map +1 -1
- package/dist/esm/TRef.js.map +1 -1
- package/dist/esm/TSemaphore.js.map +1 -1
- package/dist/esm/TSet.js.map +1 -1
- package/dist/esm/Take.js.map +1 -1
- package/dist/esm/TestAnnotationMap.js.map +1 -1
- package/dist/esm/TestClock.js.map +1 -1
- package/dist/esm/TestServices.js.map +1 -1
- package/dist/esm/Trie.js.map +1 -1
- package/dist/esm/Tuple.js +19 -0
- package/dist/esm/Tuple.js.map +1 -1
- package/dist/esm/Unify.js.map +1 -1
- package/dist/esm/UpstreamPullRequest.js.map +1 -1
- package/dist/esm/UpstreamPullStrategy.js.map +1 -1
- package/dist/esm/Utils.js +1 -14
- package/dist/esm/Utils.js.map +1 -1
- package/dist/esm/internal/cause.js +4 -1
- package/dist/esm/internal/cause.js.map +1 -1
- package/dist/esm/internal/context.js +7 -2
- package/dist/esm/internal/context.js.map +1 -1
- package/dist/esm/internal/core-effect.js.map +1 -1
- package/dist/esm/internal/core.js +14 -2
- package/dist/esm/internal/core.js.map +1 -1
- package/dist/esm/internal/effect/circular.js +5 -1
- package/dist/esm/internal/effect/circular.js.map +1 -1
- package/dist/esm/internal/fiberId.js +10 -1
- package/dist/esm/internal/fiberId.js.map +1 -1
- package/dist/esm/internal/hashMap.js +4 -1
- package/dist/esm/internal/hashMap.js.map +1 -1
- package/dist/esm/internal/hashSet.js +4 -1
- package/dist/esm/internal/hashSet.js.map +1 -1
- package/dist/esm/internal/layer.js +32 -18
- package/dist/esm/internal/layer.js.map +1 -1
- package/dist/esm/internal/mailbox.js +3 -0
- package/dist/esm/internal/mailbox.js.map +1 -1
- package/dist/esm/internal/managedRuntime/circular.js +4 -0
- package/dist/esm/internal/managedRuntime/circular.js.map +1 -0
- package/dist/esm/internal/managedRuntime.js +21 -8
- package/dist/esm/internal/managedRuntime.js.map +1 -1
- package/dist/esm/internal/option.js +4 -1
- package/dist/esm/internal/option.js.map +1 -1
- package/dist/esm/internal/pool.js +6 -1
- package/dist/esm/internal/pool.js.map +1 -1
- package/dist/esm/internal/redBlackTree.js +4 -1
- package/dist/esm/internal/redBlackTree.js.map +1 -1
- package/dist/esm/internal/resource.js +15 -5
- package/dist/esm/internal/resource.js.map +1 -1
- package/dist/esm/internal/runtime.js +4 -1
- package/dist/esm/internal/runtime.js.map +1 -1
- package/dist/esm/internal/scopedRef.js +11 -8
- package/dist/esm/internal/scopedRef.js.map +1 -1
- package/dist/esm/internal/stm/core.js +1 -2
- package/dist/esm/internal/stm/core.js.map +1 -1
- package/dist/esm/internal/stream.js +9 -0
- package/dist/esm/internal/stream.js.map +1 -1
- package/dist/esm/internal/trie.js +4 -1
- package/dist/esm/internal/trie.js.map +1 -1
- package/dist/esm/internal/version.js +1 -1
- package/package.json +1 -1
- package/src/Array.ts +2791 -40
- package/src/BigDecimal.ts +589 -19
- package/src/BigInt.ts +516 -16
- package/src/Boolean.ts +241 -8
- package/src/Cause.ts +177 -1
- package/src/Channel.ts +766 -49
- package/src/ChildExecutorDecision.ts +12 -0
- package/src/Chunk.ts +822 -5
- package/src/Config.ts +187 -8
- package/src/ConfigError.ts +16 -0
- package/src/ConfigProvider.ts +89 -1
- package/src/ConfigProviderPathPatch.ts +32 -0
- package/src/Console.ts +37 -8
- package/src/Context.ts +234 -3
- package/src/Cron.ts +16 -1
- package/src/Data.ts +165 -0
- package/src/DateTime.ts +1012 -50
- package/src/Deferred.ts +171 -1
- package/src/Differ.ts +89 -27
- package/src/Duration.ts +160 -17
- package/src/Effect.ts +4717 -164
- package/src/Either.ts +650 -34
- package/src/Equivalence.ts +24 -0
- package/src/ExecutionStrategy.ts +29 -10
- package/src/Exit.ts +252 -0
- package/src/Fiber.ts +182 -0
- package/src/FiberHandle.ts +45 -0
- package/src/FiberId.ts +24 -0
- package/src/FiberMap.ts +147 -21
- package/src/FiberRef.ts +80 -0
- package/src/FiberRefs.ts +84 -0
- package/src/FiberRefsPatch.ts +35 -1
- package/src/FiberSet.ts +41 -0
- package/src/Function.ts +416 -31
- package/src/GroupBy.ts +38 -0
- package/src/Hash.ts +8 -0
- package/src/HashMap.ts +316 -0
- package/src/HashSet.ts +284 -0
- package/src/Inspectable.ts +22 -0
- package/src/Iterable.ts +456 -6
- package/src/KeyedPool.ts +34 -0
- package/src/Layer.ts +475 -38
- package/src/List.ts +483 -4
- package/src/LogLevel.ts +46 -0
- package/src/Logger.ts +195 -4
- package/src/Mailbox.ts +16 -0
- package/src/ManagedRuntime.ts +46 -2
- package/src/MergeDecision.ts +8 -0
- package/src/MergeState.ts +8 -0
- package/src/MergeStrategy.ts +25 -8
- package/src/Metric.ts +426 -15
- package/src/MetricHook.ts +24 -0
- package/src/MetricKey.ts +62 -8
- package/src/MetricPolling.ts +42 -6
- package/src/MetricState.ts +16 -0
- package/src/Micro.ts +1223 -61
- package/src/MutableHashMap.ts +109 -2
- package/src/MutableHashSet.ts +28 -1
- package/src/MutableList.ts +40 -1
- package/src/MutableQueue.ts +66 -1
- package/src/MutableRef.ts +60 -1
- package/src/Number.ts +500 -16
- package/src/Option.ts +1042 -16
- package/src/Order.ts +24 -0
- package/src/Ordering.ts +66 -0
- package/src/Pipeable.ts +224 -21
- package/src/Pool.ts +42 -1
- package/src/Predicate.ts +514 -0
- package/src/PubSub.ts +28 -0
- package/src/Queue.ts +106 -2
- package/src/RcMap.ts +70 -0
- package/src/Readable.ts +18 -7
- package/src/Record.ts +814 -40
- package/src/RedBlackTree.ts +305 -1
- package/src/Ref.ts +88 -0
- package/src/RegExp.ts +17 -0
- package/src/Request.ts +76 -0
- package/src/RequestResolver.ts +145 -4
- package/src/Resource.ts +22 -1
- package/src/Runtime.ts +134 -2
- package/src/RuntimeFlags.ts +100 -0
- package/src/RuntimeFlagsPatch.ts +112 -0
- package/src/STM.ts +1107 -11
- package/src/Schedule.ts +704 -0
- package/src/ScheduleInterval.ts +68 -0
- package/src/ScheduleIntervals.ts +50 -0
- package/src/Scheduler.ts +2 -0
- package/src/Scope.ts +36 -0
- package/src/ScopedRef.ts +44 -1
- package/src/Sink.ts +464 -0
- package/src/SortedMap.ts +80 -1
- package/src/SortedSet.ts +147 -4
- package/src/Stream.ts +5041 -54
- package/src/StreamHaltStrategy.ts +29 -12
- package/src/String.ts +200 -0
- package/src/Struct.ts +86 -7
- package/src/Subscribable.ts +16 -0
- package/src/SubscriptionRef.ts +159 -11
- package/src/SynchronizedRef.ts +169 -8
- package/src/TArray.ts +431 -1
- package/src/TDeferred.ts +24 -0
- package/src/TMap.ts +381 -12
- package/src/TPriorityQueue.ts +60 -0
- package/src/TPubSub.ts +28 -0
- package/src/TQueue.ts +108 -0
- package/src/TReentrantLock.ts +36 -0
- package/src/TRef.ts +88 -0
- package/src/TSemaphore.ts +40 -0
- package/src/TSet.ts +280 -12
- package/src/Take.ts +56 -0
- package/src/TestAnnotationMap.ts +45 -1
- package/src/TestClock.ts +6 -0
- package/src/TestServices.ts +66 -0
- package/src/Trie.ts +906 -0
- package/src/Tuple.ts +223 -8
- package/src/Types.ts +41 -0
- package/src/Unify.ts +28 -17
- package/src/UpstreamPullRequest.ts +12 -0
- package/src/UpstreamPullStrategy.ts +12 -0
- package/src/Utils.ts +1 -15
- package/src/internal/cause.ts +4 -1
- package/src/internal/context.ts +7 -2
- package/src/internal/core-effect.ts +7 -7
- package/src/internal/core.ts +14 -2
- package/src/internal/effect/circular.ts +8 -2
- package/src/internal/fiberId.ts +10 -1
- package/src/internal/hashMap.ts +4 -1
- package/src/internal/hashSet.ts +4 -1
- package/src/internal/layer.ts +105 -38
- package/src/internal/mailbox.ts +3 -0
- package/src/internal/managedRuntime/circular.ts +6 -0
- package/src/internal/managedRuntime.ts +36 -22
- package/src/internal/option.ts +4 -1
- package/src/internal/pool.ts +7 -1
- package/src/internal/redBlackTree.ts +4 -1
- package/src/internal/resource.ts +16 -5
- package/src/internal/runtime.ts +4 -1
- package/src/internal/scopedRef.ts +12 -8
- package/src/internal/stm/core.ts +2 -3
- package/src/internal/stream.ts +27 -0
- package/src/internal/trie.ts +4 -1
- package/src/internal/version.ts +1 -1
package/src/Channel.ts
CHANGED
|
@@ -215,9 +215,17 @@ export const acquireUseRelease: <Acquired, OutErr, Env, OutElem1, InElem, InErr,
|
|
|
215
215
|
* @category constructors
|
|
216
216
|
*/
|
|
217
217
|
export const acquireReleaseOut: {
|
|
218
|
+
/**
|
|
219
|
+
* @since 2.0.0
|
|
220
|
+
* @category constructors
|
|
221
|
+
*/
|
|
218
222
|
<Z, R2>(
|
|
219
223
|
release: (z: Z, e: Exit.Exit<unknown, unknown>) => Effect.Effect<unknown, never, R2>
|
|
220
224
|
): <E, R>(self: Effect.Effect<Z, E, R>) => Channel<Z, unknown, E, unknown, void, unknown, R2 | R>
|
|
225
|
+
/**
|
|
226
|
+
* @since 2.0.0
|
|
227
|
+
* @category constructors
|
|
228
|
+
*/
|
|
221
229
|
<Z, E, R, R2>(
|
|
222
230
|
self: Effect.Effect<Z, E, R>,
|
|
223
231
|
release: (z: Z, e: Exit.Exit<unknown, unknown>) => Effect.Effect<unknown, never, R2>
|
|
@@ -235,11 +243,29 @@ export const acquireReleaseOut: {
|
|
|
235
243
|
* @category mapping
|
|
236
244
|
*/
|
|
237
245
|
export const as: {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
246
|
+
/**
|
|
247
|
+
* Returns a new channel that is the same as this one, except the terminal
|
|
248
|
+
* value of the channel is the specified constant value.
|
|
249
|
+
*
|
|
250
|
+
* This method produces the same result as mapping this channel to the
|
|
251
|
+
* specified constant value.
|
|
252
|
+
*
|
|
253
|
+
* @since 2.0.0
|
|
254
|
+
* @category mapping
|
|
255
|
+
*/
|
|
256
|
+
<OutDone2>(value: OutDone2): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
241
257
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
242
258
|
) => Channel<OutElem, InElem, OutErr, InErr, OutDone2, InDone, Env>
|
|
259
|
+
/**
|
|
260
|
+
* Returns a new channel that is the same as this one, except the terminal
|
|
261
|
+
* value of the channel is the specified constant value.
|
|
262
|
+
*
|
|
263
|
+
* This method produces the same result as mapping this channel to the
|
|
264
|
+
* specified constant value.
|
|
265
|
+
*
|
|
266
|
+
* @since 2.0.0
|
|
267
|
+
* @category mapping
|
|
268
|
+
*/
|
|
243
269
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutDone2>(
|
|
244
270
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
245
271
|
value: OutDone2
|
|
@@ -283,6 +309,14 @@ export const bufferChunk: <InElem, InErr, InDone>(
|
|
|
283
309
|
* @category error handling
|
|
284
310
|
*/
|
|
285
311
|
export const catchAll: {
|
|
312
|
+
/**
|
|
313
|
+
* Returns a new channel that is the same as this one, except if this channel
|
|
314
|
+
* errors for any typed error, then the returned channel will switch over to
|
|
315
|
+
* using the fallback channel returned by the specified error handler.
|
|
316
|
+
*
|
|
317
|
+
* @since 2.0.0
|
|
318
|
+
* @category error handling
|
|
319
|
+
*/
|
|
286
320
|
<OutErr, OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
|
|
287
321
|
f: (error: OutErr) => Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>
|
|
288
322
|
): <OutElem, InElem, InErr, OutDone, InDone, Env>(
|
|
@@ -296,6 +330,14 @@ export const catchAll: {
|
|
|
296
330
|
InDone & InDone1,
|
|
297
331
|
Env1 | Env
|
|
298
332
|
>
|
|
333
|
+
/**
|
|
334
|
+
* Returns a new channel that is the same as this one, except if this channel
|
|
335
|
+
* errors for any typed error, then the returned channel will switch over to
|
|
336
|
+
* using the fallback channel returned by the specified error handler.
|
|
337
|
+
*
|
|
338
|
+
* @since 2.0.0
|
|
339
|
+
* @category error handling
|
|
340
|
+
*/
|
|
299
341
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
|
|
300
342
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
301
343
|
f: (error: OutErr) => Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>
|
|
@@ -319,6 +361,14 @@ export const catchAll: {
|
|
|
319
361
|
* @category error handling
|
|
320
362
|
*/
|
|
321
363
|
export const catchAllCause: {
|
|
364
|
+
/**
|
|
365
|
+
* Returns a new channel that is the same as this one, except if this channel
|
|
366
|
+
* errors for any typed error, then the returned channel will switch over to
|
|
367
|
+
* using the fallback channel returned by the specified error handler.
|
|
368
|
+
*
|
|
369
|
+
* @since 2.0.0
|
|
370
|
+
* @category error handling
|
|
371
|
+
*/
|
|
322
372
|
<OutErr, OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
|
|
323
373
|
f: (cause: Cause.Cause<OutErr>) => Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>
|
|
324
374
|
): <OutElem, InElem, InErr, OutDone, InDone, Env>(
|
|
@@ -332,6 +382,14 @@ export const catchAllCause: {
|
|
|
332
382
|
InDone & InDone1,
|
|
333
383
|
Env1 | Env
|
|
334
384
|
>
|
|
385
|
+
/**
|
|
386
|
+
* Returns a new channel that is the same as this one, except if this channel
|
|
387
|
+
* errors for any typed error, then the returned channel will switch over to
|
|
388
|
+
* using the fallback channel returned by the specified error handler.
|
|
389
|
+
*
|
|
390
|
+
* @since 2.0.0
|
|
391
|
+
* @category error handling
|
|
392
|
+
*/
|
|
335
393
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
|
|
336
394
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
337
395
|
f: (cause: Cause.Cause<OutErr>) => Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>
|
|
@@ -402,11 +460,29 @@ export const concatAllWith: <
|
|
|
402
460
|
* @category utils
|
|
403
461
|
*/
|
|
404
462
|
export const concatMap: {
|
|
463
|
+
/**
|
|
464
|
+
* Returns a new channel whose outputs are fed to the specified factory
|
|
465
|
+
* function, which creates new channels in response. These new channels are
|
|
466
|
+
* sequentially concatenated together, and all their outputs appear as outputs
|
|
467
|
+
* of the newly returned channel.
|
|
468
|
+
*
|
|
469
|
+
* @since 2.0.0
|
|
470
|
+
* @category utils
|
|
471
|
+
*/
|
|
405
472
|
<OutElem, OutElem2, InElem2, OutErr2, InErr2, X, InDone2, Env2>(
|
|
406
473
|
f: (o: OutElem) => Channel<OutElem2, InElem2, OutErr2, InErr2, X, InDone2, Env2>
|
|
407
474
|
): <Env, InErr, InElem, InDone, OutErr, OutDone>(
|
|
408
475
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
409
476
|
) => Channel<OutElem2, InElem & InElem2, OutErr2 | OutErr, InErr & InErr2, unknown, InDone & InDone2, Env2 | Env>
|
|
477
|
+
/**
|
|
478
|
+
* Returns a new channel whose outputs are fed to the specified factory
|
|
479
|
+
* function, which creates new channels in response. These new channels are
|
|
480
|
+
* sequentially concatenated together, and all their outputs appear as outputs
|
|
481
|
+
* of the newly returned channel.
|
|
482
|
+
*
|
|
483
|
+
* @since 2.0.0
|
|
484
|
+
* @category utils
|
|
485
|
+
*/
|
|
410
486
|
<Env, InErr, InElem, InDone, OutErr, OutDone, OutElem, OutElem2, Env2, InErr2, InElem2, InDone2, OutErr2, X>(
|
|
411
487
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
412
488
|
f: (o: OutElem) => Channel<OutElem2, InElem2, OutErr2, InErr2, X, InDone2, Env2>
|
|
@@ -425,6 +501,17 @@ export const concatMap: {
|
|
|
425
501
|
* @category utils
|
|
426
502
|
*/
|
|
427
503
|
export const concatMapWith: {
|
|
504
|
+
/**
|
|
505
|
+
* Returns a new channel whose outputs are fed to the specified factory
|
|
506
|
+
* function, which creates new channels in response. These new channels are
|
|
507
|
+
* sequentially concatenated together, and all their outputs appear as outputs
|
|
508
|
+
* of the newly returned channel. The provided merging function is used to
|
|
509
|
+
* merge the terminal values of all channels into the single terminal value of
|
|
510
|
+
* the returned channel.
|
|
511
|
+
*
|
|
512
|
+
* @since 2.0.0
|
|
513
|
+
* @category utils
|
|
514
|
+
*/
|
|
428
515
|
<OutElem, OutElem2, InElem2, OutErr2, InErr2, OutDone, InDone2, Env2, OutDone2, OutDone3>(
|
|
429
516
|
f: (o: OutElem) => Channel<OutElem2, InElem2, OutErr2, InErr2, OutDone, InDone2, Env2>,
|
|
430
517
|
g: (o: OutDone, o1: OutDone) => OutDone,
|
|
@@ -432,6 +519,17 @@ export const concatMapWith: {
|
|
|
432
519
|
): <Env, InErr, InElem, InDone, OutErr>(
|
|
433
520
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone2, InDone, Env>
|
|
434
521
|
) => Channel<OutElem2, InElem & InElem2, OutErr2 | OutErr, InErr & InErr2, OutDone3, InDone & InDone2, Env2 | Env>
|
|
522
|
+
/**
|
|
523
|
+
* Returns a new channel whose outputs are fed to the specified factory
|
|
524
|
+
* function, which creates new channels in response. These new channels are
|
|
525
|
+
* sequentially concatenated together, and all their outputs appear as outputs
|
|
526
|
+
* of the newly returned channel. The provided merging function is used to
|
|
527
|
+
* merge the terminal values of all channels into the single terminal value of
|
|
528
|
+
* the returned channel.
|
|
529
|
+
*
|
|
530
|
+
* @since 2.0.0
|
|
531
|
+
* @category utils
|
|
532
|
+
*/
|
|
435
533
|
<
|
|
436
534
|
OutElem,
|
|
437
535
|
InElem,
|
|
@@ -468,6 +566,17 @@ export const concatMapWith: {
|
|
|
468
566
|
* @category utils
|
|
469
567
|
*/
|
|
470
568
|
export const concatMapWithCustom: {
|
|
569
|
+
/**
|
|
570
|
+
* Returns a new channel whose outputs are fed to the specified factory
|
|
571
|
+
* function, which creates new channels in response. These new channels are
|
|
572
|
+
* sequentially concatenated together, and all their outputs appear as outputs
|
|
573
|
+
* of the newly returned channel. The provided merging function is used to
|
|
574
|
+
* merge the terminal values of all channels into the single terminal value of
|
|
575
|
+
* the returned channel.
|
|
576
|
+
*
|
|
577
|
+
* @since 2.0.0
|
|
578
|
+
* @category utils
|
|
579
|
+
*/
|
|
471
580
|
<OutElem, OutElem2, InElem2, OutErr2, InErr2, OutDone, InDone2, Env2, OutDone2, OutDone3>(
|
|
472
581
|
f: (o: OutElem) => Channel<OutElem2, InElem2, OutErr2, InErr2, OutDone, InDone2, Env2>,
|
|
473
582
|
g: (o: OutDone, o1: OutDone) => OutDone,
|
|
@@ -479,6 +588,17 @@ export const concatMapWithCustom: {
|
|
|
479
588
|
): <Env, InErr, InElem, InDone, OutErr>(
|
|
480
589
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone2, InDone, Env>
|
|
481
590
|
) => Channel<OutElem2, InElem & InElem2, OutErr2 | OutErr, InErr & InErr2, OutDone3, InDone & InDone2, Env2 | Env>
|
|
591
|
+
/**
|
|
592
|
+
* Returns a new channel whose outputs are fed to the specified factory
|
|
593
|
+
* function, which creates new channels in response. These new channels are
|
|
594
|
+
* sequentially concatenated together, and all their outputs appear as outputs
|
|
595
|
+
* of the newly returned channel. The provided merging function is used to
|
|
596
|
+
* merge the terminal values of all channels into the single terminal value of
|
|
597
|
+
* the returned channel.
|
|
598
|
+
*
|
|
599
|
+
* @since 2.0.0
|
|
600
|
+
* @category utils
|
|
601
|
+
*/
|
|
482
602
|
<
|
|
483
603
|
OutElem,
|
|
484
604
|
InElem,
|
|
@@ -515,11 +635,23 @@ export const concatMapWithCustom: {
|
|
|
515
635
|
* @category utils
|
|
516
636
|
*/
|
|
517
637
|
export const collect: {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
638
|
+
/**
|
|
639
|
+
* Returns a new channel, which is the same as this one, except its outputs
|
|
640
|
+
* are filtered and transformed by the specified partial function.
|
|
641
|
+
*
|
|
642
|
+
* @since 2.0.0
|
|
643
|
+
* @category utils
|
|
644
|
+
*/
|
|
645
|
+
<OutElem, OutElem2>(pf: (o: OutElem) => Option.Option<OutElem2>): <InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
521
646
|
self: Channel<OutElem, unknown, never, unknown, void, unknown, never>
|
|
522
647
|
) => Channel<OutElem2, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
648
|
+
/**
|
|
649
|
+
* Returns a new channel, which is the same as this one, except its outputs
|
|
650
|
+
* are filtered and transformed by the specified partial function.
|
|
651
|
+
*
|
|
652
|
+
* @since 2.0.0
|
|
653
|
+
* @category utils
|
|
654
|
+
*/
|
|
523
655
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem2>(
|
|
524
656
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
525
657
|
pf: (o: OutElem) => Option.Option<OutElem2>
|
|
@@ -554,11 +686,23 @@ export const concatOut: <OutElem, InElem, OutErr, InErr, InDone, Env, OutDone>(
|
|
|
554
686
|
* @category utils
|
|
555
687
|
*/
|
|
556
688
|
export const mapInput: {
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
689
|
+
/**
|
|
690
|
+
* Returns a new channel which is the same as this one but applies the given
|
|
691
|
+
* function to the input channel's done value.
|
|
692
|
+
*
|
|
693
|
+
* @since 2.0.0
|
|
694
|
+
* @category utils
|
|
695
|
+
*/
|
|
696
|
+
<InDone0, InDone>(f: (a: InDone0) => InDone): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
560
697
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
561
698
|
) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone0, Env>
|
|
699
|
+
/**
|
|
700
|
+
* Returns a new channel which is the same as this one but applies the given
|
|
701
|
+
* function to the input channel's done value.
|
|
702
|
+
*
|
|
703
|
+
* @since 2.0.0
|
|
704
|
+
* @category utils
|
|
705
|
+
*/
|
|
562
706
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, InDone0>(
|
|
563
707
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
564
708
|
f: (a: InDone0) => InDone
|
|
@@ -573,11 +717,25 @@ export const mapInput: {
|
|
|
573
717
|
* @category utils
|
|
574
718
|
*/
|
|
575
719
|
export const mapInputEffect: {
|
|
720
|
+
/**
|
|
721
|
+
* Returns a new channel which is the same as this one but applies the given
|
|
722
|
+
* effectual function to the input channel's done value.
|
|
723
|
+
*
|
|
724
|
+
* @since 2.0.0
|
|
725
|
+
* @category utils
|
|
726
|
+
*/
|
|
576
727
|
<InDone0, InDone, InErr, Env1>(
|
|
577
728
|
f: (i: InDone0) => Effect.Effect<InDone, InErr, Env1>
|
|
578
729
|
): <OutElem, InElem, OutErr, OutDone, Env>(
|
|
579
730
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
580
731
|
) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone0, Env1 | Env>
|
|
732
|
+
/**
|
|
733
|
+
* Returns a new channel which is the same as this one but applies the given
|
|
734
|
+
* effectual function to the input channel's done value.
|
|
735
|
+
*
|
|
736
|
+
* @since 2.0.0
|
|
737
|
+
* @category utils
|
|
738
|
+
*/
|
|
581
739
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, InDone0, Env1>(
|
|
582
740
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
583
741
|
f: (i: InDone0) => Effect.Effect<InDone, InErr, Env1>
|
|
@@ -592,11 +750,23 @@ export const mapInputEffect: {
|
|
|
592
750
|
* @category utils
|
|
593
751
|
*/
|
|
594
752
|
export const mapInputError: {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
753
|
+
/**
|
|
754
|
+
* Returns a new channel which is the same as this one but applies the given
|
|
755
|
+
* function to the input channel's error value.
|
|
756
|
+
*
|
|
757
|
+
* @since 2.0.0
|
|
758
|
+
* @category utils
|
|
759
|
+
*/
|
|
760
|
+
<InErr0, InErr>(f: (a: InErr0) => InErr): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
598
761
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
599
762
|
) => Channel<OutElem, InElem, OutErr, InErr0, OutDone, InDone, Env>
|
|
763
|
+
/**
|
|
764
|
+
* Returns a new channel which is the same as this one but applies the given
|
|
765
|
+
* function to the input channel's error value.
|
|
766
|
+
*
|
|
767
|
+
* @since 2.0.0
|
|
768
|
+
* @category utils
|
|
769
|
+
*/
|
|
600
770
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, InErr0>(
|
|
601
771
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
602
772
|
f: (a: InErr0) => InErr
|
|
@@ -611,11 +781,25 @@ export const mapInputError: {
|
|
|
611
781
|
* @category utils
|
|
612
782
|
*/
|
|
613
783
|
export const mapInputErrorEffect: {
|
|
784
|
+
/**
|
|
785
|
+
* Returns a new channel which is the same as this one but applies the given
|
|
786
|
+
* effectual function to the input channel's error value.
|
|
787
|
+
*
|
|
788
|
+
* @since 2.0.0
|
|
789
|
+
* @category utils
|
|
790
|
+
*/
|
|
614
791
|
<InErr0, InDone, InErr, Env1>(
|
|
615
792
|
f: (error: InErr0) => Effect.Effect<InDone, InErr, Env1>
|
|
616
793
|
): <OutElem, InElem, OutErr, OutDone, Env>(
|
|
617
794
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
618
795
|
) => Channel<OutElem, InElem, OutErr, InErr0, OutDone, InDone, Env1 | Env>
|
|
796
|
+
/**
|
|
797
|
+
* Returns a new channel which is the same as this one but applies the given
|
|
798
|
+
* effectual function to the input channel's error value.
|
|
799
|
+
*
|
|
800
|
+
* @since 2.0.0
|
|
801
|
+
* @category utils
|
|
802
|
+
*/
|
|
619
803
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, InErr0, Env1>(
|
|
620
804
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
621
805
|
f: (error: InErr0) => Effect.Effect<InDone, InErr, Env1>
|
|
@@ -630,11 +814,23 @@ export const mapInputErrorEffect: {
|
|
|
630
814
|
* @category utils
|
|
631
815
|
*/
|
|
632
816
|
export const mapInputIn: {
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
817
|
+
/**
|
|
818
|
+
* Returns a new channel which is the same as this one but applies the given
|
|
819
|
+
* function to the input channel's output elements.
|
|
820
|
+
*
|
|
821
|
+
* @since 2.0.0
|
|
822
|
+
* @category utils
|
|
823
|
+
*/
|
|
824
|
+
<InElem0, InElem>(f: (a: InElem0) => InElem): <OutElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
636
825
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
637
826
|
) => Channel<OutElem, InElem0, OutErr, InErr, OutDone, InDone, Env>
|
|
827
|
+
/**
|
|
828
|
+
* Returns a new channel which is the same as this one but applies the given
|
|
829
|
+
* function to the input channel's output elements.
|
|
830
|
+
*
|
|
831
|
+
* @since 2.0.0
|
|
832
|
+
* @category utils
|
|
833
|
+
*/
|
|
638
834
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, InElem0>(
|
|
639
835
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
640
836
|
f: (a: InElem0) => InElem
|
|
@@ -649,11 +845,25 @@ export const mapInputIn: {
|
|
|
649
845
|
* @category utils
|
|
650
846
|
*/
|
|
651
847
|
export const mapInputInEffect: {
|
|
848
|
+
/**
|
|
849
|
+
* Returns a new channel which is the same as this one but applies the given
|
|
850
|
+
* effectual function to the input channel's output elements.
|
|
851
|
+
*
|
|
852
|
+
* @since 2.0.0
|
|
853
|
+
* @category utils
|
|
854
|
+
*/
|
|
652
855
|
<InElem0, InElem, InErr, Env1>(
|
|
653
856
|
f: (a: InElem0) => Effect.Effect<InElem, InErr, Env1>
|
|
654
857
|
): <OutElem, OutErr, OutDone, InDone, Env>(
|
|
655
858
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
656
859
|
) => Channel<OutElem, InElem0, OutErr, InErr, OutDone, InDone, Env1 | Env>
|
|
860
|
+
/**
|
|
861
|
+
* Returns a new channel which is the same as this one but applies the given
|
|
862
|
+
* effectual function to the input channel's output elements.
|
|
863
|
+
*
|
|
864
|
+
* @since 2.0.0
|
|
865
|
+
* @category utils
|
|
866
|
+
*/
|
|
657
867
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, InElem0, Env1>(
|
|
658
868
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
659
869
|
f: (a: InElem0) => Effect.Effect<InElem, InErr, Env1>
|
|
@@ -695,11 +905,25 @@ export const drain: <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
|
695
905
|
* @category utils
|
|
696
906
|
*/
|
|
697
907
|
export const embedInput: {
|
|
908
|
+
/**
|
|
909
|
+
* Returns a new channel which connects the given `AsyncInputProducer` as
|
|
910
|
+
* this channel's input.
|
|
911
|
+
*
|
|
912
|
+
* @since 2.0.0
|
|
913
|
+
* @category utils
|
|
914
|
+
*/
|
|
698
915
|
<InErr, InElem, InDone>(
|
|
699
916
|
input: SingleProducerAsyncInput.AsyncInputProducer<InErr, InElem, InDone>
|
|
700
917
|
): <OutElem, OutErr, OutDone, Env>(
|
|
701
918
|
self: Channel<OutElem, unknown, OutErr, unknown, OutDone, unknown, Env>
|
|
702
919
|
) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
920
|
+
/**
|
|
921
|
+
* Returns a new channel which connects the given `AsyncInputProducer` as
|
|
922
|
+
* this channel's input.
|
|
923
|
+
*
|
|
924
|
+
* @since 2.0.0
|
|
925
|
+
* @category utils
|
|
926
|
+
*/
|
|
703
927
|
<OutElem, OutErr, OutDone, Env, InErr, InElem, InDone>(
|
|
704
928
|
self: Channel<OutElem, unknown, OutErr, unknown, OutDone, unknown, Env>,
|
|
705
929
|
input: SingleProducerAsyncInput.AsyncInputProducer<InErr, InElem, InDone>
|
|
@@ -726,11 +950,25 @@ export const emitCollect: <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
|
726
950
|
* @category utils
|
|
727
951
|
*/
|
|
728
952
|
export const ensuring: {
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
953
|
+
/**
|
|
954
|
+
* Returns a new channel with an attached finalizer. The finalizer is
|
|
955
|
+
* guaranteed to be executed so long as the channel begins execution (and
|
|
956
|
+
* regardless of whether or not it completes).
|
|
957
|
+
*
|
|
958
|
+
* @since 2.0.0
|
|
959
|
+
* @category utils
|
|
960
|
+
*/
|
|
961
|
+
<Z, Env1>(finalizer: Effect.Effect<Z, never, Env1>): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
732
962
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
733
963
|
) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env1 | Env>
|
|
964
|
+
/**
|
|
965
|
+
* Returns a new channel with an attached finalizer. The finalizer is
|
|
966
|
+
* guaranteed to be executed so long as the channel begins execution (and
|
|
967
|
+
* regardless of whether or not it completes).
|
|
968
|
+
*
|
|
969
|
+
* @since 2.0.0
|
|
970
|
+
* @category utils
|
|
971
|
+
*/
|
|
734
972
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, Z, Env1>(
|
|
735
973
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
736
974
|
finalizer: Effect.Effect<Z, never, Env1>
|
|
@@ -746,11 +984,27 @@ export const ensuring: {
|
|
|
746
984
|
* @category utils
|
|
747
985
|
*/
|
|
748
986
|
export const ensuringWith: {
|
|
987
|
+
/**
|
|
988
|
+
* Returns a new channel with an attached finalizer. The finalizer is
|
|
989
|
+
* guaranteed to be executed so long as the channel begins execution (and
|
|
990
|
+
* regardless of whether or not it completes).
|
|
991
|
+
*
|
|
992
|
+
* @since 2.0.0
|
|
993
|
+
* @category utils
|
|
994
|
+
*/
|
|
749
995
|
<OutDone, OutErr, Env2>(
|
|
750
996
|
finalizer: (e: Exit.Exit<OutDone, OutErr>) => Effect.Effect<unknown, never, Env2>
|
|
751
997
|
): <OutElem, InElem, InErr, InDone, Env>(
|
|
752
998
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
753
999
|
) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env2 | Env>
|
|
1000
|
+
/**
|
|
1001
|
+
* Returns a new channel with an attached finalizer. The finalizer is
|
|
1002
|
+
* guaranteed to be executed so long as the channel begins execution (and
|
|
1003
|
+
* regardless of whether or not it completes).
|
|
1004
|
+
*
|
|
1005
|
+
* @since 2.0.0
|
|
1006
|
+
* @category utils
|
|
1007
|
+
*/
|
|
754
1008
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, Env2>(
|
|
755
1009
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
756
1010
|
finalizer: (e: Exit.Exit<OutDone, OutErr>) => Effect.Effect<unknown, never, Env2>
|
|
@@ -844,6 +1098,16 @@ export const failCauseSync: <E>(
|
|
|
844
1098
|
* @category sequencing
|
|
845
1099
|
*/
|
|
846
1100
|
export const flatMap: {
|
|
1101
|
+
/**
|
|
1102
|
+
* Returns a new channel, which sequentially combines this channel, together
|
|
1103
|
+
* with the provided factory function, which creates a second channel based on
|
|
1104
|
+
* the terminal value of this channel. The result is a channel that will first
|
|
1105
|
+
* perform the functions of this channel, before performing the functions of
|
|
1106
|
+
* the created channel (including yielding its terminal value).
|
|
1107
|
+
*
|
|
1108
|
+
* @since 2.0.0
|
|
1109
|
+
* @category sequencing
|
|
1110
|
+
*/
|
|
847
1111
|
<OutDone, OutElem1, InElem1, OutErr1, InErr1, OutDone2, InDone1, Env1>(
|
|
848
1112
|
f: (d: OutDone) => Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone2, InDone1, Env1>
|
|
849
1113
|
): <OutElem, InElem, OutErr, InErr, InDone, Env>(
|
|
@@ -857,6 +1121,16 @@ export const flatMap: {
|
|
|
857
1121
|
InDone & InDone1,
|
|
858
1122
|
Env1 | Env
|
|
859
1123
|
>
|
|
1124
|
+
/**
|
|
1125
|
+
* Returns a new channel, which sequentially combines this channel, together
|
|
1126
|
+
* with the provided factory function, which creates a second channel based on
|
|
1127
|
+
* the terminal value of this channel. The result is a channel that will first
|
|
1128
|
+
* perform the functions of this channel, before performing the functions of
|
|
1129
|
+
* the created channel (including yielding its terminal value).
|
|
1130
|
+
*
|
|
1131
|
+
* @since 2.0.0
|
|
1132
|
+
* @category sequencing
|
|
1133
|
+
*/
|
|
860
1134
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, InElem1, OutErr1, InErr1, OutDone2, InDone1, Env1>(
|
|
861
1135
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
862
1136
|
f: (d: OutDone) => Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone2, InDone1, Env1>
|
|
@@ -920,6 +1194,12 @@ export const flatten: <
|
|
|
920
1194
|
* @category utils
|
|
921
1195
|
*/
|
|
922
1196
|
export const foldChannel: {
|
|
1197
|
+
/**
|
|
1198
|
+
* Folds over the result of this channel.
|
|
1199
|
+
*
|
|
1200
|
+
* @since 2.0.0
|
|
1201
|
+
* @category utils
|
|
1202
|
+
*/
|
|
923
1203
|
<
|
|
924
1204
|
OutErr,
|
|
925
1205
|
OutElem1,
|
|
@@ -953,6 +1233,12 @@ export const foldChannel: {
|
|
|
953
1233
|
InDone & InDone1 & InDone2,
|
|
954
1234
|
Env1 | Env2 | Env
|
|
955
1235
|
>
|
|
1236
|
+
/**
|
|
1237
|
+
* Folds over the result of this channel.
|
|
1238
|
+
*
|
|
1239
|
+
* @since 2.0.0
|
|
1240
|
+
* @category utils
|
|
1241
|
+
*/
|
|
956
1242
|
<
|
|
957
1243
|
OutElem,
|
|
958
1244
|
InElem,
|
|
@@ -999,6 +1285,12 @@ export const foldChannel: {
|
|
|
999
1285
|
* @category utils
|
|
1000
1286
|
*/
|
|
1001
1287
|
export const foldCauseChannel: {
|
|
1288
|
+
/**
|
|
1289
|
+
* Folds over the result of this channel including any cause of termination.
|
|
1290
|
+
*
|
|
1291
|
+
* @since 2.0.0
|
|
1292
|
+
* @category utils
|
|
1293
|
+
*/
|
|
1002
1294
|
<
|
|
1003
1295
|
OutErr,
|
|
1004
1296
|
OutElem1,
|
|
@@ -1034,6 +1326,12 @@ export const foldCauseChannel: {
|
|
|
1034
1326
|
InDone & InDone1 & InDone2,
|
|
1035
1327
|
Env1 | Env2 | Env
|
|
1036
1328
|
>
|
|
1329
|
+
/**
|
|
1330
|
+
* Folds over the result of this channel including any cause of termination.
|
|
1331
|
+
*
|
|
1332
|
+
* @since 2.0.0
|
|
1333
|
+
* @category utils
|
|
1334
|
+
*/
|
|
1037
1335
|
<
|
|
1038
1336
|
OutElem,
|
|
1039
1337
|
InElem,
|
|
@@ -1163,11 +1461,35 @@ export const identity: <Elem, Err, Done>() => Channel<Elem, Elem, Err, Err, Done
|
|
|
1163
1461
|
* @category utils
|
|
1164
1462
|
*/
|
|
1165
1463
|
export const interruptWhen: {
|
|
1464
|
+
/**
|
|
1465
|
+
* Returns a new channel, which is the same as this one, except it will be
|
|
1466
|
+
* interrupted when the specified effect completes. If the effect completes
|
|
1467
|
+
* successfully before the underlying channel is done, then the returned
|
|
1468
|
+
* channel will yield the success value of the effect as its terminal value.
|
|
1469
|
+
* On the other hand, if the underlying channel finishes first, then the
|
|
1470
|
+
* returned channel will yield the success value of the underlying channel as
|
|
1471
|
+
* its terminal value.
|
|
1472
|
+
*
|
|
1473
|
+
* @since 2.0.0
|
|
1474
|
+
* @category utils
|
|
1475
|
+
*/
|
|
1166
1476
|
<OutDone1, OutErr1, Env1>(
|
|
1167
1477
|
effect: Effect.Effect<OutDone1, OutErr1, Env1>
|
|
1168
1478
|
): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
1169
1479
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1170
1480
|
) => Channel<OutElem, InElem, OutErr1 | OutErr, InErr, OutDone1 | OutDone, InDone, Env1 | Env>
|
|
1481
|
+
/**
|
|
1482
|
+
* Returns a new channel, which is the same as this one, except it will be
|
|
1483
|
+
* interrupted when the specified effect completes. If the effect completes
|
|
1484
|
+
* successfully before the underlying channel is done, then the returned
|
|
1485
|
+
* channel will yield the success value of the effect as its terminal value.
|
|
1486
|
+
* On the other hand, if the underlying channel finishes first, then the
|
|
1487
|
+
* returned channel will yield the success value of the underlying channel as
|
|
1488
|
+
* its terminal value.
|
|
1489
|
+
*
|
|
1490
|
+
* @since 2.0.0
|
|
1491
|
+
* @category utils
|
|
1492
|
+
*/
|
|
1171
1493
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutDone1, OutErr1, Env1>(
|
|
1172
1494
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1173
1495
|
effect: Effect.Effect<OutDone1, OutErr1, Env1>
|
|
@@ -1186,11 +1508,33 @@ export const interruptWhen: {
|
|
|
1186
1508
|
* @category utils
|
|
1187
1509
|
*/
|
|
1188
1510
|
export const interruptWhenDeferred: {
|
|
1511
|
+
/**
|
|
1512
|
+
* Returns a new channel, which is the same as this one, except it will be
|
|
1513
|
+
* interrupted when the specified deferred is completed. If the deferred is
|
|
1514
|
+
* completed before the underlying channel is done, then the returned channel
|
|
1515
|
+
* will yield the value of the deferred. Otherwise, if the underlying channel
|
|
1516
|
+
* finishes first, then the returned channel will yield the value of the
|
|
1517
|
+
* underlying channel.
|
|
1518
|
+
*
|
|
1519
|
+
* @since 2.0.0
|
|
1520
|
+
* @category utils
|
|
1521
|
+
*/
|
|
1189
1522
|
<OutDone1, OutErr1>(
|
|
1190
1523
|
deferred: Deferred.Deferred<OutDone1, OutErr1>
|
|
1191
1524
|
): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
1192
1525
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1193
1526
|
) => Channel<OutElem, InElem, OutErr1 | OutErr, InErr, OutDone1 | OutDone, InDone, Env>
|
|
1527
|
+
/**
|
|
1528
|
+
* Returns a new channel, which is the same as this one, except it will be
|
|
1529
|
+
* interrupted when the specified deferred is completed. If the deferred is
|
|
1530
|
+
* completed before the underlying channel is done, then the returned channel
|
|
1531
|
+
* will yield the value of the deferred. Otherwise, if the underlying channel
|
|
1532
|
+
* finishes first, then the returned channel will yield the value of the
|
|
1533
|
+
* underlying channel.
|
|
1534
|
+
*
|
|
1535
|
+
* @since 2.0.0
|
|
1536
|
+
* @category utils
|
|
1537
|
+
*/
|
|
1194
1538
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutDone1, OutErr1>(
|
|
1195
1539
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1196
1540
|
deferred: Deferred.Deferred<OutDone1, OutErr1>
|
|
@@ -1206,11 +1550,25 @@ export const interruptWhenDeferred: {
|
|
|
1206
1550
|
* @category mapping
|
|
1207
1551
|
*/
|
|
1208
1552
|
export const map: {
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1553
|
+
/**
|
|
1554
|
+
* Returns a new channel, which is the same as this one, except the terminal
|
|
1555
|
+
* value of the returned channel is created by applying the specified function
|
|
1556
|
+
* to the terminal value of this channel.
|
|
1557
|
+
*
|
|
1558
|
+
* @since 2.0.0
|
|
1559
|
+
* @category mapping
|
|
1560
|
+
*/
|
|
1561
|
+
<OutDone, OutDone2>(f: (out: OutDone) => OutDone2): <OutElem, InElem, OutErr, InErr, InDone, Env>(
|
|
1212
1562
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1213
1563
|
) => Channel<OutElem, InElem, OutErr, InErr, OutDone2, InDone, Env>
|
|
1564
|
+
/**
|
|
1565
|
+
* Returns a new channel, which is the same as this one, except the terminal
|
|
1566
|
+
* value of the returned channel is created by applying the specified function
|
|
1567
|
+
* to the terminal value of this channel.
|
|
1568
|
+
*
|
|
1569
|
+
* @since 2.0.0
|
|
1570
|
+
* @category mapping
|
|
1571
|
+
*/
|
|
1214
1572
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutDone2>(
|
|
1215
1573
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1216
1574
|
f: (out: OutDone) => OutDone2
|
|
@@ -1226,11 +1584,27 @@ export const map: {
|
|
|
1226
1584
|
* @category mapping
|
|
1227
1585
|
*/
|
|
1228
1586
|
export const mapEffect: {
|
|
1587
|
+
/**
|
|
1588
|
+
* Returns a new channel, which is the same as this one, except the terminal
|
|
1589
|
+
* value of the returned channel is created by applying the specified
|
|
1590
|
+
* effectful function to the terminal value of this channel.
|
|
1591
|
+
*
|
|
1592
|
+
* @since 2.0.0
|
|
1593
|
+
* @category mapping
|
|
1594
|
+
*/
|
|
1229
1595
|
<OutDone, OutDone1, OutErr1, Env1>(
|
|
1230
1596
|
f: (o: OutDone) => Effect.Effect<OutDone1, OutErr1, Env1>
|
|
1231
1597
|
): <OutElem, InElem, OutErr, InErr, InDone, Env>(
|
|
1232
1598
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1233
1599
|
) => Channel<OutElem, InElem, OutErr1 | OutErr, InErr, OutDone1, InDone, Env1 | Env>
|
|
1600
|
+
/**
|
|
1601
|
+
* Returns a new channel, which is the same as this one, except the terminal
|
|
1602
|
+
* value of the returned channel is created by applying the specified
|
|
1603
|
+
* effectful function to the terminal value of this channel.
|
|
1604
|
+
*
|
|
1605
|
+
* @since 2.0.0
|
|
1606
|
+
* @category mapping
|
|
1607
|
+
*/
|
|
1234
1608
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutDone1, OutErr1, Env1>(
|
|
1235
1609
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1236
1610
|
f: (o: OutDone) => Effect.Effect<OutDone1, OutErr1, Env1>
|
|
@@ -1246,11 +1620,25 @@ export const mapEffect: {
|
|
|
1246
1620
|
* @category mapping
|
|
1247
1621
|
*/
|
|
1248
1622
|
export const mapError: {
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1623
|
+
/**
|
|
1624
|
+
* Returns a new channel, which is the same as this one, except the failure
|
|
1625
|
+
* value of the returned channel is created by applying the specified function
|
|
1626
|
+
* to the failure value of this channel.
|
|
1627
|
+
*
|
|
1628
|
+
* @since 2.0.0
|
|
1629
|
+
* @category mapping
|
|
1630
|
+
*/
|
|
1631
|
+
<OutErr, OutErr2>(f: (err: OutErr) => OutErr2): <OutElem, InElem, InErr, OutDone, InDone, Env>(
|
|
1252
1632
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1253
1633
|
) => Channel<OutElem, InElem, OutErr2, InErr, OutDone, InDone, Env>
|
|
1634
|
+
/**
|
|
1635
|
+
* Returns a new channel, which is the same as this one, except the failure
|
|
1636
|
+
* value of the returned channel is created by applying the specified function
|
|
1637
|
+
* to the failure value of this channel.
|
|
1638
|
+
*
|
|
1639
|
+
* @since 2.0.0
|
|
1640
|
+
* @category mapping
|
|
1641
|
+
*/
|
|
1254
1642
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutErr2>(
|
|
1255
1643
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1256
1644
|
f: (err: OutErr) => OutErr2
|
|
@@ -1265,11 +1653,25 @@ export const mapError: {
|
|
|
1265
1653
|
* @category mapping
|
|
1266
1654
|
*/
|
|
1267
1655
|
export const mapErrorCause: {
|
|
1656
|
+
/**
|
|
1657
|
+
* A more powerful version of `mapError` which also surfaces the `Cause`
|
|
1658
|
+
* of the channel failure.
|
|
1659
|
+
*
|
|
1660
|
+
* @since 2.0.0
|
|
1661
|
+
* @category mapping
|
|
1662
|
+
*/
|
|
1268
1663
|
<OutErr, OutErr2>(
|
|
1269
1664
|
f: (cause: Cause.Cause<OutErr>) => Cause.Cause<OutErr2>
|
|
1270
1665
|
): <OutElem, InElem, InErr, OutDone, InDone, Env>(
|
|
1271
1666
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1272
1667
|
) => Channel<OutElem, InElem, OutErr2, InErr, OutDone, InDone, Env>
|
|
1668
|
+
/**
|
|
1669
|
+
* A more powerful version of `mapError` which also surfaces the `Cause`
|
|
1670
|
+
* of the channel failure.
|
|
1671
|
+
*
|
|
1672
|
+
* @since 2.0.0
|
|
1673
|
+
* @category mapping
|
|
1674
|
+
*/
|
|
1273
1675
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutErr2>(
|
|
1274
1676
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1275
1677
|
f: (cause: Cause.Cause<OutErr>) => Cause.Cause<OutErr2>
|
|
@@ -1283,11 +1685,21 @@ export const mapErrorCause: {
|
|
|
1283
1685
|
* @category mapping
|
|
1284
1686
|
*/
|
|
1285
1687
|
export const mapOut: {
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1688
|
+
/**
|
|
1689
|
+
* Maps the output of this channel using the specified function.
|
|
1690
|
+
*
|
|
1691
|
+
* @since 2.0.0
|
|
1692
|
+
* @category mapping
|
|
1693
|
+
*/
|
|
1694
|
+
<OutElem, OutElem2>(f: (o: OutElem) => OutElem2): <InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
1289
1695
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1290
1696
|
) => Channel<OutElem2, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1697
|
+
/**
|
|
1698
|
+
* Maps the output of this channel using the specified function.
|
|
1699
|
+
*
|
|
1700
|
+
* @since 2.0.0
|
|
1701
|
+
* @category mapping
|
|
1702
|
+
*/
|
|
1291
1703
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem2>(
|
|
1292
1704
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1293
1705
|
f: (o: OutElem) => OutElem2
|
|
@@ -1302,11 +1714,25 @@ export const mapOut: {
|
|
|
1302
1714
|
* @category mapping
|
|
1303
1715
|
*/
|
|
1304
1716
|
export const mapOutEffect: {
|
|
1717
|
+
/**
|
|
1718
|
+
* Creates a channel that is like this channel but the given effectful function
|
|
1719
|
+
* gets applied to each emitted output element.
|
|
1720
|
+
*
|
|
1721
|
+
* @since 2.0.0
|
|
1722
|
+
* @category mapping
|
|
1723
|
+
*/
|
|
1305
1724
|
<OutElem, OutElem1, OutErr1, Env1>(
|
|
1306
1725
|
f: (o: OutElem) => Effect.Effect<OutElem1, OutErr1, Env1>
|
|
1307
1726
|
): <InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
1308
1727
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1309
1728
|
) => Channel<OutElem1, InElem, OutErr1 | OutErr, InErr, OutDone, InDone, Env1 | Env>
|
|
1729
|
+
/**
|
|
1730
|
+
* Creates a channel that is like this channel but the given effectful function
|
|
1731
|
+
* gets applied to each emitted output element.
|
|
1732
|
+
*
|
|
1733
|
+
* @since 2.0.0
|
|
1734
|
+
* @category mapping
|
|
1735
|
+
*/
|
|
1310
1736
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, OutErr1, Env1>(
|
|
1311
1737
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1312
1738
|
f: (o: OutElem) => Effect.Effect<OutElem1, OutErr1, Env1>
|
|
@@ -1322,12 +1748,28 @@ export const mapOutEffect: {
|
|
|
1322
1748
|
* @category mapping
|
|
1323
1749
|
*/
|
|
1324
1750
|
export const mapOutEffectPar: {
|
|
1751
|
+
/**
|
|
1752
|
+
* Creates a channel that is like this channel but the given ZIO function gets
|
|
1753
|
+
* applied to each emitted output element, taking `n` elements at once and
|
|
1754
|
+
* mapping them in parallel.
|
|
1755
|
+
*
|
|
1756
|
+
* @since 2.0.0
|
|
1757
|
+
* @category mapping
|
|
1758
|
+
*/
|
|
1325
1759
|
<OutElem, OutElem1, OutErr1, Env1>(
|
|
1326
1760
|
f: (o: OutElem) => Effect.Effect<OutElem1, OutErr1, Env1>,
|
|
1327
1761
|
n: number
|
|
1328
1762
|
): <InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
1329
1763
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1330
1764
|
) => Channel<OutElem1, InElem, OutErr1 | OutErr, InErr, OutDone, InDone, Env1 | Env>
|
|
1765
|
+
/**
|
|
1766
|
+
* Creates a channel that is like this channel but the given ZIO function gets
|
|
1767
|
+
* applied to each emitted output element, taking `n` elements at once and
|
|
1768
|
+
* mapping them in parallel.
|
|
1769
|
+
*
|
|
1770
|
+
* @since 2.0.0
|
|
1771
|
+
* @category mapping
|
|
1772
|
+
*/
|
|
1331
1773
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, OutErr1, Env1>(
|
|
1332
1774
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1333
1775
|
f: (o: OutElem) => Effect.Effect<OutElem1, OutErr1, Env1>,
|
|
@@ -1442,6 +1884,17 @@ export const mergeAllWith: (
|
|
|
1442
1884
|
* @category mapping
|
|
1443
1885
|
*/
|
|
1444
1886
|
export const mergeMap: {
|
|
1887
|
+
/**
|
|
1888
|
+
* Returns a new channel which creates a new channel for each emitted element
|
|
1889
|
+
* and merges some of them together. Different merge strategies control what
|
|
1890
|
+
* happens if there are more than the given maximum number of channels gets
|
|
1891
|
+
* created. See `Channel.mergeAll`.
|
|
1892
|
+
*
|
|
1893
|
+
* @param n The maximum number of channels to merge.
|
|
1894
|
+
* @param f The function that creates a new channel from each emitted element.
|
|
1895
|
+
* @since 2.0.0
|
|
1896
|
+
* @category mapping
|
|
1897
|
+
*/
|
|
1445
1898
|
<OutElem, OutElem1, InElem1, OutErr1, InErr1, Z, InDone1, Env1>(
|
|
1446
1899
|
f: (outElem: OutElem) => Channel<OutElem1, InElem1, OutErr1, InErr1, Z, InDone1, Env1>,
|
|
1447
1900
|
options: {
|
|
@@ -1452,6 +1905,17 @@ export const mergeMap: {
|
|
|
1452
1905
|
): <InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
1453
1906
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1454
1907
|
) => Channel<OutElem1, InElem & InElem1, OutErr1 | OutErr, InErr & InErr1, unknown, InDone & InDone1, Env1 | Env>
|
|
1908
|
+
/**
|
|
1909
|
+
* Returns a new channel which creates a new channel for each emitted element
|
|
1910
|
+
* and merges some of them together. Different merge strategies control what
|
|
1911
|
+
* happens if there are more than the given maximum number of channels gets
|
|
1912
|
+
* created. See `Channel.mergeAll`.
|
|
1913
|
+
*
|
|
1914
|
+
* @param n The maximum number of channels to merge.
|
|
1915
|
+
* @param f The function that creates a new channel from each emitted element.
|
|
1916
|
+
* @since 2.0.0
|
|
1917
|
+
* @category mapping
|
|
1918
|
+
*/
|
|
1455
1919
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, InElem1, OutErr1, InErr1, Z, InDone1, Env1>(
|
|
1456
1920
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1457
1921
|
f: (outElem: OutElem) => Channel<OutElem1, InElem1, OutErr1, InErr1, Z, InDone1, Env1>,
|
|
@@ -1471,9 +1935,14 @@ export const mergeMap: {
|
|
|
1471
1935
|
* @category utils
|
|
1472
1936
|
*/
|
|
1473
1937
|
export const mergeOut: {
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1938
|
+
/**
|
|
1939
|
+
* Returns a new channel which merges a number of channels emitted by this
|
|
1940
|
+
* channel using the back pressuring merge strategy. See `Channel.mergeAll`.
|
|
1941
|
+
*
|
|
1942
|
+
* @since 2.0.0
|
|
1943
|
+
* @category utils
|
|
1944
|
+
*/
|
|
1945
|
+
(n: number): <OutElem1, InElem1, OutErr1, InErr1, Z, InDone1, Env1, InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
1477
1946
|
self: Channel<
|
|
1478
1947
|
Channel<OutElem1, InElem1, OutErr1, InErr1, Z, InDone1, Env1>,
|
|
1479
1948
|
InElem,
|
|
@@ -1484,6 +1953,13 @@ export const mergeOut: {
|
|
|
1484
1953
|
Env
|
|
1485
1954
|
>
|
|
1486
1955
|
) => Channel<OutElem1, InElem & InElem1, OutErr1 | OutErr, InErr & InErr1, unknown, InDone & InDone1, Env1 | Env>
|
|
1956
|
+
/**
|
|
1957
|
+
* Returns a new channel which merges a number of channels emitted by this
|
|
1958
|
+
* channel using the back pressuring merge strategy. See `Channel.mergeAll`.
|
|
1959
|
+
*
|
|
1960
|
+
* @since 2.0.0
|
|
1961
|
+
* @category utils
|
|
1962
|
+
*/
|
|
1487
1963
|
<OutElem1, InElem1, OutErr1, InErr1, Z, InDone1, Env1, InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
1488
1964
|
self: Channel<
|
|
1489
1965
|
Channel<OutElem1, InElem1, OutErr1, InErr1, Z, InDone1, Env1>,
|
|
@@ -1508,6 +1984,15 @@ export const mergeOut: {
|
|
|
1508
1984
|
* @category utils
|
|
1509
1985
|
*/
|
|
1510
1986
|
export const mergeOutWith: {
|
|
1987
|
+
/**
|
|
1988
|
+
* Returns a new channel which merges a number of channels emitted by this
|
|
1989
|
+
* channel using the back pressuring merge strategy and uses a given function
|
|
1990
|
+
* to merge each completed subchannel's result value. See
|
|
1991
|
+
* `Channel.mergeAll`.
|
|
1992
|
+
*
|
|
1993
|
+
* @since 2.0.0
|
|
1994
|
+
* @category utils
|
|
1995
|
+
*/
|
|
1511
1996
|
<OutDone1>(
|
|
1512
1997
|
n: number,
|
|
1513
1998
|
f: (o1: OutDone1, o2: OutDone1) => OutDone1
|
|
@@ -1522,6 +2007,15 @@ export const mergeOutWith: {
|
|
|
1522
2007
|
Env
|
|
1523
2008
|
>
|
|
1524
2009
|
) => Channel<OutElem1, InElem & InElem1, OutErr1 | OutErr, InErr & InErr1, OutDone1, InDone & InDone1, Env1 | Env>
|
|
2010
|
+
/**
|
|
2011
|
+
* Returns a new channel which merges a number of channels emitted by this
|
|
2012
|
+
* channel using the back pressuring merge strategy and uses a given function
|
|
2013
|
+
* to merge each completed subchannel's result value. See
|
|
2014
|
+
* `Channel.mergeAll`.
|
|
2015
|
+
*
|
|
2016
|
+
* @since 2.0.0
|
|
2017
|
+
* @category utils
|
|
2018
|
+
*/
|
|
1525
2019
|
<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1, InElem, OutErr, InErr, InDone, Env>(
|
|
1526
2020
|
self: Channel<
|
|
1527
2021
|
Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>,
|
|
@@ -1547,6 +2041,15 @@ export const mergeOutWith: {
|
|
|
1547
2041
|
* @category utils
|
|
1548
2042
|
*/
|
|
1549
2043
|
export const mergeWith: {
|
|
2044
|
+
/**
|
|
2045
|
+
* Returns a new channel, which is the merge of this channel and the specified
|
|
2046
|
+
* channel, where the behavior of the returned channel on left or right early
|
|
2047
|
+
* termination is decided by the specified `leftDone` and `rightDone` merge
|
|
2048
|
+
* decisions.
|
|
2049
|
+
*
|
|
2050
|
+
* @since 2.0.0
|
|
2051
|
+
* @category utils
|
|
2052
|
+
*/
|
|
1550
2053
|
<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1, OutDone, OutErr, OutErr2, OutDone2, OutErr3, OutDone3>(
|
|
1551
2054
|
options: {
|
|
1552
2055
|
readonly other: Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>
|
|
@@ -1568,6 +2071,15 @@ export const mergeWith: {
|
|
|
1568
2071
|
InDone & InDone1,
|
|
1569
2072
|
Env1 | Env
|
|
1570
2073
|
>
|
|
2074
|
+
/**
|
|
2075
|
+
* Returns a new channel, which is the merge of this channel and the specified
|
|
2076
|
+
* channel, where the behavior of the returned channel on left or right early
|
|
2077
|
+
* termination is decided by the specified `leftDone` and `rightDone` merge
|
|
2078
|
+
* decisions.
|
|
2079
|
+
*
|
|
2080
|
+
* @since 2.0.0
|
|
2081
|
+
* @category utils
|
|
2082
|
+
*/
|
|
1571
2083
|
<
|
|
1572
2084
|
OutElem,
|
|
1573
2085
|
InElem,
|
|
@@ -1625,11 +2137,23 @@ export const never: Channel<never, unknown, never, unknown, never, unknown> = ch
|
|
|
1625
2137
|
* @category error handling
|
|
1626
2138
|
*/
|
|
1627
2139
|
export const orDie: {
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
2140
|
+
/**
|
|
2141
|
+
* Translates channel failure into death of the fiber, making all failures
|
|
2142
|
+
* unchecked and not a part of the type of the channel.
|
|
2143
|
+
*
|
|
2144
|
+
* @since 2.0.0
|
|
2145
|
+
* @category error handling
|
|
2146
|
+
*/
|
|
2147
|
+
<E>(error: LazyArg<E>): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
1631
2148
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1632
2149
|
) => Channel<OutElem, InElem, never, InErr, OutDone, InDone, Env>
|
|
2150
|
+
/**
|
|
2151
|
+
* Translates channel failure into death of the fiber, making all failures
|
|
2152
|
+
* unchecked and not a part of the type of the channel.
|
|
2153
|
+
*
|
|
2154
|
+
* @since 2.0.0
|
|
2155
|
+
* @category error handling
|
|
2156
|
+
*/
|
|
1633
2157
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, E>(
|
|
1634
2158
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1635
2159
|
error: LazyArg<E>
|
|
@@ -1644,11 +2168,23 @@ export const orDie: {
|
|
|
1644
2168
|
* @category error handling
|
|
1645
2169
|
*/
|
|
1646
2170
|
export const orDieWith: {
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
2171
|
+
/**
|
|
2172
|
+
* Keeps none of the errors, and terminates the fiber with them, using the
|
|
2173
|
+
* specified function to convert the `OutErr` into a defect.
|
|
2174
|
+
*
|
|
2175
|
+
* @since 2.0.0
|
|
2176
|
+
* @category error handling
|
|
2177
|
+
*/
|
|
2178
|
+
<OutErr>(f: (e: OutErr) => unknown): <OutElem, InElem, InErr, OutDone, InDone, Env>(
|
|
1650
2179
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1651
2180
|
) => Channel<OutElem, InElem, never, InErr, OutDone, InDone, Env>
|
|
2181
|
+
/**
|
|
2182
|
+
* Keeps none of the errors, and terminates the fiber with them, using the
|
|
2183
|
+
* specified function to convert the `OutErr` into a defect.
|
|
2184
|
+
*
|
|
2185
|
+
* @since 2.0.0
|
|
2186
|
+
* @category error handling
|
|
2187
|
+
*/
|
|
1652
2188
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
1653
2189
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1654
2190
|
f: (e: OutErr) => unknown
|
|
@@ -1664,6 +2200,14 @@ export const orDieWith: {
|
|
|
1664
2200
|
* @category error handling
|
|
1665
2201
|
*/
|
|
1666
2202
|
export const orElse: {
|
|
2203
|
+
/**
|
|
2204
|
+
* Returns a new channel that will perform the operations of this one, until
|
|
2205
|
+
* failure, and then it will switch over to the operations of the specified
|
|
2206
|
+
* fallback channel.
|
|
2207
|
+
*
|
|
2208
|
+
* @since 2.0.0
|
|
2209
|
+
* @category error handling
|
|
2210
|
+
*/
|
|
1667
2211
|
<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
|
|
1668
2212
|
that: LazyArg<Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>>
|
|
1669
2213
|
): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
@@ -1677,6 +2221,14 @@ export const orElse: {
|
|
|
1677
2221
|
InDone & InDone1,
|
|
1678
2222
|
Env1 | Env
|
|
1679
2223
|
>
|
|
2224
|
+
/**
|
|
2225
|
+
* Returns a new channel that will perform the operations of this one, until
|
|
2226
|
+
* failure, and then it will switch over to the operations of the specified
|
|
2227
|
+
* fallback channel.
|
|
2228
|
+
*
|
|
2229
|
+
* @since 2.0.0
|
|
2230
|
+
* @category error handling
|
|
2231
|
+
*/
|
|
1680
2232
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
|
|
1681
2233
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1682
2234
|
that: LazyArg<Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>>
|
|
@@ -1701,11 +2253,29 @@ export const orElse: {
|
|
|
1701
2253
|
* @category utils
|
|
1702
2254
|
*/
|
|
1703
2255
|
export const pipeTo: {
|
|
2256
|
+
/**
|
|
2257
|
+
* Returns a new channel that pipes the output of this channel into the
|
|
2258
|
+
* specified channel. The returned channel has the input type of this channel,
|
|
2259
|
+
* and the output type of the specified channel, terminating with the value of
|
|
2260
|
+
* the specified channel.
|
|
2261
|
+
*
|
|
2262
|
+
* @since 2.0.0
|
|
2263
|
+
* @category utils
|
|
2264
|
+
*/
|
|
1704
2265
|
<OutElem2, OutElem, OutErr2, OutErr, OutDone2, OutDone, Env2>(
|
|
1705
2266
|
that: Channel<OutElem2, OutElem, OutErr2, OutErr, OutDone2, OutDone, Env2>
|
|
1706
2267
|
): <InElem, InErr, InDone, Env>(
|
|
1707
2268
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1708
2269
|
) => Channel<OutElem2, InElem, OutErr2, InErr, OutDone2, InDone, Env2 | Env>
|
|
2270
|
+
/**
|
|
2271
|
+
* Returns a new channel that pipes the output of this channel into the
|
|
2272
|
+
* specified channel. The returned channel has the input type of this channel,
|
|
2273
|
+
* and the output type of the specified channel, terminating with the value of
|
|
2274
|
+
* the specified channel.
|
|
2275
|
+
*
|
|
2276
|
+
* @since 2.0.0
|
|
2277
|
+
* @category utils
|
|
2278
|
+
*/
|
|
1709
2279
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem2, OutErr2, OutDone2, Env2>(
|
|
1710
2280
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1711
2281
|
that: Channel<OutElem2, OutElem, OutErr2, OutErr, OutDone2, OutDone, Env2>
|
|
@@ -1721,11 +2291,27 @@ export const pipeTo: {
|
|
|
1721
2291
|
* @category utils
|
|
1722
2292
|
*/
|
|
1723
2293
|
export const pipeToOrFail: {
|
|
2294
|
+
/**
|
|
2295
|
+
* Returns a new channel that pipes the output of this channel into the
|
|
2296
|
+
* specified channel and preserves this channel's failures without providing
|
|
2297
|
+
* them to the other channel for observation.
|
|
2298
|
+
*
|
|
2299
|
+
* @since 2.0.0
|
|
2300
|
+
* @category utils
|
|
2301
|
+
*/
|
|
1724
2302
|
<OutElem2, OutElem, OutErr2, OutDone2, OutDone, Env2>(
|
|
1725
2303
|
that: Channel<OutElem2, OutElem, OutErr2, never, OutDone2, OutDone, Env2>
|
|
1726
2304
|
): <InElem, OutErr, InErr, InDone, Env>(
|
|
1727
2305
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1728
2306
|
) => Channel<OutElem2, InElem, OutErr2 | OutErr, InErr, OutDone2, InDone, Env2 | Env>
|
|
2307
|
+
/**
|
|
2308
|
+
* Returns a new channel that pipes the output of this channel into the
|
|
2309
|
+
* specified channel and preserves this channel's failures without providing
|
|
2310
|
+
* them to the other channel for observation.
|
|
2311
|
+
*
|
|
2312
|
+
* @since 2.0.0
|
|
2313
|
+
* @category utils
|
|
2314
|
+
*/
|
|
1729
2315
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem2, OutErr2, OutDone2, Env2>(
|
|
1730
2316
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1731
2317
|
that: Channel<OutElem2, OutElem, OutErr2, never, OutDone2, OutDone, Env2>
|
|
@@ -1740,11 +2326,23 @@ export const pipeToOrFail: {
|
|
|
1740
2326
|
* @category context
|
|
1741
2327
|
*/
|
|
1742
2328
|
export const provideContext: {
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
2329
|
+
/**
|
|
2330
|
+
* Provides the channel with its required context, which eliminates its
|
|
2331
|
+
* dependency on `Env`.
|
|
2332
|
+
*
|
|
2333
|
+
* @since 2.0.0
|
|
2334
|
+
* @category context
|
|
2335
|
+
*/
|
|
2336
|
+
<Env>(env: Context.Context<Env>): <OutElem, InElem, OutErr, InErr, OutDone, InDone>(
|
|
1746
2337
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1747
2338
|
) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, never>
|
|
2339
|
+
/**
|
|
2340
|
+
* Provides the channel with its required context, which eliminates its
|
|
2341
|
+
* dependency on `Env`.
|
|
2342
|
+
*
|
|
2343
|
+
* @since 2.0.0
|
|
2344
|
+
* @category context
|
|
2345
|
+
*/
|
|
1748
2346
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
1749
2347
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1750
2348
|
env: Context.Context<Env>
|
|
@@ -1758,11 +2356,21 @@ export const provideContext: {
|
|
|
1758
2356
|
* @category context
|
|
1759
2357
|
*/
|
|
1760
2358
|
export const provideLayer: {
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
2359
|
+
/**
|
|
2360
|
+
* Provides a layer to the channel, which translates it to another level.
|
|
2361
|
+
*
|
|
2362
|
+
* @since 2.0.0
|
|
2363
|
+
* @category context
|
|
2364
|
+
*/
|
|
2365
|
+
<Env, OutErr2, Env0>(layer: Layer.Layer<Env, OutErr2, Env0>): <OutElem, InElem, OutErr, InErr, OutDone, InDone>(
|
|
1764
2366
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1765
2367
|
) => Channel<OutElem, InElem, OutErr2 | OutErr, InErr, OutDone, InDone, Env0>
|
|
2368
|
+
/**
|
|
2369
|
+
* Provides a layer to the channel, which translates it to another level.
|
|
2370
|
+
*
|
|
2371
|
+
* @since 2.0.0
|
|
2372
|
+
* @category context
|
|
2373
|
+
*/
|
|
1766
2374
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutErr2, Env0>(
|
|
1767
2375
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1768
2376
|
layer: Layer.Layer<Env, OutErr2, Env0>
|
|
@@ -1777,11 +2385,25 @@ export const provideLayer: {
|
|
|
1777
2385
|
* @category context
|
|
1778
2386
|
*/
|
|
1779
2387
|
export const mapInputContext: {
|
|
2388
|
+
/**
|
|
2389
|
+
* Transforms the context being provided to the channel with the specified
|
|
2390
|
+
* function.
|
|
2391
|
+
*
|
|
2392
|
+
* @since 2.0.0
|
|
2393
|
+
* @category context
|
|
2394
|
+
*/
|
|
1780
2395
|
<Env0, Env>(
|
|
1781
2396
|
f: (env: Context.Context<Env0>) => Context.Context<Env>
|
|
1782
2397
|
): <OutElem, InElem, OutErr, InErr, OutDone, InDone>(
|
|
1783
2398
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1784
2399
|
) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env0>
|
|
2400
|
+
/**
|
|
2401
|
+
* Transforms the context being provided to the channel with the specified
|
|
2402
|
+
* function.
|
|
2403
|
+
*
|
|
2404
|
+
* @since 2.0.0
|
|
2405
|
+
* @category context
|
|
2406
|
+
*/
|
|
1785
2407
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, Env0>(
|
|
1786
2408
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1787
2409
|
f: (env: Context.Context<Env0>) => Context.Context<Env>
|
|
@@ -1796,11 +2418,23 @@ export const mapInputContext: {
|
|
|
1796
2418
|
* @category context
|
|
1797
2419
|
*/
|
|
1798
2420
|
export const provideSomeLayer: {
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
2421
|
+
/**
|
|
2422
|
+
* Splits the context into two parts, providing one part using the
|
|
2423
|
+
* specified layer and leaving the remainder `Env0`.
|
|
2424
|
+
*
|
|
2425
|
+
* @since 2.0.0
|
|
2426
|
+
* @category context
|
|
2427
|
+
*/
|
|
2428
|
+
<R2, OutErr2, Env0>(layer: Layer.Layer<R2, OutErr2, Env0>): <OutElem, InElem, OutErr, InErr, OutDone, InDone, R>(
|
|
1802
2429
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, R>
|
|
1803
2430
|
) => Channel<OutElem, InElem, OutErr2 | OutErr, InErr, OutDone, InDone, Env0 | Exclude<R, R2>>
|
|
2431
|
+
/**
|
|
2432
|
+
* Splits the context into two parts, providing one part using the
|
|
2433
|
+
* specified layer and leaving the remainder `Env0`.
|
|
2434
|
+
*
|
|
2435
|
+
* @since 2.0.0
|
|
2436
|
+
* @category context
|
|
2437
|
+
*/
|
|
1804
2438
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, R, R2, OutErr2, Env0>(
|
|
1805
2439
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, R>,
|
|
1806
2440
|
layer: Layer.Layer<R2, OutErr2, Env0>
|
|
@@ -1815,12 +2449,26 @@ export const provideSomeLayer: {
|
|
|
1815
2449
|
* @category context
|
|
1816
2450
|
*/
|
|
1817
2451
|
export const provideService: {
|
|
2452
|
+
/**
|
|
2453
|
+
* Provides the effect with the single service it requires. If the effect
|
|
2454
|
+
* requires more than one service use `provideContext` instead.
|
|
2455
|
+
*
|
|
2456
|
+
* @since 2.0.0
|
|
2457
|
+
* @category context
|
|
2458
|
+
*/
|
|
1818
2459
|
<T extends Context.Tag<any, any>>(
|
|
1819
2460
|
tag: T,
|
|
1820
2461
|
service: Context.Tag.Service<T>
|
|
1821
2462
|
): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
1822
2463
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
1823
2464
|
) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Exclude<Env, Context.Tag.Identifier<T>>>
|
|
2465
|
+
/**
|
|
2466
|
+
* Provides the effect with the single service it requires. If the effect
|
|
2467
|
+
* requires more than one service use `provideContext` instead.
|
|
2468
|
+
*
|
|
2469
|
+
* @since 2.0.0
|
|
2470
|
+
* @category context
|
|
2471
|
+
*/
|
|
1824
2472
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, T extends Context.Tag<any, any>>(
|
|
1825
2473
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
1826
2474
|
tag: T,
|
|
@@ -2099,12 +2747,24 @@ export const unwrapScoped: <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env
|
|
|
2099
2747
|
* @category context
|
|
2100
2748
|
*/
|
|
2101
2749
|
export const updateService: {
|
|
2750
|
+
/**
|
|
2751
|
+
* Updates a service in the context of this channel.
|
|
2752
|
+
*
|
|
2753
|
+
* @since 2.0.0
|
|
2754
|
+
* @category context
|
|
2755
|
+
*/
|
|
2102
2756
|
<T extends Context.Tag<any, any>>(
|
|
2103
2757
|
tag: T,
|
|
2104
2758
|
f: (resource: Context.Tag.Service<T>) => Context.Tag.Service<T>
|
|
2105
2759
|
): <OutElem, OutErr, InErr, OutDone, InDone, R>(
|
|
2106
2760
|
self: Channel<OutElem, unknown, OutErr, InErr, OutDone, InDone, R>
|
|
2107
2761
|
) => Channel<OutElem, unknown, OutErr, InErr, OutDone, InDone, T | R>
|
|
2762
|
+
/**
|
|
2763
|
+
* Updates a service in the context of this channel.
|
|
2764
|
+
*
|
|
2765
|
+
* @since 2.0.0
|
|
2766
|
+
* @category context
|
|
2767
|
+
*/
|
|
2108
2768
|
<OutElem, OutErr, InErr, OutDone, InDone, R, T extends Context.Tag<any, any>>(
|
|
2109
2769
|
self: Channel<OutElem, unknown, OutErr, InErr, OutDone, InDone, R>,
|
|
2110
2770
|
tag: T,
|
|
@@ -2119,12 +2779,21 @@ export const updateService: {
|
|
|
2119
2779
|
* @category tracing
|
|
2120
2780
|
*/
|
|
2121
2781
|
export const withSpan: {
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2782
|
+
/**
|
|
2783
|
+
* Wraps the channel with a new span for tracing.
|
|
2784
|
+
*
|
|
2785
|
+
* @since 2.0.0
|
|
2786
|
+
* @category tracing
|
|
2787
|
+
*/
|
|
2788
|
+
(name: string, options?: Tracer.SpanOptions | undefined): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
2126
2789
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
|
|
2127
2790
|
) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Exclude<Env, Tracer.ParentSpan>>
|
|
2791
|
+
/**
|
|
2792
|
+
* Wraps the channel with a new span for tracing.
|
|
2793
|
+
*
|
|
2794
|
+
* @since 2.0.0
|
|
2795
|
+
* @category tracing
|
|
2796
|
+
*/
|
|
2128
2797
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
|
|
2129
2798
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
2130
2799
|
name: string,
|
|
@@ -2169,6 +2838,14 @@ export const writeChunk: <OutElem>(
|
|
|
2169
2838
|
* @category zipping
|
|
2170
2839
|
*/
|
|
2171
2840
|
export const zip: {
|
|
2841
|
+
/**
|
|
2842
|
+
* Returns a new channel that is the sequential composition of this channel
|
|
2843
|
+
* and the specified channel. The returned channel terminates with a tuple of
|
|
2844
|
+
* the terminal values of both channels.
|
|
2845
|
+
*
|
|
2846
|
+
* @since 2.0.0
|
|
2847
|
+
* @category zipping
|
|
2848
|
+
*/
|
|
2172
2849
|
<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
|
|
2173
2850
|
that: Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>,
|
|
2174
2851
|
options?: { readonly concurrent?: boolean | undefined } | undefined
|
|
@@ -2183,6 +2860,14 @@ export const zip: {
|
|
|
2183
2860
|
InDone & InDone1,
|
|
2184
2861
|
Env1 | Env
|
|
2185
2862
|
>
|
|
2863
|
+
/**
|
|
2864
|
+
* Returns a new channel that is the sequential composition of this channel
|
|
2865
|
+
* and the specified channel. The returned channel terminates with a tuple of
|
|
2866
|
+
* the terminal values of both channels.
|
|
2867
|
+
*
|
|
2868
|
+
* @since 2.0.0
|
|
2869
|
+
* @category zipping
|
|
2870
|
+
*/
|
|
2186
2871
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
|
|
2187
2872
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
2188
2873
|
that: Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>,
|
|
@@ -2207,6 +2892,14 @@ export const zip: {
|
|
|
2207
2892
|
* @category zipping
|
|
2208
2893
|
*/
|
|
2209
2894
|
export const zipLeft: {
|
|
2895
|
+
/**
|
|
2896
|
+
* Returns a new channel that is the sequential composition of this channel
|
|
2897
|
+
* and the specified channel. The returned channel terminates with the
|
|
2898
|
+
* terminal value of this channel.
|
|
2899
|
+
*
|
|
2900
|
+
* @since 2.0.0
|
|
2901
|
+
* @category zipping
|
|
2902
|
+
*/
|
|
2210
2903
|
<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
|
|
2211
2904
|
that: Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>,
|
|
2212
2905
|
options?: { readonly concurrent?: boolean | undefined } | undefined
|
|
@@ -2221,6 +2914,14 @@ export const zipLeft: {
|
|
|
2221
2914
|
InDone & InDone1,
|
|
2222
2915
|
Env1 | Env
|
|
2223
2916
|
>
|
|
2917
|
+
/**
|
|
2918
|
+
* Returns a new channel that is the sequential composition of this channel
|
|
2919
|
+
* and the specified channel. The returned channel terminates with the
|
|
2920
|
+
* terminal value of this channel.
|
|
2921
|
+
*
|
|
2922
|
+
* @since 2.0.0
|
|
2923
|
+
* @category zipping
|
|
2924
|
+
*/
|
|
2224
2925
|
<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>(
|
|
2225
2926
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
2226
2927
|
that: Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>,
|
|
@@ -2245,6 +2946,14 @@ export const zipLeft: {
|
|
|
2245
2946
|
* @category zipping
|
|
2246
2947
|
*/
|
|
2247
2948
|
export const zipRight: {
|
|
2949
|
+
/**
|
|
2950
|
+
* Returns a new channel that is the sequential composition of this channel
|
|
2951
|
+
* and the specified channel. The returned channel terminates with the
|
|
2952
|
+
* terminal value of that channel.
|
|
2953
|
+
*
|
|
2954
|
+
* @since 2.0.0
|
|
2955
|
+
* @category zipping
|
|
2956
|
+
*/
|
|
2248
2957
|
<Env1, InErr1, InElem1, InDone1, OutErr1, OutElem1, OutDone1>(
|
|
2249
2958
|
that: Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>,
|
|
2250
2959
|
options?: {
|
|
@@ -2261,6 +2970,14 @@ export const zipRight: {
|
|
|
2261
2970
|
InDone & InDone1,
|
|
2262
2971
|
Env1 | Env
|
|
2263
2972
|
>
|
|
2973
|
+
/**
|
|
2974
|
+
* Returns a new channel that is the sequential composition of this channel
|
|
2975
|
+
* and the specified channel. The returned channel terminates with the
|
|
2976
|
+
* terminal value of that channel.
|
|
2977
|
+
*
|
|
2978
|
+
* @since 2.0.0
|
|
2979
|
+
* @category zipping
|
|
2980
|
+
*/
|
|
2264
2981
|
<Env, InErr, InElem, InDone, OutErr, OutElem, OutDone, Env1, InErr1, InElem1, InDone1, OutErr1, OutElem1, OutDone1>(
|
|
2265
2982
|
self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
|
|
2266
2983
|
that: Channel<OutElem1, InElem1, OutErr1, InErr1, OutDone1, InDone1, Env1>,
|