effect 2.2.5 → 2.3.1
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/RateLimiter/package.json +6 -0
- package/dist/cjs/Cause.js +14 -1
- package/dist/cjs/Cause.js.map +1 -1
- package/dist/cjs/Channel.js.map +1 -1
- package/dist/cjs/Clock.js.map +1 -1
- package/dist/cjs/Console.js.map +1 -1
- package/dist/cjs/Context.js +23 -25
- package/dist/cjs/Context.js.map +1 -1
- package/dist/cjs/Data.js +3 -3
- package/dist/cjs/Data.js.map +1 -1
- package/dist/cjs/Deferred.js +1 -1
- package/dist/cjs/Deferred.js.map +1 -1
- package/dist/cjs/Effect.js +9 -9
- package/dist/cjs/Effect.js.map +1 -1
- package/dist/cjs/Effectable.js.map +1 -1
- package/dist/cjs/Either.js.map +1 -1
- package/dist/cjs/Exit.js +2 -2
- package/dist/cjs/Exit.js.map +1 -1
- package/dist/cjs/Fiber.js.map +1 -1
- package/dist/cjs/FiberMap.js +3 -3
- package/dist/cjs/FiberRef.js.map +1 -1
- package/dist/cjs/FiberRefs.js.map +1 -1
- package/dist/cjs/FiberSet.js +3 -3
- package/dist/cjs/FiberSet.js.map +1 -1
- package/dist/cjs/GroupBy.js.map +1 -1
- package/dist/cjs/Layer.js.map +1 -1
- package/dist/cjs/LogLevel.js.map +1 -1
- package/dist/cjs/Logger.js.map +1 -1
- package/dist/cjs/Metric.js.map +1 -1
- package/dist/cjs/Number.js +20 -1
- package/dist/cjs/Number.js.map +1 -1
- package/dist/cjs/Option.js.map +1 -1
- package/dist/cjs/Pool.js.map +1 -1
- package/dist/cjs/PubSub.js.map +1 -1
- package/dist/cjs/Queue.js.map +1 -1
- package/dist/cjs/Random.js.map +1 -1
- package/dist/cjs/RateLimiter.js +38 -0
- package/dist/cjs/RateLimiter.js.map +1 -0
- package/dist/cjs/ReadonlyRecord.js +45 -9
- package/dist/cjs/ReadonlyRecord.js.map +1 -1
- package/dist/cjs/Ref.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 +1 -4
- package/dist/cjs/Runtime.js.map +1 -1
- package/dist/cjs/RuntimeFlags.js.map +1 -1
- package/dist/cjs/STM.js.map +1 -1
- package/dist/cjs/Schedule.js.map +1 -1
- package/dist/cjs/Scope.js.map +1 -1
- package/dist/cjs/ScopedRef.js.map +1 -1
- package/dist/cjs/SingleProducerAsyncInput.js.map +1 -1
- package/dist/cjs/Sink.js.map +1 -1
- package/dist/cjs/Stream.js.map +1 -1
- package/dist/cjs/SubscriptionRef.js.map +1 -1
- package/dist/cjs/Supervisor.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/TRandom.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 +6 -6
- package/dist/cjs/Take.js.map +1 -1
- package/dist/cjs/TestAnnotation.js +10 -13
- package/dist/cjs/TestAnnotation.js.map +1 -1
- package/dist/cjs/TestAnnotations.js +1 -1
- package/dist/cjs/TestAnnotations.js.map +1 -1
- package/dist/cjs/TestClock.js +1 -1
- package/dist/cjs/TestClock.js.map +1 -1
- package/dist/cjs/TestConfig.js +1 -1
- package/dist/cjs/TestConfig.js.map +1 -1
- package/dist/cjs/TestContext.js.map +1 -1
- package/dist/cjs/TestLive.js +1 -1
- package/dist/cjs/TestLive.js.map +1 -1
- package/dist/cjs/TestServices.js.map +1 -1
- package/dist/cjs/TestSized.js +1 -1
- package/dist/cjs/TestSized.js.map +1 -1
- package/dist/cjs/Utils.js +0 -1
- package/dist/cjs/Utils.js.map +1 -1
- package/dist/cjs/index.js +4 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/internal/cache.js.map +1 -1
- package/dist/cjs/internal/channel/channelExecutor.js.map +1 -1
- package/dist/cjs/internal/channel/mergeDecision.js +2 -6
- package/dist/cjs/internal/channel/mergeDecision.js.map +1 -1
- package/dist/cjs/internal/channel/singleProducerAsyncInput.js.map +1 -1
- package/dist/cjs/internal/channel.js +1 -1
- package/dist/cjs/internal/channel.js.map +1 -1
- package/dist/cjs/internal/clock.js +1 -1
- package/dist/cjs/internal/clock.js.map +1 -1
- package/dist/cjs/internal/configProvider.js +2 -4
- package/dist/cjs/internal/configProvider.js.map +1 -1
- package/dist/cjs/internal/console.js.map +1 -1
- package/dist/cjs/internal/context.js +31 -22
- package/dist/cjs/internal/context.js.map +1 -1
- package/dist/cjs/internal/core-effect.js +13 -27
- package/dist/cjs/internal/core-effect.js.map +1 -1
- package/dist/cjs/internal/core-stream.js.map +1 -1
- package/dist/cjs/internal/core.js +61 -130
- package/dist/cjs/internal/core.js.map +1 -1
- package/dist/cjs/internal/data.js.map +1 -1
- package/dist/cjs/internal/defaultServices/console.js +1 -1
- package/dist/cjs/internal/defaultServices/console.js.map +1 -1
- package/dist/cjs/internal/defaultServices.js.map +1 -1
- package/dist/cjs/internal/deferred.js.map +1 -1
- package/dist/cjs/internal/differ/contextPatch.js +9 -9
- package/dist/cjs/internal/differ/contextPatch.js.map +1 -1
- package/dist/cjs/internal/effect/circular.js +7 -10
- package/dist/cjs/internal/effect/circular.js.map +1 -1
- package/dist/cjs/internal/effectable.js +4 -4
- package/dist/cjs/internal/effectable.js.map +1 -1
- package/dist/cjs/internal/fiber.js +2 -6
- package/dist/cjs/internal/fiber.js.map +1 -1
- package/dist/cjs/internal/fiberRuntime.js +10 -19
- package/dist/cjs/internal/fiberRuntime.js.map +1 -1
- package/dist/cjs/internal/groupBy.js.map +1 -1
- package/dist/cjs/internal/keyedPool.js.map +1 -1
- package/dist/cjs/internal/layer/circular.js.map +1 -1
- package/dist/cjs/internal/layer.js +3 -3
- package/dist/cjs/internal/layer.js.map +1 -1
- package/dist/cjs/internal/logSpan.js +3 -5
- package/dist/cjs/internal/logSpan.js.map +1 -1
- package/dist/cjs/internal/metric.js.map +1 -1
- package/dist/cjs/internal/pool.js.map +1 -1
- package/dist/cjs/internal/pubsub.js +2 -6
- package/dist/cjs/internal/pubsub.js.map +1 -1
- package/dist/cjs/internal/query.js.map +1 -1
- package/dist/cjs/internal/queue.js.map +1 -1
- package/dist/cjs/internal/random.js +1 -1
- package/dist/cjs/internal/random.js.map +1 -1
- package/dist/cjs/internal/rateLimiter.js +44 -0
- package/dist/cjs/internal/rateLimiter.js.map +1 -0
- package/dist/cjs/internal/ref.js.map +1 -1
- package/dist/cjs/internal/reloadable.js +1 -9
- package/dist/cjs/internal/reloadable.js.map +1 -1
- package/dist/cjs/internal/runtime.js +0 -1
- package/dist/cjs/internal/runtime.js.map +1 -1
- package/dist/cjs/internal/schedule.js.map +1 -1
- package/dist/cjs/internal/scopedCache.js.map +1 -1
- package/dist/cjs/internal/scopedRef.js.map +1 -1
- package/dist/cjs/internal/sink.js +7 -7
- package/dist/cjs/internal/sink.js.map +1 -1
- package/dist/cjs/internal/stm/core.js.map +1 -1
- package/dist/cjs/internal/stm/stm/stmState.js.map +1 -1
- package/dist/cjs/internal/stm/stm/tExit.js +2 -2
- package/dist/cjs/internal/stm/stm/tExit.js.map +1 -1
- package/dist/cjs/internal/stm/stm/tryCommit.js.map +1 -1
- package/dist/cjs/internal/stm/stm.js.map +1 -1
- package/dist/cjs/internal/stm/tArray.js.map +1 -1
- package/dist/cjs/internal/stm/tDeferred.js +4 -2
- package/dist/cjs/internal/stm/tDeferred.js.map +1 -1
- package/dist/cjs/internal/stm/tMap.js.map +1 -1
- package/dist/cjs/internal/stm/tPriorityQueue.js.map +1 -1
- package/dist/cjs/internal/stm/tPubSub.js.map +1 -1
- package/dist/cjs/internal/stm/tQueue.js.map +1 -1
- package/dist/cjs/internal/stm/tRandom.js +1 -1
- package/dist/cjs/internal/stm/tRandom.js.map +1 -1
- package/dist/cjs/internal/stm/tReentrantLock.js.map +1 -1
- package/dist/cjs/internal/stm/tRef.js.map +1 -1
- package/dist/cjs/internal/stm/tSemaphore.js.map +1 -1
- package/dist/cjs/internal/stm/tSet.js.map +1 -1
- package/dist/cjs/internal/stream/debounceState.js.map +1 -1
- package/dist/cjs/internal/stream/handoff.js.map +1 -1
- package/dist/cjs/internal/stream/handoffSignal.js.map +1 -1
- package/dist/cjs/internal/stream/pull.js.map +1 -1
- package/dist/cjs/internal/stream.js +0 -2
- package/dist/cjs/internal/stream.js.map +1 -1
- package/dist/cjs/internal/subscriptionRef.js.map +1 -1
- package/dist/cjs/internal/supervisor.js.map +1 -1
- package/dist/cjs/internal/take.js +2 -2
- package/dist/cjs/internal/take.js.map +1 -1
- package/dist/cjs/internal/testing/sleep.js.map +1 -1
- package/dist/cjs/internal/tracer.js +2 -2
- package/dist/cjs/internal/tracer.js.map +1 -1
- package/dist/cjs/internal/version.js +1 -1
- package/dist/dts/Cache.d.ts +20 -20
- package/dist/dts/Cache.d.ts.map +1 -1
- package/dist/dts/Cause.d.ts +33 -5
- package/dist/dts/Cause.d.ts.map +1 -1
- package/dist/dts/Channel.d.ts +197 -194
- package/dist/dts/Channel.d.ts.map +1 -1
- package/dist/dts/Clock.d.ts +7 -7
- package/dist/dts/Clock.d.ts.map +1 -1
- package/dist/dts/Config.d.ts +1 -1
- package/dist/dts/Config.d.ts.map +1 -1
- package/dist/dts/ConfigProvider.d.ts +6 -6
- package/dist/dts/ConfigProvider.d.ts.map +1 -1
- package/dist/dts/Console.d.ts +43 -43
- package/dist/dts/Console.d.ts.map +1 -1
- package/dist/dts/Context.d.ts +44 -29
- package/dist/dts/Context.d.ts.map +1 -1
- package/dist/dts/Data.d.ts +38 -57
- package/dist/dts/Data.d.ts.map +1 -1
- package/dist/dts/Deferred.d.ts +36 -36
- package/dist/dts/Deferred.d.ts.map +1 -1
- package/dist/dts/Effect.d.ts +732 -729
- package/dist/dts/Effect.d.ts.map +1 -1
- package/dist/dts/Effectable.d.ts +8 -8
- package/dist/dts/Effectable.d.ts.map +1 -1
- package/dist/dts/Either.d.ts +2 -3
- package/dist/dts/Either.d.ts.map +1 -1
- package/dist/dts/Exit.d.ts +74 -74
- package/dist/dts/Exit.d.ts.map +1 -1
- package/dist/dts/Fiber.d.ts +75 -75
- package/dist/dts/Fiber.d.ts.map +1 -1
- package/dist/dts/FiberMap.d.ts +22 -22
- package/dist/dts/FiberMap.d.ts.map +1 -1
- package/dist/dts/FiberRef.d.ts +28 -28
- package/dist/dts/FiberRef.d.ts.map +1 -1
- package/dist/dts/FiberRefs.d.ts +1 -1
- package/dist/dts/FiberRefs.d.ts.map +1 -1
- package/dist/dts/FiberSet.d.ts +16 -16
- package/dist/dts/FiberSet.d.ts.map +1 -1
- package/dist/dts/GroupBy.d.ts +6 -6
- package/dist/dts/GroupBy.d.ts.map +1 -1
- package/dist/dts/KeyedPool.d.ts +22 -22
- package/dist/dts/KeyedPool.d.ts.map +1 -1
- package/dist/dts/Layer.d.ts +126 -126
- package/dist/dts/Layer.d.ts.map +1 -1
- package/dist/dts/LogLevel.d.ts +2 -2
- package/dist/dts/LogLevel.d.ts.map +1 -1
- package/dist/dts/Logger.d.ts +14 -14
- package/dist/dts/Logger.d.ts.map +1 -1
- package/dist/dts/MergeDecision.d.ts +7 -7
- package/dist/dts/MergeState.d.ts +13 -13
- package/dist/dts/MergeState.d.ts.map +1 -1
- package/dist/dts/Metric.d.ts +32 -32
- package/dist/dts/Metric.d.ts.map +1 -1
- package/dist/dts/MetricPolling.d.ts +6 -6
- package/dist/dts/MetricPolling.d.ts.map +1 -1
- package/dist/dts/Number.d.ts +15 -0
- package/dist/dts/Number.d.ts.map +1 -1
- package/dist/dts/Option.d.ts +2 -3
- package/dist/dts/Option.d.ts.map +1 -1
- package/dist/dts/Pool.d.ts +15 -16
- package/dist/dts/Pool.d.ts.map +1 -1
- package/dist/dts/PubSub.d.ts +18 -18
- package/dist/dts/PubSub.d.ts.map +1 -1
- package/dist/dts/Queue.d.ts +40 -40
- package/dist/dts/Queue.d.ts.map +1 -1
- package/dist/dts/Random.d.ts +13 -13
- package/dist/dts/Random.d.ts.map +1 -1
- package/dist/dts/RateLimiter.d.ts +31 -0
- package/dist/dts/RateLimiter.d.ts.map +1 -0
- package/dist/dts/ReadonlyArray.d.ts +3 -3
- package/dist/dts/ReadonlyRecord.d.ts +37 -8
- package/dist/dts/ReadonlyRecord.d.ts.map +1 -1
- package/dist/dts/Ref.d.ts +25 -25
- package/dist/dts/Ref.d.ts.map +1 -1
- package/dist/dts/Reloadable.d.ts +9 -9
- package/dist/dts/Reloadable.d.ts.map +1 -1
- package/dist/dts/Request.d.ts +27 -28
- package/dist/dts/Request.d.ts.map +1 -1
- package/dist/dts/RequestBlock.d.ts +3 -3
- package/dist/dts/RequestBlock.d.ts.map +1 -1
- package/dist/dts/RequestResolver.d.ts +16 -16
- package/dist/dts/RequestResolver.d.ts.map +1 -1
- package/dist/dts/Resource.d.ts +7 -7
- package/dist/dts/Resource.d.ts.map +1 -1
- package/dist/dts/Runtime.d.ts +13 -16
- package/dist/dts/Runtime.d.ts.map +1 -1
- package/dist/dts/RuntimeFlags.d.ts +10 -10
- package/dist/dts/RuntimeFlags.d.ts.map +1 -1
- package/dist/dts/STM.d.ts +303 -303
- package/dist/dts/STM.d.ts.map +1 -1
- package/dist/dts/Schedule.d.ts +47 -47
- package/dist/dts/Schedule.d.ts.map +1 -1
- package/dist/dts/Scope.d.ts +10 -10
- package/dist/dts/Scope.d.ts.map +1 -1
- package/dist/dts/ScopedCache.d.ts +14 -14
- package/dist/dts/ScopedCache.d.ts.map +1 -1
- package/dist/dts/ScopedRef.d.ts +5 -5
- package/dist/dts/ScopedRef.d.ts.map +1 -1
- package/dist/dts/SingleProducerAsyncInput.d.ts +8 -8
- package/dist/dts/SingleProducerAsyncInput.d.ts.map +1 -1
- package/dist/dts/Sink.d.ts +214 -205
- package/dist/dts/Sink.d.ts.map +1 -1
- package/dist/dts/Stream.d.ts +595 -592
- package/dist/dts/Stream.d.ts.map +1 -1
- package/dist/dts/StreamEmit.d.ts +5 -5
- package/dist/dts/StreamEmit.d.ts.map +1 -1
- package/dist/dts/Streamable.d.ts +2 -2
- package/dist/dts/Streamable.d.ts.map +1 -1
- package/dist/dts/SubscriptionRef.d.ts +41 -41
- package/dist/dts/SubscriptionRef.d.ts.map +1 -1
- package/dist/dts/Supervisor.d.ts +17 -17
- package/dist/dts/Supervisor.d.ts.map +1 -1
- package/dist/dts/SynchronizedRef.d.ts +41 -41
- package/dist/dts/SynchronizedRef.d.ts.map +1 -1
- package/dist/dts/TArray.d.ts +72 -72
- package/dist/dts/TArray.d.ts.map +1 -1
- package/dist/dts/TDeferred.d.ts +12 -12
- package/dist/dts/TDeferred.d.ts.map +1 -1
- package/dist/dts/TMap.d.ts +67 -67
- package/dist/dts/TMap.d.ts.map +1 -1
- package/dist/dts/TPriorityQueue.d.ts +23 -23
- package/dist/dts/TPriorityQueue.d.ts.map +1 -1
- package/dist/dts/TPubSub.d.ts +15 -15
- package/dist/dts/TPubSub.d.ts.map +1 -1
- package/dist/dts/TQueue.d.ts +40 -40
- package/dist/dts/TQueue.d.ts.map +1 -1
- package/dist/dts/TRandom.d.ts +13 -13
- package/dist/dts/TRandom.d.ts.map +1 -1
- package/dist/dts/TReentrantLock.d.ts +21 -21
- package/dist/dts/TReentrantLock.d.ts.map +1 -1
- package/dist/dts/TRef.d.ts +25 -25
- package/dist/dts/TRef.d.ts.map +1 -1
- package/dist/dts/TSemaphore.d.ts +15 -15
- package/dist/dts/TSemaphore.d.ts.map +1 -1
- package/dist/dts/TSet.d.ts +49 -49
- package/dist/dts/TSet.d.ts.map +1 -1
- package/dist/dts/Take.d.ts +41 -41
- package/dist/dts/Take.d.ts.map +1 -1
- package/dist/dts/TestAnnotation.d.ts +1 -3
- package/dist/dts/TestAnnotation.d.ts.map +1 -1
- package/dist/dts/TestAnnotations.d.ts +3 -3
- package/dist/dts/TestAnnotations.d.ts.map +1 -1
- package/dist/dts/TestClock.d.ts +18 -18
- package/dist/dts/TestClock.d.ts.map +1 -1
- package/dist/dts/TestConfig.d.ts.map +1 -1
- package/dist/dts/TestContext.d.ts +2 -2
- package/dist/dts/TestContext.d.ts.map +1 -1
- package/dist/dts/TestLive.d.ts +1 -1
- package/dist/dts/TestLive.d.ts.map +1 -1
- package/dist/dts/TestServices.d.ts +31 -31
- package/dist/dts/TestServices.d.ts.map +1 -1
- package/dist/dts/TestSized.d.ts +2 -2
- package/dist/dts/TestSized.d.ts.map +1 -1
- package/dist/dts/Tracer.d.ts +1 -1
- package/dist/dts/Utils.d.ts.map +1 -1
- package/dist/dts/index.d.ts +12 -2
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/internal/channel/channelExecutor.d.ts +1 -1
- package/dist/dts/internal/channel/channelExecutor.d.ts.map +1 -1
- package/dist/dts/internal/core-stream.d.ts +1 -1
- package/dist/dts/internal/core-stream.d.ts.map +1 -1
- package/dist/dts/internal/rateLimiter.d.ts +2 -0
- package/dist/dts/internal/rateLimiter.d.ts.map +1 -0
- package/dist/dts/internal/stm/stm.d.ts +6 -6
- package/dist/dts/internal/stm/stm.d.ts.map +1 -1
- package/dist/dts/internal/version.d.ts +1 -1
- package/dist/esm/Cause.js +13 -0
- package/dist/esm/Cause.js.map +1 -1
- package/dist/esm/Channel.js.map +1 -1
- package/dist/esm/Clock.js.map +1 -1
- package/dist/esm/Console.js.map +1 -1
- package/dist/esm/Context.js +22 -24
- package/dist/esm/Context.js.map +1 -1
- package/dist/esm/Data.js +4 -5
- package/dist/esm/Data.js.map +1 -1
- package/dist/esm/Deferred.js +1 -1
- package/dist/esm/Deferred.js.map +1 -1
- package/dist/esm/Effect.js +9 -9
- package/dist/esm/Effect.js.map +1 -1
- package/dist/esm/Effectable.js.map +1 -1
- package/dist/esm/Either.js.map +1 -1
- package/dist/esm/Exit.js +2 -2
- package/dist/esm/Exit.js.map +1 -1
- package/dist/esm/Fiber.js.map +1 -1
- package/dist/esm/FiberMap.js +3 -3
- package/dist/esm/FiberRef.js.map +1 -1
- package/dist/esm/FiberRefs.js.map +1 -1
- package/dist/esm/FiberSet.js +3 -3
- package/dist/esm/FiberSet.js.map +1 -1
- package/dist/esm/GroupBy.js.map +1 -1
- package/dist/esm/Layer.js.map +1 -1
- package/dist/esm/LogLevel.js.map +1 -1
- package/dist/esm/Logger.js.map +1 -1
- package/dist/esm/Metric.js.map +1 -1
- package/dist/esm/Number.js +18 -0
- package/dist/esm/Number.js.map +1 -1
- package/dist/esm/Option.js.map +1 -1
- package/dist/esm/Pool.js.map +1 -1
- package/dist/esm/PubSub.js.map +1 -1
- package/dist/esm/Queue.js.map +1 -1
- package/dist/esm/Random.js.map +1 -1
- package/dist/esm/RateLimiter.js +7 -0
- package/dist/esm/RateLimiter.js.map +1 -0
- package/dist/esm/ReadonlyRecord.js +44 -8
- package/dist/esm/ReadonlyRecord.js.map +1 -1
- package/dist/esm/Ref.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 +1 -4
- package/dist/esm/Runtime.js.map +1 -1
- package/dist/esm/RuntimeFlags.js.map +1 -1
- package/dist/esm/STM.js.map +1 -1
- package/dist/esm/Schedule.js.map +1 -1
- package/dist/esm/Scope.js.map +1 -1
- package/dist/esm/ScopedRef.js.map +1 -1
- package/dist/esm/SingleProducerAsyncInput.js.map +1 -1
- package/dist/esm/Sink.js.map +1 -1
- package/dist/esm/Stream.js.map +1 -1
- package/dist/esm/SubscriptionRef.js.map +1 -1
- package/dist/esm/Supervisor.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/TRandom.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 +6 -6
- package/dist/esm/Take.js.map +1 -1
- package/dist/esm/TestAnnotation.js +10 -13
- package/dist/esm/TestAnnotation.js.map +1 -1
- package/dist/esm/TestAnnotations.js +1 -1
- package/dist/esm/TestAnnotations.js.map +1 -1
- package/dist/esm/TestClock.js +1 -1
- package/dist/esm/TestClock.js.map +1 -1
- package/dist/esm/TestConfig.js +1 -1
- package/dist/esm/TestConfig.js.map +1 -1
- package/dist/esm/TestContext.js.map +1 -1
- package/dist/esm/TestLive.js +1 -1
- package/dist/esm/TestLive.js.map +1 -1
- package/dist/esm/TestServices.js.map +1 -1
- package/dist/esm/TestSized.js +1 -1
- package/dist/esm/TestSized.js.map +1 -1
- package/dist/esm/Utils.js +1 -1
- package/dist/esm/Utils.js.map +1 -1
- package/dist/esm/index.js +12 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/internal/cache.js.map +1 -1
- package/dist/esm/internal/channel/channelExecutor.js.map +1 -1
- package/dist/esm/internal/channel/mergeDecision.js +2 -6
- package/dist/esm/internal/channel/mergeDecision.js.map +1 -1
- package/dist/esm/internal/channel/singleProducerAsyncInput.js.map +1 -1
- package/dist/esm/internal/channel.js +1 -1
- package/dist/esm/internal/channel.js.map +1 -1
- package/dist/esm/internal/clock.js +1 -1
- package/dist/esm/internal/clock.js.map +1 -1
- package/dist/esm/internal/configProvider.js +2 -4
- package/dist/esm/internal/configProvider.js.map +1 -1
- package/dist/esm/internal/console.js.map +1 -1
- package/dist/esm/internal/context.js +28 -20
- package/dist/esm/internal/context.js.map +1 -1
- package/dist/esm/internal/core-effect.js +12 -26
- package/dist/esm/internal/core-effect.js.map +1 -1
- package/dist/esm/internal/core-stream.js.map +1 -1
- package/dist/esm/internal/core.js +57 -127
- package/dist/esm/internal/core.js.map +1 -1
- package/dist/esm/internal/data.js.map +1 -1
- package/dist/esm/internal/defaultServices/console.js +1 -1
- package/dist/esm/internal/defaultServices/console.js.map +1 -1
- package/dist/esm/internal/defaultServices.js.map +1 -1
- package/dist/esm/internal/deferred.js.map +1 -1
- package/dist/esm/internal/differ/contextPatch.js +9 -9
- package/dist/esm/internal/differ/contextPatch.js.map +1 -1
- package/dist/esm/internal/effect/circular.js +5 -8
- package/dist/esm/internal/effect/circular.js.map +1 -1
- package/dist/esm/internal/effectable.js +4 -4
- package/dist/esm/internal/effectable.js.map +1 -1
- package/dist/esm/internal/fiber.js +2 -6
- package/dist/esm/internal/fiber.js.map +1 -1
- package/dist/esm/internal/fiberRuntime.js +10 -19
- package/dist/esm/internal/fiberRuntime.js.map +1 -1
- package/dist/esm/internal/groupBy.js.map +1 -1
- package/dist/esm/internal/keyedPool.js.map +1 -1
- package/dist/esm/internal/layer/circular.js.map +1 -1
- package/dist/esm/internal/layer.js +3 -3
- package/dist/esm/internal/layer.js.map +1 -1
- package/dist/esm/internal/logSpan.js +3 -5
- package/dist/esm/internal/logSpan.js.map +1 -1
- package/dist/esm/internal/metric.js.map +1 -1
- package/dist/esm/internal/pool.js.map +1 -1
- package/dist/esm/internal/pubsub.js +1 -5
- package/dist/esm/internal/pubsub.js.map +1 -1
- package/dist/esm/internal/query.js.map +1 -1
- package/dist/esm/internal/queue.js.map +1 -1
- package/dist/esm/internal/random.js +1 -1
- package/dist/esm/internal/random.js.map +1 -1
- package/dist/esm/internal/rateLimiter.js +12 -0
- package/dist/esm/internal/rateLimiter.js.map +1 -0
- package/dist/esm/internal/ref.js.map +1 -1
- package/dist/esm/internal/reloadable.js +1 -9
- package/dist/esm/internal/reloadable.js.map +1 -1
- package/dist/esm/internal/runtime.js +0 -1
- package/dist/esm/internal/runtime.js.map +1 -1
- package/dist/esm/internal/schedule.js.map +1 -1
- package/dist/esm/internal/scopedCache.js.map +1 -1
- package/dist/esm/internal/scopedRef.js.map +1 -1
- package/dist/esm/internal/sink.js +7 -7
- package/dist/esm/internal/sink.js.map +1 -1
- package/dist/esm/internal/stm/core.js.map +1 -1
- package/dist/esm/internal/stm/stm/stmState.js.map +1 -1
- package/dist/esm/internal/stm/stm/tExit.js +2 -2
- package/dist/esm/internal/stm/stm/tExit.js.map +1 -1
- package/dist/esm/internal/stm/stm/tryCommit.js.map +1 -1
- package/dist/esm/internal/stm/stm.js.map +1 -1
- package/dist/esm/internal/stm/tArray.js.map +1 -1
- package/dist/esm/internal/stm/tDeferred.js +4 -2
- package/dist/esm/internal/stm/tDeferred.js.map +1 -1
- package/dist/esm/internal/stm/tMap.js.map +1 -1
- package/dist/esm/internal/stm/tPriorityQueue.js.map +1 -1
- package/dist/esm/internal/stm/tPubSub.js.map +1 -1
- package/dist/esm/internal/stm/tQueue.js.map +1 -1
- package/dist/esm/internal/stm/tRandom.js +1 -1
- package/dist/esm/internal/stm/tRandom.js.map +1 -1
- package/dist/esm/internal/stm/tReentrantLock.js.map +1 -1
- package/dist/esm/internal/stm/tRef.js.map +1 -1
- package/dist/esm/internal/stm/tSemaphore.js.map +1 -1
- package/dist/esm/internal/stm/tSet.js.map +1 -1
- package/dist/esm/internal/stream/debounceState.js.map +1 -1
- package/dist/esm/internal/stream/handoff.js.map +1 -1
- package/dist/esm/internal/stream/handoffSignal.js.map +1 -1
- package/dist/esm/internal/stream/pull.js.map +1 -1
- package/dist/esm/internal/stream.js +0 -2
- package/dist/esm/internal/stream.js.map +1 -1
- package/dist/esm/internal/subscriptionRef.js.map +1 -1
- package/dist/esm/internal/supervisor.js.map +1 -1
- package/dist/esm/internal/take.js +2 -2
- package/dist/esm/internal/take.js.map +1 -1
- package/dist/esm/internal/testing/sleep.js.map +1 -1
- package/dist/esm/internal/tracer.js +2 -2
- package/dist/esm/internal/tracer.js.map +1 -1
- package/dist/esm/internal/version.js +1 -1
- package/package.json +9 -1
- package/src/Cache.ts +20 -20
- package/src/Cause.ts +37 -13
- package/src/Channel.ts +802 -794
- package/src/Clock.ts +7 -7
- package/src/Config.ts +1 -1
- package/src/ConfigProvider.ts +6 -6
- package/src/Console.ts +44 -48
- package/src/Context.ts +52 -30
- package/src/Data.ts +38 -61
- package/src/Deferred.ts +39 -41
- package/src/Effect.ts +1187 -1206
- package/src/Effectable.ts +8 -8
- package/src/Either.ts +2 -3
- package/src/Exit.ts +88 -105
- package/src/Fiber.ts +77 -83
- package/src/FiberMap.ts +77 -77
- package/src/FiberRef.ts +28 -28
- package/src/FiberRefs.ts +1 -1
- package/src/FiberSet.ts +61 -62
- package/src/GroupBy.ts +8 -12
- package/src/KeyedPool.ts +22 -22
- package/src/Layer.ts +187 -181
- package/src/LogLevel.ts +7 -6
- package/src/Logger.ts +18 -18
- package/src/MergeDecision.ts +7 -7
- package/src/MergeState.ts +16 -16
- package/src/Metric.ts +39 -39
- package/src/MetricPolling.ts +6 -6
- package/src/Number.ts +19 -0
- package/src/Option.ts +2 -3
- package/src/Pool.ts +15 -16
- package/src/PubSub.ts +18 -18
- package/src/Queue.ts +43 -46
- package/src/Random.ts +13 -15
- package/src/RateLimiter.ts +37 -0
- package/src/ReadonlyRecord.ts +49 -8
- package/src/Ref.ts +25 -25
- package/src/Reloadable.ts +10 -10
- package/src/Request.ts +31 -31
- package/src/RequestBlock.ts +3 -3
- package/src/RequestResolver.ts +21 -21
- package/src/Resource.ts +13 -13
- package/src/Runtime.ts +16 -19
- package/src/RuntimeFlags.ts +10 -10
- package/src/STM.ts +361 -362
- package/src/Schedule.ts +47 -47
- package/src/Scheduler.ts +2 -2
- package/src/Scope.ts +14 -15
- package/src/ScopedCache.ts +14 -14
- package/src/ScopedRef.ts +7 -7
- package/src/SingleProducerAsyncInput.ts +8 -9
- package/src/Sink.ts +357 -381
- package/src/Stream.ts +935 -1033
- package/src/StreamEmit.ts +5 -5
- package/src/Streamable.ts +2 -2
- package/src/SubscriptionRef.ts +51 -51
- package/src/Supervisor.ts +26 -26
- package/src/SynchronizedRef.ts +44 -44
- package/src/TArray.ts +74 -74
- package/src/TDeferred.ts +14 -14
- package/src/TMap.ts +72 -72
- package/src/TPriorityQueue.ts +23 -24
- package/src/TPubSub.ts +15 -15
- package/src/TQueue.ts +40 -40
- package/src/TRandom.ts +13 -13
- package/src/TReentrantLock.ts +21 -21
- package/src/TRef.ts +25 -25
- package/src/TSemaphore.ts +15 -15
- package/src/TSet.ts +49 -49
- package/src/Take.ts +51 -51
- package/src/TestAnnotation.ts +6 -17
- package/src/TestAnnotations.ts +7 -9
- package/src/TestClock.ts +39 -45
- package/src/TestConfig.ts +1 -3
- package/src/TestContext.ts +3 -3
- package/src/TestLive.ts +3 -5
- package/src/TestServices.ts +45 -47
- package/src/TestSized.ts +5 -5
- package/src/Tracer.ts +1 -1
- package/src/Utils.ts +8 -10
- package/src/index.ts +13 -2
- package/src/internal/blockedRequests.ts +2 -2
- package/src/internal/cache.ts +38 -38
- package/src/internal/channel/channelExecutor.ts +65 -73
- package/src/internal/channel/channelState.ts +11 -11
- package/src/internal/channel/continuation.ts +10 -10
- package/src/internal/channel/mergeDecision.ts +14 -16
- package/src/internal/channel/mergeState.ts +12 -12
- package/src/internal/channel/singleProducerAsyncInput.ts +15 -17
- package/src/internal/channel/subexecutor.ts +7 -7
- package/src/internal/channel.ts +901 -980
- package/src/internal/clock.ts +6 -6
- package/src/internal/concurrency.ts +9 -9
- package/src/internal/configProvider.ts +29 -36
- package/src/internal/console.ts +12 -12
- package/src/internal/context.ts +32 -23
- package/src/internal/core-effect.ts +655 -616
- package/src/internal/core-stream.ts +317 -325
- package/src/internal/core.ts +856 -790
- package/src/internal/data.ts +2 -3
- package/src/internal/dataSource.ts +14 -14
- package/src/internal/defaultServices/console.ts +3 -1
- package/src/internal/defaultServices.ts +21 -21
- package/src/internal/deferred.ts +9 -9
- package/src/internal/differ/contextPatch.ts +17 -17
- package/src/internal/effect/circular.ts +154 -159
- package/src/internal/effectable.ts +7 -7
- package/src/internal/fiber.ts +55 -59
- package/src/internal/fiberRefs.ts +1 -1
- package/src/internal/fiberRuntime.ts +426 -463
- package/src/internal/groupBy.ts +59 -62
- package/src/internal/keyedPool.ts +37 -37
- package/src/internal/layer/circular.ts +37 -37
- package/src/internal/layer.ts +235 -240
- package/src/internal/logSpan.ts +3 -5
- package/src/internal/metric/polling.ts +5 -5
- package/src/internal/metric.ts +54 -55
- package/src/internal/pool.ts +72 -72
- package/src/internal/pubsub.ts +75 -84
- package/src/internal/query.ts +25 -27
- package/src/internal/queue.ts +65 -70
- package/src/internal/random.ts +9 -9
- package/src/internal/rateLimiter.ts +30 -0
- package/src/internal/ref.ts +24 -24
- package/src/internal/reloadable.ts +11 -31
- package/src/internal/request.ts +14 -14
- package/src/internal/resource.ts +8 -8
- package/src/internal/runtime.ts +21 -22
- package/src/internal/schedule.ts +131 -134
- package/src/internal/scopedCache.ts +35 -32
- package/src/internal/scopedRef.ts +14 -14
- package/src/internal/sink.ts +507 -565
- package/src/internal/stm/core.ts +101 -102
- package/src/internal/stm/stm/stmState.ts +10 -10
- package/src/internal/stm/stm/tExit.ts +18 -18
- package/src/internal/stm/stm/tryCommit.ts +5 -5
- package/src/internal/stm/stm.ts +363 -374
- package/src/internal/stm/tArray.ts +92 -92
- package/src/internal/stm/tDeferred.ts +16 -14
- package/src/internal/stm/tMap.ts +83 -84
- package/src/internal/stm/tPriorityQueue.ts +24 -25
- package/src/internal/stm/tPubSub.ts +37 -38
- package/src/internal/stm/tQueue.ts +44 -48
- package/src/internal/stm/tRandom.ts +18 -18
- package/src/internal/stm/tReentrantLock.ts +28 -28
- package/src/internal/stm/tRef.ts +25 -25
- package/src/internal/stm/tSemaphore.ts +16 -16
- package/src/internal/stm/tSet.ts +51 -52
- package/src/internal/stream/debounceState.ts +7 -7
- package/src/internal/stream/emit.ts +4 -4
- package/src/internal/stream/handoff.ts +19 -19
- package/src/internal/stream/handoffSignal.ts +4 -4
- package/src/internal/stream/pull.ts +10 -11
- package/src/internal/stream.ts +1770 -1788
- package/src/internal/subscriptionRef.ts +17 -17
- package/src/internal/supervisor.ts +49 -56
- package/src/internal/synchronizedRef.ts +27 -27
- package/src/internal/take.ts +61 -61
- package/src/internal/testing/sleep.ts +2 -2
- package/src/internal/testing/suspendedWarningData.ts +2 -2
- package/src/internal/testing/warningData.ts +2 -2
- package/src/internal/tracer.ts +2 -6
- package/src/internal/version.ts +1 -1
package/src/Stream.ts
CHANGED
|
@@ -45,7 +45,7 @@ export const StreamTypeId: unique symbol = internal.StreamTypeId
|
|
|
45
45
|
export type StreamTypeId = typeof StreamTypeId
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
* A `Stream<
|
|
48
|
+
* A `Stream<A, E, R>` is a description of a program that, when evaluated, may
|
|
49
49
|
* emit zero or more values of type `A`, may fail with errors of type `E`, and
|
|
50
50
|
* uses an context of type `R`. One way to think of `Stream` is as a
|
|
51
51
|
* `Effect` program that could emit multiple values.
|
|
@@ -64,7 +64,7 @@ export type StreamTypeId = typeof StreamTypeId
|
|
|
64
64
|
* @since 2.0.0
|
|
65
65
|
* @category models
|
|
66
66
|
*/
|
|
67
|
-
export interface Stream<out
|
|
67
|
+
export interface Stream<out A, out E = never, out R = never> extends Stream.Variance<A, E, R>, Pipeable {
|
|
68
68
|
[Unify.typeSymbol]?: unknown
|
|
69
69
|
[Unify.unifySymbol]?: StreamUnify<this>
|
|
70
70
|
[Unify.ignoreSymbol]?: StreamUnifyIgnore
|
|
@@ -75,7 +75,7 @@ export interface Stream<out R, out E, out A> extends Stream.Variance<R, E, A>, P
|
|
|
75
75
|
* @category models
|
|
76
76
|
*/
|
|
77
77
|
export interface StreamUnify<A extends { [Unify.typeSymbol]?: any }> extends Effect.EffectUnify<A> {
|
|
78
|
-
Stream?: () => A[Unify.typeSymbol] extends Stream<infer
|
|
78
|
+
Stream?: () => A[Unify.typeSymbol] extends Stream<infer A0, infer E0, infer R0> | infer _ ? Stream<A0, E0, R0> : never
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
/**
|
|
@@ -91,7 +91,7 @@ export interface StreamUnifyIgnore extends Effect.EffectUnifyIgnore {
|
|
|
91
91
|
* @category models
|
|
92
92
|
*/
|
|
93
93
|
declare module "./Effect.js" {
|
|
94
|
-
interface Effect<
|
|
94
|
+
interface Effect<A, E, R> extends Stream<A, E, R> {}
|
|
95
95
|
interface EffectUnifyIgnore {
|
|
96
96
|
Stream?: true
|
|
97
97
|
}
|
|
@@ -102,7 +102,7 @@ declare module "./Effect.js" {
|
|
|
102
102
|
* @since 2.0.0
|
|
103
103
|
*/
|
|
104
104
|
export interface StreamTypeLambda extends TypeLambda {
|
|
105
|
-
readonly type: Stream<this["
|
|
105
|
+
readonly type: Stream<this["Target"], this["Out1"], this["Out2"]>
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
/**
|
|
@@ -113,11 +113,11 @@ export declare namespace Stream {
|
|
|
113
113
|
* @since 2.0.0
|
|
114
114
|
* @category models
|
|
115
115
|
*/
|
|
116
|
-
export interface Variance<out
|
|
116
|
+
export interface Variance<out A, out E, out R> {
|
|
117
117
|
readonly [StreamTypeId]: {
|
|
118
|
-
_R: Covariant<R>
|
|
119
|
-
_E: Covariant<E>
|
|
120
118
|
_A: Covariant<A>
|
|
119
|
+
_E: Covariant<E>
|
|
120
|
+
_R: Covariant<R>
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
|
|
@@ -152,7 +152,7 @@ export const DefaultChunkSize: number = internal.DefaultChunkSize
|
|
|
152
152
|
* @since 2.0.0
|
|
153
153
|
* @category utils
|
|
154
154
|
*/
|
|
155
|
-
export const accumulate: <
|
|
155
|
+
export const accumulate: <A, E, R>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R> = internal.accumulate
|
|
156
156
|
|
|
157
157
|
/**
|
|
158
158
|
* Re-chunks the elements of the stream by accumulating each underlying chunk.
|
|
@@ -160,7 +160,7 @@ export const accumulate: <R, E, A>(self: Stream<R, E, A>) => Stream<R, E, Chunk.
|
|
|
160
160
|
* @since 2.0.0
|
|
161
161
|
* @category utils
|
|
162
162
|
*/
|
|
163
|
-
export const accumulateChunks: <
|
|
163
|
+
export const accumulateChunks: <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R> = internal.accumulateChunks
|
|
164
164
|
|
|
165
165
|
/**
|
|
166
166
|
* Creates a stream from a single value that will get cleaned up after the
|
|
@@ -169,10 +169,10 @@ export const accumulateChunks: <R, E, A>(self: Stream<R, E, A>) => Stream<R, E,
|
|
|
169
169
|
* @since 2.0.0
|
|
170
170
|
* @category constructors
|
|
171
171
|
*/
|
|
172
|
-
export const acquireRelease: <
|
|
173
|
-
acquire: Effect.Effect<
|
|
174
|
-
release: (resource: A, exit: Exit.Exit<unknown, unknown>) => Effect.Effect<
|
|
175
|
-
) => Stream<R | R2
|
|
172
|
+
export const acquireRelease: <A, E, R, R2, _>(
|
|
173
|
+
acquire: Effect.Effect<A, E, R>,
|
|
174
|
+
release: (resource: A, exit: Exit.Exit<unknown, unknown>) => Effect.Effect<_, never, R2>
|
|
175
|
+
) => Stream<A, E, R | R2> = internal.acquireRelease
|
|
176
176
|
|
|
177
177
|
/**
|
|
178
178
|
* Aggregates elements of this stream using the provided sink for as long as
|
|
@@ -191,8 +191,8 @@ export const acquireRelease: <R, E, A, R2, _>(
|
|
|
191
191
|
* @category utils
|
|
192
192
|
*/
|
|
193
193
|
export const aggregate: {
|
|
194
|
-
<
|
|
195
|
-
<
|
|
194
|
+
<B, A, A2, E2, R2>(sink: Sink.Sink<B, A | A2, A2, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<B, E2 | E, R2 | R>
|
|
195
|
+
<A, E, R, B, A2, E2, R2>(self: Stream<A, E, R>, sink: Sink.Sink<B, A | A2, A2, E2, R2>): Stream<B, E | E2, R | R2>
|
|
196
196
|
} = internal.aggregate
|
|
197
197
|
|
|
198
198
|
/**
|
|
@@ -204,15 +204,15 @@ export const aggregate: {
|
|
|
204
204
|
* @category utils
|
|
205
205
|
*/
|
|
206
206
|
export const aggregateWithin: {
|
|
207
|
-
<
|
|
208
|
-
sink: Sink.Sink<
|
|
207
|
+
<B, A, A2, E2, R2, R3, C>(
|
|
208
|
+
sink: Sink.Sink<B, A | A2, A2, E2, R2>,
|
|
209
209
|
schedule: Schedule.Schedule<R3, Option.Option<B>, C>
|
|
210
|
-
): <
|
|
211
|
-
<
|
|
212
|
-
self: Stream<
|
|
213
|
-
sink: Sink.Sink<
|
|
210
|
+
): <E, R>(self: Stream<A, E, R>) => Stream<B, E2 | E, R2 | R3 | R>
|
|
211
|
+
<A, E, R, B, A2, E2, R2, R3, C>(
|
|
212
|
+
self: Stream<A, E, R>,
|
|
213
|
+
sink: Sink.Sink<B, A | A2, A2, E2, R2>,
|
|
214
214
|
schedule: Schedule.Schedule<R3, Option.Option<B>, C>
|
|
215
|
-
): Stream<
|
|
215
|
+
): Stream<B, E | E2, R | R2 | R3>
|
|
216
216
|
} = internal.aggregateWithin
|
|
217
217
|
|
|
218
218
|
/**
|
|
@@ -233,15 +233,15 @@ export const aggregateWithin: {
|
|
|
233
233
|
* @category utils
|
|
234
234
|
*/
|
|
235
235
|
export const aggregateWithinEither: {
|
|
236
|
-
<
|
|
237
|
-
sink: Sink.Sink<
|
|
236
|
+
<B, A, A2, E2, R2, R3, C>(
|
|
237
|
+
sink: Sink.Sink<B, A | A2, A2, E2, R2>,
|
|
238
238
|
schedule: Schedule.Schedule<R3, Option.Option<B>, C>
|
|
239
|
-
): <
|
|
240
|
-
<
|
|
241
|
-
self: Stream<
|
|
242
|
-
sink: Sink.Sink<
|
|
239
|
+
): <E, R>(self: Stream<A, E, R>) => Stream<Either.Either<C, B>, E2 | E, R2 | R3 | R>
|
|
240
|
+
<A, E, R, B, A2, E2, R2, R3, C>(
|
|
241
|
+
self: Stream<A, E, R>,
|
|
242
|
+
sink: Sink.Sink<B, A | A2, A2, E2, R2>,
|
|
243
243
|
schedule: Schedule.Schedule<R3, Option.Option<B>, C>
|
|
244
|
-
): Stream<
|
|
244
|
+
): Stream<Either.Either<C, B>, E | E2, R | R2 | R3>
|
|
245
245
|
} = internal.aggregateWithinEither
|
|
246
246
|
|
|
247
247
|
/**
|
|
@@ -251,12 +251,15 @@ export const aggregateWithinEither: {
|
|
|
251
251
|
* @category mapping
|
|
252
252
|
*/
|
|
253
253
|
export const as: {
|
|
254
|
-
<B>(value: B): <
|
|
255
|
-
<R, E, A, B>(self: Stream<
|
|
254
|
+
<B>(value: B): <A, E, R>(self: Stream<A, E, R>) => Stream<B, E, R>
|
|
255
|
+
<R, E, A, B>(self: Stream<A, E, R>, value: B): Stream<B, E, R>
|
|
256
256
|
} = internal.as
|
|
257
257
|
|
|
258
|
-
const _async: <
|
|
259
|
-
|
|
258
|
+
const _async: <A, E = never, R = never>(
|
|
259
|
+
register: (emit: Emit.Emit<R, E, A, void>) => void,
|
|
260
|
+
outputBuffer?: number
|
|
261
|
+
) => Stream<A, E, R> = internal._async
|
|
262
|
+
|
|
260
263
|
export {
|
|
261
264
|
/**
|
|
262
265
|
* Creates a stream from an asynchronous callback that can be called multiple
|
|
@@ -278,10 +281,10 @@ export {
|
|
|
278
281
|
* @since 2.0.0
|
|
279
282
|
* @category constructors
|
|
280
283
|
*/
|
|
281
|
-
export const asyncEffect: <
|
|
282
|
-
register: (emit: Emit.Emit<R, E, A, void>) => Effect.Effect<
|
|
284
|
+
export const asyncEffect: <A, E = never, R = never>(
|
|
285
|
+
register: (emit: Emit.Emit<R, E, A, void>) => Effect.Effect<unknown, E, R>,
|
|
283
286
|
outputBuffer?: number
|
|
284
|
-
) => Stream<
|
|
287
|
+
) => Stream<A, E, R> = internal.asyncEffect
|
|
285
288
|
|
|
286
289
|
/**
|
|
287
290
|
* Creates a stream from an asynchronous callback that can be called multiple
|
|
@@ -292,10 +295,10 @@ export const asyncEffect: <R, E, A>(
|
|
|
292
295
|
* @since 2.0.0
|
|
293
296
|
* @category constructors
|
|
294
297
|
*/
|
|
295
|
-
export const asyncInterrupt: <
|
|
296
|
-
register: (emit: Emit.Emit<R, E, A, void>) => Either.Either<Effect.Effect<
|
|
298
|
+
export const asyncInterrupt: <A, E = never, R = never>(
|
|
299
|
+
register: (emit: Emit.Emit<R, E, A, void>) => Either.Either<Effect.Effect<unknown, never, R>, Stream<A, E, R>>,
|
|
297
300
|
outputBuffer?: number
|
|
298
|
-
) => Stream<
|
|
301
|
+
) => Stream<A, E, R> = internal.asyncInterrupt
|
|
299
302
|
|
|
300
303
|
/**
|
|
301
304
|
* Creates a stream from an asynchronous callback that can be called multiple
|
|
@@ -306,10 +309,10 @@ export const asyncInterrupt: <R, E, A>(
|
|
|
306
309
|
* @since 2.0.0
|
|
307
310
|
* @category constructors
|
|
308
311
|
*/
|
|
309
|
-
export const asyncOption: <
|
|
310
|
-
register: (emit: Emit.Emit<R, E, A, void>) => Option.Option<Stream<
|
|
312
|
+
export const asyncOption: <A, E = never, R = never>(
|
|
313
|
+
register: (emit: Emit.Emit<R, E, A, void>) => Option.Option<Stream<A, E, R>>,
|
|
311
314
|
outputBuffer?: number
|
|
312
|
-
) => Stream<
|
|
315
|
+
) => Stream<A, E, R> = internal.asyncOption
|
|
313
316
|
|
|
314
317
|
/**
|
|
315
318
|
* Creates a stream from an asynchronous callback that can be called multiple
|
|
@@ -320,10 +323,10 @@ export const asyncOption: <R, E, A>(
|
|
|
320
323
|
* @since 2.0.0
|
|
321
324
|
* @category constructors
|
|
322
325
|
*/
|
|
323
|
-
export const asyncScoped: <
|
|
324
|
-
register: (emit: Emit.Emit<R, E, A, void>) => Effect.Effect<R | Scope.Scope
|
|
326
|
+
export const asyncScoped: <A, E = never, R = never>(
|
|
327
|
+
register: (emit: Emit.Emit<R, E, A, void>) => Effect.Effect<unknown, E, R | Scope.Scope>,
|
|
325
328
|
outputBuffer?: number
|
|
326
|
-
) => Stream<Exclude<R, Scope.Scope
|
|
329
|
+
) => Stream<A, E, Exclude<R, Scope.Scope>> = internal.asyncScoped
|
|
327
330
|
|
|
328
331
|
/**
|
|
329
332
|
* Returns a `Stream` that first collects `n` elements from the input `Stream`,
|
|
@@ -334,15 +337,15 @@ export const asyncScoped: <R, E, A>(
|
|
|
334
337
|
* @category sequencing
|
|
335
338
|
*/
|
|
336
339
|
export const branchAfter: {
|
|
337
|
-
<A,
|
|
340
|
+
<A, A2, E2, R2>(
|
|
338
341
|
n: number,
|
|
339
|
-
f: (input: Chunk.Chunk<A>) => Stream<
|
|
340
|
-
): <R, E>(self: Stream<
|
|
341
|
-
<
|
|
342
|
-
self: Stream<
|
|
342
|
+
f: (input: Chunk.Chunk<A>) => Stream<A2, E2, R2>
|
|
343
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>
|
|
344
|
+
<A, E, R, R2, E2, A2>(
|
|
345
|
+
self: Stream<A, E, R>,
|
|
343
346
|
n: number,
|
|
344
|
-
f: (input: Chunk.Chunk<A>) => Stream<
|
|
345
|
-
): Stream<
|
|
347
|
+
f: (input: Chunk.Chunk<A>) => Stream<A2, E2, R2>
|
|
348
|
+
): Stream<A2, E | E2, R | R2>
|
|
346
349
|
} = internal.branchAfter
|
|
347
350
|
|
|
348
351
|
/**
|
|
@@ -357,14 +360,14 @@ export const broadcast: {
|
|
|
357
360
|
<N extends number>(
|
|
358
361
|
n: N,
|
|
359
362
|
maximumLag: number
|
|
360
|
-
): <
|
|
361
|
-
self: Stream<
|
|
362
|
-
) => Effect.Effect<
|
|
363
|
-
<
|
|
364
|
-
self: Stream<
|
|
363
|
+
): <A, E, R>(
|
|
364
|
+
self: Stream<A, E, R>
|
|
365
|
+
) => Effect.Effect<Stream.DynamicTuple<Stream<A, E>, N>, never, Scope.Scope | R>
|
|
366
|
+
<A, E, R, N extends number>(
|
|
367
|
+
self: Stream<A, E, R>,
|
|
365
368
|
n: N,
|
|
366
369
|
maximumLag: number
|
|
367
|
-
): Effect.Effect<
|
|
370
|
+
): Effect.Effect<Stream.DynamicTuple<Stream<A, E>, N>, never, Scope.Scope | R>
|
|
368
371
|
} = internal.broadcast
|
|
369
372
|
|
|
370
373
|
/**
|
|
@@ -376,8 +379,8 @@ export const broadcast: {
|
|
|
376
379
|
* @category utils
|
|
377
380
|
*/
|
|
378
381
|
export const broadcastDynamic: {
|
|
379
|
-
(maximumLag: number): <
|
|
380
|
-
<
|
|
382
|
+
(maximumLag: number): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Stream<A, E>, never, Scope.Scope | R>
|
|
383
|
+
<A, E, R>(self: Stream<A, E, R>, maximumLag: number): Effect.Effect<Stream<A, E>, never, Scope.Scope | R>
|
|
381
384
|
} = internal.broadcastDynamic
|
|
382
385
|
|
|
383
386
|
/**
|
|
@@ -394,14 +397,14 @@ export const broadcastedQueues: {
|
|
|
394
397
|
<N extends number>(
|
|
395
398
|
n: N,
|
|
396
399
|
maximumLag: number
|
|
397
|
-
): <
|
|
398
|
-
self: Stream<
|
|
399
|
-
) => Effect.Effect<
|
|
400
|
-
<
|
|
401
|
-
self: Stream<
|
|
400
|
+
): <A, E, R>(
|
|
401
|
+
self: Stream<A, E, R>
|
|
402
|
+
) => Effect.Effect<Stream.DynamicTuple<Queue.Dequeue<Take.Take<A, E>>, N>, never, R | Scope.Scope>
|
|
403
|
+
<A, E, R, N extends number>(
|
|
404
|
+
self: Stream<A, E, R>,
|
|
402
405
|
n: N,
|
|
403
406
|
maximumLag: number
|
|
404
|
-
): Effect.Effect<
|
|
407
|
+
): Effect.Effect<Stream.DynamicTuple<Queue.Dequeue<Take.Take<A, E>>, N>, never, Scope.Scope | R>
|
|
405
408
|
} = internal.broadcastedQueues
|
|
406
409
|
|
|
407
410
|
/**
|
|
@@ -417,13 +420,13 @@ export const broadcastedQueues: {
|
|
|
417
420
|
export const broadcastedQueuesDynamic: {
|
|
418
421
|
(
|
|
419
422
|
maximumLag: number
|
|
420
|
-
): <
|
|
421
|
-
self: Stream<
|
|
422
|
-
) => Effect.Effect<
|
|
423
|
-
<
|
|
424
|
-
self: Stream<
|
|
423
|
+
): <A, E, R>(
|
|
424
|
+
self: Stream<A, E, R>
|
|
425
|
+
) => Effect.Effect<Effect.Effect<Queue.Dequeue<Take.Take<A, E>>, never, Scope.Scope>, never, R | Scope.Scope>
|
|
426
|
+
<A, E, R>(
|
|
427
|
+
self: Stream<A, E, R>,
|
|
425
428
|
maximumLag: number
|
|
426
|
-
): Effect.Effect<
|
|
429
|
+
): Effect.Effect<Effect.Effect<Queue.Dequeue<Take.Take<A, E>>, never, Scope.Scope>, never, Scope.Scope | R>
|
|
427
430
|
} = internal.broadcastedQueuesDynamic
|
|
428
431
|
|
|
429
432
|
/**
|
|
@@ -442,14 +445,14 @@ export const buffer: {
|
|
|
442
445
|
readonly capacity: number
|
|
443
446
|
readonly strategy?: "dropping" | "sliding" | "suspend" | undefined
|
|
444
447
|
}
|
|
445
|
-
): <
|
|
446
|
-
<
|
|
447
|
-
self: Stream<
|
|
448
|
+
): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
449
|
+
<A, E, R>(
|
|
450
|
+
self: Stream<A, E, R>,
|
|
448
451
|
options: { readonly capacity: "unbounded" } | {
|
|
449
452
|
readonly capacity: number
|
|
450
453
|
readonly strategy?: "dropping" | "sliding" | "suspend" | undefined
|
|
451
454
|
}
|
|
452
|
-
): Stream<
|
|
455
|
+
): Stream<A, E, R>
|
|
453
456
|
} = internal.buffer
|
|
454
457
|
|
|
455
458
|
/**
|
|
@@ -462,18 +465,12 @@ export const buffer: {
|
|
|
462
465
|
*/
|
|
463
466
|
export const bufferChunks: {
|
|
464
467
|
(
|
|
465
|
-
options: {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
<
|
|
471
|
-
self: Stream<R, E, A>,
|
|
472
|
-
options: {
|
|
473
|
-
readonly capacity: number
|
|
474
|
-
readonly strategy?: "dropping" | "sliding" | "suspend" | undefined
|
|
475
|
-
}
|
|
476
|
-
): Stream<R, E, A>
|
|
468
|
+
options: { readonly capacity: number; readonly strategy?: "dropping" | "sliding" | "suspend" | undefined }
|
|
469
|
+
): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
470
|
+
<A, E, R>(
|
|
471
|
+
self: Stream<A, E, R>,
|
|
472
|
+
options: { readonly capacity: number; readonly strategy?: "dropping" | "sliding" | "suspend" | undefined }
|
|
473
|
+
): Stream<A, E, R>
|
|
477
474
|
} = internal.bufferChunks
|
|
478
475
|
|
|
479
476
|
/**
|
|
@@ -484,8 +481,8 @@ export const bufferChunks: {
|
|
|
484
481
|
* @category error handling
|
|
485
482
|
*/
|
|
486
483
|
export const catchAll: {
|
|
487
|
-
<E, R2, E2, A2>(f: (error: E) => Stream<
|
|
488
|
-
<R, A, E, R2, E2, A2>(self: Stream<
|
|
484
|
+
<E, R2, E2, A2>(f: (error: E) => Stream<A2, E2, R2>): <R, A>(self: Stream<A, E, R>) => Stream<A2 | A, E2, R2 | R>
|
|
485
|
+
<R, A, E, R2, E2, A2>(self: Stream<A, E, R>, f: (error: E) => Stream<A2, E2, R2>): Stream<A | A2, E2, R | R2>
|
|
489
486
|
} = internal.catchAll
|
|
490
487
|
|
|
491
488
|
/**
|
|
@@ -498,12 +495,12 @@ export const catchAll: {
|
|
|
498
495
|
*/
|
|
499
496
|
export const catchAllCause: {
|
|
500
497
|
<E, R2, E2, A2>(
|
|
501
|
-
f: (cause: Cause.Cause<E>) => Stream<
|
|
502
|
-
): <R, A>(self: Stream<
|
|
498
|
+
f: (cause: Cause.Cause<E>) => Stream<A2, E2, R2>
|
|
499
|
+
): <R, A>(self: Stream<A, E, R>) => Stream<A2 | A, E2, R2 | R>
|
|
503
500
|
<R, A, E, R2, E2, A2>(
|
|
504
|
-
self: Stream<
|
|
505
|
-
f: (cause: Cause.Cause<E>) => Stream<
|
|
506
|
-
): Stream<
|
|
501
|
+
self: Stream<A, E, R>,
|
|
502
|
+
f: (cause: Cause.Cause<E>) => Stream<A2, E2, R2>
|
|
503
|
+
): Stream<A | A2, E2, R | R2>
|
|
507
504
|
} = internal.catchAllCause
|
|
508
505
|
|
|
509
506
|
/**
|
|
@@ -515,12 +512,12 @@ export const catchAllCause: {
|
|
|
515
512
|
*/
|
|
516
513
|
export const catchSome: {
|
|
517
514
|
<E, R2, E2, A2>(
|
|
518
|
-
pf: (error: E) => Option.Option<Stream<
|
|
519
|
-
): <R, A>(self: Stream<
|
|
515
|
+
pf: (error: E) => Option.Option<Stream<A2, E2, R2>>
|
|
516
|
+
): <R, A>(self: Stream<A, E, R>) => Stream<A2 | A, E | E2, R2 | R>
|
|
520
517
|
<R, A, E, R2, E2, A2>(
|
|
521
|
-
self: Stream<
|
|
522
|
-
pf: (error: E) => Option.Option<Stream<
|
|
523
|
-
): Stream<
|
|
518
|
+
self: Stream<A, E, R>,
|
|
519
|
+
pf: (error: E) => Option.Option<Stream<A2, E2, R2>>
|
|
520
|
+
): Stream<A | A2, E | E2, R | R2>
|
|
524
521
|
} = internal.catchSome
|
|
525
522
|
|
|
526
523
|
/**
|
|
@@ -533,13 +530,13 @@ export const catchSome: {
|
|
|
533
530
|
export const catchTag: {
|
|
534
531
|
<K extends E["_tag"] & string, E extends { _tag: string }, R1, E1, A1>(
|
|
535
532
|
k: K,
|
|
536
|
-
f: (e: Extract<E, { _tag: K }>) => Stream<
|
|
537
|
-
): <R, A>(self: Stream<
|
|
533
|
+
f: (e: Extract<E, { _tag: K }>) => Stream<A1, E1, R1>
|
|
534
|
+
): <R, A>(self: Stream<A, E, R>) => Stream<A1 | A, E1 | Exclude<E, { _tag: K }>, R1 | R>
|
|
538
535
|
<R, E extends { _tag: string }, A, K extends E["_tag"] & string, R1, E1, A1>(
|
|
539
|
-
self: Stream<
|
|
536
|
+
self: Stream<A, E, R>,
|
|
540
537
|
k: K,
|
|
541
|
-
f: (e: Extract<E, { _tag: K }>) => Stream<
|
|
542
|
-
): Stream<
|
|
538
|
+
f: (e: Extract<E, { _tag: K }>) => Stream<A1, E1, R1>
|
|
539
|
+
): Stream<A | A1, E1 | Exclude<E, { _tag: K }>, R | R1>
|
|
543
540
|
} = internal.catchTag
|
|
544
541
|
|
|
545
542
|
/**
|
|
@@ -552,25 +549,25 @@ export const catchTag: {
|
|
|
552
549
|
export const catchTags: {
|
|
553
550
|
<
|
|
554
551
|
E extends { _tag: string },
|
|
555
|
-
Cases extends { [K in E["_tag"]]+?: (
|
|
552
|
+
Cases extends { [K in E["_tag"]]+?: (error: Extract<E, { _tag: K }>) => Stream<any, any, any> }
|
|
556
553
|
>(
|
|
557
554
|
cases: Cases
|
|
558
555
|
): <R, A>(
|
|
559
|
-
self: Stream<
|
|
556
|
+
self: Stream<A, E, R>
|
|
560
557
|
) => Stream<
|
|
561
|
-
|
|
|
558
|
+
| A
|
|
562
559
|
| {
|
|
563
|
-
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer
|
|
560
|
+
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer A, infer _E, infer _R> ? A
|
|
564
561
|
: never
|
|
565
562
|
}[keyof Cases],
|
|
566
563
|
| Exclude<E, { _tag: keyof Cases }>
|
|
567
564
|
| {
|
|
568
|
-
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer
|
|
565
|
+
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer _A, infer E, infer _R> ? E
|
|
569
566
|
: never
|
|
570
567
|
}[keyof Cases],
|
|
571
|
-
|
|
|
568
|
+
| R
|
|
572
569
|
| {
|
|
573
|
-
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer
|
|
570
|
+
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer _A, infer _E, infer R> ? R
|
|
574
571
|
: never
|
|
575
572
|
}[keyof Cases]
|
|
576
573
|
>
|
|
@@ -578,14 +575,14 @@ export const catchTags: {
|
|
|
578
575
|
R,
|
|
579
576
|
E extends { _tag: string },
|
|
580
577
|
A,
|
|
581
|
-
Cases extends { [K in E["_tag"]]+?: (
|
|
578
|
+
Cases extends { [K in E["_tag"]]+?: (error: Extract<E, { _tag: K }>) => Stream<any, any, any> }
|
|
582
579
|
>(
|
|
583
|
-
self: Stream<
|
|
580
|
+
self: Stream<A, E, R>,
|
|
584
581
|
cases: Cases
|
|
585
582
|
): Stream<
|
|
586
|
-
|
|
|
583
|
+
| A
|
|
587
584
|
| {
|
|
588
|
-
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer
|
|
585
|
+
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer _R, infer _E, infer A> ? A
|
|
589
586
|
: never
|
|
590
587
|
}[keyof Cases],
|
|
591
588
|
| Exclude<E, { _tag: keyof Cases }>
|
|
@@ -593,9 +590,9 @@ export const catchTags: {
|
|
|
593
590
|
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer _R, infer E, infer _A> ? E
|
|
594
591
|
: never
|
|
595
592
|
}[keyof Cases],
|
|
596
|
-
|
|
|
593
|
+
| R
|
|
597
594
|
| {
|
|
598
|
-
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer
|
|
595
|
+
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer R, infer _E, infer _A> ? R
|
|
599
596
|
: never
|
|
600
597
|
}[keyof Cases]
|
|
601
598
|
>
|
|
@@ -611,12 +608,12 @@ export const catchTags: {
|
|
|
611
608
|
*/
|
|
612
609
|
export const catchSomeCause: {
|
|
613
610
|
<E, R2, E2, A2>(
|
|
614
|
-
pf: (cause: Cause.Cause<E>) => Option.Option<Stream<
|
|
615
|
-
): <R, A>(self: Stream<
|
|
611
|
+
pf: (cause: Cause.Cause<E>) => Option.Option<Stream<A2, E2, R2>>
|
|
612
|
+
): <R, A>(self: Stream<A, E, R>) => Stream<A2 | A, E | E2, R2 | R>
|
|
616
613
|
<R, A, E, R2, E2, A2>(
|
|
617
|
-
self: Stream<
|
|
618
|
-
pf: (cause: Cause.Cause<E>) => Option.Option<Stream<
|
|
619
|
-
): Stream<
|
|
614
|
+
self: Stream<A, E, R>,
|
|
615
|
+
pf: (cause: Cause.Cause<E>) => Option.Option<Stream<A2, E2, R2>>
|
|
616
|
+
): Stream<A | A2, E | E2, R | R2>
|
|
620
617
|
} = internal.catchSomeCause
|
|
621
618
|
|
|
622
619
|
/**
|
|
@@ -627,7 +624,7 @@ export const catchSomeCause: {
|
|
|
627
624
|
* @since 2.0.0
|
|
628
625
|
* @category utils
|
|
629
626
|
*/
|
|
630
|
-
export const changes: <
|
|
627
|
+
export const changes: <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R> = internal.changes
|
|
631
628
|
|
|
632
629
|
/**
|
|
633
630
|
* Returns a new stream that only emits elements that are not equal to the
|
|
@@ -638,8 +635,8 @@ export const changes: <R, E, A>(self: Stream<R, E, A>) => Stream<R, E, A> = inte
|
|
|
638
635
|
* @category utils
|
|
639
636
|
*/
|
|
640
637
|
export const changesWith: {
|
|
641
|
-
<A>(f: (x: A, y: A) => boolean): <R, E>(self: Stream<
|
|
642
|
-
<
|
|
638
|
+
<A>(f: (x: A, y: A) => boolean): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
639
|
+
<A, E, R>(self: Stream<A, E, R>, f: (x: A, y: A) => boolean): Stream<A, E, R>
|
|
643
640
|
} = internal.changesWith
|
|
644
641
|
|
|
645
642
|
/**
|
|
@@ -652,9 +649,9 @@ export const changesWith: {
|
|
|
652
649
|
*/
|
|
653
650
|
export const changesWithEffect: {
|
|
654
651
|
<A, R2, E2>(
|
|
655
|
-
f: (x: A, y: A) => Effect.Effect<
|
|
656
|
-
): <R, E>(self: Stream<
|
|
657
|
-
<R, E, A, R2, E2>(self: Stream<
|
|
652
|
+
f: (x: A, y: A) => Effect.Effect<boolean, E2, R2>
|
|
653
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
654
|
+
<R, E, A, R2, E2>(self: Stream<A, E, R>, f: (x: A, y: A) => Effect.Effect<boolean, E2, R2>): Stream<A, E | E2, R | R2>
|
|
658
655
|
} = internal.changesWithEffect
|
|
659
656
|
|
|
660
657
|
/**
|
|
@@ -664,7 +661,7 @@ export const changesWithEffect: {
|
|
|
664
661
|
* @since 2.0.0
|
|
665
662
|
* @category utils
|
|
666
663
|
*/
|
|
667
|
-
export const chunks: <
|
|
664
|
+
export const chunks: <A, E, R>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R> = internal.chunks
|
|
668
665
|
|
|
669
666
|
/**
|
|
670
667
|
* Performs the specified stream transformation with the chunk structure of
|
|
@@ -673,9 +670,15 @@ export const chunks: <R, E, A>(self: Stream<R, E, A>) => Stream<R, E, Chunk.Chun
|
|
|
673
670
|
* @since 2.0.0
|
|
674
671
|
* @category utils
|
|
675
672
|
*/
|
|
676
|
-
export const chunksWith:
|
|
677
|
-
|
|
678
|
-
|
|
673
|
+
export const chunksWith: {
|
|
674
|
+
<R, E, A, R2, E2, A2>(
|
|
675
|
+
f: (stream: Stream<Chunk.Chunk<A>, E, R>) => Stream<Chunk.Chunk<A2>, E2, R2>
|
|
676
|
+
): (self: Stream<A, E, R>) => Stream<A2, E | E2, R | R2>
|
|
677
|
+
<R, E, A, R2, E2, A2>(
|
|
678
|
+
self: Stream<A, E, R>,
|
|
679
|
+
f: (stream: Stream<Chunk.Chunk<A>, E, R>) => Stream<Chunk.Chunk<A2>, E2, R2>
|
|
680
|
+
): Stream<A2, E | E2, R | R2>
|
|
681
|
+
} = internal.chunksWith
|
|
679
682
|
|
|
680
683
|
/**
|
|
681
684
|
* Combines the elements from this stream and the specified stream by
|
|
@@ -692,24 +695,24 @@ export const chunksWith: <R, E, A, R2, E2, A2>(
|
|
|
692
695
|
*/
|
|
693
696
|
export const combine: {
|
|
694
697
|
<R2, E2, A2, S, R3, E, A, R4, R5, A3>(
|
|
695
|
-
that: Stream<
|
|
698
|
+
that: Stream<A2, E2, R2>,
|
|
696
699
|
s: S,
|
|
697
700
|
f: (
|
|
698
701
|
s: S,
|
|
699
|
-
pullLeft: Effect.Effect<
|
|
700
|
-
pullRight: Effect.Effect<
|
|
701
|
-
) => Effect.Effect<
|
|
702
|
-
): <R>(self: Stream<
|
|
702
|
+
pullLeft: Effect.Effect<A, Option.Option<E>, R3>,
|
|
703
|
+
pullRight: Effect.Effect<A2, Option.Option<E2>, R4>
|
|
704
|
+
) => Effect.Effect<Exit.Exit<readonly [A3, S], Option.Option<E2 | E>>, never, R5>
|
|
705
|
+
): <R>(self: Stream<A, E, R>) => Stream<A3, E2 | E, R2 | R3 | R4 | R5 | R>
|
|
703
706
|
<R, R2, E2, A2, S, R3, E, A, R4, R5, A3>(
|
|
704
|
-
self: Stream<
|
|
705
|
-
that: Stream<
|
|
707
|
+
self: Stream<A, E, R>,
|
|
708
|
+
that: Stream<A2, E2, R2>,
|
|
706
709
|
s: S,
|
|
707
710
|
f: (
|
|
708
711
|
s: S,
|
|
709
|
-
pullLeft: Effect.Effect<
|
|
710
|
-
pullRight: Effect.Effect<
|
|
711
|
-
) => Effect.Effect<
|
|
712
|
-
): Stream<R | R2 | R3 | R4 | R5
|
|
712
|
+
pullLeft: Effect.Effect<A, Option.Option<E>, R3>,
|
|
713
|
+
pullRight: Effect.Effect<A2, Option.Option<E2>, R4>
|
|
714
|
+
) => Effect.Effect<Exit.Exit<readonly [A3, S], Option.Option<E2 | E>>, never, R5>
|
|
715
|
+
): Stream<A3, E2 | E, R | R2 | R3 | R4 | R5>
|
|
713
716
|
} = internal.combine
|
|
714
717
|
|
|
715
718
|
/**
|
|
@@ -724,24 +727,24 @@ export const combine: {
|
|
|
724
727
|
*/
|
|
725
728
|
export const combineChunks: {
|
|
726
729
|
<R2, E2, A2, S, R3, E, A, R4, R5, A3>(
|
|
727
|
-
that: Stream<
|
|
730
|
+
that: Stream<A2, E2, R2>,
|
|
728
731
|
s: S,
|
|
729
732
|
f: (
|
|
730
733
|
s: S,
|
|
731
|
-
pullLeft: Effect.Effect<
|
|
732
|
-
pullRight: Effect.Effect<
|
|
733
|
-
) => Effect.Effect<
|
|
734
|
-
): <R>(self: Stream<
|
|
734
|
+
pullLeft: Effect.Effect<Chunk.Chunk<A>, Option.Option<E>, R3>,
|
|
735
|
+
pullRight: Effect.Effect<Chunk.Chunk<A2>, Option.Option<E2>, R4>
|
|
736
|
+
) => Effect.Effect<Exit.Exit<readonly [Chunk.Chunk<A3>, S], Option.Option<E2 | E>>, never, R5>
|
|
737
|
+
): <R>(self: Stream<A, E, R>) => Stream<A3, E2 | E, R2 | R3 | R4 | R5 | R>
|
|
735
738
|
<R, R2, E2, A2, S, R3, E, A, R4, R5, A3>(
|
|
736
|
-
self: Stream<
|
|
737
|
-
that: Stream<
|
|
739
|
+
self: Stream<A, E, R>,
|
|
740
|
+
that: Stream<A2, E2, R2>,
|
|
738
741
|
s: S,
|
|
739
742
|
f: (
|
|
740
743
|
s: S,
|
|
741
|
-
pullLeft: Effect.Effect<
|
|
742
|
-
pullRight: Effect.Effect<
|
|
743
|
-
) => Effect.Effect<
|
|
744
|
-
): Stream<R | R2 | R3 | R4 | R5
|
|
744
|
+
pullLeft: Effect.Effect<Chunk.Chunk<A>, Option.Option<E>, R3>,
|
|
745
|
+
pullRight: Effect.Effect<Chunk.Chunk<A2>, Option.Option<E2>, R4>
|
|
746
|
+
) => Effect.Effect<Exit.Exit<readonly [Chunk.Chunk<A3>, S], Option.Option<E2 | E>>, never, R5>
|
|
747
|
+
): Stream<A3, E2 | E, R | R2 | R3 | R4 | R5>
|
|
745
748
|
} = internal.combineChunks
|
|
746
749
|
|
|
747
750
|
/**
|
|
@@ -753,8 +756,8 @@ export const combineChunks: {
|
|
|
753
756
|
* @category utils
|
|
754
757
|
*/
|
|
755
758
|
export const concat: {
|
|
756
|
-
<R2, E2, A2>(that: Stream<
|
|
757
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
759
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E, R2 | R>
|
|
760
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A | A2, E | E2, R | R2>
|
|
758
761
|
} = internal.concat
|
|
759
762
|
|
|
760
763
|
/**
|
|
@@ -763,7 +766,7 @@ export const concat: {
|
|
|
763
766
|
* @since 2.0.0
|
|
764
767
|
* @category constructors
|
|
765
768
|
*/
|
|
766
|
-
export const concatAll: <
|
|
769
|
+
export const concatAll: <A, E, R>(streams: Chunk.Chunk<Stream<A, E, R>>) => Stream<A, E, R> = internal.concatAll
|
|
767
770
|
|
|
768
771
|
/**
|
|
769
772
|
* Composes this stream with the specified stream to create a cartesian
|
|
@@ -776,8 +779,8 @@ export const concatAll: <R, E, A>(streams: Chunk.Chunk<Stream<R, E, A>>) => Stre
|
|
|
776
779
|
* @category utils
|
|
777
780
|
*/
|
|
778
781
|
export const cross: {
|
|
779
|
-
<R2, E2, A2>(that: Stream<
|
|
780
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
782
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<[A, A2], E2 | E, R2 | R>
|
|
783
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<[A, A2], E | E2, R | R2>
|
|
781
784
|
} = internal.cross
|
|
782
785
|
|
|
783
786
|
/**
|
|
@@ -791,8 +794,8 @@ export const cross: {
|
|
|
791
794
|
* @category utils
|
|
792
795
|
*/
|
|
793
796
|
export const crossLeft: {
|
|
794
|
-
<R2, E2, A2>(that: Stream<
|
|
795
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
797
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
798
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A, E | E2, R | R2>
|
|
796
799
|
} = internal.crossLeft
|
|
797
800
|
|
|
798
801
|
/**
|
|
@@ -807,8 +810,8 @@ export const crossLeft: {
|
|
|
807
810
|
* @category utils
|
|
808
811
|
*/
|
|
809
812
|
export const crossRight: {
|
|
810
|
-
<R2, E2, A2>(that: Stream<
|
|
811
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
813
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>
|
|
814
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A2, E | E2, R | R2>
|
|
812
815
|
} = internal.crossRight
|
|
813
816
|
|
|
814
817
|
/**
|
|
@@ -823,14 +826,14 @@ export const crossRight: {
|
|
|
823
826
|
*/
|
|
824
827
|
export const crossWith: {
|
|
825
828
|
<R2, E2, B, A, C>(
|
|
826
|
-
that: Stream<
|
|
829
|
+
that: Stream<B, E2, R2>,
|
|
827
830
|
f: (a: A, b: B) => C
|
|
828
|
-
): <R, E>(self: Stream<
|
|
831
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<C, E2 | E, R2 | R>
|
|
829
832
|
<R, E, R2, E2, B, A, C>(
|
|
830
|
-
self: Stream<
|
|
831
|
-
that: Stream<
|
|
833
|
+
self: Stream<A, E, R>,
|
|
834
|
+
that: Stream<B, E2, R2>,
|
|
832
835
|
f: (a: A, b: B) => C
|
|
833
|
-
): Stream<
|
|
836
|
+
): Stream<C, E | E2, R | R2>
|
|
834
837
|
} = internal.crossWith
|
|
835
838
|
|
|
836
839
|
/**
|
|
@@ -848,8 +851,8 @@ export const crossWith: {
|
|
|
848
851
|
* @category utils
|
|
849
852
|
*/
|
|
850
853
|
export const debounce: {
|
|
851
|
-
(duration: Duration.DurationInput): <
|
|
852
|
-
<
|
|
854
|
+
(duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
855
|
+
<A, E, R>(self: Stream<A, E, R>, duration: Duration.DurationInput): Stream<A, E, R>
|
|
853
856
|
} = internal.debounce
|
|
854
857
|
|
|
855
858
|
/**
|
|
@@ -858,7 +861,7 @@ export const debounce: {
|
|
|
858
861
|
* @since 2.0.0
|
|
859
862
|
* @category constructors
|
|
860
863
|
*/
|
|
861
|
-
export const die: (defect: unknown) => Stream<never
|
|
864
|
+
export const die: (defect: unknown) => Stream<never> = internal.die
|
|
862
865
|
|
|
863
866
|
/**
|
|
864
867
|
* The stream that dies with the specified lazily evaluated defect.
|
|
@@ -866,7 +869,7 @@ export const die: (defect: unknown) => Stream<never, never, never> = internal.di
|
|
|
866
869
|
* @since 2.0.0
|
|
867
870
|
* @category constructors
|
|
868
871
|
*/
|
|
869
|
-
export const dieSync: (evaluate: LazyArg<unknown>) => Stream<never
|
|
872
|
+
export const dieSync: (evaluate: LazyArg<unknown>) => Stream<never> = internal.dieSync
|
|
870
873
|
|
|
871
874
|
/**
|
|
872
875
|
* The stream that dies with an exception described by `message`.
|
|
@@ -874,7 +877,7 @@ export const dieSync: (evaluate: LazyArg<unknown>) => Stream<never, never, never
|
|
|
874
877
|
* @since 2.0.0
|
|
875
878
|
* @category constructors
|
|
876
879
|
*/
|
|
877
|
-
export const dieMessage: (message: string) => Stream<never
|
|
880
|
+
export const dieMessage: (message: string) => Stream<never> = internal.dieMessage
|
|
878
881
|
|
|
879
882
|
/**
|
|
880
883
|
* More powerful version of `Stream.broadcast`. Allows to provide a function
|
|
@@ -889,19 +892,19 @@ export const distributedWith: {
|
|
|
889
892
|
options: {
|
|
890
893
|
readonly size: N
|
|
891
894
|
readonly maximumLag: number
|
|
892
|
-
readonly decide: (a: A) => Effect.Effect<
|
|
895
|
+
readonly decide: (a: A) => Effect.Effect<Predicate<number>>
|
|
893
896
|
}
|
|
894
897
|
): <R, E>(
|
|
895
|
-
self: Stream<
|
|
896
|
-
) => Effect.Effect<
|
|
898
|
+
self: Stream<A, E, R>
|
|
899
|
+
) => Effect.Effect<Stream.DynamicTuple<Queue.Dequeue<Exit.Exit<A, Option.Option<E>>>, N>, never, Scope.Scope | R>
|
|
897
900
|
<R, E, N extends number, A>(
|
|
898
|
-
self: Stream<
|
|
901
|
+
self: Stream<A, E, R>,
|
|
899
902
|
options: {
|
|
900
903
|
readonly size: N
|
|
901
904
|
readonly maximumLag: number
|
|
902
|
-
readonly decide: (a: A) => Effect.Effect<
|
|
905
|
+
readonly decide: (a: A) => Effect.Effect<Predicate<number>>
|
|
903
906
|
}
|
|
904
|
-
): Effect.Effect<
|
|
907
|
+
): Effect.Effect<Stream.DynamicTuple<Queue.Dequeue<Exit.Exit<A, Option.Option<E>>>, N>, never, Scope.Scope | R>
|
|
905
908
|
} = internal.distributedWith
|
|
906
909
|
|
|
907
910
|
/**
|
|
@@ -917,27 +920,21 @@ export const distributedWith: {
|
|
|
917
920
|
*/
|
|
918
921
|
export const distributedWithDynamic: {
|
|
919
922
|
<E, A, _>(
|
|
920
|
-
options: {
|
|
921
|
-
readonly maximumLag: number
|
|
922
|
-
readonly decide: (a: A) => Effect.Effect<never, never, Predicate<number>>
|
|
923
|
-
}
|
|
923
|
+
options: { readonly maximumLag: number; readonly decide: (a: A) => Effect.Effect<Predicate<number>> }
|
|
924
924
|
): <R>(
|
|
925
|
-
self: Stream<
|
|
925
|
+
self: Stream<A, E, R>
|
|
926
926
|
) => Effect.Effect<
|
|
927
|
-
|
|
927
|
+
Effect.Effect<[number, Queue.Dequeue<Exit.Exit<A, Option.Option<E>>>]>,
|
|
928
928
|
never,
|
|
929
|
-
|
|
929
|
+
Scope.Scope | R
|
|
930
930
|
>
|
|
931
931
|
<R, E, A, _>(
|
|
932
|
-
self: Stream<
|
|
933
|
-
options: {
|
|
934
|
-
readonly maximumLag: number
|
|
935
|
-
readonly decide: (a: A) => Effect.Effect<never, never, Predicate<number>>
|
|
936
|
-
}
|
|
932
|
+
self: Stream<A, E, R>,
|
|
933
|
+
options: { readonly maximumLag: number; readonly decide: (a: A) => Effect.Effect<Predicate<number>> }
|
|
937
934
|
): Effect.Effect<
|
|
938
|
-
|
|
935
|
+
Effect.Effect<[number, Queue.Dequeue<Exit.Exit<A, Option.Option<E>>>]>,
|
|
939
936
|
never,
|
|
940
|
-
|
|
937
|
+
Scope.Scope | R
|
|
941
938
|
>
|
|
942
939
|
} = internal.distributedWithDynamic
|
|
943
940
|
|
|
@@ -948,7 +945,7 @@ export const distributedWithDynamic: {
|
|
|
948
945
|
* @since 2.0.0
|
|
949
946
|
* @category utils
|
|
950
947
|
*/
|
|
951
|
-
export const drain: <
|
|
948
|
+
export const drain: <A, E, R>(self: Stream<A, E, R>) => Stream<never, E, R> = internal.drain
|
|
952
949
|
|
|
953
950
|
/**
|
|
954
951
|
* Drains the provided stream in the background for as long as this stream is
|
|
@@ -959,8 +956,8 @@ export const drain: <R, E, A>(self: Stream<R, E, A>) => Stream<R, E, never> = in
|
|
|
959
956
|
* @category utils
|
|
960
957
|
*/
|
|
961
958
|
export const drainFork: {
|
|
962
|
-
<R2, E2, A2>(that: Stream<
|
|
963
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
959
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
960
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A, E | E2, R | R2>
|
|
964
961
|
} = internal.drainFork
|
|
965
962
|
|
|
966
963
|
/**
|
|
@@ -970,8 +967,8 @@ export const drainFork: {
|
|
|
970
967
|
* @category utils
|
|
971
968
|
*/
|
|
972
969
|
export const drop: {
|
|
973
|
-
(n: number): <
|
|
974
|
-
<
|
|
970
|
+
(n: number): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
971
|
+
<A, E, R>(self: Stream<A, E, R>, n: number): Stream<A, E, R>
|
|
975
972
|
} = internal.drop
|
|
976
973
|
|
|
977
974
|
/**
|
|
@@ -983,8 +980,8 @@ export const drop: {
|
|
|
983
980
|
* @category utils
|
|
984
981
|
*/
|
|
985
982
|
export const dropRight: {
|
|
986
|
-
(n: number): <
|
|
987
|
-
<
|
|
983
|
+
(n: number): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
984
|
+
<A, E, R>(self: Stream<A, E, R>, n: number): Stream<A, E, R>
|
|
988
985
|
} = internal.dropRight
|
|
989
986
|
|
|
990
987
|
/**
|
|
@@ -995,8 +992,8 @@ export const dropRight: {
|
|
|
995
992
|
* @category utils
|
|
996
993
|
*/
|
|
997
994
|
export const dropUntil: {
|
|
998
|
-
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<
|
|
999
|
-
<
|
|
995
|
+
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
996
|
+
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>
|
|
1000
997
|
} = internal.dropUntil
|
|
1001
998
|
|
|
1002
999
|
/**
|
|
@@ -1008,12 +1005,12 @@ export const dropUntil: {
|
|
|
1008
1005
|
*/
|
|
1009
1006
|
export const dropUntilEffect: {
|
|
1010
1007
|
<A, R2, E2>(
|
|
1011
|
-
predicate: (a: NoInfer<A>) => Effect.Effect<
|
|
1012
|
-
): <R, E>(self: Stream<
|
|
1008
|
+
predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>
|
|
1009
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
1013
1010
|
<R, E, A, R2, E2>(
|
|
1014
|
-
self: Stream<
|
|
1015
|
-
predicate: (a: NoInfer<A>) => Effect.Effect<
|
|
1016
|
-
): Stream<
|
|
1011
|
+
self: Stream<A, E, R>,
|
|
1012
|
+
predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>
|
|
1013
|
+
): Stream<A, E | E2, R | R2>
|
|
1017
1014
|
} = internal.dropUntilEffect
|
|
1018
1015
|
|
|
1019
1016
|
/**
|
|
@@ -1024,8 +1021,8 @@ export const dropUntilEffect: {
|
|
|
1024
1021
|
* @category utils
|
|
1025
1022
|
*/
|
|
1026
1023
|
export const dropWhile: {
|
|
1027
|
-
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<
|
|
1028
|
-
<
|
|
1024
|
+
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
1025
|
+
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>
|
|
1029
1026
|
} = internal.dropWhile
|
|
1030
1027
|
|
|
1031
1028
|
/**
|
|
@@ -1037,12 +1034,12 @@ export const dropWhile: {
|
|
|
1037
1034
|
*/
|
|
1038
1035
|
export const dropWhileEffect: {
|
|
1039
1036
|
<A, R2, E2>(
|
|
1040
|
-
predicate: (a: NoInfer<A>) => Effect.Effect<
|
|
1041
|
-
): <R, E>(self: Stream<
|
|
1037
|
+
predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>
|
|
1038
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
1042
1039
|
<R, E, A, R2, E2>(
|
|
1043
|
-
self: Stream<
|
|
1044
|
-
predicate: (a:
|
|
1045
|
-
): Stream<
|
|
1040
|
+
self: Stream<A, E, R>,
|
|
1041
|
+
predicate: (a: A) => Effect.Effect<boolean, E2, R2>
|
|
1042
|
+
): Stream<A, E | E2, R | R2>
|
|
1046
1043
|
} = internal.dropWhileEffect
|
|
1047
1044
|
|
|
1048
1045
|
/**
|
|
@@ -1055,7 +1052,7 @@ export const dropWhileEffect: {
|
|
|
1055
1052
|
* @since 2.0.0
|
|
1056
1053
|
* @category utils
|
|
1057
1054
|
*/
|
|
1058
|
-
export const either: <
|
|
1055
|
+
export const either: <A, E, R>(self: Stream<A, E, R>) => Stream<Either.Either<E, A>, never, R> = internal.either
|
|
1059
1056
|
|
|
1060
1057
|
/**
|
|
1061
1058
|
* The empty stream.
|
|
@@ -1063,7 +1060,7 @@ export const either: <R, E, A>(self: Stream<R, E, A>) => Stream<R, never, Either
|
|
|
1063
1060
|
* @since 2.0.0
|
|
1064
1061
|
* @category constructors
|
|
1065
1062
|
*/
|
|
1066
|
-
export const empty: Stream<never
|
|
1063
|
+
export const empty: Stream<never> = internal.empty
|
|
1067
1064
|
|
|
1068
1065
|
/**
|
|
1069
1066
|
* Executes the provided finalizer after this stream's finalizers run.
|
|
@@ -1072,8 +1069,8 @@ export const empty: Stream<never, never, never> = internal.empty
|
|
|
1072
1069
|
* @category utils
|
|
1073
1070
|
*/
|
|
1074
1071
|
export const ensuring: {
|
|
1075
|
-
<R2, _>(finalizer: Effect.Effect<
|
|
1076
|
-
<R, E, A, R2, _>(self: Stream<
|
|
1072
|
+
<R2, _>(finalizer: Effect.Effect<_, never, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>
|
|
1073
|
+
<R, E, A, R2, _>(self: Stream<A, E, R>, finalizer: Effect.Effect<_, never, R2>): Stream<A, E, R | R2>
|
|
1077
1074
|
} = internal.ensuring
|
|
1078
1075
|
|
|
1079
1076
|
/**
|
|
@@ -1084,12 +1081,12 @@ export const ensuring: {
|
|
|
1084
1081
|
*/
|
|
1085
1082
|
export const ensuringWith: {
|
|
1086
1083
|
<E, R2>(
|
|
1087
|
-
finalizer: (exit: Exit.Exit<
|
|
1088
|
-
): <R, A>(self: Stream<
|
|
1084
|
+
finalizer: (exit: Exit.Exit<unknown, E>) => Effect.Effect<unknown, never, R2>
|
|
1085
|
+
): <R, A>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>
|
|
1089
1086
|
<R, E, A, R2>(
|
|
1090
|
-
self: Stream<
|
|
1091
|
-
finalizer: (exit: Exit.Exit<
|
|
1092
|
-
): Stream<R | R2
|
|
1087
|
+
self: Stream<A, E, R>,
|
|
1088
|
+
finalizer: (exit: Exit.Exit<unknown, E>) => Effect.Effect<unknown, never, R2>
|
|
1089
|
+
): Stream<A, E, R | R2>
|
|
1093
1090
|
} = internal.ensuringWith
|
|
1094
1091
|
|
|
1095
1092
|
/**
|
|
@@ -1098,7 +1095,7 @@ export const ensuringWith: {
|
|
|
1098
1095
|
* @since 2.0.0
|
|
1099
1096
|
* @category context
|
|
1100
1097
|
*/
|
|
1101
|
-
export const context: <R>() => Stream<R
|
|
1098
|
+
export const context: <R>() => Stream<Context.Context<R>, never, R> = internal.context
|
|
1102
1099
|
|
|
1103
1100
|
/**
|
|
1104
1101
|
* Accesses the context of the stream.
|
|
@@ -1106,7 +1103,7 @@ export const context: <R>() => Stream<R, never, Context.Context<R>> = internal.c
|
|
|
1106
1103
|
* @since 2.0.0
|
|
1107
1104
|
* @category context
|
|
1108
1105
|
*/
|
|
1109
|
-
export const contextWith: <R, A>(f: (env: Context.Context<R>) => A) => Stream<
|
|
1106
|
+
export const contextWith: <R, A>(f: (env: Context.Context<R>) => A) => Stream<A, never, R> = internal.contextWith
|
|
1110
1107
|
|
|
1111
1108
|
/**
|
|
1112
1109
|
* Accesses the context of the stream in the context of an effect.
|
|
@@ -1115,8 +1112,8 @@ export const contextWith: <R, A>(f: (env: Context.Context<R>) => A) => Stream<R,
|
|
|
1115
1112
|
* @category context
|
|
1116
1113
|
*/
|
|
1117
1114
|
export const contextWithEffect: <R0, R, E, A>(
|
|
1118
|
-
f: (env: Context.Context<R0>) => Effect.Effect<
|
|
1119
|
-
) => Stream<R0 | R
|
|
1115
|
+
f: (env: Context.Context<R0>) => Effect.Effect<A, E, R>
|
|
1116
|
+
) => Stream<A, E, R0 | R> = internal.contextWithEffect
|
|
1120
1117
|
|
|
1121
1118
|
/**
|
|
1122
1119
|
* Accesses the context of the stream in the context of a stream.
|
|
@@ -1125,8 +1122,8 @@ export const contextWithEffect: <R0, R, E, A>(
|
|
|
1125
1122
|
* @category context
|
|
1126
1123
|
*/
|
|
1127
1124
|
export const contextWithStream: <R0, R, E, A>(
|
|
1128
|
-
f: (env: Context.Context<R0>) => Stream<
|
|
1129
|
-
) => Stream<R0 | R
|
|
1125
|
+
f: (env: Context.Context<R0>) => Stream<A, E, R>
|
|
1126
|
+
) => Stream<A, E, R0 | R> = internal.contextWithStream
|
|
1130
1127
|
|
|
1131
1128
|
/**
|
|
1132
1129
|
* Creates a stream that executes the specified effect but emits no elements.
|
|
@@ -1134,7 +1131,7 @@ export const contextWithStream: <R0, R, E, A>(
|
|
|
1134
1131
|
* @since 2.0.0
|
|
1135
1132
|
* @category constructors
|
|
1136
1133
|
*/
|
|
1137
|
-
export const execute: <R, E, _>(effect: Effect.Effect<
|
|
1134
|
+
export const execute: <R, E, _>(effect: Effect.Effect<_, E, R>) => Stream<never, E, R> = internal.execute
|
|
1138
1135
|
|
|
1139
1136
|
/**
|
|
1140
1137
|
* Terminates with the specified error.
|
|
@@ -1142,7 +1139,7 @@ export const execute: <R, E, _>(effect: Effect.Effect<R, E, _>) => Stream<R, E,
|
|
|
1142
1139
|
* @since 2.0.0
|
|
1143
1140
|
* @category constructors
|
|
1144
1141
|
*/
|
|
1145
|
-
export const fail: <E>(error: E) => Stream<never, E
|
|
1142
|
+
export const fail: <E>(error: E) => Stream<never, E> = internal.fail
|
|
1146
1143
|
|
|
1147
1144
|
/**
|
|
1148
1145
|
* Terminates with the specified lazily evaluated error.
|
|
@@ -1150,7 +1147,7 @@ export const fail: <E>(error: E) => Stream<never, E, never> = internal.fail
|
|
|
1150
1147
|
* @since 2.0.0
|
|
1151
1148
|
* @category constructors
|
|
1152
1149
|
*/
|
|
1153
|
-
export const failSync: <E>(evaluate: LazyArg<E>) => Stream<never, E
|
|
1150
|
+
export const failSync: <E>(evaluate: LazyArg<E>) => Stream<never, E> = internal.failSync
|
|
1154
1151
|
|
|
1155
1152
|
/**
|
|
1156
1153
|
* The stream that always fails with the specified `Cause`.
|
|
@@ -1158,7 +1155,7 @@ export const failSync: <E>(evaluate: LazyArg<E>) => Stream<never, E, never> = in
|
|
|
1158
1155
|
* @since 2.0.0
|
|
1159
1156
|
* @category constructors
|
|
1160
1157
|
*/
|
|
1161
|
-
export const failCause: <E>(cause: Cause.Cause<E>) => Stream<never, E
|
|
1158
|
+
export const failCause: <E>(cause: Cause.Cause<E>) => Stream<never, E> = internal.failCause
|
|
1162
1159
|
|
|
1163
1160
|
/**
|
|
1164
1161
|
* The stream that always fails with the specified lazily evaluated `Cause`.
|
|
@@ -1166,7 +1163,7 @@ export const failCause: <E>(cause: Cause.Cause<E>) => Stream<never, E, never> =
|
|
|
1166
1163
|
* @since 2.0.0
|
|
1167
1164
|
* @category constructors
|
|
1168
1165
|
*/
|
|
1169
|
-
export const failCauseSync: <E>(evaluate: LazyArg<Cause.Cause<E>>) => Stream<never, E
|
|
1166
|
+
export const failCauseSync: <E>(evaluate: LazyArg<Cause.Cause<E>>) => Stream<never, E> = internal.failCauseSync
|
|
1170
1167
|
|
|
1171
1168
|
/**
|
|
1172
1169
|
* Filters the elements emitted by this stream using the provided function.
|
|
@@ -1175,10 +1172,10 @@ export const failCauseSync: <E>(evaluate: LazyArg<Cause.Cause<E>>) => Stream<nev
|
|
|
1175
1172
|
* @category filtering
|
|
1176
1173
|
*/
|
|
1177
1174
|
export const filter: {
|
|
1178
|
-
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <R, E>(self: Stream<
|
|
1179
|
-
<A>(predicate: Predicate<
|
|
1180
|
-
<R, E, A, B extends A>(self: Stream<
|
|
1181
|
-
<
|
|
1175
|
+
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <R, E>(self: Stream<A, E, R>) => Stream<B, E, R>
|
|
1176
|
+
<A, B extends A>(predicate: Predicate<B>): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
1177
|
+
<R, E, A, B extends A>(self: Stream<A, E, R>, refinement: Refinement<A, B>): Stream<B, E, R>
|
|
1178
|
+
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>
|
|
1182
1179
|
} = internal.filter
|
|
1183
1180
|
|
|
1184
1181
|
/**
|
|
@@ -1189,12 +1186,9 @@ export const filter: {
|
|
|
1189
1186
|
*/
|
|
1190
1187
|
export const filterEffect: {
|
|
1191
1188
|
<A, R2, E2>(
|
|
1192
|
-
f: (a: NoInfer<A>) => Effect.Effect<
|
|
1193
|
-
): <R, E>(self: Stream<
|
|
1194
|
-
<R, E, A, R2, E2>(
|
|
1195
|
-
self: Stream<R, E, A>,
|
|
1196
|
-
f: (a: NoInfer<A>) => Effect.Effect<R2, E2, boolean>
|
|
1197
|
-
): Stream<R | R2, E | E2, A>
|
|
1189
|
+
f: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>
|
|
1190
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
1191
|
+
<R, E, A, R2, E2>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<boolean, E2, R2>): Stream<A, E | E2, R | R2>
|
|
1198
1192
|
} = internal.filterEffect
|
|
1199
1193
|
|
|
1200
1194
|
/**
|
|
@@ -1204,8 +1198,8 @@ export const filterEffect: {
|
|
|
1204
1198
|
* @category utils
|
|
1205
1199
|
*/
|
|
1206
1200
|
export const filterMap: {
|
|
1207
|
-
<A, B>(pf: (a: A) => Option.Option<B>): <R, E>(self: Stream<
|
|
1208
|
-
<R, E, A, B>(self: Stream<
|
|
1201
|
+
<A, B>(pf: (a: A) => Option.Option<B>): <R, E>(self: Stream<A, E, R>) => Stream<B, E, R>
|
|
1202
|
+
<R, E, A, B>(self: Stream<A, E, R>, pf: (a: A) => Option.Option<B>): Stream<B, E, R>
|
|
1209
1203
|
} = internal.filterMap
|
|
1210
1204
|
|
|
1211
1205
|
/**
|
|
@@ -1216,12 +1210,12 @@ export const filterMap: {
|
|
|
1216
1210
|
*/
|
|
1217
1211
|
export const filterMapEffect: {
|
|
1218
1212
|
<A, R2, E2, A2>(
|
|
1219
|
-
pf: (a: A) => Option.Option<Effect.Effect<
|
|
1220
|
-
): <R, E>(self: Stream<
|
|
1213
|
+
pf: (a: A) => Option.Option<Effect.Effect<A2, E2, R2>>
|
|
1214
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>
|
|
1221
1215
|
<R, E, A, R2, E2, A2>(
|
|
1222
|
-
self: Stream<
|
|
1223
|
-
pf: (a: A) => Option.Option<Effect.Effect<
|
|
1224
|
-
): Stream<
|
|
1216
|
+
self: Stream<A, E, R>,
|
|
1217
|
+
pf: (a: A) => Option.Option<Effect.Effect<A2, E2, R2>>
|
|
1218
|
+
): Stream<A2, E | E2, R | R2>
|
|
1225
1219
|
} = internal.filterMapEffect
|
|
1226
1220
|
|
|
1227
1221
|
/**
|
|
@@ -1232,8 +1226,8 @@ export const filterMapEffect: {
|
|
|
1232
1226
|
* @category utils
|
|
1233
1227
|
*/
|
|
1234
1228
|
export const filterMapWhile: {
|
|
1235
|
-
<A, A2>(pf: (a: A) => Option.Option<A2>): <R, E>(self: Stream<
|
|
1236
|
-
<R, E, A, A2>(self: Stream<
|
|
1229
|
+
<A, A2>(pf: (a: A) => Option.Option<A2>): <R, E>(self: Stream<A, E, R>) => Stream<A2, E, R>
|
|
1230
|
+
<R, E, A, A2>(self: Stream<A, E, R>, pf: (a: A) => Option.Option<A2>): Stream<A2, E, R>
|
|
1237
1231
|
} = internal.filterMapWhile
|
|
1238
1232
|
|
|
1239
1233
|
/**
|
|
@@ -1245,12 +1239,12 @@ export const filterMapWhile: {
|
|
|
1245
1239
|
*/
|
|
1246
1240
|
export const filterMapWhileEffect: {
|
|
1247
1241
|
<A, R2, E2, A2>(
|
|
1248
|
-
pf: (a: A) => Option.Option<Effect.Effect<
|
|
1249
|
-
): <R, E>(self: Stream<
|
|
1242
|
+
pf: (a: A) => Option.Option<Effect.Effect<A2, E2, R2>>
|
|
1243
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>
|
|
1250
1244
|
<R, E, A, R2, E2, A2>(
|
|
1251
|
-
self: Stream<
|
|
1252
|
-
pf: (a: A) => Option.Option<Effect.Effect<
|
|
1253
|
-
): Stream<
|
|
1245
|
+
self: Stream<A, E, R>,
|
|
1246
|
+
pf: (a: A) => Option.Option<Effect.Effect<A2, E2, R2>>
|
|
1247
|
+
): Stream<A2, E | E2, R | R2>
|
|
1254
1248
|
} = internal.filterMapWhileEffect
|
|
1255
1249
|
|
|
1256
1250
|
/**
|
|
@@ -1260,7 +1254,7 @@ export const filterMapWhileEffect: {
|
|
|
1260
1254
|
* @since 2.0.0
|
|
1261
1255
|
* @category constructors
|
|
1262
1256
|
*/
|
|
1263
|
-
export const finalizer: <R, _>(finalizer: Effect.Effect<
|
|
1257
|
+
export const finalizer: <R, _>(finalizer: Effect.Effect<_, never, R>) => Stream<void, never, R> = internal.finalizer
|
|
1264
1258
|
|
|
1265
1259
|
/**
|
|
1266
1260
|
* Finds the first element emitted by this stream that satisfies the provided
|
|
@@ -1270,10 +1264,10 @@ export const finalizer: <R, _>(finalizer: Effect.Effect<R, never, _>) => Stream<
|
|
|
1270
1264
|
* @category elements
|
|
1271
1265
|
*/
|
|
1272
1266
|
export const find: {
|
|
1273
|
-
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <R, E>(self: Stream<
|
|
1274
|
-
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<
|
|
1275
|
-
<R, E, A, B extends A>(self: Stream<
|
|
1276
|
-
<
|
|
1267
|
+
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <R, E>(self: Stream<A, E, R>) => Stream<B, E, R>
|
|
1268
|
+
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
1269
|
+
<R, E, A, B extends A>(self: Stream<A, E, R>, refinement: Refinement<A, B>): Stream<B, E, R>
|
|
1270
|
+
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>
|
|
1277
1271
|
} = internal.find
|
|
1278
1272
|
|
|
1279
1273
|
/**
|
|
@@ -1285,12 +1279,12 @@ export const find: {
|
|
|
1285
1279
|
*/
|
|
1286
1280
|
export const findEffect: {
|
|
1287
1281
|
<A, R2, E2>(
|
|
1288
|
-
predicate: (a: NoInfer<A>) => Effect.Effect<
|
|
1289
|
-
): <R, E>(self: Stream<
|
|
1282
|
+
predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>
|
|
1283
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
1290
1284
|
<R, E, A, R2, E2>(
|
|
1291
|
-
self: Stream<
|
|
1292
|
-
predicate: (a: NoInfer<A>) => Effect.Effect<
|
|
1293
|
-
): Stream<
|
|
1285
|
+
self: Stream<A, E, R>,
|
|
1286
|
+
predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>
|
|
1287
|
+
): Stream<A, E | E2, R | R2>
|
|
1294
1288
|
} = internal.findEffect
|
|
1295
1289
|
|
|
1296
1290
|
/**
|
|
@@ -1302,22 +1296,22 @@ export const findEffect: {
|
|
|
1302
1296
|
*/
|
|
1303
1297
|
export const flatMap: {
|
|
1304
1298
|
<A, R2, E2, A2>(
|
|
1305
|
-
f: (a: A) => Stream<
|
|
1299
|
+
f: (a: A) => Stream<A2, E2, R2>,
|
|
1306
1300
|
options?: {
|
|
1307
1301
|
readonly concurrency?: number | "unbounded" | undefined
|
|
1308
1302
|
readonly bufferSize?: number | undefined
|
|
1309
1303
|
readonly switch?: boolean | undefined
|
|
1310
|
-
}
|
|
1311
|
-
): <R, E>(self: Stream<
|
|
1304
|
+
} | undefined
|
|
1305
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>
|
|
1312
1306
|
<R, E, A, R2, E2, A2>(
|
|
1313
|
-
self: Stream<
|
|
1314
|
-
f: (a: A) => Stream<
|
|
1307
|
+
self: Stream<A, E, R>,
|
|
1308
|
+
f: (a: A) => Stream<A2, E2, R2>,
|
|
1315
1309
|
options?: {
|
|
1316
1310
|
readonly concurrency?: number | "unbounded" | undefined
|
|
1317
1311
|
readonly bufferSize?: number | undefined
|
|
1318
1312
|
readonly switch?: boolean | undefined
|
|
1319
|
-
}
|
|
1320
|
-
): Stream<
|
|
1313
|
+
} | undefined
|
|
1314
|
+
): Stream<A2, E | E2, R | R2>
|
|
1321
1315
|
} = internal.flatMap
|
|
1322
1316
|
|
|
1323
1317
|
/**
|
|
@@ -1329,18 +1323,16 @@ export const flatMap: {
|
|
|
1329
1323
|
*/
|
|
1330
1324
|
export const flatten: {
|
|
1331
1325
|
(
|
|
1332
|
-
options?:
|
|
1333
|
-
readonly concurrency?: number | "unbounded" | undefined
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
): <R, E, R2, E2, A>(self: Stream<R, E, Stream<R2, E2, A>>) => Stream<R | R2, E | E2, A>
|
|
1326
|
+
options?:
|
|
1327
|
+
| { readonly concurrency?: number | "unbounded" | undefined; readonly bufferSize?: number | undefined }
|
|
1328
|
+
| undefined
|
|
1329
|
+
): <R, E, R2, E2, A>(self: Stream<Stream<A, E2, R2>, E, R>) => Stream<A, E | E2, R | R2>
|
|
1337
1330
|
<R, E, R2, E2, A>(
|
|
1338
|
-
self: Stream<
|
|
1339
|
-
options?:
|
|
1340
|
-
readonly concurrency?: number | "unbounded" | undefined
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
): Stream<R | R2, E | E2, A>
|
|
1331
|
+
self: Stream<Stream<A, E2, R2>, E, R>,
|
|
1332
|
+
options?:
|
|
1333
|
+
| { readonly concurrency?: number | "unbounded" | undefined; readonly bufferSize?: number | undefined }
|
|
1334
|
+
| undefined
|
|
1335
|
+
): Stream<A, E | E2, R | R2>
|
|
1344
1336
|
} = internal.flatten
|
|
1345
1337
|
|
|
1346
1338
|
/**
|
|
@@ -1350,7 +1342,7 @@ export const flatten: {
|
|
|
1350
1342
|
* @since 2.0.0
|
|
1351
1343
|
* @category sequencing
|
|
1352
1344
|
*/
|
|
1353
|
-
export const flattenChunks: <
|
|
1345
|
+
export const flattenChunks: <A, E, R>(self: Stream<Chunk.Chunk<A>, E, R>) => Stream<A, E, R> = internal.flattenChunks
|
|
1354
1346
|
|
|
1355
1347
|
/**
|
|
1356
1348
|
* Flattens `Effect` values into the stream's structure, preserving all
|
|
@@ -1361,18 +1353,16 @@ export const flattenChunks: <R, E, A>(self: Stream<R, E, Chunk.Chunk<A>>) => Str
|
|
|
1361
1353
|
*/
|
|
1362
1354
|
export const flattenEffect: {
|
|
1363
1355
|
(
|
|
1364
|
-
options?:
|
|
1365
|
-
readonly concurrency?: number | "unbounded" | undefined
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
): <R, E, R2, E2, A>(self: Stream<R, E, Effect.Effect<R2, E2, A>>) => Stream<R | R2, E | E2, A>
|
|
1356
|
+
options?:
|
|
1357
|
+
| { readonly concurrency?: number | "unbounded" | undefined; readonly unordered?: boolean | undefined }
|
|
1358
|
+
| undefined
|
|
1359
|
+
): <R, E, R2, E2, A>(self: Stream<Effect.Effect<A, E2, R2>, E, R>) => Stream<A, E | E2, R | R2>
|
|
1369
1360
|
<R, E, R2, E2, A>(
|
|
1370
|
-
self: Stream<
|
|
1371
|
-
options?:
|
|
1372
|
-
readonly concurrency?: number | "unbounded" | undefined
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
): Stream<R | R2, E | E2, A>
|
|
1361
|
+
self: Stream<Effect.Effect<A, E2, R2>, E, R>,
|
|
1362
|
+
options?:
|
|
1363
|
+
| { readonly concurrency?: number | "unbounded" | undefined; readonly unordered?: boolean | undefined }
|
|
1364
|
+
| undefined
|
|
1365
|
+
): Stream<A, E | E2, R | R2>
|
|
1376
1366
|
} = internal.flattenEffect
|
|
1377
1367
|
|
|
1378
1368
|
/**
|
|
@@ -1388,8 +1378,8 @@ export const flattenEffect: {
|
|
|
1388
1378
|
* @category sequencing
|
|
1389
1379
|
*/
|
|
1390
1380
|
export const flattenExitOption: <R, E, E2, A>(
|
|
1391
|
-
self: Stream<
|
|
1392
|
-
) => Stream<
|
|
1381
|
+
self: Stream<Exit.Exit<A, Option.Option<E2>>, E, R>
|
|
1382
|
+
) => Stream<A, E | E2, R> = internal.flattenExitOption
|
|
1393
1383
|
|
|
1394
1384
|
/**
|
|
1395
1385
|
* Submerges the iterables carried by this stream into the stream's structure,
|
|
@@ -1398,7 +1388,7 @@ export const flattenExitOption: <R, E, E2, A>(
|
|
|
1398
1388
|
* @since 2.0.0
|
|
1399
1389
|
* @category sequencing
|
|
1400
1390
|
*/
|
|
1401
|
-
export const flattenIterables: <
|
|
1391
|
+
export const flattenIterables: <A, E, R>(self: Stream<Iterable<A>, E, R>) => Stream<A, E, R> = internal.flattenIterables
|
|
1402
1392
|
|
|
1403
1393
|
/**
|
|
1404
1394
|
* Unwraps `Exit` values and flatten chunks that also signify end-of-stream
|
|
@@ -1407,9 +1397,8 @@ export const flattenIterables: <R, E, A>(self: Stream<R, E, Iterable<A>>) => Str
|
|
|
1407
1397
|
* @since 2.0.0
|
|
1408
1398
|
* @category sequencing
|
|
1409
1399
|
*/
|
|
1410
|
-
export const flattenTake: <R, E, E2, A>(
|
|
1411
|
-
|
|
1412
|
-
) => Stream<R, E | E2, A> = internal.flattenTake
|
|
1400
|
+
export const flattenTake: <R, E, E2, A>(self: Stream<Take.Take<A, E2>, E, R>) => Stream<A, E | E2, R> =
|
|
1401
|
+
internal.flattenTake
|
|
1413
1402
|
|
|
1414
1403
|
/**
|
|
1415
1404
|
* Repeats this stream forever.
|
|
@@ -1417,7 +1406,7 @@ export const flattenTake: <R, E, E2, A>(
|
|
|
1417
1406
|
* @since 2.0.0
|
|
1418
1407
|
* @category utils
|
|
1419
1408
|
*/
|
|
1420
|
-
export const forever: <
|
|
1409
|
+
export const forever: <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R> = internal.forever
|
|
1421
1410
|
|
|
1422
1411
|
/**
|
|
1423
1412
|
* Creates a stream from an `AsyncIterable`.
|
|
@@ -1425,10 +1414,8 @@ export const forever: <R, E, A>(self: Stream<R, E, A>) => Stream<R, E, A> = inte
|
|
|
1425
1414
|
* @since 2.0.0
|
|
1426
1415
|
* @category constructors
|
|
1427
1416
|
*/
|
|
1428
|
-
export const fromAsyncIterable: <E,
|
|
1429
|
-
|
|
1430
|
-
onError: (e: unknown) => E
|
|
1431
|
-
) => Stream<never, E, A> = internal.fromAsyncIterable
|
|
1417
|
+
export const fromAsyncIterable: <A, E>(iterable: AsyncIterable<A>, onError: (e: unknown) => E) => Stream<A, E> =
|
|
1418
|
+
internal.fromAsyncIterable
|
|
1432
1419
|
|
|
1433
1420
|
/**
|
|
1434
1421
|
* Creates a stream from a `Channel`.
|
|
@@ -1436,9 +1423,9 @@ export const fromAsyncIterable: <E, A>(
|
|
|
1436
1423
|
* @since 2.0.0
|
|
1437
1424
|
* @category constructors
|
|
1438
1425
|
*/
|
|
1439
|
-
export const fromChannel: <
|
|
1440
|
-
channel: Channel.Channel<
|
|
1441
|
-
) => Stream<
|
|
1426
|
+
export const fromChannel: <A, E, R>(
|
|
1427
|
+
channel: Channel.Channel<Chunk.Chunk<A>, unknown, E, unknown, unknown, unknown, R>
|
|
1428
|
+
) => Stream<A, E, R> = internal.fromChannel
|
|
1442
1429
|
|
|
1443
1430
|
/**
|
|
1444
1431
|
* Creates a channel from a `Stream`.
|
|
@@ -1446,9 +1433,9 @@ export const fromChannel: <R, E, A>(
|
|
|
1446
1433
|
* @since 2.0.0
|
|
1447
1434
|
* @category constructors
|
|
1448
1435
|
*/
|
|
1449
|
-
export const toChannel: <
|
|
1450
|
-
stream: Stream<
|
|
1451
|
-
) => Channel.Channel<
|
|
1436
|
+
export const toChannel: <A, E, R>(
|
|
1437
|
+
stream: Stream<A, E, R>
|
|
1438
|
+
) => Channel.Channel<Chunk.Chunk<A>, unknown, E, unknown, unknown, unknown, R> = internal.toChannel
|
|
1452
1439
|
|
|
1453
1440
|
/**
|
|
1454
1441
|
* Creates a stream from a `Chunk` of values.
|
|
@@ -1456,7 +1443,7 @@ export const toChannel: <R, E, A>(
|
|
|
1456
1443
|
* @since 2.0.0
|
|
1457
1444
|
* @category constructors
|
|
1458
1445
|
*/
|
|
1459
|
-
export const fromChunk: <A>(chunk: Chunk.Chunk<A>) => Stream<
|
|
1446
|
+
export const fromChunk: <A>(chunk: Chunk.Chunk<A>) => Stream<A> = internal.fromChunk
|
|
1460
1447
|
|
|
1461
1448
|
/**
|
|
1462
1449
|
* Creates a stream from a subscription to a `PubSub`.
|
|
@@ -1468,18 +1455,12 @@ export const fromChunk: <A>(chunk: Chunk.Chunk<A>) => Stream<never, never, A> =
|
|
|
1468
1455
|
export const fromChunkPubSub: {
|
|
1469
1456
|
<A>(
|
|
1470
1457
|
pubsub: PubSub.PubSub<Chunk.Chunk<A>>,
|
|
1471
|
-
options: {
|
|
1472
|
-
|
|
1473
|
-
readonly shutdown?: boolean | undefined
|
|
1474
|
-
}
|
|
1475
|
-
): Effect.Effect<Scope.Scope, never, Stream<never, never, A>>
|
|
1458
|
+
options: { readonly scoped: true; readonly shutdown?: boolean | undefined }
|
|
1459
|
+
): Effect.Effect<Stream<A>, never, Scope.Scope>
|
|
1476
1460
|
<A>(
|
|
1477
1461
|
pubsub: PubSub.PubSub<Chunk.Chunk<A>>,
|
|
1478
|
-
options?: {
|
|
1479
|
-
|
|
1480
|
-
readonly shutdown?: boolean | undefined
|
|
1481
|
-
}
|
|
1482
|
-
): Stream<never, never, A>
|
|
1462
|
+
options?: { readonly scoped?: false | undefined; readonly shutdown?: boolean | undefined } | undefined
|
|
1463
|
+
): Stream<A>
|
|
1483
1464
|
} = internal.fromChunkPubSub
|
|
1484
1465
|
|
|
1485
1466
|
/**
|
|
@@ -1494,7 +1475,7 @@ export const fromChunkQueue: <A>(
|
|
|
1494
1475
|
options?: {
|
|
1495
1476
|
readonly shutdown?: boolean | undefined
|
|
1496
1477
|
}
|
|
1497
|
-
) => Stream<
|
|
1478
|
+
) => Stream<A> = internal.fromChunkQueue
|
|
1498
1479
|
|
|
1499
1480
|
/**
|
|
1500
1481
|
* Creates a stream from an arbitrary number of chunks.
|
|
@@ -1502,7 +1483,7 @@ export const fromChunkQueue: <A>(
|
|
|
1502
1483
|
* @since 2.0.0
|
|
1503
1484
|
* @category constructors
|
|
1504
1485
|
*/
|
|
1505
|
-
export const fromChunks: <A>(...chunks: Array<Chunk.Chunk<A>>) => Stream<
|
|
1486
|
+
export const fromChunks: <A>(...chunks: Array<Chunk.Chunk<A>>) => Stream<A> = internal.fromChunks
|
|
1506
1487
|
|
|
1507
1488
|
/**
|
|
1508
1489
|
* Either emits the success value of this effect or terminates the stream
|
|
@@ -1511,7 +1492,7 @@ export const fromChunks: <A>(...chunks: Array<Chunk.Chunk<A>>) => Stream<never,
|
|
|
1511
1492
|
* @since 2.0.0
|
|
1512
1493
|
* @category constructors
|
|
1513
1494
|
*/
|
|
1514
|
-
export const fromEffect: <
|
|
1495
|
+
export const fromEffect: <A, E, R>(effect: Effect.Effect<A, E, R>) => Stream<A, E, R> = internal.fromEffect
|
|
1515
1496
|
|
|
1516
1497
|
/**
|
|
1517
1498
|
* Creates a stream from an effect producing a value of type `A` or an empty
|
|
@@ -1520,7 +1501,7 @@ export const fromEffect: <R, E, A>(effect: Effect.Effect<R, E, A>) => Stream<R,
|
|
|
1520
1501
|
* @since 2.0.0
|
|
1521
1502
|
* @category constructors
|
|
1522
1503
|
*/
|
|
1523
|
-
export const fromEffectOption: <
|
|
1504
|
+
export const fromEffectOption: <A, E, R>(effect: Effect.Effect<A, Option.Option<E>, R>) => Stream<A, E, R> =
|
|
1524
1505
|
internal.fromEffectOption
|
|
1525
1506
|
|
|
1526
1507
|
/**
|
|
@@ -1538,15 +1519,15 @@ export const fromPubSub: {
|
|
|
1538
1519
|
readonly maxChunkSize?: number | undefined
|
|
1539
1520
|
readonly shutdown?: boolean | undefined
|
|
1540
1521
|
}
|
|
1541
|
-
): Effect.Effect<
|
|
1522
|
+
): Effect.Effect<Stream<A>, never, Scope.Scope>
|
|
1542
1523
|
<A>(
|
|
1543
1524
|
pubsub: PubSub.PubSub<A>,
|
|
1544
1525
|
options?: {
|
|
1545
1526
|
readonly scoped?: false | undefined
|
|
1546
1527
|
readonly maxChunkSize?: number | undefined
|
|
1547
1528
|
readonly shutdown?: boolean | undefined
|
|
1548
|
-
}
|
|
1549
|
-
): Stream<
|
|
1529
|
+
} | undefined
|
|
1530
|
+
): Stream<A>
|
|
1550
1531
|
} = internal.fromPubSub
|
|
1551
1532
|
|
|
1552
1533
|
/**
|
|
@@ -1555,7 +1536,7 @@ export const fromPubSub: {
|
|
|
1555
1536
|
* @since 2.0.0
|
|
1556
1537
|
* @category constructors
|
|
1557
1538
|
*/
|
|
1558
|
-
export const fromIterable: <A>(iterable: Iterable<A>) => Stream<
|
|
1539
|
+
export const fromIterable: <A>(iterable: Iterable<A>) => Stream<A> = internal.fromIterable
|
|
1559
1540
|
|
|
1560
1541
|
/**
|
|
1561
1542
|
* Creates a stream from an effect producing a value of type `Iterable<A>`.
|
|
@@ -1563,7 +1544,7 @@ export const fromIterable: <A>(iterable: Iterable<A>) => Stream<never, never, A>
|
|
|
1563
1544
|
* @since 2.0.0
|
|
1564
1545
|
* @category constructors
|
|
1565
1546
|
*/
|
|
1566
|
-
export const fromIterableEffect: <
|
|
1547
|
+
export const fromIterableEffect: <A, E, R>(effect: Effect.Effect<Iterable<A>, E, R>) => Stream<A, E, R> =
|
|
1567
1548
|
internal.fromIterableEffect
|
|
1568
1549
|
|
|
1569
1550
|
/**
|
|
@@ -1572,7 +1553,7 @@ export const fromIterableEffect: <R, E, A>(effect: Effect.Effect<R, E, Iterable<
|
|
|
1572
1553
|
* @since 2.0.0
|
|
1573
1554
|
* @category constructors
|
|
1574
1555
|
*/
|
|
1575
|
-
export const fromIteratorSucceed: <A>(iterator: IterableIterator<A>, maxChunkSize?: number) => Stream<
|
|
1556
|
+
export const fromIteratorSucceed: <A>(iterator: IterableIterator<A>, maxChunkSize?: number) => Stream<A> =
|
|
1576
1557
|
internal.fromIteratorSucceed
|
|
1577
1558
|
|
|
1578
1559
|
/**
|
|
@@ -1584,8 +1565,8 @@ export const fromIteratorSucceed: <A>(iterator: IterableIterator<A>, maxChunkSiz
|
|
|
1584
1565
|
* @category constructors
|
|
1585
1566
|
*/
|
|
1586
1567
|
export const fromPull: <R, R2, E, A>(
|
|
1587
|
-
effect: Effect.Effect<
|
|
1588
|
-
) => Stream<Exclude<R, Scope.Scope
|
|
1568
|
+
effect: Effect.Effect<Effect.Effect<Chunk.Chunk<A>, Option.Option<E>, R2>, never, Scope.Scope | R>
|
|
1569
|
+
) => Stream<A, E, R2 | Exclude<R, Scope.Scope>> = internal.fromPull
|
|
1589
1570
|
|
|
1590
1571
|
/**
|
|
1591
1572
|
* Creates a stream from a queue of values
|
|
@@ -1601,7 +1582,7 @@ export const fromQueue: <A>(
|
|
|
1601
1582
|
readonly maxChunkSize?: number | undefined
|
|
1602
1583
|
readonly shutdown?: boolean | undefined
|
|
1603
1584
|
}
|
|
1604
|
-
) => Stream<
|
|
1585
|
+
) => Stream<A> = internal.fromQueue
|
|
1605
1586
|
|
|
1606
1587
|
/**
|
|
1607
1588
|
* Creates a stream from a `ReadableStream`.
|
|
@@ -1614,7 +1595,7 @@ export const fromQueue: <A>(
|
|
|
1614
1595
|
export const fromReadableStream: <A, E>(
|
|
1615
1596
|
evaluate: LazyArg<ReadableStream<A>>,
|
|
1616
1597
|
onError: (error: unknown) => E
|
|
1617
|
-
) => Stream<
|
|
1598
|
+
) => Stream<A, E> = internal.fromReadableStream
|
|
1618
1599
|
|
|
1619
1600
|
/**
|
|
1620
1601
|
* Creates a stream from a `ReadableStreamBYOBReader`.
|
|
@@ -1629,7 +1610,7 @@ export const fromReadableStreamByob: <E>(
|
|
|
1629
1610
|
evaluate: LazyArg<ReadableStream<Uint8Array>>,
|
|
1630
1611
|
onError: (error: unknown) => E,
|
|
1631
1612
|
allocSize?: number
|
|
1632
|
-
) => Stream<
|
|
1613
|
+
) => Stream<Uint8Array, E> = internal.fromReadableStreamByob
|
|
1633
1614
|
|
|
1634
1615
|
/**
|
|
1635
1616
|
* Creates a stream from a `Schedule` that does not require any further
|
|
@@ -1639,7 +1620,7 @@ export const fromReadableStreamByob: <E>(
|
|
|
1639
1620
|
* @since 2.0.0
|
|
1640
1621
|
* @category constructors
|
|
1641
1622
|
*/
|
|
1642
|
-
export const fromSchedule: <R, A>(schedule: Schedule.Schedule<R, unknown, A>) => Stream<
|
|
1623
|
+
export const fromSchedule: <R, A>(schedule: Schedule.Schedule<R, unknown, A>) => Stream<A, never, R> =
|
|
1643
1624
|
internal.fromSchedule
|
|
1644
1625
|
|
|
1645
1626
|
/**
|
|
@@ -1650,8 +1631,8 @@ export const fromSchedule: <R, A>(schedule: Schedule.Schedule<R, unknown, A>) =>
|
|
|
1650
1631
|
* @category grouping
|
|
1651
1632
|
*/
|
|
1652
1633
|
export const groupAdjacentBy: {
|
|
1653
|
-
<A, K>(f: (a: A) => K): <R, E>(self: Stream<
|
|
1654
|
-
<R, E, A, K>(self: Stream<
|
|
1634
|
+
<A, K>(f: (a: A) => K): <R, E>(self: Stream<A, E, R>) => Stream<[K, Chunk.NonEmptyChunk<A>], E, R>
|
|
1635
|
+
<R, E, A, K>(self: Stream<A, E, R>, f: (a: A) => K): Stream<[K, Chunk.NonEmptyChunk<A>], E, R>
|
|
1655
1636
|
} = internal.groupAdjacentBy
|
|
1656
1637
|
|
|
1657
1638
|
/**
|
|
@@ -1662,17 +1643,13 @@ export const groupAdjacentBy: {
|
|
|
1662
1643
|
*/
|
|
1663
1644
|
export const groupBy: {
|
|
1664
1645
|
<A, R2, E2, K, V>(
|
|
1665
|
-
f: (a: A) => Effect.Effect<
|
|
1666
|
-
options?: {
|
|
1667
|
-
|
|
1668
|
-
}
|
|
1669
|
-
): <R, E>(self: Stream<R, E, A>) => GroupBy.GroupBy<R2 | R, E2 | E, K, V>
|
|
1646
|
+
f: (a: A) => Effect.Effect<readonly [K, V], E2, R2>,
|
|
1647
|
+
options?: { readonly bufferSize?: number | undefined } | undefined
|
|
1648
|
+
): <R, E>(self: Stream<A, E, R>) => GroupBy.GroupBy<R2 | R, E2 | E, K, V>
|
|
1670
1649
|
<R, E, A, R2, E2, K, V>(
|
|
1671
|
-
self: Stream<
|
|
1672
|
-
f: (a: A) => Effect.Effect<
|
|
1673
|
-
options?: {
|
|
1674
|
-
readonly bufferSize?: number | undefined
|
|
1675
|
-
}
|
|
1650
|
+
self: Stream<A, E, R>,
|
|
1651
|
+
f: (a: A) => Effect.Effect<readonly [K, V], E2, R2>,
|
|
1652
|
+
options?: { readonly bufferSize?: number | undefined } | undefined
|
|
1676
1653
|
): GroupBy.GroupBy<R | R2, E | E2, K, V>
|
|
1677
1654
|
} = _groupBy.groupBy
|
|
1678
1655
|
|
|
@@ -1719,9 +1696,9 @@ export const groupByKey: {
|
|
|
1719
1696
|
options?: {
|
|
1720
1697
|
readonly bufferSize?: number | undefined
|
|
1721
1698
|
}
|
|
1722
|
-
): <R, E>(self: Stream<
|
|
1699
|
+
): <R, E>(self: Stream<A, E, R>) => GroupBy.GroupBy<R, E, K, A>
|
|
1723
1700
|
<R, E, A, K>(
|
|
1724
|
-
self: Stream<
|
|
1701
|
+
self: Stream<A, E, R>,
|
|
1725
1702
|
f: (a: A) => K,
|
|
1726
1703
|
options?: {
|
|
1727
1704
|
readonly bufferSize?: number | undefined
|
|
@@ -1736,8 +1713,8 @@ export const groupByKey: {
|
|
|
1736
1713
|
* @category utils
|
|
1737
1714
|
*/
|
|
1738
1715
|
export const grouped: {
|
|
1739
|
-
(chunkSize: number): <
|
|
1740
|
-
<
|
|
1716
|
+
(chunkSize: number): <A, E, R>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R>
|
|
1717
|
+
<A, E, R>(self: Stream<A, E, R>, chunkSize: number): Stream<Chunk.Chunk<A>, E, R>
|
|
1741
1718
|
} = internal.grouped
|
|
1742
1719
|
|
|
1743
1720
|
/**
|
|
@@ -1751,8 +1728,8 @@ export const groupedWithin: {
|
|
|
1751
1728
|
(
|
|
1752
1729
|
chunkSize: number,
|
|
1753
1730
|
duration: Duration.DurationInput
|
|
1754
|
-
): <
|
|
1755
|
-
<
|
|
1731
|
+
): <A, E, R>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R>
|
|
1732
|
+
<A, E, R>(self: Stream<A, E, R>, chunkSize: number, duration: Duration.DurationInput): Stream<Chunk.Chunk<A>, E, R>
|
|
1756
1733
|
} = internal.groupedWithin
|
|
1757
1734
|
|
|
1758
1735
|
/**
|
|
@@ -1766,8 +1743,8 @@ export const groupedWithin: {
|
|
|
1766
1743
|
* @category utils
|
|
1767
1744
|
*/
|
|
1768
1745
|
export const haltAfter: {
|
|
1769
|
-
(duration: Duration.DurationInput): <
|
|
1770
|
-
<
|
|
1746
|
+
(duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
1747
|
+
<A, E, R>(self: Stream<A, E, R>, duration: Duration.DurationInput): Stream<A, E, R>
|
|
1771
1748
|
} = internal.haltAfter
|
|
1772
1749
|
|
|
1773
1750
|
/**
|
|
@@ -1784,8 +1761,8 @@ export const haltAfter: {
|
|
|
1784
1761
|
* @category utils
|
|
1785
1762
|
*/
|
|
1786
1763
|
export const haltWhen: {
|
|
1787
|
-
<R2, E2, _>(effect: Effect.Effect<
|
|
1788
|
-
<R, E, A, R2, E2, _>(self: Stream<
|
|
1764
|
+
<R2, E2, _>(effect: Effect.Effect<_, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
1765
|
+
<R, E, A, R2, E2, _>(self: Stream<A, E, R>, effect: Effect.Effect<_, E2, R2>): Stream<A, E | E2, R | R2>
|
|
1789
1766
|
} = internal.haltWhen
|
|
1790
1767
|
|
|
1791
1768
|
/**
|
|
@@ -1797,8 +1774,8 @@ export const haltWhen: {
|
|
|
1797
1774
|
* @category utils
|
|
1798
1775
|
*/
|
|
1799
1776
|
export const haltWhenDeferred: {
|
|
1800
|
-
<E2, _>(deferred: Deferred.Deferred<
|
|
1801
|
-
<R, E, A, E2, _>(self: Stream<
|
|
1777
|
+
<E2, _>(deferred: Deferred.Deferred<_, E2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R>
|
|
1778
|
+
<R, E, A, E2, _>(self: Stream<A, E, R>, deferred: Deferred.Deferred<_, E2>): Stream<A, E | E2, R>
|
|
1802
1779
|
} = internal.haltWhenDeferred
|
|
1803
1780
|
|
|
1804
1781
|
/**
|
|
@@ -1807,7 +1784,7 @@ export const haltWhenDeferred: {
|
|
|
1807
1784
|
* @since 2.0.0
|
|
1808
1785
|
* @category utils
|
|
1809
1786
|
*/
|
|
1810
|
-
export const identity: <
|
|
1787
|
+
export const identity: <A, E = never, R = never>() => Stream<A, E, R> = internal.identityStream
|
|
1811
1788
|
|
|
1812
1789
|
/**
|
|
1813
1790
|
* Interleaves this stream and the specified stream deterministically by
|
|
@@ -1819,8 +1796,8 @@ export const identity: <R, E, A>() => Stream<R, E, A> = internal.identityStream
|
|
|
1819
1796
|
* @category utils
|
|
1820
1797
|
*/
|
|
1821
1798
|
export const interleave: {
|
|
1822
|
-
<R2, E2, A2>(that: Stream<
|
|
1823
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
1799
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E, R2 | R>
|
|
1800
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A | A2, E | E2, R | R2>
|
|
1824
1801
|
} = internal.interleave
|
|
1825
1802
|
|
|
1826
1803
|
/**
|
|
@@ -1837,14 +1814,14 @@ export const interleave: {
|
|
|
1837
1814
|
*/
|
|
1838
1815
|
export const interleaveWith: {
|
|
1839
1816
|
<R2, E2, A2, R3, E3>(
|
|
1840
|
-
that: Stream<
|
|
1841
|
-
decider: Stream<
|
|
1842
|
-
): <
|
|
1817
|
+
that: Stream<A2, E2, R2>,
|
|
1818
|
+
decider: Stream<boolean, E3, R3>
|
|
1819
|
+
): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E3 | E, R2 | R3 | R>
|
|
1843
1820
|
<R, E, A, R2, E2, A2, R3, E3>(
|
|
1844
|
-
self: Stream<
|
|
1845
|
-
that: Stream<
|
|
1846
|
-
decider: Stream<
|
|
1847
|
-
): Stream<
|
|
1821
|
+
self: Stream<A, E, R>,
|
|
1822
|
+
that: Stream<A2, E2, R2>,
|
|
1823
|
+
decider: Stream<boolean, E3, R3>
|
|
1824
|
+
): Stream<A | A2, E | E2 | E3, R | R2 | R3>
|
|
1848
1825
|
} = internal.interleaveWith
|
|
1849
1826
|
|
|
1850
1827
|
/**
|
|
@@ -1854,8 +1831,8 @@ export const interleaveWith: {
|
|
|
1854
1831
|
* @category utils
|
|
1855
1832
|
*/
|
|
1856
1833
|
export const intersperse: {
|
|
1857
|
-
<A2>(element: A2): <
|
|
1858
|
-
<R, E, A, A2>(self: Stream<
|
|
1834
|
+
<A2>(element: A2): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E, R>
|
|
1835
|
+
<R, E, A, A2>(self: Stream<A, E, R>, element: A2): Stream<A | A2, E, R>
|
|
1859
1836
|
} = internal.intersperse
|
|
1860
1837
|
|
|
1861
1838
|
/**
|
|
@@ -1867,11 +1844,11 @@ export const intersperse: {
|
|
|
1867
1844
|
export const intersperseAffixes: {
|
|
1868
1845
|
<A2, A3, A4>(
|
|
1869
1846
|
options: { readonly start: A2; readonly middle: A3; readonly end: A4 }
|
|
1870
|
-
): <
|
|
1847
|
+
): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A3 | A4 | A, E, R>
|
|
1871
1848
|
<R, E, A, A2, A3, A4>(
|
|
1872
|
-
self: Stream<
|
|
1849
|
+
self: Stream<A, E, R>,
|
|
1873
1850
|
options: { readonly start: A2; readonly middle: A3; readonly end: A4 }
|
|
1874
|
-
): Stream<
|
|
1851
|
+
): Stream<A | A2 | A3 | A4, E, R>
|
|
1875
1852
|
} = internal.intersperseAffixes
|
|
1876
1853
|
|
|
1877
1854
|
/**
|
|
@@ -1882,8 +1859,8 @@ export const intersperseAffixes: {
|
|
|
1882
1859
|
* @category utils
|
|
1883
1860
|
*/
|
|
1884
1861
|
export const interruptAfter: {
|
|
1885
|
-
(duration: Duration.DurationInput): <
|
|
1886
|
-
<
|
|
1862
|
+
(duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
1863
|
+
<A, E, R>(self: Stream<A, E, R>, duration: Duration.DurationInput): Stream<A, E, R>
|
|
1887
1864
|
} = internal.interruptAfter
|
|
1888
1865
|
|
|
1889
1866
|
/**
|
|
@@ -1899,8 +1876,8 @@ export const interruptAfter: {
|
|
|
1899
1876
|
* @category utils
|
|
1900
1877
|
*/
|
|
1901
1878
|
export const interruptWhen: {
|
|
1902
|
-
<R2, E2, _>(effect: Effect.Effect<
|
|
1903
|
-
<R, E, A, R2, E2, _>(self: Stream<
|
|
1879
|
+
<R2, E2, _>(effect: Effect.Effect<_, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
1880
|
+
<R, E, A, R2, E2, _>(self: Stream<A, E, R>, effect: Effect.Effect<_, E2, R2>): Stream<A, E | E2, R | R2>
|
|
1904
1881
|
} = internal.interruptWhen
|
|
1905
1882
|
|
|
1906
1883
|
/**
|
|
@@ -1914,8 +1891,8 @@ export const interruptWhen: {
|
|
|
1914
1891
|
* @category utils
|
|
1915
1892
|
*/
|
|
1916
1893
|
export const interruptWhenDeferred: {
|
|
1917
|
-
<E2, _>(deferred: Deferred.Deferred<
|
|
1918
|
-
<R, E, A, E2, _>(self: Stream<
|
|
1894
|
+
<E2, _>(deferred: Deferred.Deferred<_, E2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R>
|
|
1895
|
+
<R, E, A, E2, _>(self: Stream<A, E, R>, deferred: Deferred.Deferred<_, E2>): Stream<A, E | E2, R>
|
|
1919
1896
|
} = internal.interruptWhenDeferred
|
|
1920
1897
|
|
|
1921
1898
|
/**
|
|
@@ -1925,7 +1902,7 @@ export const interruptWhenDeferred: {
|
|
|
1925
1902
|
* @since 2.0.0
|
|
1926
1903
|
* @category constructors
|
|
1927
1904
|
*/
|
|
1928
|
-
export const iterate: <A>(value: A, next: (value: A) => A) => Stream<
|
|
1905
|
+
export const iterate: <A>(value: A, next: (value: A) => A) => Stream<A> = internal.iterate
|
|
1929
1906
|
|
|
1930
1907
|
/**
|
|
1931
1908
|
* Creates a stream from an sequence of values.
|
|
@@ -1933,7 +1910,7 @@ export const iterate: <A>(value: A, next: (value: A) => A) => Stream<never, neve
|
|
|
1933
1910
|
* @since 2.0.0
|
|
1934
1911
|
* @category constructors
|
|
1935
1912
|
*/
|
|
1936
|
-
export const make: <As extends Array<any>>(...as: As) => Stream<
|
|
1913
|
+
export const make: <As extends Array<any>>(...as: As) => Stream<As[number]> = internal.make
|
|
1937
1914
|
|
|
1938
1915
|
/**
|
|
1939
1916
|
* Transforms the elements of this stream using the supplied function.
|
|
@@ -1942,8 +1919,8 @@ export const make: <As extends Array<any>>(...as: As) => Stream<never, never, As
|
|
|
1942
1919
|
* @category mapping
|
|
1943
1920
|
*/
|
|
1944
1921
|
export const map: {
|
|
1945
|
-
<A, B>(f: (a: A) => B): <R, E>(self: Stream<
|
|
1946
|
-
<R, E, A, B>(self: Stream<
|
|
1922
|
+
<A, B>(f: (a: A) => B): <R, E>(self: Stream<A, E, R>) => Stream<B, E, R>
|
|
1923
|
+
<R, E, A, B>(self: Stream<A, E, R>, f: (a: A) => B): Stream<B, E, R>
|
|
1947
1924
|
} = internal.map
|
|
1948
1925
|
|
|
1949
1926
|
/**
|
|
@@ -1953,8 +1930,8 @@ export const map: {
|
|
|
1953
1930
|
* @category mapping
|
|
1954
1931
|
*/
|
|
1955
1932
|
export const mapAccum: {
|
|
1956
|
-
<S, A, A2>(s: S, f: (s: S, a: A) => readonly [S, A2]): <R, E>(self: Stream<
|
|
1957
|
-
<R, E, S, A, A2>(self: Stream<
|
|
1933
|
+
<S, A, A2>(s: S, f: (s: S, a: A) => readonly [S, A2]): <R, E>(self: Stream<A, E, R>) => Stream<A2, E, R>
|
|
1934
|
+
<R, E, S, A, A2>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => readonly [S, A2]): Stream<A2, E, R>
|
|
1958
1935
|
} = internal.mapAccum
|
|
1959
1936
|
|
|
1960
1937
|
/**
|
|
@@ -1965,15 +1942,15 @@ export const mapAccum: {
|
|
|
1965
1942
|
* @category mapping
|
|
1966
1943
|
*/
|
|
1967
1944
|
export const mapAccumEffect: {
|
|
1968
|
-
<S, A,
|
|
1945
|
+
<S, A, A2, E2, R2>(
|
|
1969
1946
|
s: S,
|
|
1970
|
-
f: (s: S, a: A) => Effect.Effect<
|
|
1971
|
-
): <R, E>(self: Stream<
|
|
1972
|
-
<R, E,
|
|
1973
|
-
self: Stream<
|
|
1947
|
+
f: (s: S, a: A) => Effect.Effect<readonly [S, A2], E2, R2>
|
|
1948
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>
|
|
1949
|
+
<R, E, A, S, A2, E2, R2>(
|
|
1950
|
+
self: Stream<A, E, R>,
|
|
1974
1951
|
s: S,
|
|
1975
|
-
f: (s: S, a: A) => Effect.Effect<
|
|
1976
|
-
): Stream<
|
|
1952
|
+
f: (s: S, a: A) => Effect.Effect<readonly [S, A2], E2, R2>
|
|
1953
|
+
): Stream<A2, E | E2, R | R2>
|
|
1977
1954
|
} = internal.mapAccumEffect
|
|
1978
1955
|
|
|
1979
1956
|
/**
|
|
@@ -1985,18 +1962,12 @@ export const mapAccumEffect: {
|
|
|
1985
1962
|
*/
|
|
1986
1963
|
export const mapBoth: {
|
|
1987
1964
|
<E, E2, A, A2>(
|
|
1988
|
-
options: {
|
|
1989
|
-
|
|
1990
|
-
readonly onSuccess: (a: A) => A2
|
|
1991
|
-
}
|
|
1992
|
-
): <R>(self: Stream<R, E, A>) => Stream<R, E2, A2>
|
|
1965
|
+
options: { readonly onFailure: (e: E) => E2; readonly onSuccess: (a: A) => A2 }
|
|
1966
|
+
): <R>(self: Stream<A, E, R>) => Stream<A2, E2, R>
|
|
1993
1967
|
<R, E, E2, A, A2>(
|
|
1994
|
-
self: Stream<
|
|
1995
|
-
options: {
|
|
1996
|
-
|
|
1997
|
-
readonly onSuccess: (a: A) => A2
|
|
1998
|
-
}
|
|
1999
|
-
): Stream<R, E2, A2>
|
|
1968
|
+
self: Stream<A, E, R>,
|
|
1969
|
+
options: { readonly onFailure: (e: E) => E2; readonly onSuccess: (a: A) => A2 }
|
|
1970
|
+
): Stream<A2, E2, R>
|
|
2000
1971
|
} = internal.mapBoth
|
|
2001
1972
|
|
|
2002
1973
|
/**
|
|
@@ -2006,8 +1977,8 @@ export const mapBoth: {
|
|
|
2006
1977
|
* @category mapping
|
|
2007
1978
|
*/
|
|
2008
1979
|
export const mapChunks: {
|
|
2009
|
-
<A, B>(f: (chunk: Chunk.Chunk<A>) => Chunk.Chunk<B>): <
|
|
2010
|
-
<R, E, A, B>(self: Stream<
|
|
1980
|
+
<A, B>(f: (chunk: Chunk.Chunk<A>) => Chunk.Chunk<B>): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>
|
|
1981
|
+
<R, E, A, B>(self: Stream<A, E, R>, f: (chunk: Chunk.Chunk<A>) => Chunk.Chunk<B>): Stream<B, E, R>
|
|
2011
1982
|
} = internal.mapChunks
|
|
2012
1983
|
|
|
2013
1984
|
/**
|
|
@@ -2018,12 +1989,12 @@ export const mapChunks: {
|
|
|
2018
1989
|
*/
|
|
2019
1990
|
export const mapChunksEffect: {
|
|
2020
1991
|
<A, R2, E2, B>(
|
|
2021
|
-
f: (chunk: Chunk.Chunk<A>) => Effect.Effect<
|
|
2022
|
-
): <R, E>(self: Stream<
|
|
1992
|
+
f: (chunk: Chunk.Chunk<A>) => Effect.Effect<Chunk.Chunk<B>, E2, R2>
|
|
1993
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<B, E2 | E, R2 | R>
|
|
2023
1994
|
<R, E, A, R2, E2, B>(
|
|
2024
|
-
self: Stream<
|
|
2025
|
-
f: (chunk: Chunk.Chunk<A>) => Effect.Effect<
|
|
2026
|
-
): Stream<
|
|
1995
|
+
self: Stream<A, E, R>,
|
|
1996
|
+
f: (chunk: Chunk.Chunk<A>) => Effect.Effect<Chunk.Chunk<B>, E2, R2>
|
|
1997
|
+
): Stream<B, E | E2, R | R2>
|
|
2027
1998
|
} = internal.mapChunksEffect
|
|
2028
1999
|
|
|
2029
2000
|
/**
|
|
@@ -2034,8 +2005,8 @@ export const mapChunksEffect: {
|
|
|
2034
2005
|
* @category mapping
|
|
2035
2006
|
*/
|
|
2036
2007
|
export const mapConcat: {
|
|
2037
|
-
<A, A2>(f: (a: A) => Iterable<A2>): <R, E>(self: Stream<
|
|
2038
|
-
<R, E, A, A2>(self: Stream<
|
|
2008
|
+
<A, A2>(f: (a: A) => Iterable<A2>): <R, E>(self: Stream<A, E, R>) => Stream<A2, E, R>
|
|
2009
|
+
<R, E, A, A2>(self: Stream<A, E, R>, f: (a: A) => Iterable<A2>): Stream<A2, E, R>
|
|
2039
2010
|
} = internal.mapConcat
|
|
2040
2011
|
|
|
2041
2012
|
/**
|
|
@@ -2046,8 +2017,8 @@ export const mapConcat: {
|
|
|
2046
2017
|
* @category mapping
|
|
2047
2018
|
*/
|
|
2048
2019
|
export const mapConcatChunk: {
|
|
2049
|
-
<A, A2>(f: (a: A) => Chunk.Chunk<A2>): <R, E>(self: Stream<
|
|
2050
|
-
<R, E, A, A2>(self: Stream<
|
|
2020
|
+
<A, A2>(f: (a: A) => Chunk.Chunk<A2>): <R, E>(self: Stream<A, E, R>) => Stream<A2, E, R>
|
|
2021
|
+
<R, E, A, A2>(self: Stream<A, E, R>, f: (a: A) => Chunk.Chunk<A2>): Stream<A2, E, R>
|
|
2051
2022
|
} = internal.mapConcatChunk
|
|
2052
2023
|
|
|
2053
2024
|
/**
|
|
@@ -2059,12 +2030,12 @@ export const mapConcatChunk: {
|
|
|
2059
2030
|
*/
|
|
2060
2031
|
export const mapConcatChunkEffect: {
|
|
2061
2032
|
<A, R2, E2, A2>(
|
|
2062
|
-
f: (a: A) => Effect.Effect<
|
|
2063
|
-
): <R, E>(self: Stream<
|
|
2033
|
+
f: (a: A) => Effect.Effect<Chunk.Chunk<A2>, E2, R2>
|
|
2034
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>
|
|
2064
2035
|
<R, E, A, R2, E2, A2>(
|
|
2065
|
-
self: Stream<
|
|
2066
|
-
f: (a: A) => Effect.Effect<
|
|
2067
|
-
): Stream<
|
|
2036
|
+
self: Stream<A, E, R>,
|
|
2037
|
+
f: (a: A) => Effect.Effect<Chunk.Chunk<A2>, E2, R2>
|
|
2038
|
+
): Stream<A2, E | E2, R | R2>
|
|
2068
2039
|
} = internal.mapConcatChunkEffect
|
|
2069
2040
|
|
|
2070
2041
|
/**
|
|
@@ -2076,12 +2047,12 @@ export const mapConcatChunkEffect: {
|
|
|
2076
2047
|
*/
|
|
2077
2048
|
export const mapConcatEffect: {
|
|
2078
2049
|
<A, R2, E2, A2>(
|
|
2079
|
-
f: (a: A) => Effect.Effect<
|
|
2080
|
-
): <R, E>(self: Stream<
|
|
2050
|
+
f: (a: A) => Effect.Effect<Iterable<A2>, E2, R2>
|
|
2051
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>
|
|
2081
2052
|
<R, E, A, R2, E2, A2>(
|
|
2082
|
-
self: Stream<
|
|
2083
|
-
f: (a: A) => Effect.Effect<
|
|
2084
|
-
): Stream<
|
|
2053
|
+
self: Stream<A, E, R>,
|
|
2054
|
+
f: (a: A) => Effect.Effect<Iterable<A2>, E2, R2>
|
|
2055
|
+
): Stream<A2, E | E2, R | R2>
|
|
2085
2056
|
} = internal.mapConcatEffect
|
|
2086
2057
|
|
|
2087
2058
|
/**
|
|
@@ -2092,35 +2063,27 @@ export const mapConcatEffect: {
|
|
|
2092
2063
|
*/
|
|
2093
2064
|
export const mapEffect: {
|
|
2094
2065
|
<A, R2, E2, A2>(
|
|
2095
|
-
f: (a: A) => Effect.Effect<
|
|
2096
|
-
options?:
|
|
2097
|
-
readonly concurrency?: number | "unbounded" | undefined
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
): <R, E>(self: Stream<R, E, A>) => Stream<R2 | R, E2 | E, A2>
|
|
2066
|
+
f: (a: A) => Effect.Effect<A2, E2, R2>,
|
|
2067
|
+
options?:
|
|
2068
|
+
| { readonly concurrency?: number | "unbounded" | undefined; readonly unordered?: boolean | undefined }
|
|
2069
|
+
| undefined
|
|
2070
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>
|
|
2101
2071
|
<A, R2, E2, A2, K>(
|
|
2102
|
-
f: (a: A) => Effect.Effect<
|
|
2103
|
-
options: {
|
|
2104
|
-
|
|
2105
|
-
readonly bufferSize?: number | undefined
|
|
2106
|
-
}
|
|
2107
|
-
): <R, E>(self: Stream<R, E, A>) => Stream<R2 | R, E2 | E, A2>
|
|
2072
|
+
f: (a: A) => Effect.Effect<A2, E2, R2>,
|
|
2073
|
+
options: { readonly key: (a: A) => K; readonly bufferSize?: number | undefined }
|
|
2074
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>
|
|
2108
2075
|
<R, E, A, R2, E2, A2>(
|
|
2109
|
-
self: Stream<
|
|
2110
|
-
f: (a: A) => Effect.Effect<
|
|
2111
|
-
options?:
|
|
2112
|
-
readonly concurrency?: number | "unbounded" | undefined
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
): Stream<R | R2, E | E2, A2>
|
|
2076
|
+
self: Stream<A, E, R>,
|
|
2077
|
+
f: (a: A) => Effect.Effect<A2, E2, R2>,
|
|
2078
|
+
options?:
|
|
2079
|
+
| { readonly concurrency?: number | "unbounded" | undefined; readonly unordered?: boolean | undefined }
|
|
2080
|
+
| undefined
|
|
2081
|
+
): Stream<A2, E | E2, R | R2>
|
|
2116
2082
|
<R, E, A, R2, E2, A2, K>(
|
|
2117
|
-
self: Stream<
|
|
2118
|
-
f: (a: A) => Effect.Effect<
|
|
2119
|
-
options: {
|
|
2120
|
-
|
|
2121
|
-
readonly bufferSize?: number | undefined
|
|
2122
|
-
}
|
|
2123
|
-
): Stream<R | R2, E | E2, A2>
|
|
2083
|
+
self: Stream<A, E, R>,
|
|
2084
|
+
f: (a: A) => Effect.Effect<A2, E2, R2>,
|
|
2085
|
+
options: { readonly key: (a: A) => K; readonly bufferSize?: number | undefined }
|
|
2086
|
+
): Stream<A2, E | E2, R | R2>
|
|
2124
2087
|
} = _groupBy.mapEffectOptions
|
|
2125
2088
|
|
|
2126
2089
|
/**
|
|
@@ -2130,8 +2093,8 @@ export const mapEffect: {
|
|
|
2130
2093
|
* @category mapping
|
|
2131
2094
|
*/
|
|
2132
2095
|
export const mapError: {
|
|
2133
|
-
<E, E2>(f: (error: E) => E2): <R, A>(self: Stream<
|
|
2134
|
-
<R, A, E, E2>(self: Stream<
|
|
2096
|
+
<E, E2>(f: (error: E) => E2): <R, A>(self: Stream<A, E, R>) => Stream<A, E2, R>
|
|
2097
|
+
<R, A, E, E2>(self: Stream<A, E, R>, f: (error: E) => E2): Stream<A, E2, R>
|
|
2135
2098
|
} = internal.mapError
|
|
2136
2099
|
|
|
2137
2100
|
/**
|
|
@@ -2141,8 +2104,8 @@ export const mapError: {
|
|
|
2141
2104
|
* @category mapping
|
|
2142
2105
|
*/
|
|
2143
2106
|
export const mapErrorCause: {
|
|
2144
|
-
<E, E2>(f: (cause: Cause.Cause<E>) => Cause.Cause<E2>): <R, A>(self: Stream<
|
|
2145
|
-
<R, A, E, E2>(self: Stream<
|
|
2107
|
+
<E, E2>(f: (cause: Cause.Cause<E>) => Cause.Cause<E2>): <R, A>(self: Stream<A, E, R>) => Stream<A, E2, R>
|
|
2108
|
+
<R, A, E, E2>(self: Stream<A, E, R>, f: (cause: Cause.Cause<E>) => Cause.Cause<E2>): Stream<A, E2, R>
|
|
2146
2109
|
} = internal.mapErrorCause
|
|
2147
2110
|
|
|
2148
2111
|
/**
|
|
@@ -2156,18 +2119,14 @@ export const mapErrorCause: {
|
|
|
2156
2119
|
*/
|
|
2157
2120
|
export const merge: {
|
|
2158
2121
|
<R2, E2, A2>(
|
|
2159
|
-
that: Stream<
|
|
2160
|
-
options?: {
|
|
2161
|
-
|
|
2162
|
-
}
|
|
2163
|
-
): <R, E, A>(self: Stream<R, E, A>) => Stream<R2 | R, E2 | E, A2 | A>
|
|
2122
|
+
that: Stream<A2, E2, R2>,
|
|
2123
|
+
options?: { readonly haltStrategy?: HaltStrategy.HaltStrategyInput | undefined } | undefined
|
|
2124
|
+
): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E, R2 | R>
|
|
2164
2125
|
<R, E, A, R2, E2, A2>(
|
|
2165
|
-
self: Stream<
|
|
2166
|
-
that: Stream<
|
|
2167
|
-
options?: {
|
|
2168
|
-
|
|
2169
|
-
}
|
|
2170
|
-
): Stream<R | R2, E | E2, A | A2>
|
|
2126
|
+
self: Stream<A, E, R>,
|
|
2127
|
+
that: Stream<A2, E2, R2>,
|
|
2128
|
+
options?: { readonly haltStrategy?: HaltStrategy.HaltStrategyInput | undefined } | undefined
|
|
2129
|
+
): Stream<A | A2, E | E2, R | R2>
|
|
2171
2130
|
} = internal.merge
|
|
2172
2131
|
|
|
2173
2132
|
/**
|
|
@@ -2184,14 +2143,14 @@ export const mergeAll: {
|
|
|
2184
2143
|
readonly concurrency: number | "unbounded"
|
|
2185
2144
|
readonly bufferSize?: number | undefined
|
|
2186
2145
|
}
|
|
2187
|
-
): <
|
|
2188
|
-
<
|
|
2189
|
-
streams: Iterable<Stream<
|
|
2146
|
+
): <A, E, R>(streams: Iterable<Stream<A, E, R>>) => Stream<A, E, R>
|
|
2147
|
+
<A, E, R>(
|
|
2148
|
+
streams: Iterable<Stream<A, E, R>>,
|
|
2190
2149
|
options: {
|
|
2191
2150
|
readonly concurrency: number | "unbounded"
|
|
2192
2151
|
readonly bufferSize?: number | undefined
|
|
2193
2152
|
}
|
|
2194
|
-
): Stream<
|
|
2153
|
+
): Stream<A, E, R>
|
|
2195
2154
|
} = internal.mergeAll
|
|
2196
2155
|
|
|
2197
2156
|
/**
|
|
@@ -2206,22 +2165,22 @@ export const mergeAll: {
|
|
|
2206
2165
|
*/
|
|
2207
2166
|
export const mergeWith: {
|
|
2208
2167
|
<R2, E2, A2, A, A3, A4>(
|
|
2209
|
-
other: Stream<
|
|
2168
|
+
other: Stream<A2, E2, R2>,
|
|
2210
2169
|
options: {
|
|
2211
2170
|
readonly onSelf: (a: A) => A3
|
|
2212
2171
|
readonly onOther: (a2: A2) => A4
|
|
2213
2172
|
readonly haltStrategy?: HaltStrategy.HaltStrategyInput | undefined
|
|
2214
2173
|
}
|
|
2215
|
-
): <R, E>(self: Stream<
|
|
2174
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A3 | A4, E2 | E, R2 | R>
|
|
2216
2175
|
<R, E, R2, E2, A2, A, A3, A4>(
|
|
2217
|
-
self: Stream<
|
|
2218
|
-
other: Stream<
|
|
2176
|
+
self: Stream<A, E, R>,
|
|
2177
|
+
other: Stream<A2, E2, R2>,
|
|
2219
2178
|
options: {
|
|
2220
2179
|
readonly onSelf: (a: A) => A3
|
|
2221
2180
|
readonly onOther: (a2: A2) => A4
|
|
2222
2181
|
readonly haltStrategy?: HaltStrategy.HaltStrategyInput | undefined
|
|
2223
2182
|
}
|
|
2224
|
-
): Stream<
|
|
2183
|
+
): Stream<A3 | A4, E | E2, R | R2>
|
|
2225
2184
|
} = internal.mergeWith
|
|
2226
2185
|
|
|
2227
2186
|
/**
|
|
@@ -2233,9 +2192,9 @@ export const mergeWith: {
|
|
|
2233
2192
|
*/
|
|
2234
2193
|
export const mergeEither: {
|
|
2235
2194
|
<R2, E2, A2>(
|
|
2236
|
-
that: Stream<
|
|
2237
|
-
): <
|
|
2238
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
2195
|
+
that: Stream<A2, E2, R2>
|
|
2196
|
+
): <A, E, R>(self: Stream<A, E, R>) => Stream<Either.Either<A, A2>, E2 | E, R2 | R>
|
|
2197
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<Either.Either<A, A2>, E | E2, R | R2>
|
|
2239
2198
|
} = internal.mergeEither
|
|
2240
2199
|
|
|
2241
2200
|
/**
|
|
@@ -2246,8 +2205,8 @@ export const mergeEither: {
|
|
|
2246
2205
|
* @category utils
|
|
2247
2206
|
*/
|
|
2248
2207
|
export const mergeLeft: {
|
|
2249
|
-
<R2, E2, A2>(that: Stream<
|
|
2250
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
2208
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
2209
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A, E | E2, R | R2>
|
|
2251
2210
|
} = internal.mergeLeft
|
|
2252
2211
|
|
|
2253
2212
|
/**
|
|
@@ -2258,8 +2217,8 @@ export const mergeLeft: {
|
|
|
2258
2217
|
* @category utils
|
|
2259
2218
|
*/
|
|
2260
2219
|
export const mergeRight: {
|
|
2261
|
-
<R2, E2, A2>(that: Stream<
|
|
2262
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
2220
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>
|
|
2221
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A2, E | E2, R | R2>
|
|
2263
2222
|
} = internal.mergeRight
|
|
2264
2223
|
|
|
2265
2224
|
/**
|
|
@@ -2269,7 +2228,7 @@ export const mergeRight: {
|
|
|
2269
2228
|
* @since 2.0.0
|
|
2270
2229
|
* @category utils
|
|
2271
2230
|
*/
|
|
2272
|
-
export const mkString: <R, E>(self: Stream<
|
|
2231
|
+
export const mkString: <R, E>(self: Stream<string, E, R>) => Effect.Effect<string, E, R> = internal.mkString
|
|
2273
2232
|
|
|
2274
2233
|
/**
|
|
2275
2234
|
* The stream that never produces any value or fails with any error.
|
|
@@ -2277,7 +2236,7 @@ export const mkString: <R, E>(self: Stream<R, E, string>) => Effect.Effect<R, E,
|
|
|
2277
2236
|
* @since 2.0.0
|
|
2278
2237
|
* @category constructors
|
|
2279
2238
|
*/
|
|
2280
|
-
export const never: Stream<never
|
|
2239
|
+
export const never: Stream<never> = internal.never
|
|
2281
2240
|
|
|
2282
2241
|
/**
|
|
2283
2242
|
* Runs the specified effect if this stream fails, providing the error to the
|
|
@@ -2291,12 +2250,12 @@ export const never: Stream<never, never, never> = internal.never
|
|
|
2291
2250
|
*/
|
|
2292
2251
|
export const onError: {
|
|
2293
2252
|
<E, R2, _>(
|
|
2294
|
-
cleanup: (cause: Cause.Cause<E>) => Effect.Effect<
|
|
2295
|
-
): <R, A>(self: Stream<
|
|
2253
|
+
cleanup: (cause: Cause.Cause<E>) => Effect.Effect<_, never, R2>
|
|
2254
|
+
): <R, A>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>
|
|
2296
2255
|
<R, A, E, R2, _>(
|
|
2297
|
-
self: Stream<
|
|
2298
|
-
cleanup: (cause: Cause.Cause<E>) => Effect.Effect<
|
|
2299
|
-
): Stream<R | R2
|
|
2256
|
+
self: Stream<A, E, R>,
|
|
2257
|
+
cleanup: (cause: Cause.Cause<E>) => Effect.Effect<_, never, R2>
|
|
2258
|
+
): Stream<A, E, R | R2>
|
|
2300
2259
|
} = internal.onError
|
|
2301
2260
|
|
|
2302
2261
|
/**
|
|
@@ -2306,8 +2265,8 @@ export const onError: {
|
|
|
2306
2265
|
* @category utils
|
|
2307
2266
|
*/
|
|
2308
2267
|
export const onDone: {
|
|
2309
|
-
<R2, _>(cleanup: () => Effect.Effect<
|
|
2310
|
-
<R, E, A, R2, _>(self: Stream<
|
|
2268
|
+
<R2, _>(cleanup: () => Effect.Effect<_, never, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>
|
|
2269
|
+
<R, E, A, R2, _>(self: Stream<A, E, R>, cleanup: () => Effect.Effect<_, never, R2>): Stream<A, E, R | R2>
|
|
2311
2270
|
} = internal.onDone
|
|
2312
2271
|
|
|
2313
2272
|
/**
|
|
@@ -2317,7 +2276,7 @@ export const onDone: {
|
|
|
2317
2276
|
* @since 2.0.0
|
|
2318
2277
|
* @category error handling
|
|
2319
2278
|
*/
|
|
2320
|
-
export const orDie: <
|
|
2279
|
+
export const orDie: <A, E, R>(self: Stream<A, E, R>) => Stream<A, never, R> = internal.orDie
|
|
2321
2280
|
|
|
2322
2281
|
/**
|
|
2323
2282
|
* Keeps none of the errors, and terminates the stream with them, using the
|
|
@@ -2327,8 +2286,8 @@ export const orDie: <R, E, A>(self: Stream<R, E, A>) => Stream<R, never, A> = in
|
|
|
2327
2286
|
* @category error handling
|
|
2328
2287
|
*/
|
|
2329
2288
|
export const orDieWith: {
|
|
2330
|
-
<E>(f: (e: E) => unknown): <R, A>(self: Stream<
|
|
2331
|
-
<R, A, E>(self: Stream<
|
|
2289
|
+
<E>(f: (e: E) => unknown): <R, A>(self: Stream<A, E, R>) => Stream<A, never, R>
|
|
2290
|
+
<R, A, E>(self: Stream<A, E, R>, f: (e: E) => unknown): Stream<A, never, R>
|
|
2332
2291
|
} = internal.orDieWith
|
|
2333
2292
|
|
|
2334
2293
|
/**
|
|
@@ -2340,8 +2299,8 @@ export const orDieWith: {
|
|
|
2340
2299
|
* @category error handling
|
|
2341
2300
|
*/
|
|
2342
2301
|
export const orElse: {
|
|
2343
|
-
<R2, E2, A2>(that: LazyArg<Stream<
|
|
2344
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
2302
|
+
<R2, E2, A2>(that: LazyArg<Stream<A2, E2, R2>>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2, R2 | R>
|
|
2303
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: LazyArg<Stream<A2, E2, R2>>): Stream<A | A2, E2, R | R2>
|
|
2345
2304
|
} = internal.orElse
|
|
2346
2305
|
|
|
2347
2306
|
/**
|
|
@@ -2354,12 +2313,12 @@ export const orElse: {
|
|
|
2354
2313
|
*/
|
|
2355
2314
|
export const orElseEither: {
|
|
2356
2315
|
<R2, E2, A2>(
|
|
2357
|
-
that: LazyArg<Stream<
|
|
2358
|
-
): <
|
|
2316
|
+
that: LazyArg<Stream<A2, E2, R2>>
|
|
2317
|
+
): <A, E, R>(self: Stream<A, E, R>) => Stream<Either.Either<A, A2>, E2, R2 | R>
|
|
2359
2318
|
<R, E, A, R2, E2, A2>(
|
|
2360
|
-
self: Stream<
|
|
2361
|
-
that: LazyArg<Stream<
|
|
2362
|
-
): Stream<
|
|
2319
|
+
self: Stream<A, E, R>,
|
|
2320
|
+
that: LazyArg<Stream<A2, E2, R2>>
|
|
2321
|
+
): Stream<Either.Either<A, A2>, E2, R | R2>
|
|
2363
2322
|
} = internal.orElseEither
|
|
2364
2323
|
|
|
2365
2324
|
/**
|
|
@@ -2371,8 +2330,8 @@ export const orElseEither: {
|
|
|
2371
2330
|
* @category error handling
|
|
2372
2331
|
*/
|
|
2373
2332
|
export const orElseFail: {
|
|
2374
|
-
<E2>(error: LazyArg<E2>): <
|
|
2375
|
-
<R, E, A, E2>(self: Stream<
|
|
2333
|
+
<E2>(error: LazyArg<E2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2, R>
|
|
2334
|
+
<R, E, A, E2>(self: Stream<A, E, R>, error: LazyArg<E2>): Stream<A, E2, R>
|
|
2376
2335
|
} = internal.orElseFail
|
|
2377
2336
|
|
|
2378
2337
|
/**
|
|
@@ -2382,8 +2341,8 @@ export const orElseFail: {
|
|
|
2382
2341
|
* @category error handling
|
|
2383
2342
|
*/
|
|
2384
2343
|
export const orElseIfEmpty: {
|
|
2385
|
-
<A2>(element: LazyArg<A2>): <
|
|
2386
|
-
<R, E, A, A2>(self: Stream<
|
|
2344
|
+
<A2>(element: LazyArg<A2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E, R>
|
|
2345
|
+
<R, E, A, A2>(self: Stream<A, E, R>, element: LazyArg<A2>): Stream<A | A2, E, R>
|
|
2387
2346
|
} = internal.orElseIfEmpty
|
|
2388
2347
|
|
|
2389
2348
|
/**
|
|
@@ -2393,8 +2352,8 @@ export const orElseIfEmpty: {
|
|
|
2393
2352
|
* @category error handling
|
|
2394
2353
|
*/
|
|
2395
2354
|
export const orElseIfEmptyChunk: {
|
|
2396
|
-
<A2>(chunk: LazyArg<Chunk.Chunk<A2>>): <
|
|
2397
|
-
<R, E, A, A2>(self: Stream<
|
|
2355
|
+
<A2>(chunk: LazyArg<Chunk.Chunk<A2>>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E, R>
|
|
2356
|
+
<R, E, A, A2>(self: Stream<A, E, R>, chunk: LazyArg<Chunk.Chunk<A2>>): Stream<A | A2, E, R>
|
|
2398
2357
|
} = internal.orElseIfEmptyChunk
|
|
2399
2358
|
|
|
2400
2359
|
/**
|
|
@@ -2404,8 +2363,8 @@ export const orElseIfEmptyChunk: {
|
|
|
2404
2363
|
* @category error handling
|
|
2405
2364
|
*/
|
|
2406
2365
|
export const orElseIfEmptyStream: {
|
|
2407
|
-
<R2, E2, A2>(stream: LazyArg<Stream<
|
|
2408
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
2366
|
+
<R2, E2, A2>(stream: LazyArg<Stream<A2, E2, R2>>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E, R2 | R>
|
|
2367
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, stream: LazyArg<Stream<A2, E2, R2>>): Stream<A | A2, E | E2, R | R2>
|
|
2409
2368
|
} = internal.orElseIfEmptyStream
|
|
2410
2369
|
|
|
2411
2370
|
/**
|
|
@@ -2415,8 +2374,8 @@ export const orElseIfEmptyStream: {
|
|
|
2415
2374
|
* @category error handling
|
|
2416
2375
|
*/
|
|
2417
2376
|
export const orElseSucceed: {
|
|
2418
|
-
<A2>(value: LazyArg<A2>): <
|
|
2419
|
-
<R, E, A, A2>(self: Stream<
|
|
2377
|
+
<A2>(value: LazyArg<A2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, never, R>
|
|
2378
|
+
<R, E, A, A2>(self: Stream<A, E, R>, value: LazyArg<A2>): Stream<A | A2, never, R>
|
|
2420
2379
|
} = internal.orElseSucceed
|
|
2421
2380
|
|
|
2422
2381
|
/**
|
|
@@ -2427,8 +2386,7 @@ export const orElseSucceed: {
|
|
|
2427
2386
|
* @since 2.0.0
|
|
2428
2387
|
* @category constructors
|
|
2429
2388
|
*/
|
|
2430
|
-
export const paginate: <S, A>(s: S, f: (s: S) => readonly [A, Option.Option<S>]) => Stream<
|
|
2431
|
-
internal.paginate
|
|
2389
|
+
export const paginate: <S, A>(s: S, f: (s: S) => readonly [A, Option.Option<S>]) => Stream<A> = internal.paginate
|
|
2432
2390
|
|
|
2433
2391
|
/**
|
|
2434
2392
|
* Like `Stream.unfoldChunk`, but allows the emission of values to end one step
|
|
@@ -2441,7 +2399,7 @@ export const paginate: <S, A>(s: S, f: (s: S) => readonly [A, Option.Option<S>])
|
|
|
2441
2399
|
export const paginateChunk: <S, A>(
|
|
2442
2400
|
s: S,
|
|
2443
2401
|
f: (s: S) => readonly [Chunk.Chunk<A>, Option.Option<S>]
|
|
2444
|
-
) => Stream<
|
|
2402
|
+
) => Stream<A> = internal.paginateChunk
|
|
2445
2403
|
|
|
2446
2404
|
/**
|
|
2447
2405
|
* Like `Stream.unfoldChunkEffect`, but allows the emission of values to end one step
|
|
@@ -2453,8 +2411,8 @@ export const paginateChunk: <S, A>(
|
|
|
2453
2411
|
*/
|
|
2454
2412
|
export const paginateChunkEffect: <S, R, E, A>(
|
|
2455
2413
|
s: S,
|
|
2456
|
-
f: (s: S) => Effect.Effect<
|
|
2457
|
-
) => Stream<
|
|
2414
|
+
f: (s: S) => Effect.Effect<readonly [Chunk.Chunk<A>, Option.Option<S>], E, R>
|
|
2415
|
+
) => Stream<A, E, R> = internal.paginateChunkEffect
|
|
2458
2416
|
|
|
2459
2417
|
/**
|
|
2460
2418
|
* Like `Stream.unfoldEffect` but allows the emission of values to end one step
|
|
@@ -2466,8 +2424,8 @@ export const paginateChunkEffect: <S, R, E, A>(
|
|
|
2466
2424
|
*/
|
|
2467
2425
|
export const paginateEffect: <S, R, E, A>(
|
|
2468
2426
|
s: S,
|
|
2469
|
-
f: (s: S) => Effect.Effect<
|
|
2470
|
-
) => Stream<
|
|
2427
|
+
f: (s: S) => Effect.Effect<readonly [A, Option.Option<S>], E, R>
|
|
2428
|
+
) => Stream<A, E, R> = internal.paginateEffect
|
|
2471
2429
|
|
|
2472
2430
|
/**
|
|
2473
2431
|
* Partition a stream using a predicate. The first stream will contain all
|
|
@@ -2481,34 +2439,26 @@ export const paginateEffect: <S, R, E, A>(
|
|
|
2481
2439
|
export const partition: {
|
|
2482
2440
|
<C extends A, B extends A, A = C>(
|
|
2483
2441
|
refinement: Refinement<NoInfer<A>, B>,
|
|
2484
|
-
options?: {
|
|
2485
|
-
bufferSize?: number | undefined
|
|
2486
|
-
}
|
|
2442
|
+
options?: { bufferSize?: number | undefined } | undefined
|
|
2487
2443
|
): <R, E>(
|
|
2488
|
-
self: Stream<
|
|
2489
|
-
) => Effect.Effect<
|
|
2444
|
+
self: Stream<C, E, R>
|
|
2445
|
+
) => Effect.Effect<[excluded: Stream<Exclude<C, B>, E>, satisfying: Stream<B, E>], E, Scope.Scope | R>
|
|
2490
2446
|
<A>(
|
|
2491
2447
|
predicate: Predicate<A>,
|
|
2492
|
-
options?: {
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
): <
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
<R, E, A, B extends A>(
|
|
2499
|
-
self: Stream<R, E, A>,
|
|
2448
|
+
options?: { bufferSize?: number | undefined } | undefined
|
|
2449
|
+
): <R, E>(
|
|
2450
|
+
self: Stream<A, E, R>
|
|
2451
|
+
) => Effect.Effect<[excluded: Stream<A, E>, satisfying: Stream<A, E>], E, Scope.Scope | R>
|
|
2452
|
+
<R, E, C extends A, B extends A, A = C>(
|
|
2453
|
+
self: Stream<C, E, R>,
|
|
2500
2454
|
refinement: Refinement<A, B>,
|
|
2501
|
-
options?: {
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
<R, E, A>(
|
|
2506
|
-
self: Stream<R, E, A>,
|
|
2455
|
+
options?: { bufferSize?: number | undefined } | undefined
|
|
2456
|
+
): Effect.Effect<[excluded: Stream<Exclude<C, B>, E>, satisfying: Stream<B, E>], E, Scope.Scope | R>
|
|
2457
|
+
<A, E, R>(
|
|
2458
|
+
self: Stream<A, E, R>,
|
|
2507
2459
|
predicate: Predicate<A>,
|
|
2508
|
-
options?: {
|
|
2509
|
-
|
|
2510
|
-
}
|
|
2511
|
-
): Effect.Effect<Scope.Scope | R, E, [excluded: Stream<never, E, A>, satisfying: Stream<never, E, A>]>
|
|
2460
|
+
options?: { bufferSize?: number | undefined } | undefined
|
|
2461
|
+
): Effect.Effect<[excluded: Stream<A, E>, satisfying: Stream<A, E>], E, Scope.Scope | R>
|
|
2512
2462
|
} = internal.partition
|
|
2513
2463
|
|
|
2514
2464
|
/**
|
|
@@ -2520,20 +2470,16 @@ export const partition: {
|
|
|
2520
2470
|
*/
|
|
2521
2471
|
export const partitionEither: {
|
|
2522
2472
|
<A, R2, E2, A2, A3>(
|
|
2523
|
-
predicate: (a: NoInfer<A>) => Effect.Effect<
|
|
2524
|
-
options?: {
|
|
2525
|
-
readonly bufferSize?: number | undefined
|
|
2526
|
-
}
|
|
2473
|
+
predicate: (a: NoInfer<A>) => Effect.Effect<Either.Either<A2, A3>, E2, R2>,
|
|
2474
|
+
options?: { readonly bufferSize?: number | undefined } | undefined
|
|
2527
2475
|
): <R, E>(
|
|
2528
|
-
self: Stream<
|
|
2529
|
-
) => Effect.Effect<
|
|
2476
|
+
self: Stream<A, E, R>
|
|
2477
|
+
) => Effect.Effect<[left: Stream<A2, E2 | E>, right: Stream<A3, E2 | E>], E2 | E, Scope.Scope | R2 | R>
|
|
2530
2478
|
<R, E, A, R2, E2, A2, A3>(
|
|
2531
|
-
self: Stream<
|
|
2532
|
-
predicate: (a: A) => Effect.Effect<
|
|
2533
|
-
options?: {
|
|
2534
|
-
|
|
2535
|
-
}
|
|
2536
|
-
): Effect.Effect<Scope.Scope | R | R2, E | E2, [left: Stream<never, E | E2, A2>, right: Stream<never, E | E2, A3>]>
|
|
2479
|
+
self: Stream<A, E, R>,
|
|
2480
|
+
predicate: (a: A) => Effect.Effect<Either.Either<A2, A3>, E2, R2>,
|
|
2481
|
+
options?: { readonly bufferSize?: number | undefined } | undefined
|
|
2482
|
+
): Effect.Effect<[left: Stream<A2, E | E2>, right: Stream<A3, E | E2>], E | E2, Scope.Scope | R | R2>
|
|
2537
2483
|
} = internal.partitionEither
|
|
2538
2484
|
|
|
2539
2485
|
/**
|
|
@@ -2546,13 +2492,13 @@ export const partitionEither: {
|
|
|
2546
2492
|
* @category utils
|
|
2547
2493
|
*/
|
|
2548
2494
|
export const peel: {
|
|
2549
|
-
<
|
|
2550
|
-
sink: Sink.Sink<
|
|
2551
|
-
): <
|
|
2552
|
-
<
|
|
2553
|
-
self: Stream<
|
|
2554
|
-
sink: Sink.Sink<
|
|
2555
|
-
): Effect.Effect<
|
|
2495
|
+
<A2, A, E2, R2>(
|
|
2496
|
+
sink: Sink.Sink<A2, A, A, E2, R2>
|
|
2497
|
+
): <E, R>(self: Stream<A, E, R>) => Effect.Effect<[A2, Stream<A, E, never>], E2 | E, Scope.Scope | R2 | R>
|
|
2498
|
+
<A, E, R, A2, E2, R2>(
|
|
2499
|
+
self: Stream<A, E, R>,
|
|
2500
|
+
sink: Sink.Sink<A2, A, A, E2, R2>
|
|
2501
|
+
): Effect.Effect<[A2, Stream<A, E, never>], E | E2, Scope.Scope | R | R2>
|
|
2556
2502
|
} = internal.peel
|
|
2557
2503
|
|
|
2558
2504
|
/**
|
|
@@ -2564,8 +2510,8 @@ export const peel: {
|
|
|
2564
2510
|
* @category utils
|
|
2565
2511
|
*/
|
|
2566
2512
|
export const pipeThrough: {
|
|
2567
|
-
<
|
|
2568
|
-
<
|
|
2513
|
+
<A2, A, L, E2, R2>(sink: Sink.Sink<A2, A, L, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<L, E2 | E, R2 | R>
|
|
2514
|
+
<A, E, R, A2, L, E2, R2>(self: Stream<A, E, R>, sink: Sink.Sink<A2, A, L, E2, R2>): Stream<L, E | E2, R | R2>
|
|
2569
2515
|
} = internal.pipeThrough
|
|
2570
2516
|
|
|
2571
2517
|
/**
|
|
@@ -2576,12 +2522,12 @@ export const pipeThrough: {
|
|
|
2576
2522
|
*/
|
|
2577
2523
|
export const pipeThroughChannel: {
|
|
2578
2524
|
<R2, E, E2, A, A2>(
|
|
2579
|
-
channel: Channel.Channel<
|
|
2580
|
-
): <R>(self: Stream<
|
|
2525
|
+
channel: Channel.Channel<Chunk.Chunk<A2>, Chunk.Chunk<A>, E2, E, unknown, unknown, R2>
|
|
2526
|
+
): <R>(self: Stream<A, E, R>) => Stream<A2, E2, R2 | R>
|
|
2581
2527
|
<R, R2, E, E2, A, A2>(
|
|
2582
|
-
self: Stream<
|
|
2583
|
-
channel: Channel.Channel<
|
|
2584
|
-
): Stream<R | R2
|
|
2528
|
+
self: Stream<A, E, R>,
|
|
2529
|
+
channel: Channel.Channel<Chunk.Chunk<A2>, Chunk.Chunk<A>, E2, E, unknown, unknown, R2>
|
|
2530
|
+
): Stream<A2, E2, R | R2>
|
|
2585
2531
|
} = internal.pipeThroughChannel
|
|
2586
2532
|
|
|
2587
2533
|
/**
|
|
@@ -2593,12 +2539,12 @@ export const pipeThroughChannel: {
|
|
|
2593
2539
|
*/
|
|
2594
2540
|
export const pipeThroughChannelOrFail: {
|
|
2595
2541
|
<R2, E, E2, A, A2>(
|
|
2596
|
-
chan: Channel.Channel<
|
|
2597
|
-
): <R>(self: Stream<
|
|
2542
|
+
chan: Channel.Channel<Chunk.Chunk<A2>, Chunk.Chunk<A>, E2, E, unknown, unknown, R2>
|
|
2543
|
+
): <R>(self: Stream<A, E, R>) => Stream<A2, E | E2, R2 | R>
|
|
2598
2544
|
<R, R2, E, E2, A, A2>(
|
|
2599
|
-
self: Stream<
|
|
2600
|
-
chan: Channel.Channel<
|
|
2601
|
-
): Stream<
|
|
2545
|
+
self: Stream<A, E, R>,
|
|
2546
|
+
chan: Channel.Channel<Chunk.Chunk<A2>, Chunk.Chunk<A>, E2, E, unknown, unknown, R2>
|
|
2547
|
+
): Stream<A2, E | E2, R | R2>
|
|
2602
2548
|
} = internal.pipeThroughChannelOrFail
|
|
2603
2549
|
|
|
2604
2550
|
/**
|
|
@@ -2608,8 +2554,8 @@ export const pipeThroughChannelOrFail: {
|
|
|
2608
2554
|
* @category utils
|
|
2609
2555
|
*/
|
|
2610
2556
|
export const prepend: {
|
|
2611
|
-
<B>(values: Chunk.Chunk<B>): <
|
|
2612
|
-
<R, E, A, B>(self: Stream<
|
|
2557
|
+
<B>(values: Chunk.Chunk<B>): <A, E, R>(self: Stream<A, E, R>) => Stream<B | A, E, R>
|
|
2558
|
+
<R, E, A, B>(self: Stream<A, E, R>, values: Chunk.Chunk<B>): Stream<A | B, E, R>
|
|
2613
2559
|
} = internal.prepend
|
|
2614
2560
|
|
|
2615
2561
|
/**
|
|
@@ -2620,8 +2566,8 @@ export const prepend: {
|
|
|
2620
2566
|
* @category context
|
|
2621
2567
|
*/
|
|
2622
2568
|
export const provideContext: {
|
|
2623
|
-
<R>(context: Context.Context<R>): <
|
|
2624
|
-
<
|
|
2569
|
+
<R>(context: Context.Context<R>): <A, E>(self: Stream<A, E, R>) => Stream<A, E>
|
|
2570
|
+
<A, E, R>(self: Stream<A, E, R>, context: Context.Context<R>): Stream<A, E>
|
|
2625
2571
|
} = internal.provideContext
|
|
2626
2572
|
|
|
2627
2573
|
/**
|
|
@@ -2631,8 +2577,8 @@ export const provideContext: {
|
|
|
2631
2577
|
* @category context
|
|
2632
2578
|
*/
|
|
2633
2579
|
export const provideLayer: {
|
|
2634
|
-
<RIn, E2, ROut>(layer: Layer.Layer<
|
|
2635
|
-
<
|
|
2580
|
+
<RIn, E2, ROut>(layer: Layer.Layer<ROut, E2, RIn>): <A, E>(self: Stream<A, E, ROut>) => Stream<A, E2 | E, RIn>
|
|
2581
|
+
<A, E, RIn, E2, ROut>(self: Stream<A, E, ROut>, layer: Layer.Layer<ROut, E2, RIn>): Stream<A, E | E2, RIn>
|
|
2636
2582
|
} = internal.provideLayer
|
|
2637
2583
|
|
|
2638
2584
|
/**
|
|
@@ -2646,12 +2592,12 @@ export const provideService: {
|
|
|
2646
2592
|
<T extends Context.Tag<any, any>>(
|
|
2647
2593
|
tag: T,
|
|
2648
2594
|
resource: Context.Tag.Service<T>
|
|
2649
|
-
): <
|
|
2595
|
+
): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, Exclude<R, Context.Tag.Identifier<T>>>
|
|
2650
2596
|
<R, E, A, T extends Context.Tag<any, any>>(
|
|
2651
|
-
self: Stream<
|
|
2597
|
+
self: Stream<A, E, R>,
|
|
2652
2598
|
tag: T,
|
|
2653
2599
|
resource: Context.Tag.Service<T>
|
|
2654
|
-
): Stream<Exclude<R, Context.Tag.Identifier<T
|
|
2600
|
+
): Stream<A, E, Exclude<R, Context.Tag.Identifier<T>>>
|
|
2655
2601
|
} = internal.provideService
|
|
2656
2602
|
|
|
2657
2603
|
/**
|
|
@@ -2664,13 +2610,13 @@ export const provideService: {
|
|
|
2664
2610
|
export const provideServiceEffect: {
|
|
2665
2611
|
<T extends Context.Tag<any, any>, R2, E2>(
|
|
2666
2612
|
tag: T,
|
|
2667
|
-
effect: Effect.Effect<
|
|
2668
|
-
): <
|
|
2613
|
+
effect: Effect.Effect<Context.Tag.Service<T>, E2, R2>
|
|
2614
|
+
): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | Exclude<R, Context.Tag.Identifier<T>>>
|
|
2669
2615
|
<R, E, A, T extends Context.Tag<any, any>, R2, E2>(
|
|
2670
|
-
self: Stream<
|
|
2616
|
+
self: Stream<A, E, R>,
|
|
2671
2617
|
tag: T,
|
|
2672
|
-
effect: Effect.Effect<
|
|
2673
|
-
): Stream<R2 | Exclude<R, Context.Tag.Identifier<T
|
|
2618
|
+
effect: Effect.Effect<Context.Tag.Service<T>, E2, R2>
|
|
2619
|
+
): Stream<A, E | E2, R2 | Exclude<R, Context.Tag.Identifier<T>>>
|
|
2674
2620
|
} = internal.provideServiceEffect
|
|
2675
2621
|
|
|
2676
2622
|
/**
|
|
@@ -2683,13 +2629,13 @@ export const provideServiceEffect: {
|
|
|
2683
2629
|
export const provideServiceStream: {
|
|
2684
2630
|
<T extends Context.Tag<any, any>, R2, E2>(
|
|
2685
2631
|
tag: T,
|
|
2686
|
-
stream: Stream<
|
|
2687
|
-
): <
|
|
2632
|
+
stream: Stream<Context.Tag.Service<T>, E2, R2>
|
|
2633
|
+
): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | Exclude<R, Context.Tag.Identifier<T>>>
|
|
2688
2634
|
<R, E, A, T extends Context.Tag<any, any>, R2, E2>(
|
|
2689
|
-
self: Stream<
|
|
2635
|
+
self: Stream<A, E, R>,
|
|
2690
2636
|
tag: T,
|
|
2691
|
-
stream: Stream<
|
|
2692
|
-
): Stream<R2 | Exclude<R, Context.Tag.Identifier<T
|
|
2637
|
+
stream: Stream<Context.Tag.Service<T>, E2, R2>
|
|
2638
|
+
): Stream<A, E | E2, R2 | Exclude<R, Context.Tag.Identifier<T>>>
|
|
2693
2639
|
} = internal.provideServiceStream
|
|
2694
2640
|
|
|
2695
2641
|
/**
|
|
@@ -2700,8 +2646,8 @@ export const provideServiceStream: {
|
|
|
2700
2646
|
* @category context
|
|
2701
2647
|
*/
|
|
2702
2648
|
export const mapInputContext: {
|
|
2703
|
-
<R0, R>(f: (env: Context.Context<R0>) => Context.Context<R>): <
|
|
2704
|
-
<
|
|
2649
|
+
<R0, R>(f: (env: Context.Context<R0>) => Context.Context<R>): <A, E>(self: Stream<A, E, R>) => Stream<A, E, R0>
|
|
2650
|
+
<A, E, R0, R>(self: Stream<A, E, R>, f: (env: Context.Context<R0>) => Context.Context<R>): Stream<A, E, R0>
|
|
2705
2651
|
} = internal.mapInputContext
|
|
2706
2652
|
|
|
2707
2653
|
/**
|
|
@@ -2713,12 +2659,12 @@ export const mapInputContext: {
|
|
|
2713
2659
|
*/
|
|
2714
2660
|
export const provideSomeLayer: {
|
|
2715
2661
|
<RIn, E2, ROut>(
|
|
2716
|
-
layer: Layer.Layer<
|
|
2717
|
-
): <
|
|
2662
|
+
layer: Layer.Layer<ROut, E2, RIn>
|
|
2663
|
+
): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, RIn | Exclude<R, ROut>>
|
|
2718
2664
|
<R, E, A, RIn, E2, ROut>(
|
|
2719
|
-
self: Stream<
|
|
2720
|
-
layer: Layer.Layer<
|
|
2721
|
-
): Stream<RIn | Exclude<R, ROut
|
|
2665
|
+
self: Stream<A, E, R>,
|
|
2666
|
+
layer: Layer.Layer<ROut, E2, RIn>
|
|
2667
|
+
): Stream<A, E | E2, RIn | Exclude<R, ROut>>
|
|
2722
2668
|
} = internal.provideSomeLayer
|
|
2723
2669
|
|
|
2724
2670
|
/**
|
|
@@ -2727,7 +2673,7 @@ export const provideSomeLayer: {
|
|
|
2727
2673
|
* @since 2.0.0
|
|
2728
2674
|
* @category constructors
|
|
2729
2675
|
*/
|
|
2730
|
-
export const range: (min: number, max: number, chunkSize?: number) => Stream<
|
|
2676
|
+
export const range: (min: number, max: number, chunkSize?: number) => Stream<number> = internal.range
|
|
2731
2677
|
|
|
2732
2678
|
/**
|
|
2733
2679
|
* Re-chunks the elements of the stream into chunks of `n` elements each. The
|
|
@@ -2737,8 +2683,8 @@ export const range: (min: number, max: number, chunkSize?: number) => Stream<nev
|
|
|
2737
2683
|
* @category utils
|
|
2738
2684
|
*/
|
|
2739
2685
|
export const rechunk: {
|
|
2740
|
-
(n: number): <
|
|
2741
|
-
<
|
|
2686
|
+
(n: number): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
2687
|
+
<A, E, R>(self: Stream<A, E, R>, n: number): Stream<A, E, R>
|
|
2742
2688
|
} = internal.rechunk
|
|
2743
2689
|
|
|
2744
2690
|
/**
|
|
@@ -2748,8 +2694,8 @@ export const rechunk: {
|
|
|
2748
2694
|
* @category error handling
|
|
2749
2695
|
*/
|
|
2750
2696
|
export const refineOrDie: {
|
|
2751
|
-
<E, E2>(pf: (error: E) => Option.Option<E2>): <R, A>(self: Stream<
|
|
2752
|
-
<R, A, E, E2>(self: Stream<
|
|
2697
|
+
<E, E2>(pf: (error: E) => Option.Option<E2>): <R, A>(self: Stream<A, E, R>) => Stream<A, E2, R>
|
|
2698
|
+
<R, A, E, E2>(self: Stream<A, E, R>, pf: (error: E) => Option.Option<E2>): Stream<A, E2, R>
|
|
2753
2699
|
} = internal.refineOrDie
|
|
2754
2700
|
|
|
2755
2701
|
/**
|
|
@@ -2763,8 +2709,8 @@ export const refineOrDieWith: {
|
|
|
2763
2709
|
<E, E2>(
|
|
2764
2710
|
pf: (error: E) => Option.Option<E2>,
|
|
2765
2711
|
f: (error: E) => unknown
|
|
2766
|
-
): <R, A>(self: Stream<
|
|
2767
|
-
<R, A, E, E2>(self: Stream<
|
|
2712
|
+
): <R, A>(self: Stream<A, E, R>) => Stream<A, E2, R>
|
|
2713
|
+
<R, A, E, E2>(self: Stream<A, E, R>, pf: (error: E) => Option.Option<E2>, f: (error: E) => unknown): Stream<A, E2, R>
|
|
2768
2714
|
} = internal.refineOrDieWith
|
|
2769
2715
|
|
|
2770
2716
|
/**
|
|
@@ -2775,8 +2721,8 @@ export const refineOrDieWith: {
|
|
|
2775
2721
|
* @category utils
|
|
2776
2722
|
*/
|
|
2777
2723
|
export const repeat: {
|
|
2778
|
-
<R2, B>(schedule: Schedule.Schedule<R2, unknown, B>): <
|
|
2779
|
-
<R, E, A, R2, B>(self: Stream<
|
|
2724
|
+
<R2, B>(schedule: Schedule.Schedule<R2, unknown, B>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>
|
|
2725
|
+
<R, E, A, R2, B>(self: Stream<A, E, R>, schedule: Schedule.Schedule<R2, unknown, B>): Stream<A, E, R | R2>
|
|
2780
2726
|
} = internal.repeat
|
|
2781
2727
|
|
|
2782
2728
|
/**
|
|
@@ -2786,7 +2732,7 @@ export const repeat: {
|
|
|
2786
2732
|
* @since 2.0.0
|
|
2787
2733
|
* @category constructors
|
|
2788
2734
|
*/
|
|
2789
|
-
export const repeatEffect: <
|
|
2735
|
+
export const repeatEffect: <A, E, R>(effect: Effect.Effect<A, E, R>) => Stream<A, E, R> = internal.repeatEffect
|
|
2790
2736
|
|
|
2791
2737
|
/**
|
|
2792
2738
|
* Creates a stream from an effect producing chunks of `A` values which
|
|
@@ -2795,7 +2741,7 @@ export const repeatEffect: <R, E, A>(effect: Effect.Effect<R, E, A>) => Stream<R
|
|
|
2795
2741
|
* @since 2.0.0
|
|
2796
2742
|
* @category constructors
|
|
2797
2743
|
*/
|
|
2798
|
-
export const repeatEffectChunk: <
|
|
2744
|
+
export const repeatEffectChunk: <A, E, R>(effect: Effect.Effect<Chunk.Chunk<A>, E, R>) => Stream<A, E, R> =
|
|
2799
2745
|
internal.repeatEffectChunk
|
|
2800
2746
|
|
|
2801
2747
|
/**
|
|
@@ -2805,9 +2751,9 @@ export const repeatEffectChunk: <R, E, A>(effect: Effect.Effect<R, E, Chunk.Chun
|
|
|
2805
2751
|
* @since 2.0.0
|
|
2806
2752
|
* @category constructors
|
|
2807
2753
|
*/
|
|
2808
|
-
export const repeatEffectChunkOption: <
|
|
2809
|
-
effect: Effect.Effect<
|
|
2810
|
-
) => Stream<
|
|
2754
|
+
export const repeatEffectChunkOption: <A, E, R>(
|
|
2755
|
+
effect: Effect.Effect<Chunk.Chunk<A>, Option.Option<E>, R>
|
|
2756
|
+
) => Stream<A, E, R> = internal.repeatEffectChunkOption
|
|
2811
2757
|
|
|
2812
2758
|
/**
|
|
2813
2759
|
* Creates a stream from an effect producing values of type `A` until it fails
|
|
@@ -2816,7 +2762,7 @@ export const repeatEffectChunkOption: <R, E, A>(
|
|
|
2816
2762
|
* @since 2.0.0
|
|
2817
2763
|
* @category constructors
|
|
2818
2764
|
*/
|
|
2819
|
-
export const repeatEffectOption: <
|
|
2765
|
+
export const repeatEffectOption: <A, E, R>(effect: Effect.Effect<A, Option.Option<E>, R>) => Stream<A, E, R> =
|
|
2820
2766
|
internal.repeatEffectOption
|
|
2821
2767
|
|
|
2822
2768
|
/**
|
|
@@ -2827,9 +2773,9 @@ export const repeatEffectOption: <R, E, A>(effect: Effect.Effect<R, Option.Optio
|
|
|
2827
2773
|
* @category constructors
|
|
2828
2774
|
*/
|
|
2829
2775
|
export const repeatEffectWithSchedule: <R, E, A, A0 extends A, R2, _>(
|
|
2830
|
-
effect: Effect.Effect<
|
|
2776
|
+
effect: Effect.Effect<A, E, R>,
|
|
2831
2777
|
schedule: Schedule.Schedule<R2, A0, _>
|
|
2832
|
-
) => Stream<R | R2
|
|
2778
|
+
) => Stream<A, E, R | R2> = internal.repeatEffectWithSchedule
|
|
2833
2779
|
|
|
2834
2780
|
/**
|
|
2835
2781
|
* Repeats the entire stream using the specified schedule. The stream will
|
|
@@ -2842,11 +2788,11 @@ export const repeatEffectWithSchedule: <R, E, A, A0 extends A, R2, _>(
|
|
|
2842
2788
|
export const repeatEither: {
|
|
2843
2789
|
<R2, B>(
|
|
2844
2790
|
schedule: Schedule.Schedule<R2, unknown, B>
|
|
2845
|
-
): <
|
|
2791
|
+
): <A, E, R>(self: Stream<A, E, R>) => Stream<Either.Either<B, A>, E, R2 | R>
|
|
2846
2792
|
<R, E, A, R2, B>(
|
|
2847
|
-
self: Stream<
|
|
2793
|
+
self: Stream<A, E, R>,
|
|
2848
2794
|
schedule: Schedule.Schedule<R2, unknown, B>
|
|
2849
|
-
): Stream<
|
|
2795
|
+
): Stream<Either.Either<B, A>, E, R | R2>
|
|
2850
2796
|
} = internal.repeatEither
|
|
2851
2797
|
|
|
2852
2798
|
/**
|
|
@@ -2860,8 +2806,8 @@ export const repeatEither: {
|
|
|
2860
2806
|
* @category utils
|
|
2861
2807
|
*/
|
|
2862
2808
|
export const repeatElements: {
|
|
2863
|
-
<R2, B>(schedule: Schedule.Schedule<R2, unknown, B>): <
|
|
2864
|
-
<R, E, A, R2, B>(self: Stream<
|
|
2809
|
+
<R2, B>(schedule: Schedule.Schedule<R2, unknown, B>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>
|
|
2810
|
+
<R, E, A, R2, B>(self: Stream<A, E, R>, schedule: Schedule.Schedule<R2, unknown, B>): Stream<A, E, R | R2>
|
|
2865
2811
|
} = internal.repeatElements
|
|
2866
2812
|
|
|
2867
2813
|
/**
|
|
@@ -2882,19 +2828,13 @@ export const repeatElements: {
|
|
|
2882
2828
|
export const repeatElementsWith: {
|
|
2883
2829
|
<R2, B, A, C>(
|
|
2884
2830
|
schedule: Schedule.Schedule<R2, unknown, B>,
|
|
2885
|
-
options: {
|
|
2886
|
-
|
|
2887
|
-
readonly onSchedule: (b: B) => C
|
|
2888
|
-
}
|
|
2889
|
-
): <R, E>(self: Stream<R, E, A>) => Stream<R2 | R, E, C>
|
|
2831
|
+
options: { readonly onElement: (a: A) => C; readonly onSchedule: (b: B) => C }
|
|
2832
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<C, E, R2 | R>
|
|
2890
2833
|
<R, E, R2, B, A, C>(
|
|
2891
|
-
self: Stream<
|
|
2834
|
+
self: Stream<A, E, R>,
|
|
2892
2835
|
schedule: Schedule.Schedule<R2, unknown, B>,
|
|
2893
|
-
options: {
|
|
2894
|
-
|
|
2895
|
-
readonly onSchedule: (b: B) => C
|
|
2896
|
-
}
|
|
2897
|
-
): Stream<R | R2, E, C>
|
|
2836
|
+
options: { readonly onElement: (a: A) => C; readonly onSchedule: (b: B) => C }
|
|
2837
|
+
): Stream<C, E, R | R2>
|
|
2898
2838
|
} = internal.repeatElementsWith
|
|
2899
2839
|
|
|
2900
2840
|
/**
|
|
@@ -2903,7 +2843,7 @@ export const repeatElementsWith: {
|
|
|
2903
2843
|
* @since 2.0.0
|
|
2904
2844
|
* @category constructors
|
|
2905
2845
|
*/
|
|
2906
|
-
export const repeatValue: <A>(value: A) => Stream<
|
|
2846
|
+
export const repeatValue: <A>(value: A) => Stream<A> = internal.repeatValue
|
|
2907
2847
|
|
|
2908
2848
|
/**
|
|
2909
2849
|
* Repeats the entire stream using the specified schedule. The stream will
|
|
@@ -2917,19 +2857,13 @@ export const repeatValue: <A>(value: A) => Stream<never, never, A> = internal.re
|
|
|
2917
2857
|
export const repeatWith: {
|
|
2918
2858
|
<R2, B, A, C>(
|
|
2919
2859
|
schedule: Schedule.Schedule<R2, unknown, B>,
|
|
2920
|
-
options: {
|
|
2921
|
-
|
|
2922
|
-
readonly onSchedule: (b: B) => C
|
|
2923
|
-
}
|
|
2924
|
-
): <R, E>(self: Stream<R, E, A>) => Stream<R2 | R, E, C>
|
|
2860
|
+
options: { readonly onElement: (a: A) => C; readonly onSchedule: (b: B) => C }
|
|
2861
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<C, E, R2 | R>
|
|
2925
2862
|
<R, E, R2, B, A, C>(
|
|
2926
|
-
self: Stream<
|
|
2863
|
+
self: Stream<A, E, R>,
|
|
2927
2864
|
schedule: Schedule.Schedule<R2, unknown, B>,
|
|
2928
|
-
options: {
|
|
2929
|
-
|
|
2930
|
-
readonly onSchedule: (b: B) => C
|
|
2931
|
-
}
|
|
2932
|
-
): Stream<R | R2, E, C>
|
|
2865
|
+
options: { readonly onElement: (a: A) => C; readonly onSchedule: (b: B) => C }
|
|
2866
|
+
): Stream<C, E, R | R2>
|
|
2933
2867
|
} = internal.repeatWith
|
|
2934
2868
|
|
|
2935
2869
|
/**
|
|
@@ -2948,8 +2882,8 @@ export const repeatWith: {
|
|
|
2948
2882
|
export const retry: {
|
|
2949
2883
|
<R2, E, E0 extends E, _>(
|
|
2950
2884
|
schedule: Schedule.Schedule<R2, E0, _>
|
|
2951
|
-
): <R, A>(self: Stream<
|
|
2952
|
-
<R, A, R2, E, E0 extends E, _>(self: Stream<
|
|
2885
|
+
): <R, A>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>
|
|
2886
|
+
<R, A, R2, E, E0 extends E, _>(self: Stream<A, E, R>, schedule: Schedule.Schedule<R2, E0, _>): Stream<A, E, R | R2>
|
|
2953
2887
|
} = internal.retry
|
|
2954
2888
|
|
|
2955
2889
|
/**
|
|
@@ -2959,10 +2893,13 @@ export const retry: {
|
|
|
2959
2893
|
* @category destructors
|
|
2960
2894
|
*/
|
|
2961
2895
|
export const run: {
|
|
2962
|
-
<
|
|
2963
|
-
sink: Sink.Sink<
|
|
2964
|
-
): <
|
|
2965
|
-
<
|
|
2896
|
+
<A2, A, E2, R2>(
|
|
2897
|
+
sink: Sink.Sink<A2, A, unknown, E2, R2>
|
|
2898
|
+
): <E, R>(self: Stream<A, E, R>) => Effect.Effect<A2, E2 | E, R2 | R>
|
|
2899
|
+
<A, E, R, A2, E2, R2>(
|
|
2900
|
+
self: Stream<A, E, R>,
|
|
2901
|
+
sink: Sink.Sink<A2, A, unknown, E2, R2>
|
|
2902
|
+
): Effect.Effect<A2, E | E2, R | R2>
|
|
2966
2903
|
} = internal.run
|
|
2967
2904
|
|
|
2968
2905
|
/**
|
|
@@ -2971,7 +2908,7 @@ export const run: {
|
|
|
2971
2908
|
* @since 2.0.0
|
|
2972
2909
|
* @category destructors
|
|
2973
2910
|
*/
|
|
2974
|
-
export const runCollect: <
|
|
2911
|
+
export const runCollect: <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Chunk.Chunk<A>, E, R> = internal.runCollect
|
|
2975
2912
|
|
|
2976
2913
|
/**
|
|
2977
2914
|
* Runs the stream and emits the number of elements processed
|
|
@@ -2979,7 +2916,7 @@ export const runCollect: <R, E, A>(self: Stream<R, E, A>) => Effect.Effect<R, E,
|
|
|
2979
2916
|
* @since 2.0.0
|
|
2980
2917
|
* @category destructors
|
|
2981
2918
|
*/
|
|
2982
|
-
export const runCount: <
|
|
2919
|
+
export const runCount: <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<number, E, R> = internal.runCount
|
|
2983
2920
|
|
|
2984
2921
|
/**
|
|
2985
2922
|
* Runs the stream only for its effects. The emitted elements are discarded.
|
|
@@ -2987,7 +2924,7 @@ export const runCount: <R, E, A>(self: Stream<R, E, A>) => Effect.Effect<R, E, n
|
|
|
2987
2924
|
* @since 2.0.0
|
|
2988
2925
|
* @category destructors
|
|
2989
2926
|
*/
|
|
2990
|
-
export const runDrain: <
|
|
2927
|
+
export const runDrain: <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<void, E, R> = internal.runDrain
|
|
2991
2928
|
|
|
2992
2929
|
/**
|
|
2993
2930
|
* Executes a pure fold over the stream of values - reduces all elements in
|
|
@@ -2997,8 +2934,8 @@ export const runDrain: <R, E, A>(self: Stream<R, E, A>) => Effect.Effect<R, E, v
|
|
|
2997
2934
|
* @category destructors
|
|
2998
2935
|
*/
|
|
2999
2936
|
export const runFold: {
|
|
3000
|
-
<S, A>(s: S, f: (s: S, a: A) => S): <R, E>(self: Stream<
|
|
3001
|
-
<R, E, S, A>(self: Stream<
|
|
2937
|
+
<S, A>(s: S, f: (s: S, a: A) => S): <R, E>(self: Stream<A, E, R>) => Effect.Effect<S, E, R>
|
|
2938
|
+
<R, E, S, A>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => S): Effect.Effect<S, E, R>
|
|
3002
2939
|
} = internal.runFold
|
|
3003
2940
|
|
|
3004
2941
|
/**
|
|
@@ -3010,13 +2947,13 @@ export const runFold: {
|
|
|
3010
2947
|
export const runFoldEffect: {
|
|
3011
2948
|
<S, A, R2, E2>(
|
|
3012
2949
|
s: S,
|
|
3013
|
-
f: (s: S, a: A) => Effect.Effect<
|
|
3014
|
-
): <R, E>(self: Stream<
|
|
2950
|
+
f: (s: S, a: A) => Effect.Effect<S, E2, R2>
|
|
2951
|
+
): <R, E>(self: Stream<A, E, R>) => Effect.Effect<S, E2 | E, R2 | R>
|
|
3015
2952
|
<R, E, S, A, R2, E2>(
|
|
3016
|
-
self: Stream<
|
|
2953
|
+
self: Stream<A, E, R>,
|
|
3017
2954
|
s: S,
|
|
3018
|
-
f: (s: S, a: A) => Effect.Effect<
|
|
3019
|
-
): Effect.Effect<
|
|
2955
|
+
f: (s: S, a: A) => Effect.Effect<S, E2, R2>
|
|
2956
|
+
): Effect.Effect<S, E | E2, R | R2>
|
|
3020
2957
|
} = internal.runFoldEffect
|
|
3021
2958
|
|
|
3022
2959
|
/**
|
|
@@ -3027,8 +2964,8 @@ export const runFoldEffect: {
|
|
|
3027
2964
|
* @category destructors
|
|
3028
2965
|
*/
|
|
3029
2966
|
export const runFoldScoped: {
|
|
3030
|
-
<S, A>(s: S, f: (s: S, a: A) => S): <R, E>(self: Stream<
|
|
3031
|
-
<R, E, S, A>(self: Stream<
|
|
2967
|
+
<S, A>(s: S, f: (s: S, a: A) => S): <R, E>(self: Stream<A, E, R>) => Effect.Effect<S, E, Scope.Scope | R>
|
|
2968
|
+
<R, E, S, A>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => S): Effect.Effect<S, E, Scope.Scope | R>
|
|
3032
2969
|
} = internal.runFoldScoped
|
|
3033
2970
|
|
|
3034
2971
|
/**
|
|
@@ -3041,13 +2978,13 @@ export const runFoldScoped: {
|
|
|
3041
2978
|
export const runFoldScopedEffect: {
|
|
3042
2979
|
<S, A, R2, E2>(
|
|
3043
2980
|
s: S,
|
|
3044
|
-
f: (s: S, a: A) => Effect.Effect<
|
|
3045
|
-
): <R, E>(self: Stream<
|
|
2981
|
+
f: (s: S, a: A) => Effect.Effect<S, E2, R2>
|
|
2982
|
+
): <R, E>(self: Stream<A, E, R>) => Effect.Effect<S, E2 | E, Scope.Scope | R2 | R>
|
|
3046
2983
|
<R, E, S, A, R2, E2>(
|
|
3047
|
-
self: Stream<
|
|
2984
|
+
self: Stream<A, E, R>,
|
|
3048
2985
|
s: S,
|
|
3049
|
-
f: (s: S, a: A) => Effect.Effect<
|
|
3050
|
-
): Effect.Effect<Scope.Scope | R | R2
|
|
2986
|
+
f: (s: S, a: A) => Effect.Effect<S, E2, R2>
|
|
2987
|
+
): Effect.Effect<S, E | E2, Scope.Scope | R | R2>
|
|
3051
2988
|
} = internal.runFoldScopedEffect
|
|
3052
2989
|
|
|
3053
2990
|
/**
|
|
@@ -3058,8 +2995,8 @@ export const runFoldScopedEffect: {
|
|
|
3058
2995
|
* @category destructors
|
|
3059
2996
|
*/
|
|
3060
2997
|
export const runFoldWhile: {
|
|
3061
|
-
<S, A>(s: S, cont: Predicate<S>, f: (s: S, a: A) => S): <R, E>(self: Stream<
|
|
3062
|
-
<R, E, S, A>(self: Stream<
|
|
2998
|
+
<S, A>(s: S, cont: Predicate<S>, f: (s: S, a: A) => S): <R, E>(self: Stream<A, E, R>) => Effect.Effect<S, E, R>
|
|
2999
|
+
<R, E, S, A>(self: Stream<A, E, R>, s: S, cont: Predicate<S>, f: (s: S, a: A) => S): Effect.Effect<S, E, R>
|
|
3063
3000
|
} = internal.runFoldWhile
|
|
3064
3001
|
|
|
3065
3002
|
/**
|
|
@@ -3073,14 +3010,14 @@ export const runFoldWhileEffect: {
|
|
|
3073
3010
|
<S, A, R2, E2>(
|
|
3074
3011
|
s: S,
|
|
3075
3012
|
cont: Predicate<S>,
|
|
3076
|
-
f: (s: S, a: A) => Effect.Effect<
|
|
3077
|
-
): <R, E>(self: Stream<
|
|
3013
|
+
f: (s: S, a: A) => Effect.Effect<S, E2, R2>
|
|
3014
|
+
): <R, E>(self: Stream<A, E, R>) => Effect.Effect<S, E2 | E, R2 | R>
|
|
3078
3015
|
<R, E, S, A, R2, E2>(
|
|
3079
|
-
self: Stream<
|
|
3016
|
+
self: Stream<A, E, R>,
|
|
3080
3017
|
s: S,
|
|
3081
3018
|
cont: Predicate<S>,
|
|
3082
|
-
f: (s: S, a: A) => Effect.Effect<
|
|
3083
|
-
): Effect.Effect<
|
|
3019
|
+
f: (s: S, a: A) => Effect.Effect<S, E2, R2>
|
|
3020
|
+
): Effect.Effect<S, E | E2, R | R2>
|
|
3084
3021
|
} = internal.runFoldWhileEffect
|
|
3085
3022
|
|
|
3086
3023
|
/**
|
|
@@ -3096,13 +3033,13 @@ export const runFoldWhileScoped: {
|
|
|
3096
3033
|
s: S,
|
|
3097
3034
|
cont: Predicate<S>,
|
|
3098
3035
|
f: (s: S, a: A) => S
|
|
3099
|
-
): <R, E>(self: Stream<
|
|
3036
|
+
): <R, E>(self: Stream<A, E, R>) => Effect.Effect<S, E, Scope.Scope | R>
|
|
3100
3037
|
<R, E, S, A>(
|
|
3101
|
-
self: Stream<
|
|
3038
|
+
self: Stream<A, E, R>,
|
|
3102
3039
|
s: S,
|
|
3103
3040
|
cont: Predicate<S>,
|
|
3104
3041
|
f: (s: S, a: A) => S
|
|
3105
|
-
): Effect.Effect<Scope.Scope | R
|
|
3042
|
+
): Effect.Effect<S, E, Scope.Scope | R>
|
|
3106
3043
|
} = internal.runFoldWhileScoped
|
|
3107
3044
|
|
|
3108
3045
|
/**
|
|
@@ -3117,14 +3054,14 @@ export const runFoldWhileScopedEffect: {
|
|
|
3117
3054
|
<S, A, R2, E2>(
|
|
3118
3055
|
s: S,
|
|
3119
3056
|
cont: Predicate<S>,
|
|
3120
|
-
f: (s: S, a: A) => Effect.Effect<
|
|
3121
|
-
): <R, E>(self: Stream<
|
|
3057
|
+
f: (s: S, a: A) => Effect.Effect<S, E2, R2>
|
|
3058
|
+
): <R, E>(self: Stream<A, E, R>) => Effect.Effect<S, E2 | E, Scope.Scope | R2 | R>
|
|
3122
3059
|
<R, E, S, A, R2, E2>(
|
|
3123
|
-
self: Stream<
|
|
3060
|
+
self: Stream<A, E, R>,
|
|
3124
3061
|
s: S,
|
|
3125
3062
|
cont: Predicate<S>,
|
|
3126
|
-
f: (s: S, a: A) => Effect.Effect<
|
|
3127
|
-
): Effect.Effect<Scope.Scope | R | R2
|
|
3063
|
+
f: (s: S, a: A) => Effect.Effect<S, E2, R2>
|
|
3064
|
+
): Effect.Effect<S, E | E2, Scope.Scope | R | R2>
|
|
3128
3065
|
} = internal.runFoldWhileScopedEffect
|
|
3129
3066
|
|
|
3130
3067
|
/**
|
|
@@ -3136,12 +3073,12 @@ export const runFoldWhileScopedEffect: {
|
|
|
3136
3073
|
*/
|
|
3137
3074
|
export const runForEach: {
|
|
3138
3075
|
<A, R2, E2, _>(
|
|
3139
|
-
f: (a: A) => Effect.Effect<
|
|
3140
|
-
): <R, E>(self: Stream<
|
|
3076
|
+
f: (a: A) => Effect.Effect<_, E2, R2>
|
|
3077
|
+
): <R, E>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, R2 | R>
|
|
3141
3078
|
<R, E, A, R2, E2, _>(
|
|
3142
|
-
self: Stream<
|
|
3143
|
-
f: (a: A) => Effect.Effect<
|
|
3144
|
-
): Effect.Effect<
|
|
3079
|
+
self: Stream<A, E, R>,
|
|
3080
|
+
f: (a: A) => Effect.Effect<_, E2, R2>
|
|
3081
|
+
): Effect.Effect<void, E | E2, R | R2>
|
|
3145
3082
|
} = internal.runForEach
|
|
3146
3083
|
|
|
3147
3084
|
/**
|
|
@@ -3153,12 +3090,12 @@ export const runForEach: {
|
|
|
3153
3090
|
*/
|
|
3154
3091
|
export const runForEachChunk: {
|
|
3155
3092
|
<A, R2, E2, _>(
|
|
3156
|
-
f: (a: Chunk.Chunk<A>) => Effect.Effect<
|
|
3157
|
-
): <R, E>(self: Stream<
|
|
3093
|
+
f: (a: Chunk.Chunk<A>) => Effect.Effect<_, E2, R2>
|
|
3094
|
+
): <R, E>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, R2 | R>
|
|
3158
3095
|
<R, E, A, R2, E2, _>(
|
|
3159
|
-
self: Stream<
|
|
3160
|
-
f: (a: Chunk.Chunk<A>) => Effect.Effect<
|
|
3161
|
-
): Effect.Effect<
|
|
3096
|
+
self: Stream<A, E, R>,
|
|
3097
|
+
f: (a: Chunk.Chunk<A>) => Effect.Effect<_, E2, R2>
|
|
3098
|
+
): Effect.Effect<void, E | E2, R | R2>
|
|
3162
3099
|
} = internal.runForEachChunk
|
|
3163
3100
|
|
|
3164
3101
|
/**
|
|
@@ -3170,12 +3107,12 @@ export const runForEachChunk: {
|
|
|
3170
3107
|
*/
|
|
3171
3108
|
export const runForEachChunkScoped: {
|
|
3172
3109
|
<A, R2, E2, _>(
|
|
3173
|
-
f: (a: Chunk.Chunk<A>) => Effect.Effect<
|
|
3174
|
-
): <R, E>(self: Stream<
|
|
3110
|
+
f: (a: Chunk.Chunk<A>) => Effect.Effect<_, E2, R2>
|
|
3111
|
+
): <R, E>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, Scope.Scope | R2 | R>
|
|
3175
3112
|
<R, E, A, R2, E2, _>(
|
|
3176
|
-
self: Stream<
|
|
3177
|
-
f: (a: Chunk.Chunk<A>) => Effect.Effect<
|
|
3178
|
-
): Effect.Effect<Scope.Scope | R | R2
|
|
3113
|
+
self: Stream<A, E, R>,
|
|
3114
|
+
f: (a: Chunk.Chunk<A>) => Effect.Effect<_, E2, R2>
|
|
3115
|
+
): Effect.Effect<void, E | E2, Scope.Scope | R | R2>
|
|
3179
3116
|
} = internal.runForEachChunkScoped
|
|
3180
3117
|
|
|
3181
3118
|
/**
|
|
@@ -3187,12 +3124,12 @@ export const runForEachChunkScoped: {
|
|
|
3187
3124
|
*/
|
|
3188
3125
|
export const runForEachScoped: {
|
|
3189
3126
|
<A, R2, E2, _>(
|
|
3190
|
-
f: (a: A) => Effect.Effect<
|
|
3191
|
-
): <R, E>(self: Stream<
|
|
3127
|
+
f: (a: A) => Effect.Effect<_, E2, R2>
|
|
3128
|
+
): <R, E>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, Scope.Scope | R2 | R>
|
|
3192
3129
|
<R, E, A, R2, E2, _>(
|
|
3193
|
-
self: Stream<
|
|
3194
|
-
f: (a: A) => Effect.Effect<
|
|
3195
|
-
): Effect.Effect<Scope.Scope | R | R2
|
|
3130
|
+
self: Stream<A, E, R>,
|
|
3131
|
+
f: (a: A) => Effect.Effect<_, E2, R2>
|
|
3132
|
+
): Effect.Effect<void, E | E2, Scope.Scope | R | R2>
|
|
3196
3133
|
} = internal.runForEachScoped
|
|
3197
3134
|
|
|
3198
3135
|
/**
|
|
@@ -3204,12 +3141,12 @@ export const runForEachScoped: {
|
|
|
3204
3141
|
*/
|
|
3205
3142
|
export const runForEachWhile: {
|
|
3206
3143
|
<A, R2, E2>(
|
|
3207
|
-
f: (a: A) => Effect.Effect<
|
|
3208
|
-
): <R, E>(self: Stream<
|
|
3144
|
+
f: (a: A) => Effect.Effect<boolean, E2, R2>
|
|
3145
|
+
): <R, E>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, R2 | R>
|
|
3209
3146
|
<R, E, A, R2, E2>(
|
|
3210
|
-
self: Stream<
|
|
3211
|
-
f: (a: A) => Effect.Effect<
|
|
3212
|
-
): Effect.Effect<
|
|
3147
|
+
self: Stream<A, E, R>,
|
|
3148
|
+
f: (a: A) => Effect.Effect<boolean, E2, R2>
|
|
3149
|
+
): Effect.Effect<void, E | E2, R | R2>
|
|
3213
3150
|
} = internal.runForEachWhile
|
|
3214
3151
|
|
|
3215
3152
|
/**
|
|
@@ -3221,12 +3158,12 @@ export const runForEachWhile: {
|
|
|
3221
3158
|
*/
|
|
3222
3159
|
export const runForEachWhileScoped: {
|
|
3223
3160
|
<A, R2, E2>(
|
|
3224
|
-
f: (a: A) => Effect.Effect<
|
|
3225
|
-
): <R, E>(self: Stream<
|
|
3161
|
+
f: (a: A) => Effect.Effect<boolean, E2, R2>
|
|
3162
|
+
): <R, E>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, Scope.Scope | R2 | R>
|
|
3226
3163
|
<R, E, A, R2, E2>(
|
|
3227
|
-
self: Stream<
|
|
3228
|
-
f: (a: A) => Effect.Effect<
|
|
3229
|
-
): Effect.Effect<Scope.Scope | R | R2
|
|
3164
|
+
self: Stream<A, E, R>,
|
|
3165
|
+
f: (a: A) => Effect.Effect<boolean, E2, R2>
|
|
3166
|
+
): Effect.Effect<void, E | E2, Scope.Scope | R | R2>
|
|
3230
3167
|
} = internal.runForEachWhileScoped
|
|
3231
3168
|
|
|
3232
3169
|
/**
|
|
@@ -3236,7 +3173,7 @@ export const runForEachWhileScoped: {
|
|
|
3236
3173
|
* @since 2.0.0
|
|
3237
3174
|
* @category destructors
|
|
3238
3175
|
*/
|
|
3239
|
-
export const runHead: <
|
|
3176
|
+
export const runHead: <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Option.Option<A>, E, R> = internal.runHead
|
|
3240
3177
|
|
|
3241
3178
|
/**
|
|
3242
3179
|
* Publishes elements of this stream to a `PubSub`. Stream failure and ending will
|
|
@@ -3246,8 +3183,8 @@ export const runHead: <R, E, A>(self: Stream<R, E, A>) => Effect.Effect<R, E, Op
|
|
|
3246
3183
|
* @category destructors
|
|
3247
3184
|
*/
|
|
3248
3185
|
export const runIntoPubSub: {
|
|
3249
|
-
<
|
|
3250
|
-
<
|
|
3186
|
+
<A, E>(pubsub: PubSub.PubSub<Take.Take<A, E>>): <R>(self: Stream<A, E, R>) => Effect.Effect<void, never, R>
|
|
3187
|
+
<A, E, R>(self: Stream<A, E, R>, pubsub: PubSub.PubSub<Take.Take<A, E>>): Effect.Effect<void, never, R>
|
|
3251
3188
|
} = internal.runIntoPubSub
|
|
3252
3189
|
|
|
3253
3190
|
/**
|
|
@@ -3258,10 +3195,10 @@ export const runIntoPubSub: {
|
|
|
3258
3195
|
* @category destructors
|
|
3259
3196
|
*/
|
|
3260
3197
|
export const runIntoPubSubScoped: {
|
|
3261
|
-
<
|
|
3262
|
-
pubsub: PubSub.PubSub<Take.Take<
|
|
3263
|
-
): <R>(self: Stream<
|
|
3264
|
-
<
|
|
3198
|
+
<A, E>(
|
|
3199
|
+
pubsub: PubSub.PubSub<Take.Take<A, E>>
|
|
3200
|
+
): <R>(self: Stream<A, E, R>) => Effect.Effect<void, never, Scope.Scope | R>
|
|
3201
|
+
<A, E, R>(self: Stream<A, E, R>, pubsub: PubSub.PubSub<Take.Take<A, E>>): Effect.Effect<void, never, Scope.Scope | R>
|
|
3265
3202
|
} = internal.runIntoPubSubScoped
|
|
3266
3203
|
|
|
3267
3204
|
/**
|
|
@@ -3272,8 +3209,8 @@ export const runIntoPubSubScoped: {
|
|
|
3272
3209
|
* @category destructors
|
|
3273
3210
|
*/
|
|
3274
3211
|
export const runIntoQueue: {
|
|
3275
|
-
<
|
|
3276
|
-
<
|
|
3212
|
+
<A, E>(queue: Queue.Enqueue<Take.Take<A, E>>): <R>(self: Stream<A, E, R>) => Effect.Effect<void, never, R>
|
|
3213
|
+
<A, E, R>(self: Stream<A, E, R>, queue: Queue.Enqueue<Take.Take<A, E>>): Effect.Effect<void, never, R>
|
|
3277
3214
|
} = internal.runIntoQueue
|
|
3278
3215
|
|
|
3279
3216
|
/**
|
|
@@ -3284,13 +3221,13 @@ export const runIntoQueue: {
|
|
|
3284
3221
|
* @category destructors
|
|
3285
3222
|
*/
|
|
3286
3223
|
export const runIntoQueueElementsScoped: {
|
|
3287
|
-
<
|
|
3288
|
-
queue: Queue.Enqueue<Exit.Exit<Option.Option<E
|
|
3289
|
-
): <R>(self: Stream<
|
|
3290
|
-
<
|
|
3291
|
-
self: Stream<
|
|
3292
|
-
queue: Queue.Enqueue<Exit.Exit<Option.Option<E
|
|
3293
|
-
): Effect.Effect<Scope.Scope | R
|
|
3224
|
+
<A, E>(
|
|
3225
|
+
queue: Queue.Enqueue<Exit.Exit<A, Option.Option<E>>>
|
|
3226
|
+
): <R>(self: Stream<A, E, R>) => Effect.Effect<void, never, Scope.Scope | R>
|
|
3227
|
+
<A, E, R>(
|
|
3228
|
+
self: Stream<A, E, R>,
|
|
3229
|
+
queue: Queue.Enqueue<Exit.Exit<A, Option.Option<E>>>
|
|
3230
|
+
): Effect.Effect<void, never, Scope.Scope | R>
|
|
3294
3231
|
} = internal.runIntoQueueElementsScoped
|
|
3295
3232
|
|
|
3296
3233
|
/**
|
|
@@ -3301,10 +3238,10 @@ export const runIntoQueueElementsScoped: {
|
|
|
3301
3238
|
* @category destructors
|
|
3302
3239
|
*/
|
|
3303
3240
|
export const runIntoQueueScoped: {
|
|
3304
|
-
<
|
|
3305
|
-
queue: Queue.Enqueue<Take.Take<
|
|
3306
|
-
): <R>(self: Stream<
|
|
3307
|
-
<
|
|
3241
|
+
<A, E>(
|
|
3242
|
+
queue: Queue.Enqueue<Take.Take<A, E>>
|
|
3243
|
+
): <R>(self: Stream<A, E, R>) => Effect.Effect<void, never, Scope.Scope | R>
|
|
3244
|
+
<A, E, R>(self: Stream<A, E, R>, queue: Queue.Enqueue<Take.Take<A, E>>): Effect.Effect<void, never, Scope.Scope | R>
|
|
3308
3245
|
} = internal.runIntoQueueScoped
|
|
3309
3246
|
|
|
3310
3247
|
/**
|
|
@@ -3314,20 +3251,20 @@ export const runIntoQueueScoped: {
|
|
|
3314
3251
|
* @since 2.0.0
|
|
3315
3252
|
* @category destructors
|
|
3316
3253
|
*/
|
|
3317
|
-
export const runLast: <
|
|
3254
|
+
export const runLast: <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Option.Option<A>, E, R> = internal.runLast
|
|
3318
3255
|
|
|
3319
3256
|
/**
|
|
3320
3257
|
* @since 2.0.0
|
|
3321
3258
|
* @category destructors
|
|
3322
3259
|
*/
|
|
3323
3260
|
export const runScoped: {
|
|
3324
|
-
<
|
|
3325
|
-
sink: Sink.Sink<
|
|
3326
|
-
): <
|
|
3327
|
-
<
|
|
3328
|
-
self: Stream<
|
|
3329
|
-
sink: Sink.Sink<
|
|
3330
|
-
): Effect.Effect<Scope.Scope | R | R2
|
|
3261
|
+
<A2, A, E2, R2>(
|
|
3262
|
+
sink: Sink.Sink<A2, A, unknown, E2, R2>
|
|
3263
|
+
): <E, R>(self: Stream<A, E, R>) => Effect.Effect<A2, E2 | E, Scope.Scope | R2 | R>
|
|
3264
|
+
<A, E, R, A2, E2, R2>(
|
|
3265
|
+
self: Stream<A, E, R>,
|
|
3266
|
+
sink: Sink.Sink<A2, A, unknown, E2, R2>
|
|
3267
|
+
): Effect.Effect<A2, E | E2, Scope.Scope | R | R2>
|
|
3331
3268
|
} = internal.runScoped
|
|
3332
3269
|
|
|
3333
3270
|
/**
|
|
@@ -3336,7 +3273,7 @@ export const runScoped: {
|
|
|
3336
3273
|
* @since 2.0.0
|
|
3337
3274
|
* @category destructors
|
|
3338
3275
|
*/
|
|
3339
|
-
export const runSum: <R, E>(self: Stream<
|
|
3276
|
+
export const runSum: <R, E>(self: Stream<number, E, R>) => Effect.Effect<number, E, R> = internal.runSum
|
|
3340
3277
|
|
|
3341
3278
|
/**
|
|
3342
3279
|
* Statefully maps over the elements of this stream to produce all
|
|
@@ -3346,8 +3283,8 @@ export const runSum: <R, E>(self: Stream<R, E, number>) => Effect.Effect<R, E, n
|
|
|
3346
3283
|
* @category utils
|
|
3347
3284
|
*/
|
|
3348
3285
|
export const scan: {
|
|
3349
|
-
<S, A>(s: S, f: (s: S, a: A) => S): <R, E>(self: Stream<
|
|
3350
|
-
<R, E, S, A>(self: Stream<
|
|
3286
|
+
<S, A>(s: S, f: (s: S, a: A) => S): <R, E>(self: Stream<A, E, R>) => Stream<S, E, R>
|
|
3287
|
+
<R, E, S, A>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => S): Stream<S, E, R>
|
|
3351
3288
|
} = internal.scan
|
|
3352
3289
|
|
|
3353
3290
|
/**
|
|
@@ -3360,13 +3297,13 @@ export const scan: {
|
|
|
3360
3297
|
export const scanEffect: {
|
|
3361
3298
|
<S, A, R2, E2>(
|
|
3362
3299
|
s: S,
|
|
3363
|
-
f: (s: S, a: A) => Effect.Effect<
|
|
3364
|
-
): <R, E>(self: Stream<
|
|
3300
|
+
f: (s: S, a: A) => Effect.Effect<S, E2, R2>
|
|
3301
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<S, E2 | E, R2 | R>
|
|
3365
3302
|
<R, E, S, A, R2, E2>(
|
|
3366
|
-
self: Stream<
|
|
3303
|
+
self: Stream<A, E, R>,
|
|
3367
3304
|
s: S,
|
|
3368
|
-
f: (s: S, a: A) => Effect.Effect<
|
|
3369
|
-
): Stream<
|
|
3305
|
+
f: (s: S, a: A) => Effect.Effect<S, E2, R2>
|
|
3306
|
+
): Stream<S, E | E2, R | R2>
|
|
3370
3307
|
} = internal.scanEffect
|
|
3371
3308
|
|
|
3372
3309
|
/**
|
|
@@ -3379,8 +3316,8 @@ export const scanEffect: {
|
|
|
3379
3316
|
* @category utils
|
|
3380
3317
|
*/
|
|
3381
3318
|
export const scanReduce: {
|
|
3382
|
-
<A2, A>(f: (a2: A2 | A, a: A) => A2): <R, E>(self: Stream<
|
|
3383
|
-
<R, E, A2, A>(self: Stream<
|
|
3319
|
+
<A2, A>(f: (a2: A2 | A, a: A) => A2): <R, E>(self: Stream<A, E, R>) => Stream<A2 | A, E, R>
|
|
3320
|
+
<R, E, A2, A>(self: Stream<A, E, R>, f: (a2: A2 | A, a: A) => A2): Stream<A2 | A, E, R>
|
|
3384
3321
|
} = internal.scanReduce
|
|
3385
3322
|
|
|
3386
3323
|
/**
|
|
@@ -3392,9 +3329,7 @@ export const scanReduce: {
|
|
|
3392
3329
|
* @since 2.0.0
|
|
3393
3330
|
* @category utils
|
|
3394
3331
|
*/
|
|
3395
|
-
export const scanReduceEffect
|
|
3396
|
-
f: (a2: A2 | A, a: A) => Effect.Effect<R2, E2, A2 | A>
|
|
3397
|
-
) => <R, E>(self: Stream<R, E, A>) => Stream<R2 | R, E2 | E, A2 | A> = internal.scanReduceEffect
|
|
3332
|
+
export const scanReduceEffect = internal.scanReduceEffect
|
|
3398
3333
|
|
|
3399
3334
|
/**
|
|
3400
3335
|
* Schedules the output of the stream using the provided `schedule`.
|
|
@@ -3405,8 +3340,8 @@ export const scanReduceEffect: <A2, A, R2, E2>(
|
|
|
3405
3340
|
export const schedule: {
|
|
3406
3341
|
<R2, A, A0 extends A, _>(
|
|
3407
3342
|
schedule: Schedule.Schedule<R2, A0, _>
|
|
3408
|
-
): <R, E>(self: Stream<
|
|
3409
|
-
<R, E, R2, A, A0 extends A, _>(self: Stream<
|
|
3343
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>
|
|
3344
|
+
<R, E, R2, A, A0 extends A, _>(self: Stream<A, E, R>, schedule: Schedule.Schedule<R2, A0, _>): Stream<A, E, R | R2>
|
|
3410
3345
|
} = internal.schedule
|
|
3411
3346
|
|
|
3412
3347
|
/**
|
|
@@ -3420,19 +3355,13 @@ export const schedule: {
|
|
|
3420
3355
|
export const scheduleWith: {
|
|
3421
3356
|
<R2, A, A0 extends A, B, C>(
|
|
3422
3357
|
schedule: Schedule.Schedule<R2, A0, B>,
|
|
3423
|
-
options: {
|
|
3424
|
-
|
|
3425
|
-
readonly onSchedule: (b: B) => C
|
|
3426
|
-
}
|
|
3427
|
-
): <R, E>(self: Stream<R, E, A>) => Stream<R2 | R, E, C>
|
|
3358
|
+
options: { readonly onElement: (a: A) => C; readonly onSchedule: (b: B) => C }
|
|
3359
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<C, E, R2 | R>
|
|
3428
3360
|
<R, E, R2, A, A0 extends A, B, C>(
|
|
3429
|
-
self: Stream<
|
|
3361
|
+
self: Stream<A, E, R>,
|
|
3430
3362
|
schedule: Schedule.Schedule<R2, A0, B>,
|
|
3431
|
-
options: {
|
|
3432
|
-
|
|
3433
|
-
readonly onSchedule: (b: B) => C
|
|
3434
|
-
}
|
|
3435
|
-
): Stream<R | R2, E, C>
|
|
3363
|
+
options: { readonly onElement: (a: A) => C; readonly onSchedule: (b: B) => C }
|
|
3364
|
+
): Stream<C, E, R | R2>
|
|
3436
3365
|
} = internal.scheduleWith
|
|
3437
3366
|
|
|
3438
3367
|
/**
|
|
@@ -3441,7 +3370,7 @@ export const scheduleWith: {
|
|
|
3441
3370
|
* @since 2.0.0
|
|
3442
3371
|
* @category constructors
|
|
3443
3372
|
*/
|
|
3444
|
-
export const scoped: <
|
|
3373
|
+
export const scoped: <A, E, R>(effect: Effect.Effect<A, E, R>) => Stream<A, E, Exclude<R, Scope.Scope>> =
|
|
3445
3374
|
internal.scoped
|
|
3446
3375
|
|
|
3447
3376
|
/**
|
|
@@ -3463,8 +3392,8 @@ export const scoped: <R, E, A>(effect: Effect.Effect<R, E, A>) => Stream<Exclude
|
|
|
3463
3392
|
* @category utils
|
|
3464
3393
|
*/
|
|
3465
3394
|
export const sliding: {
|
|
3466
|
-
(chunkSize: number): <
|
|
3467
|
-
<
|
|
3395
|
+
(chunkSize: number): <A, E, R>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R>
|
|
3396
|
+
<A, E, R>(self: Stream<A, E, R>, chunkSize: number): Stream<Chunk.Chunk<A>, E, R>
|
|
3468
3397
|
} = internal.sliding
|
|
3469
3398
|
|
|
3470
3399
|
/**
|
|
@@ -3474,8 +3403,8 @@ export const sliding: {
|
|
|
3474
3403
|
* @category utils
|
|
3475
3404
|
*/
|
|
3476
3405
|
export const slidingSize: {
|
|
3477
|
-
(chunkSize: number, stepSize: number): <
|
|
3478
|
-
<
|
|
3406
|
+
(chunkSize: number, stepSize: number): <A, E, R>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R>
|
|
3407
|
+
<A, E, R>(self: Stream<A, E, R>, chunkSize: number, stepSize: number): Stream<Chunk.Chunk<A>, E, R>
|
|
3479
3408
|
} = internal.slidingSize
|
|
3480
3409
|
|
|
3481
3410
|
/**
|
|
@@ -3484,7 +3413,7 @@ export const slidingSize: {
|
|
|
3484
3413
|
* @since 2.0.0
|
|
3485
3414
|
* @category utils
|
|
3486
3415
|
*/
|
|
3487
|
-
export const some: <
|
|
3416
|
+
export const some: <A, E, R>(self: Stream<Option.Option<A>, E, R>) => Stream<A, Option.Option<E>, R> = internal.some
|
|
3488
3417
|
|
|
3489
3418
|
/**
|
|
3490
3419
|
* Extracts the optional value, or returns the given 'default'.
|
|
@@ -3493,8 +3422,8 @@ export const some: <R, E, A>(self: Stream<R, E, Option.Option<A>>) => Stream<R,
|
|
|
3493
3422
|
* @category utils
|
|
3494
3423
|
*/
|
|
3495
3424
|
export const someOrElse: {
|
|
3496
|
-
<A2>(fallback: LazyArg<A2>): <
|
|
3497
|
-
<R, E, A, A2>(self: Stream<
|
|
3425
|
+
<A2>(fallback: LazyArg<A2>): <A, E, R>(self: Stream<Option.Option<A>, E, R>) => Stream<A2 | A, E, R>
|
|
3426
|
+
<R, E, A, A2>(self: Stream<Option.Option<A>, E, R>, fallback: LazyArg<A2>): Stream<A | A2, E, R>
|
|
3498
3427
|
} = internal.someOrElse
|
|
3499
3428
|
|
|
3500
3429
|
/**
|
|
@@ -3504,8 +3433,8 @@ export const someOrElse: {
|
|
|
3504
3433
|
* @category utils
|
|
3505
3434
|
*/
|
|
3506
3435
|
export const someOrFail: {
|
|
3507
|
-
<E2>(error: LazyArg<E2>): <
|
|
3508
|
-
<R, E, A, E2>(self: Stream<
|
|
3436
|
+
<E2>(error: LazyArg<E2>): <A, E, R>(self: Stream<Option.Option<A>, E, R>) => Stream<A, E2 | E, R>
|
|
3437
|
+
<R, E, A, E2>(self: Stream<Option.Option<A>, E, R>, error: LazyArg<E2>): Stream<A, E | E2, R>
|
|
3509
3438
|
} = internal.someOrFail
|
|
3510
3439
|
|
|
3511
3440
|
/**
|
|
@@ -3527,8 +3456,8 @@ export const someOrFail: {
|
|
|
3527
3456
|
* @category utils
|
|
3528
3457
|
*/
|
|
3529
3458
|
export const split: {
|
|
3530
|
-
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<
|
|
3531
|
-
<
|
|
3459
|
+
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R>
|
|
3460
|
+
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<Chunk.Chunk<A>, E, R>
|
|
3532
3461
|
} = internal.split
|
|
3533
3462
|
|
|
3534
3463
|
/**
|
|
@@ -3538,8 +3467,8 @@ export const split: {
|
|
|
3538
3467
|
* @category utils
|
|
3539
3468
|
*/
|
|
3540
3469
|
export const splitOnChunk: {
|
|
3541
|
-
<A>(delimiter: Chunk.Chunk<A>): <R, E>(self: Stream<
|
|
3542
|
-
<
|
|
3470
|
+
<A>(delimiter: Chunk.Chunk<A>): <R, E>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R>
|
|
3471
|
+
<A, E, R>(self: Stream<A, E, R>, delimiter: Chunk.Chunk<A>): Stream<Chunk.Chunk<A>, E, R>
|
|
3543
3472
|
} = internal.splitOnChunk
|
|
3544
3473
|
|
|
3545
3474
|
/**
|
|
@@ -3549,7 +3478,7 @@ export const splitOnChunk: {
|
|
|
3549
3478
|
* @since 2.0.0
|
|
3550
3479
|
* @category combinators
|
|
3551
3480
|
*/
|
|
3552
|
-
export const splitLines: <R, E>(self: Stream<
|
|
3481
|
+
export const splitLines: <R, E>(self: Stream<string, E, R>) => Stream<string, E, R> = internal.splitLines
|
|
3553
3482
|
|
|
3554
3483
|
/**
|
|
3555
3484
|
* Creates a single-valued pure stream.
|
|
@@ -3557,7 +3486,7 @@ export const splitLines: <R, E>(self: Stream<R, E, string>) => Stream<R, E, stri
|
|
|
3557
3486
|
* @since 2.0.0
|
|
3558
3487
|
* @category constructors
|
|
3559
3488
|
*/
|
|
3560
|
-
export const succeed: <A>(value: A) => Stream<
|
|
3489
|
+
export const succeed: <A>(value: A) => Stream<A> = internal.succeed
|
|
3561
3490
|
|
|
3562
3491
|
/**
|
|
3563
3492
|
* Creates a single-valued pure stream.
|
|
@@ -3565,7 +3494,7 @@ export const succeed: <A>(value: A) => Stream<never, never, A> = internal.succee
|
|
|
3565
3494
|
* @since 2.0.0
|
|
3566
3495
|
* @category constructors
|
|
3567
3496
|
*/
|
|
3568
|
-
export const sync: <A>(evaluate: LazyArg<A>) => Stream<
|
|
3497
|
+
export const sync: <A>(evaluate: LazyArg<A>) => Stream<A> = internal.sync
|
|
3569
3498
|
|
|
3570
3499
|
/**
|
|
3571
3500
|
* Returns a lazily constructed stream.
|
|
@@ -3573,7 +3502,7 @@ export const sync: <A>(evaluate: LazyArg<A>) => Stream<never, never, A> = intern
|
|
|
3573
3502
|
* @since 2.0.0
|
|
3574
3503
|
* @category constructors
|
|
3575
3504
|
*/
|
|
3576
|
-
export const suspend: <
|
|
3505
|
+
export const suspend: <A, E, R>(stream: LazyArg<Stream<A, E, R>>) => Stream<A, E, R> = internal.suspend
|
|
3577
3506
|
|
|
3578
3507
|
/**
|
|
3579
3508
|
* Takes the specified number of elements from this stream.
|
|
@@ -3582,8 +3511,8 @@ export const suspend: <R, E, A>(stream: LazyArg<Stream<R, E, A>>) => Stream<R, E
|
|
|
3582
3511
|
* @category utils
|
|
3583
3512
|
*/
|
|
3584
3513
|
export const take: {
|
|
3585
|
-
(n: number): <
|
|
3586
|
-
<
|
|
3514
|
+
(n: number): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
3515
|
+
<A, E, R>(self: Stream<A, E, R>, n: number): Stream<A, E, R>
|
|
3587
3516
|
} = internal.take
|
|
3588
3517
|
|
|
3589
3518
|
/**
|
|
@@ -3593,8 +3522,8 @@ export const take: {
|
|
|
3593
3522
|
* @category utils
|
|
3594
3523
|
*/
|
|
3595
3524
|
export const takeRight: {
|
|
3596
|
-
(n: number): <
|
|
3597
|
-
<
|
|
3525
|
+
(n: number): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
3526
|
+
<A, E, R>(self: Stream<A, E, R>, n: number): Stream<A, E, R>
|
|
3598
3527
|
} = internal.takeRight
|
|
3599
3528
|
|
|
3600
3529
|
/**
|
|
@@ -3605,8 +3534,8 @@ export const takeRight: {
|
|
|
3605
3534
|
* @category utils
|
|
3606
3535
|
*/
|
|
3607
3536
|
export const takeUntil: {
|
|
3608
|
-
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<
|
|
3609
|
-
<
|
|
3537
|
+
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
3538
|
+
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>
|
|
3610
3539
|
} = internal.takeUntil
|
|
3611
3540
|
|
|
3612
3541
|
/**
|
|
@@ -3618,12 +3547,12 @@ export const takeUntil: {
|
|
|
3618
3547
|
*/
|
|
3619
3548
|
export const takeUntilEffect: {
|
|
3620
3549
|
<A, R2, E2>(
|
|
3621
|
-
predicate: (a: NoInfer<A>) => Effect.Effect<
|
|
3622
|
-
): <R, E>(self: Stream<
|
|
3550
|
+
predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>
|
|
3551
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
3623
3552
|
<R, E, A, R2, E2>(
|
|
3624
|
-
self: Stream<
|
|
3625
|
-
predicate: (a: A) => Effect.Effect<
|
|
3626
|
-
): Stream<
|
|
3553
|
+
self: Stream<A, E, R>,
|
|
3554
|
+
predicate: (a: A) => Effect.Effect<boolean, E2, R2>
|
|
3555
|
+
): Stream<A, E | E2, R | R2>
|
|
3627
3556
|
} = internal.takeUntilEffect
|
|
3628
3557
|
|
|
3629
3558
|
/**
|
|
@@ -3634,10 +3563,10 @@ export const takeUntilEffect: {
|
|
|
3634
3563
|
* @category utils
|
|
3635
3564
|
*/
|
|
3636
3565
|
export const takeWhile: {
|
|
3637
|
-
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <R, E>(self: Stream<
|
|
3638
|
-
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<
|
|
3639
|
-
<R, E, A, B extends A>(self: Stream<
|
|
3640
|
-
<
|
|
3566
|
+
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <R, E>(self: Stream<A, E, R>) => Stream<B, E, R>
|
|
3567
|
+
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
3568
|
+
<R, E, A, B extends A>(self: Stream<A, E, R>, refinement: Refinement<A, B>): Stream<B, E, R>
|
|
3569
|
+
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>
|
|
3641
3570
|
} = internal.takeWhile
|
|
3642
3571
|
|
|
3643
3572
|
/**
|
|
@@ -3648,12 +3577,9 @@ export const takeWhile: {
|
|
|
3648
3577
|
*/
|
|
3649
3578
|
export const tap: {
|
|
3650
3579
|
<A, R2, E2, _>(
|
|
3651
|
-
f: (a: NoInfer<A>) => Effect.Effect<
|
|
3652
|
-
): <R, E>(self: Stream<
|
|
3653
|
-
<R, E, A, R2, E2, _>(
|
|
3654
|
-
self: Stream<R, E, A>,
|
|
3655
|
-
f: (a: NoInfer<A>) => Effect.Effect<R2, E2, _>
|
|
3656
|
-
): Stream<R | R2, E | E2, A>
|
|
3580
|
+
f: (a: NoInfer<A>) => Effect.Effect<_, E2, R2>
|
|
3581
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
3582
|
+
<R, E, A, R2, E2, _>(self: Stream<A, E, R>, f: (a: NoInfer<A>) => Effect.Effect<_, E2, R2>): Stream<A, E | E2, R | R2>
|
|
3657
3583
|
} = internal.tap
|
|
3658
3584
|
|
|
3659
3585
|
/**
|
|
@@ -3666,17 +3592,17 @@ export const tap: {
|
|
|
3666
3592
|
export const tapBoth: {
|
|
3667
3593
|
<E, R2, E2, X1, A, R3, E3, X2>(
|
|
3668
3594
|
options: {
|
|
3669
|
-
readonly onFailure: (e: NoInfer<E>) => Effect.Effect<
|
|
3670
|
-
readonly onSuccess: (a: NoInfer<A>) => Effect.Effect<
|
|
3595
|
+
readonly onFailure: (e: NoInfer<E>) => Effect.Effect<X1, E2, R2>
|
|
3596
|
+
readonly onSuccess: (a: NoInfer<A>) => Effect.Effect<X2, E3, R3>
|
|
3671
3597
|
}
|
|
3672
|
-
): <R>(self: Stream<
|
|
3598
|
+
): <R>(self: Stream<A, E, R>) => Stream<A, E | E2 | E3, R2 | R3 | R>
|
|
3673
3599
|
<R, E, A, R2, E2, X1, R3, E3, X2>(
|
|
3674
|
-
self: Stream<
|
|
3600
|
+
self: Stream<A, E, R>,
|
|
3675
3601
|
options: {
|
|
3676
|
-
readonly onFailure: (e: NoInfer<E>) => Effect.Effect<
|
|
3677
|
-
readonly onSuccess: (a: NoInfer<A>) => Effect.Effect<
|
|
3602
|
+
readonly onFailure: (e: NoInfer<E>) => Effect.Effect<X1, E2, R2>
|
|
3603
|
+
readonly onSuccess: (a: NoInfer<A>) => Effect.Effect<X2, E3, R3>
|
|
3678
3604
|
}
|
|
3679
|
-
): Stream<
|
|
3605
|
+
): Stream<A, E | E2 | E3, R | R2 | R3>
|
|
3680
3606
|
} = internal.tapBoth
|
|
3681
3607
|
|
|
3682
3608
|
/**
|
|
@@ -3687,12 +3613,9 @@ export const tapBoth: {
|
|
|
3687
3613
|
*/
|
|
3688
3614
|
export const tapError: {
|
|
3689
3615
|
<E, R2, E2, _>(
|
|
3690
|
-
f: (error: NoInfer<E>) => Effect.Effect<
|
|
3691
|
-
): <R, A>(self: Stream<
|
|
3692
|
-
<R, A, E, R2, E2, _>(
|
|
3693
|
-
self: Stream<R, E, A>,
|
|
3694
|
-
f: (error: E) => Effect.Effect<R2, E2, _>
|
|
3695
|
-
): Stream<R | R2, E | E2, A>
|
|
3616
|
+
f: (error: NoInfer<E>) => Effect.Effect<_, E2, R2>
|
|
3617
|
+
): <R, A>(self: Stream<A, E, R>) => Stream<A, E | E2, R2 | R>
|
|
3618
|
+
<R, A, E, R2, E2, _>(self: Stream<A, E, R>, f: (error: E) => Effect.Effect<_, E2, R2>): Stream<A, E | E2, R | R2>
|
|
3696
3619
|
} = internal.tapError
|
|
3697
3620
|
|
|
3698
3621
|
/**
|
|
@@ -3704,12 +3627,12 @@ export const tapError: {
|
|
|
3704
3627
|
*/
|
|
3705
3628
|
export const tapErrorCause: {
|
|
3706
3629
|
<E, R2, E2, _>(
|
|
3707
|
-
f: (cause: Cause.Cause<NoInfer<E>>) => Effect.Effect<
|
|
3708
|
-
): <R, A>(self: Stream<
|
|
3630
|
+
f: (cause: Cause.Cause<NoInfer<E>>) => Effect.Effect<_, E2, R2>
|
|
3631
|
+
): <R, A>(self: Stream<A, E, R>) => Stream<A, E | E2, R2 | R>
|
|
3709
3632
|
<R, A, E, R2, E2, _>(
|
|
3710
|
-
self: Stream<
|
|
3711
|
-
f: (cause: Cause.Cause<E>) => Effect.Effect<
|
|
3712
|
-
): Stream<
|
|
3633
|
+
self: Stream<A, E, R>,
|
|
3634
|
+
f: (cause: Cause.Cause<E>) => Effect.Effect<_, E2, R2>
|
|
3635
|
+
): Stream<A, E | E2, R | R2>
|
|
3713
3636
|
} = internal.tapErrorCause
|
|
3714
3637
|
|
|
3715
3638
|
/**
|
|
@@ -3720,8 +3643,8 @@ export const tapErrorCause: {
|
|
|
3720
3643
|
* @category sequencing
|
|
3721
3644
|
*/
|
|
3722
3645
|
export const tapSink: {
|
|
3723
|
-
<
|
|
3724
|
-
<
|
|
3646
|
+
<A, E2, R2>(sink: Sink.Sink<unknown, A, unknown, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
3647
|
+
<A, E, R, E2, R2>(self: Stream<A, E, R>, sink: Sink.Sink<unknown, A, unknown, E2, R2>): Stream<A, E | E2, R | R2>
|
|
3725
3648
|
} = internal.tapSink
|
|
3726
3649
|
|
|
3727
3650
|
/**
|
|
@@ -3749,9 +3672,9 @@ export const throttle: {
|
|
|
3749
3672
|
readonly burst?: number | undefined
|
|
3750
3673
|
readonly strategy?: "enforce" | "shape" | undefined
|
|
3751
3674
|
}
|
|
3752
|
-
): <R, E>(self: Stream<
|
|
3753
|
-
<
|
|
3754
|
-
self: Stream<
|
|
3675
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
3676
|
+
<A, E, R>(
|
|
3677
|
+
self: Stream<A, E, R>,
|
|
3755
3678
|
options: {
|
|
3756
3679
|
readonly cost: (chunk: Chunk.Chunk<A>) => number
|
|
3757
3680
|
readonly units: number
|
|
@@ -3759,7 +3682,7 @@ export const throttle: {
|
|
|
3759
3682
|
readonly burst?: number | undefined
|
|
3760
3683
|
readonly strategy?: "enforce" | "shape" | undefined
|
|
3761
3684
|
}
|
|
3762
|
-
): Stream<
|
|
3685
|
+
): Stream<A, E, R>
|
|
3763
3686
|
} = internal.throttle
|
|
3764
3687
|
|
|
3765
3688
|
/**
|
|
@@ -3781,23 +3704,23 @@ export const throttle: {
|
|
|
3781
3704
|
export const throttleEffect: {
|
|
3782
3705
|
<A, R2, E2>(
|
|
3783
3706
|
options: {
|
|
3784
|
-
readonly cost: (chunk: Chunk.Chunk<A>) => Effect.Effect<
|
|
3707
|
+
readonly cost: (chunk: Chunk.Chunk<A>) => Effect.Effect<number, E2, R2>
|
|
3785
3708
|
readonly units: number
|
|
3786
3709
|
readonly duration: Duration.DurationInput
|
|
3787
3710
|
readonly burst?: number | undefined
|
|
3788
3711
|
readonly strategy?: "enforce" | "shape" | undefined
|
|
3789
3712
|
}
|
|
3790
|
-
): <R, E>(self: Stream<
|
|
3713
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
3791
3714
|
<R, E, A, R2, E2>(
|
|
3792
|
-
self: Stream<
|
|
3715
|
+
self: Stream<A, E, R>,
|
|
3793
3716
|
options: {
|
|
3794
|
-
readonly cost: (chunk: Chunk.Chunk<A>) => Effect.Effect<
|
|
3717
|
+
readonly cost: (chunk: Chunk.Chunk<A>) => Effect.Effect<number, E2, R2>
|
|
3795
3718
|
readonly units: number
|
|
3796
3719
|
readonly duration: Duration.DurationInput
|
|
3797
3720
|
readonly burst?: number | undefined
|
|
3798
3721
|
readonly strategy?: "enforce" | "shape" | undefined
|
|
3799
3722
|
}
|
|
3800
|
-
): Stream<
|
|
3723
|
+
): Stream<A, E | E2, R | R2>
|
|
3801
3724
|
} = internal.throttleEffect
|
|
3802
3725
|
|
|
3803
3726
|
/**
|
|
@@ -3806,7 +3729,7 @@ export const throttleEffect: {
|
|
|
3806
3729
|
* @since 2.0.0
|
|
3807
3730
|
* @category constructors
|
|
3808
3731
|
*/
|
|
3809
|
-
export const tick: (interval: Duration.DurationInput) => Stream<
|
|
3732
|
+
export const tick: (interval: Duration.DurationInput) => Stream<void> = internal.tick
|
|
3810
3733
|
|
|
3811
3734
|
/**
|
|
3812
3735
|
* Ends the stream if it does not produce a value after the specified duration.
|
|
@@ -3815,8 +3738,8 @@ export const tick: (interval: Duration.DurationInput) => Stream<never, never, vo
|
|
|
3815
3738
|
* @category utils
|
|
3816
3739
|
*/
|
|
3817
3740
|
export const timeout: {
|
|
3818
|
-
(duration: Duration.DurationInput): <
|
|
3819
|
-
<
|
|
3741
|
+
(duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
3742
|
+
<A, E, R>(self: Stream<A, E, R>, duration: Duration.DurationInput): Stream<A, E, R>
|
|
3820
3743
|
} = internal.timeout
|
|
3821
3744
|
|
|
3822
3745
|
/**
|
|
@@ -3827,8 +3750,8 @@ export const timeout: {
|
|
|
3827
3750
|
* @category utils
|
|
3828
3751
|
*/
|
|
3829
3752
|
export const timeoutFail: {
|
|
3830
|
-
<E2>(error: LazyArg<E2>, duration: Duration.DurationInput): <
|
|
3831
|
-
<R, E, A, E2>(self: Stream<
|
|
3753
|
+
<E2>(error: LazyArg<E2>, duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R>
|
|
3754
|
+
<R, E, A, E2>(self: Stream<A, E, R>, error: LazyArg<E2>, duration: Duration.DurationInput): Stream<A, E | E2, R>
|
|
3832
3755
|
} = internal.timeoutFail
|
|
3833
3756
|
|
|
3834
3757
|
/**
|
|
@@ -3842,12 +3765,12 @@ export const timeoutFailCause: {
|
|
|
3842
3765
|
<E2>(
|
|
3843
3766
|
cause: LazyArg<Cause.Cause<E2>>,
|
|
3844
3767
|
duration: Duration.DurationInput
|
|
3845
|
-
): <
|
|
3768
|
+
): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R>
|
|
3846
3769
|
<R, E, A, E2>(
|
|
3847
|
-
self: Stream<
|
|
3770
|
+
self: Stream<A, E, R>,
|
|
3848
3771
|
cause: LazyArg<Cause.Cause<E2>>,
|
|
3849
3772
|
duration: Duration.DurationInput
|
|
3850
|
-
): Stream<
|
|
3773
|
+
): Stream<A, E | E2, R>
|
|
3851
3774
|
} = internal.timeoutFailCause
|
|
3852
3775
|
|
|
3853
3776
|
/**
|
|
@@ -3860,13 +3783,13 @@ export const timeoutFailCause: {
|
|
|
3860
3783
|
export const timeoutTo: {
|
|
3861
3784
|
<R2, E2, A2>(
|
|
3862
3785
|
duration: Duration.DurationInput,
|
|
3863
|
-
that: Stream<
|
|
3864
|
-
): <
|
|
3786
|
+
that: Stream<A2, E2, R2>
|
|
3787
|
+
): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E, R2 | R>
|
|
3865
3788
|
<R, E, A, R2, E2, A2>(
|
|
3866
|
-
self: Stream<
|
|
3789
|
+
self: Stream<A, E, R>,
|
|
3867
3790
|
duration: Duration.DurationInput,
|
|
3868
|
-
that: Stream<
|
|
3869
|
-
): Stream<
|
|
3791
|
+
that: Stream<A2, E2, R2>
|
|
3792
|
+
): Stream<A | A2, E | E2, R | R2>
|
|
3870
3793
|
} = internal.timeoutTo
|
|
3871
3794
|
|
|
3872
3795
|
/**
|
|
@@ -3879,11 +3802,11 @@ export const timeoutTo: {
|
|
|
3879
3802
|
export const toPubSub: {
|
|
3880
3803
|
(
|
|
3881
3804
|
capacity: number
|
|
3882
|
-
): <
|
|
3883
|
-
<
|
|
3884
|
-
self: Stream<
|
|
3805
|
+
): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<PubSub.PubSub<Take.Take<A, E>>, never, Scope.Scope | R>
|
|
3806
|
+
<A, E, R>(
|
|
3807
|
+
self: Stream<A, E, R>,
|
|
3885
3808
|
capacity: number
|
|
3886
|
-
): Effect.Effect<
|
|
3809
|
+
): Effect.Effect<PubSub.PubSub<Take.Take<A, E>>, never, Scope.Scope | R>
|
|
3887
3810
|
} = internal.toPubSub
|
|
3888
3811
|
|
|
3889
3812
|
/**
|
|
@@ -3895,9 +3818,9 @@ export const toPubSub: {
|
|
|
3895
3818
|
* @since 2.0.0
|
|
3896
3819
|
* @category destructors
|
|
3897
3820
|
*/
|
|
3898
|
-
export const toPull: <
|
|
3899
|
-
self: Stream<
|
|
3900
|
-
) => Effect.Effect<
|
|
3821
|
+
export const toPull: <A, E, R>(
|
|
3822
|
+
self: Stream<A, E, R>
|
|
3823
|
+
) => Effect.Effect<Effect.Effect<Chunk.Chunk<A>, Option.Option<E>, R>, never, Scope.Scope | R> = internal.toPull
|
|
3901
3824
|
|
|
3902
3825
|
/**
|
|
3903
3826
|
* Converts the stream to a scoped queue of chunks. After the scope is closed,
|
|
@@ -3910,22 +3833,18 @@ export const toPull: <R, E, A>(
|
|
|
3910
3833
|
*/
|
|
3911
3834
|
export const toQueue: {
|
|
3912
3835
|
(
|
|
3913
|
-
options?:
|
|
3914
|
-
readonly strategy?: "dropping" | "sliding" | "suspend" | undefined
|
|
3915
|
-
readonly
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
} | {
|
|
3926
|
-
readonly strategy: "unbounded"
|
|
3927
|
-
}
|
|
3928
|
-
): Effect.Effect<Scope.Scope | R, never, Queue.Dequeue<Take.Take<E, A>>>
|
|
3836
|
+
options?:
|
|
3837
|
+
| { readonly strategy?: "dropping" | "sliding" | "suspend" | undefined; readonly capacity?: number | undefined }
|
|
3838
|
+
| { readonly strategy: "unbounded" }
|
|
3839
|
+
| undefined
|
|
3840
|
+
): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Queue.Dequeue<Take.Take<A, E>>, never, Scope.Scope | R>
|
|
3841
|
+
<A, E, R>(
|
|
3842
|
+
self: Stream<A, E, R>,
|
|
3843
|
+
options?:
|
|
3844
|
+
| { readonly strategy?: "dropping" | "sliding" | "suspend" | undefined; readonly capacity?: number | undefined }
|
|
3845
|
+
| { readonly strategy: "unbounded" }
|
|
3846
|
+
| undefined
|
|
3847
|
+
): Effect.Effect<Queue.Dequeue<Take.Take<A, E>>, never, Scope.Scope | R>
|
|
3929
3848
|
} = internal.toQueue
|
|
3930
3849
|
|
|
3931
3850
|
/**
|
|
@@ -3939,18 +3858,14 @@ export const toQueue: {
|
|
|
3939
3858
|
*/
|
|
3940
3859
|
export const toQueueOfElements: {
|
|
3941
3860
|
(
|
|
3942
|
-
options?: {
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
)
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
options?: {
|
|
3951
|
-
readonly capacity?: number | undefined
|
|
3952
|
-
}
|
|
3953
|
-
): Effect.Effect<Scope.Scope | R, never, Queue.Dequeue<Exit.Exit<Option.Option<E>, A>>>
|
|
3861
|
+
options?: { readonly capacity?: number | undefined } | undefined
|
|
3862
|
+
): <A, E, R>(
|
|
3863
|
+
self: Stream<A, E, R>
|
|
3864
|
+
) => Effect.Effect<Queue.Dequeue<Exit.Exit<A, Option.Option<E>>>, never, Scope.Scope | R>
|
|
3865
|
+
<A, E, R>(
|
|
3866
|
+
self: Stream<A, E, R>,
|
|
3867
|
+
options?: { readonly capacity?: number | undefined } | undefined
|
|
3868
|
+
): Effect.Effect<Queue.Dequeue<Exit.Exit<A, Option.Option<E>>>, never, Scope.Scope | R>
|
|
3954
3869
|
} = internal.toQueueOfElements
|
|
3955
3870
|
|
|
3956
3871
|
/**
|
|
@@ -3961,7 +3876,7 @@ export const toQueueOfElements: {
|
|
|
3961
3876
|
* @since 2.0.0
|
|
3962
3877
|
* @category destructors
|
|
3963
3878
|
*/
|
|
3964
|
-
export const toReadableStream: <
|
|
3879
|
+
export const toReadableStream: <A, E>(source: Stream<A, E>) => ReadableStream<A> = internal.toReadableStream
|
|
3965
3880
|
|
|
3966
3881
|
/**
|
|
3967
3882
|
* Applies the transducer to the stream and emits its outputs.
|
|
@@ -3970,8 +3885,8 @@ export const toReadableStream: <E, A>(source: Stream<never, E, A>) => ReadableSt
|
|
|
3970
3885
|
* @category utils
|
|
3971
3886
|
*/
|
|
3972
3887
|
export const transduce: {
|
|
3973
|
-
<
|
|
3974
|
-
<
|
|
3888
|
+
<A2, A, E2, R2>(sink: Sink.Sink<A2, A, A, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>
|
|
3889
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, sink: Sink.Sink<A2, A, A, E2, R2>): Stream<A2, E | E2, R | R2>
|
|
3975
3890
|
} = internal.transduce
|
|
3976
3891
|
|
|
3977
3892
|
/**
|
|
@@ -3980,8 +3895,7 @@ export const transduce: {
|
|
|
3980
3895
|
* @since 2.0.0
|
|
3981
3896
|
* @category constructors
|
|
3982
3897
|
*/
|
|
3983
|
-
export const unfold: <S, A>(s: S, f: (s: S) => Option.Option<readonly [A, S]>) => Stream<
|
|
3984
|
-
internal.unfold
|
|
3898
|
+
export const unfold: <S, A>(s: S, f: (s: S) => Option.Option<readonly [A, S]>) => Stream<A> = internal.unfold
|
|
3985
3899
|
|
|
3986
3900
|
/**
|
|
3987
3901
|
* Creates a stream by peeling off the "layers" of a value of type `S`.
|
|
@@ -3992,7 +3906,7 @@ export const unfold: <S, A>(s: S, f: (s: S) => Option.Option<readonly [A, S]>) =
|
|
|
3992
3906
|
export const unfoldChunk: <S, A>(
|
|
3993
3907
|
s: S,
|
|
3994
3908
|
f: (s: S) => Option.Option<readonly [Chunk.Chunk<A>, S]>
|
|
3995
|
-
) => Stream<
|
|
3909
|
+
) => Stream<A> = internal.unfoldChunk
|
|
3996
3910
|
|
|
3997
3911
|
/**
|
|
3998
3912
|
* Creates a stream by effectfully peeling off the "layers" of a value of type
|
|
@@ -4003,8 +3917,8 @@ export const unfoldChunk: <S, A>(
|
|
|
4003
3917
|
*/
|
|
4004
3918
|
export const unfoldChunkEffect: <R, E, A, S>(
|
|
4005
3919
|
s: S,
|
|
4006
|
-
f: (s: S) => Effect.Effect<
|
|
4007
|
-
) => Stream<
|
|
3920
|
+
f: (s: S) => Effect.Effect<Option.Option<readonly [Chunk.Chunk<A>, S]>, E, R>
|
|
3921
|
+
) => Stream<A, E, R> = internal.unfoldChunkEffect
|
|
4008
3922
|
|
|
4009
3923
|
/**
|
|
4010
3924
|
* Creates a stream by effectfully peeling off the "layers" of a value of type
|
|
@@ -4015,8 +3929,8 @@ export const unfoldChunkEffect: <R, E, A, S>(
|
|
|
4015
3929
|
*/
|
|
4016
3930
|
export const unfoldEffect: <S, R, E, A>(
|
|
4017
3931
|
s: S,
|
|
4018
|
-
f: (s: S) => Effect.Effect<
|
|
4019
|
-
) => Stream<
|
|
3932
|
+
f: (s: S) => Effect.Effect<Option.Option<readonly [A, S]>, E, R>
|
|
3933
|
+
) => Stream<A, E, R> = internal.unfoldEffect
|
|
4020
3934
|
|
|
4021
3935
|
/**
|
|
4022
3936
|
* A stream that contains a single `Unit` value.
|
|
@@ -4024,7 +3938,7 @@ export const unfoldEffect: <S, R, E, A>(
|
|
|
4024
3938
|
* @since 2.0.0
|
|
4025
3939
|
* @category constructors
|
|
4026
3940
|
*/
|
|
4027
|
-
export const unit: Stream<
|
|
3941
|
+
export const unit: Stream<void> = internal.unit
|
|
4028
3942
|
|
|
4029
3943
|
/**
|
|
4030
3944
|
* Creates a stream produced from an `Effect`.
|
|
@@ -4032,7 +3946,7 @@ export const unit: Stream<never, never, void> = internal.unit
|
|
|
4032
3946
|
* @since 2.0.0
|
|
4033
3947
|
* @category constructors
|
|
4034
3948
|
*/
|
|
4035
|
-
export const unwrap: <R, E, R2, E2, A>(effect: Effect.Effect<
|
|
3949
|
+
export const unwrap: <R, E, R2, E2, A>(effect: Effect.Effect<Stream<A, E2, R2>, E, R>) => Stream<A, E | E2, R | R2> =
|
|
4036
3950
|
internal.unwrap
|
|
4037
3951
|
|
|
4038
3952
|
/**
|
|
@@ -4042,8 +3956,8 @@ export const unwrap: <R, E, R2, E2, A>(effect: Effect.Effect<R, E, Stream<R2, E2
|
|
|
4042
3956
|
* @category constructors
|
|
4043
3957
|
*/
|
|
4044
3958
|
export const unwrapScoped: <R, E, R2, E2, A>(
|
|
4045
|
-
effect: Effect.Effect<
|
|
4046
|
-
) => Stream<R2 | Exclude<R, Scope.Scope
|
|
3959
|
+
effect: Effect.Effect<Stream<A, E2, R2>, E, R>
|
|
3960
|
+
) => Stream<A, E | E2, R2 | Exclude<R, Scope.Scope>> = internal.unwrapScoped
|
|
4047
3961
|
|
|
4048
3962
|
/**
|
|
4049
3963
|
* Updates the specified service within the context of the `Stream`.
|
|
@@ -4061,8 +3975,8 @@ export const updateService = internal.updateService
|
|
|
4061
3975
|
* @category utils
|
|
4062
3976
|
*/
|
|
4063
3977
|
export const when: {
|
|
4064
|
-
(test: LazyArg<boolean>): <
|
|
4065
|
-
<
|
|
3978
|
+
(test: LazyArg<boolean>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>
|
|
3979
|
+
<A, E, R>(self: Stream<A, E, R>, test: LazyArg<boolean>): Stream<A, E, R>
|
|
4066
3980
|
} = internal.when
|
|
4067
3981
|
|
|
4068
3982
|
/**
|
|
@@ -4074,8 +3988,8 @@ export const when: {
|
|
|
4074
3988
|
*/
|
|
4075
3989
|
export const whenCase: <A, R, E, A2>(
|
|
4076
3990
|
evaluate: LazyArg<A>,
|
|
4077
|
-
pf: (a: A) => Option.Option<Stream<
|
|
4078
|
-
) => Stream<
|
|
3991
|
+
pf: (a: A) => Option.Option<Stream<A2, E, R>>
|
|
3992
|
+
) => Stream<A2, E, R> = internal.whenCase
|
|
4079
3993
|
|
|
4080
3994
|
/**
|
|
4081
3995
|
* Returns the stream when the given partial function is defined for the given
|
|
@@ -4086,12 +4000,12 @@ export const whenCase: <A, R, E, A2>(
|
|
|
4086
4000
|
*/
|
|
4087
4001
|
export const whenCaseEffect: {
|
|
4088
4002
|
<A, R2, E2, A2>(
|
|
4089
|
-
pf: (a: A) => Option.Option<Stream<
|
|
4090
|
-
): <R, E>(self: Effect.Effect<
|
|
4003
|
+
pf: (a: A) => Option.Option<Stream<A2, E2, R2>>
|
|
4004
|
+
): <R, E>(self: Effect.Effect<A, E, R>) => Stream<A2, E2 | E, R2 | R>
|
|
4091
4005
|
<R, E, A, R2, E2, A2>(
|
|
4092
|
-
self: Effect.Effect<
|
|
4093
|
-
pf: (a: A) => Option.Option<Stream<
|
|
4094
|
-
): Stream<
|
|
4006
|
+
self: Effect.Effect<A, E, R>,
|
|
4007
|
+
pf: (a: A) => Option.Option<Stream<A2, E2, R2>>
|
|
4008
|
+
): Stream<A2, E | E2, R | R2>
|
|
4095
4009
|
} = internal.whenCaseEffect
|
|
4096
4010
|
|
|
4097
4011
|
/**
|
|
@@ -4102,8 +4016,8 @@ export const whenCaseEffect: {
|
|
|
4102
4016
|
* @category utils
|
|
4103
4017
|
*/
|
|
4104
4018
|
export const whenEffect: {
|
|
4105
|
-
<R2, E2>(effect: Effect.Effect<
|
|
4106
|
-
<R, E, A, R2, E2>(self: Stream<
|
|
4019
|
+
<R2, E2>(effect: Effect.Effect<boolean, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
4020
|
+
<R, E, A, R2, E2>(self: Stream<A, E, R>, effect: Effect.Effect<boolean, E2, R2>): Stream<A, E | E2, R | R2>
|
|
4107
4021
|
} = internal.whenEffect
|
|
4108
4022
|
|
|
4109
4023
|
/**
|
|
@@ -4121,10 +4035,10 @@ export const withSpan: {
|
|
|
4121
4035
|
readonly parent?: Tracer.ParentSpan | undefined
|
|
4122
4036
|
readonly root?: boolean | undefined
|
|
4123
4037
|
readonly context?: Context.Context<never> | undefined
|
|
4124
|
-
}
|
|
4125
|
-
): <
|
|
4126
|
-
<
|
|
4127
|
-
self: Stream<
|
|
4038
|
+
} | undefined
|
|
4039
|
+
): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, Exclude<R, Tracer.ParentSpan>>
|
|
4040
|
+
<A, E, R>(
|
|
4041
|
+
self: Stream<A, E, R>,
|
|
4128
4042
|
name: string,
|
|
4129
4043
|
options?: {
|
|
4130
4044
|
readonly attributes?: Record<string, unknown> | undefined
|
|
@@ -4132,8 +4046,8 @@ export const withSpan: {
|
|
|
4132
4046
|
readonly parent?: Tracer.ParentSpan | undefined
|
|
4133
4047
|
readonly root?: boolean | undefined
|
|
4134
4048
|
readonly context?: Context.Context<never> | undefined
|
|
4135
|
-
}
|
|
4136
|
-
): Stream<
|
|
4049
|
+
} | undefined
|
|
4050
|
+
): Stream<A, E, Exclude<R, Tracer.ParentSpan>>
|
|
4137
4051
|
} = internal.withSpan
|
|
4138
4052
|
|
|
4139
4053
|
/**
|
|
@@ -4146,8 +4060,8 @@ export const withSpan: {
|
|
|
4146
4060
|
* @category zipping
|
|
4147
4061
|
*/
|
|
4148
4062
|
export const zip: {
|
|
4149
|
-
<R2, E2, A2>(that: Stream<
|
|
4150
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
4063
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<[A, A2], E2 | E, R2 | R>
|
|
4064
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<[A, A2], E | E2, R | R2>
|
|
4151
4065
|
} = internal.zip
|
|
4152
4066
|
|
|
4153
4067
|
/**
|
|
@@ -4161,12 +4075,12 @@ export const zip: {
|
|
|
4161
4075
|
*/
|
|
4162
4076
|
export const zipFlatten: {
|
|
4163
4077
|
<R2, E2, A2>(
|
|
4164
|
-
that: Stream<
|
|
4165
|
-
): <R, E, A extends ReadonlyArray<any>>(self: Stream<
|
|
4078
|
+
that: Stream<A2, E2, R2>
|
|
4079
|
+
): <R, E, A extends ReadonlyArray<any>>(self: Stream<A, E, R>) => Stream<[...A, A2], E2 | E, R2 | R>
|
|
4166
4080
|
<R, E, A extends ReadonlyArray<any>, R2, E2, A2>(
|
|
4167
|
-
self: Stream<
|
|
4168
|
-
that: Stream<
|
|
4169
|
-
): Stream<
|
|
4081
|
+
self: Stream<A, E, R>,
|
|
4082
|
+
that: Stream<A2, E2, R2>
|
|
4083
|
+
): Stream<[...A, A2], E | E2, R | R2>
|
|
4170
4084
|
} = internal.zipFlatten
|
|
4171
4085
|
|
|
4172
4086
|
/**
|
|
@@ -4181,20 +4095,12 @@ export const zipFlatten: {
|
|
|
4181
4095
|
*/
|
|
4182
4096
|
export const zipAll: {
|
|
4183
4097
|
<R2, E2, A2, A>(
|
|
4184
|
-
options: {
|
|
4185
|
-
|
|
4186
|
-
readonly defaultSelf: A
|
|
4187
|
-
readonly defaultOther: A2
|
|
4188
|
-
}
|
|
4189
|
-
): <R, E>(self: Stream<R, E, A>) => Stream<R2 | R, E2 | E, [A, A2]>
|
|
4098
|
+
options: { readonly other: Stream<A2, E2, R2>; readonly defaultSelf: A; readonly defaultOther: A2 }
|
|
4099
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<[A, A2], E2 | E, R2 | R>
|
|
4190
4100
|
<R, E, R2, E2, A2, A>(
|
|
4191
|
-
self: Stream<
|
|
4192
|
-
options: {
|
|
4193
|
-
|
|
4194
|
-
readonly defaultSelf: A
|
|
4195
|
-
readonly defaultOther: A2
|
|
4196
|
-
}
|
|
4197
|
-
): Stream<R | R2, E | E2, [A, A2]>
|
|
4101
|
+
self: Stream<A, E, R>,
|
|
4102
|
+
options: { readonly other: Stream<A2, E2, R2>; readonly defaultSelf: A; readonly defaultOther: A2 }
|
|
4103
|
+
): Stream<[A, A2], E | E2, R | R2>
|
|
4198
4104
|
} = internal.zipAll
|
|
4199
4105
|
|
|
4200
4106
|
/**
|
|
@@ -4208,8 +4114,8 @@ export const zipAll: {
|
|
|
4208
4114
|
* @category zipping
|
|
4209
4115
|
*/
|
|
4210
4116
|
export const zipAllLeft: {
|
|
4211
|
-
<R2, E2, A2, A>(that: Stream<
|
|
4212
|
-
<R, E, R2, E2, A2, A>(self: Stream<
|
|
4117
|
+
<R2, E2, A2, A>(that: Stream<A2, E2, R2>, defaultLeft: A): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
4118
|
+
<R, E, R2, E2, A2, A>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, defaultLeft: A): Stream<A, E | E2, R | R2>
|
|
4213
4119
|
} = internal.zipAllLeft
|
|
4214
4120
|
|
|
4215
4121
|
/**
|
|
@@ -4224,10 +4130,10 @@ export const zipAllLeft: {
|
|
|
4224
4130
|
*/
|
|
4225
4131
|
export const zipAllRight: {
|
|
4226
4132
|
<R2, E2, A2>(
|
|
4227
|
-
that: Stream<
|
|
4133
|
+
that: Stream<A2, E2, R2>,
|
|
4228
4134
|
defaultRight: A2
|
|
4229
|
-
): <
|
|
4230
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
4135
|
+
): <A, E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>
|
|
4136
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, defaultRight: A2): Stream<A2, E | E2, R | R2>
|
|
4231
4137
|
} = internal.zipAllRight
|
|
4232
4138
|
|
|
4233
4139
|
/**
|
|
@@ -4247,21 +4153,21 @@ export const zipAllRight: {
|
|
|
4247
4153
|
export const zipAllSortedByKey: {
|
|
4248
4154
|
<R2, E2, A2, A, K>(
|
|
4249
4155
|
options: {
|
|
4250
|
-
readonly other: Stream<
|
|
4156
|
+
readonly other: Stream<readonly [K, A2], E2, R2>
|
|
4251
4157
|
readonly defaultSelf: A
|
|
4252
4158
|
readonly defaultOther: A2
|
|
4253
4159
|
readonly order: Order.Order<K>
|
|
4254
4160
|
}
|
|
4255
|
-
): <R, E>(self: Stream<
|
|
4161
|
+
): <R, E>(self: Stream<readonly [K, A], E, R>) => Stream<[K, [A, A2]], E2 | E, R2 | R>
|
|
4256
4162
|
<R, E, R2, E2, A2, A, K>(
|
|
4257
|
-
self: Stream<
|
|
4163
|
+
self: Stream<readonly [K, A], E, R>,
|
|
4258
4164
|
options: {
|
|
4259
|
-
readonly other: Stream<
|
|
4165
|
+
readonly other: Stream<readonly [K, A2], E2, R2>
|
|
4260
4166
|
readonly defaultSelf: A
|
|
4261
4167
|
readonly defaultOther: A2
|
|
4262
4168
|
readonly order: Order.Order<K>
|
|
4263
4169
|
}
|
|
4264
|
-
): Stream<
|
|
4170
|
+
): Stream<[K, [A, A2]], E | E2, R | R2>
|
|
4265
4171
|
} = internal.zipAllSortedByKey
|
|
4266
4172
|
|
|
4267
4173
|
/**
|
|
@@ -4280,19 +4186,19 @@ export const zipAllSortedByKey: {
|
|
|
4280
4186
|
export const zipAllSortedByKeyLeft: {
|
|
4281
4187
|
<R2, E2, A2, A, K>(
|
|
4282
4188
|
options: {
|
|
4283
|
-
readonly other: Stream<
|
|
4189
|
+
readonly other: Stream<readonly [K, A2], E2, R2>
|
|
4284
4190
|
readonly defaultSelf: A
|
|
4285
4191
|
readonly order: Order.Order<K>
|
|
4286
4192
|
}
|
|
4287
|
-
): <R, E>(self: Stream<
|
|
4193
|
+
): <R, E>(self: Stream<readonly [K, A], E, R>) => Stream<[K, A], E2 | E, R2 | R>
|
|
4288
4194
|
<R, E, R2, E2, A2, A, K>(
|
|
4289
|
-
self: Stream<
|
|
4195
|
+
self: Stream<readonly [K, A], E, R>,
|
|
4290
4196
|
options: {
|
|
4291
|
-
readonly other: Stream<
|
|
4197
|
+
readonly other: Stream<readonly [K, A2], E2, R2>
|
|
4292
4198
|
readonly defaultSelf: A
|
|
4293
4199
|
readonly order: Order.Order<K>
|
|
4294
4200
|
}
|
|
4295
|
-
): Stream<
|
|
4201
|
+
): Stream<[K, A], E | E2, R | R2>
|
|
4296
4202
|
} = internal.zipAllSortedByKeyLeft
|
|
4297
4203
|
|
|
4298
4204
|
/**
|
|
@@ -4311,19 +4217,19 @@ export const zipAllSortedByKeyLeft: {
|
|
|
4311
4217
|
export const zipAllSortedByKeyRight: {
|
|
4312
4218
|
<R2, E2, A2, K>(
|
|
4313
4219
|
options: {
|
|
4314
|
-
readonly other: Stream<
|
|
4220
|
+
readonly other: Stream<readonly [K, A2], E2, R2>
|
|
4315
4221
|
readonly defaultOther: A2
|
|
4316
4222
|
readonly order: Order.Order<K>
|
|
4317
4223
|
}
|
|
4318
|
-
): <
|
|
4224
|
+
): <A, E, R>(self: Stream<readonly [K, A], E, R>) => Stream<[K, A2], E2 | E, R2 | R>
|
|
4319
4225
|
<R, E, A, R2, E2, A2, K>(
|
|
4320
|
-
self: Stream<
|
|
4226
|
+
self: Stream<readonly [K, A], E, R>,
|
|
4321
4227
|
options: {
|
|
4322
|
-
readonly other: Stream<
|
|
4228
|
+
readonly other: Stream<readonly [K, A2], E2, R2>
|
|
4323
4229
|
readonly defaultOther: A2
|
|
4324
4230
|
readonly order: Order.Order<K>
|
|
4325
4231
|
}
|
|
4326
|
-
): Stream<
|
|
4232
|
+
): Stream<[K, A2], E | E2, R | R2>
|
|
4327
4233
|
} = internal.zipAllSortedByKeyRight
|
|
4328
4234
|
|
|
4329
4235
|
/**
|
|
@@ -4343,23 +4249,23 @@ export const zipAllSortedByKeyRight: {
|
|
|
4343
4249
|
export const zipAllSortedByKeyWith: {
|
|
4344
4250
|
<R2, E2, A, A3, A2, K>(
|
|
4345
4251
|
options: {
|
|
4346
|
-
readonly other: Stream<
|
|
4252
|
+
readonly other: Stream<readonly [K, A2], E2, R2>
|
|
4347
4253
|
readonly onSelf: (a: A) => A3
|
|
4348
4254
|
readonly onOther: (a2: A2) => A3
|
|
4349
4255
|
readonly onBoth: (a: A, a2: A2) => A3
|
|
4350
4256
|
readonly order: Order.Order<K>
|
|
4351
4257
|
}
|
|
4352
|
-
): <R, E>(self: Stream<
|
|
4258
|
+
): <R, E>(self: Stream<readonly [K, A], E, R>) => Stream<[K, A3], E2 | E, R2 | R>
|
|
4353
4259
|
<R, E, R2, E2, A, A3, A2, K>(
|
|
4354
|
-
self: Stream<
|
|
4260
|
+
self: Stream<readonly [K, A], E, R>,
|
|
4355
4261
|
options: {
|
|
4356
|
-
readonly other: Stream<
|
|
4262
|
+
readonly other: Stream<readonly [K, A2], E2, R2>
|
|
4357
4263
|
readonly onSelf: (a: A) => A3
|
|
4358
4264
|
readonly onOther: (a2: A2) => A3
|
|
4359
4265
|
readonly onBoth: (a: A, a2: A2) => A3
|
|
4360
4266
|
readonly order: Order.Order<K>
|
|
4361
4267
|
}
|
|
4362
|
-
): Stream<
|
|
4268
|
+
): Stream<[K, A3], E | E2, R | R2>
|
|
4363
4269
|
} = internal.zipAllSortedByKeyWith
|
|
4364
4270
|
|
|
4365
4271
|
/**
|
|
@@ -4375,21 +4281,21 @@ export const zipAllSortedByKeyWith: {
|
|
|
4375
4281
|
export const zipAllWith: {
|
|
4376
4282
|
<R2, E2, A2, A, A3>(
|
|
4377
4283
|
options: {
|
|
4378
|
-
readonly other: Stream<
|
|
4284
|
+
readonly other: Stream<A2, E2, R2>
|
|
4379
4285
|
readonly onSelf: (a: A) => A3
|
|
4380
4286
|
readonly onOther: (a2: A2) => A3
|
|
4381
4287
|
readonly onBoth: (a: A, a2: A2) => A3
|
|
4382
4288
|
}
|
|
4383
|
-
): <R, E>(self: Stream<
|
|
4289
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A3, E2 | E, R2 | R>
|
|
4384
4290
|
<R, E, R2, E2, A2, A, A3>(
|
|
4385
|
-
self: Stream<
|
|
4291
|
+
self: Stream<A, E, R>,
|
|
4386
4292
|
options: {
|
|
4387
|
-
readonly other: Stream<
|
|
4293
|
+
readonly other: Stream<A2, E2, R2>
|
|
4388
4294
|
readonly onSelf: (a: A) => A3
|
|
4389
4295
|
readonly onOther: (a2: A2) => A3
|
|
4390
4296
|
readonly onBoth: (a: A, a2: A2) => A3
|
|
4391
4297
|
}
|
|
4392
|
-
): Stream<
|
|
4298
|
+
): Stream<A3, E | E2, R | R2>
|
|
4393
4299
|
} = internal.zipAllWith
|
|
4394
4300
|
|
|
4395
4301
|
/**
|
|
@@ -4405,8 +4311,8 @@ export const zipAllWith: {
|
|
|
4405
4311
|
* @category zipping
|
|
4406
4312
|
*/
|
|
4407
4313
|
export const zipLatest: {
|
|
4408
|
-
<R2, E2, A2>(that: Stream<
|
|
4409
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
4314
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<[A, A2], E2 | E, R2 | R>
|
|
4315
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<[A, A2], E | E2, R | R2>
|
|
4410
4316
|
} = internal.zipLatest
|
|
4411
4317
|
|
|
4412
4318
|
/**
|
|
@@ -4423,14 +4329,14 @@ export const zipLatest: {
|
|
|
4423
4329
|
*/
|
|
4424
4330
|
export const zipLatestWith: {
|
|
4425
4331
|
<R2, E2, A2, A, A3>(
|
|
4426
|
-
that: Stream<
|
|
4332
|
+
that: Stream<A2, E2, R2>,
|
|
4427
4333
|
f: (a: A, a2: A2) => A3
|
|
4428
|
-
): <R, E>(self: Stream<
|
|
4334
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A3, E2 | E, R2 | R>
|
|
4429
4335
|
<R, E, R2, E2, A2, A, A3>(
|
|
4430
|
-
self: Stream<
|
|
4431
|
-
that: Stream<
|
|
4336
|
+
self: Stream<A, E, R>,
|
|
4337
|
+
that: Stream<A2, E2, R2>,
|
|
4432
4338
|
f: (a: A, a2: A2) => A3
|
|
4433
|
-
): Stream<
|
|
4339
|
+
): Stream<A3, E | E2, R | R2>
|
|
4434
4340
|
} = internal.zipLatestWith
|
|
4435
4341
|
|
|
4436
4342
|
/**
|
|
@@ -4443,8 +4349,8 @@ export const zipLatestWith: {
|
|
|
4443
4349
|
* @category zipping
|
|
4444
4350
|
*/
|
|
4445
4351
|
export const zipLeft: {
|
|
4446
|
-
<R2, E2, A2>(that: Stream<
|
|
4447
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
4352
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>
|
|
4353
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A, E | E2, R | R2>
|
|
4448
4354
|
} = internal.zipLeft
|
|
4449
4355
|
|
|
4450
4356
|
/**
|
|
@@ -4457,8 +4363,8 @@ export const zipLeft: {
|
|
|
4457
4363
|
* @category zipping
|
|
4458
4364
|
*/
|
|
4459
4365
|
export const zipRight: {
|
|
4460
|
-
<R2, E2, A2>(that: Stream<
|
|
4461
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
4366
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>
|
|
4367
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A2, E | E2, R | R2>
|
|
4462
4368
|
} = internal.zipRight
|
|
4463
4369
|
|
|
4464
4370
|
/**
|
|
@@ -4472,14 +4378,14 @@ export const zipRight: {
|
|
|
4472
4378
|
*/
|
|
4473
4379
|
export const zipWith: {
|
|
4474
4380
|
<R2, E2, A2, A, A3>(
|
|
4475
|
-
that: Stream<
|
|
4381
|
+
that: Stream<A2, E2, R2>,
|
|
4476
4382
|
f: (a: A, a2: A2) => A3
|
|
4477
|
-
): <R, E>(self: Stream<
|
|
4383
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A3, E2 | E, R2 | R>
|
|
4478
4384
|
<R, E, R2, E2, A2, A, A3>(
|
|
4479
|
-
self: Stream<
|
|
4480
|
-
that: Stream<
|
|
4385
|
+
self: Stream<A, E, R>,
|
|
4386
|
+
that: Stream<A2, E2, R2>,
|
|
4481
4387
|
f: (a: A, a2: A2) => A3
|
|
4482
|
-
): Stream<
|
|
4388
|
+
): Stream<A3, E | E2, R | R2>
|
|
4483
4389
|
} = internal.zipWith
|
|
4484
4390
|
|
|
4485
4391
|
/**
|
|
@@ -4493,20 +4399,20 @@ export const zipWith: {
|
|
|
4493
4399
|
*/
|
|
4494
4400
|
export const zipWithChunks: {
|
|
4495
4401
|
<R2, E2, A2, A, A3>(
|
|
4496
|
-
that: Stream<
|
|
4402
|
+
that: Stream<A2, E2, R2>,
|
|
4497
4403
|
f: (
|
|
4498
4404
|
left: Chunk.Chunk<A>,
|
|
4499
4405
|
right: Chunk.Chunk<A2>
|
|
4500
4406
|
) => readonly [Chunk.Chunk<A3>, Either.Either<Chunk.Chunk<A>, Chunk.Chunk<A2>>]
|
|
4501
|
-
): <R, E>(self: Stream<
|
|
4407
|
+
): <R, E>(self: Stream<A, E, R>) => Stream<A3, E2 | E, R2 | R>
|
|
4502
4408
|
<R, E, R2, E2, A2, A, A3>(
|
|
4503
|
-
self: Stream<
|
|
4504
|
-
that: Stream<
|
|
4409
|
+
self: Stream<A, E, R>,
|
|
4410
|
+
that: Stream<A2, E2, R2>,
|
|
4505
4411
|
f: (
|
|
4506
4412
|
left: Chunk.Chunk<A>,
|
|
4507
4413
|
right: Chunk.Chunk<A2>
|
|
4508
4414
|
) => readonly [Chunk.Chunk<A3>, Either.Either<Chunk.Chunk<A>, Chunk.Chunk<A2>>]
|
|
4509
|
-
): Stream<
|
|
4415
|
+
): Stream<A3, E | E2, R | R2>
|
|
4510
4416
|
} = internal.zipWithChunks
|
|
4511
4417
|
|
|
4512
4418
|
/**
|
|
@@ -4515,7 +4421,7 @@ export const zipWithChunks: {
|
|
|
4515
4421
|
* @since 2.0.0
|
|
4516
4422
|
* @category zipping
|
|
4517
4423
|
*/
|
|
4518
|
-
export const zipWithNext: <
|
|
4424
|
+
export const zipWithNext: <A, E, R>(self: Stream<A, E, R>) => Stream<[A, Option.Option<A>], E, R> = internal.zipWithNext
|
|
4519
4425
|
|
|
4520
4426
|
/**
|
|
4521
4427
|
* Zips each element with the previous element. Initially accompanied by
|
|
@@ -4524,7 +4430,7 @@ export const zipWithNext: <R, E, A>(self: Stream<R, E, A>) => Stream<R, E, [A, O
|
|
|
4524
4430
|
* @since 2.0.0
|
|
4525
4431
|
* @category zipping
|
|
4526
4432
|
*/
|
|
4527
|
-
export const zipWithPrevious: <
|
|
4433
|
+
export const zipWithPrevious: <A, E, R>(self: Stream<A, E, R>) => Stream<[Option.Option<A>, A], E, R> =
|
|
4528
4434
|
internal.zipWithPrevious
|
|
4529
4435
|
|
|
4530
4436
|
/**
|
|
@@ -4533,9 +4439,9 @@ export const zipWithPrevious: <R, E, A>(self: Stream<R, E, A>) => Stream<R, E, [
|
|
|
4533
4439
|
* @since 2.0.0
|
|
4534
4440
|
* @category zipping
|
|
4535
4441
|
*/
|
|
4536
|
-
export const zipWithPreviousAndNext: <
|
|
4537
|
-
self: Stream<
|
|
4538
|
-
) => Stream<
|
|
4442
|
+
export const zipWithPreviousAndNext: <A, E, R>(
|
|
4443
|
+
self: Stream<A, E, R>
|
|
4444
|
+
) => Stream<[Option.Option<A>, A, Option.Option<A>], E, R> = internal.zipWithPreviousAndNext
|
|
4539
4445
|
|
|
4540
4446
|
/**
|
|
4541
4447
|
* Zips this stream together with the index of elements.
|
|
@@ -4543,7 +4449,7 @@ export const zipWithPreviousAndNext: <R, E, A>(
|
|
|
4543
4449
|
* @since 2.0.0
|
|
4544
4450
|
* @category zipping
|
|
4545
4451
|
*/
|
|
4546
|
-
export const zipWithIndex: <
|
|
4452
|
+
export const zipWithIndex: <A, E, R>(self: Stream<A, E, R>) => Stream<[A, number], E, R> = internal.zipWithIndex
|
|
4547
4453
|
|
|
4548
4454
|
// -------------------------------------------------------------------------------------
|
|
4549
4455
|
// Do notation
|
|
@@ -4553,7 +4459,7 @@ export const zipWithIndex: <R, E, A>(self: Stream<R, E, A>) => Stream<R, E, [A,
|
|
|
4553
4459
|
* @since 2.0.0
|
|
4554
4460
|
* @category do notation
|
|
4555
4461
|
*/
|
|
4556
|
-
export const Do: Stream<
|
|
4462
|
+
export const Do: Stream<{}> = internal.Do
|
|
4557
4463
|
|
|
4558
4464
|
/**
|
|
4559
4465
|
* Binds a value from a stream in a `do` scope
|
|
@@ -4564,21 +4470,19 @@ export const Do: Stream<never, never, {}> = internal.Do
|
|
|
4564
4470
|
export const bind: {
|
|
4565
4471
|
<N extends string, K, R2, E2, A>(
|
|
4566
4472
|
tag: Exclude<N, keyof K>,
|
|
4567
|
-
f: (_: K) => Stream<
|
|
4568
|
-
options?:
|
|
4569
|
-
readonly concurrency?: number | "unbounded" | undefined
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
): <R, E>(self: Stream<R, E, K>) => Stream<R2 | R, E2 | E, Effect.MergeRecord<K, { [k in N]: A }>>
|
|
4473
|
+
f: (_: K) => Stream<A, E2, R2>,
|
|
4474
|
+
options?:
|
|
4475
|
+
| { readonly concurrency?: number | "unbounded" | undefined; readonly bufferSize?: number | undefined }
|
|
4476
|
+
| undefined
|
|
4477
|
+
): <R, E>(self: Stream<K, E, R>) => Stream<Effect.MergeRecord<K, { [k in N]: A }>, E2 | E, R2 | R>
|
|
4573
4478
|
<R, E, N extends string, K, R2, E2, A>(
|
|
4574
|
-
self: Stream<
|
|
4479
|
+
self: Stream<K, E, R>,
|
|
4575
4480
|
tag: Exclude<N, keyof K>,
|
|
4576
|
-
f: (_: K) => Stream<
|
|
4577
|
-
options?:
|
|
4578
|
-
readonly concurrency?: number | "unbounded" | undefined
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
): Stream<R | R2, E | E2, Effect.MergeRecord<K, { [k in N]: A }>>
|
|
4481
|
+
f: (_: K) => Stream<A, E2, R2>,
|
|
4482
|
+
options?:
|
|
4483
|
+
| { readonly concurrency?: number | "unbounded" | undefined; readonly bufferSize?: number | undefined }
|
|
4484
|
+
| undefined
|
|
4485
|
+
): Stream<Effect.MergeRecord<K, { [k in N]: A }>, E | E2, R | R2>
|
|
4582
4486
|
} = internal.bind
|
|
4583
4487
|
|
|
4584
4488
|
/**
|
|
@@ -4590,21 +4494,19 @@ export const bind: {
|
|
|
4590
4494
|
export const bindEffect: {
|
|
4591
4495
|
<N extends string, K, R2, E2, A>(
|
|
4592
4496
|
tag: Exclude<N, keyof K>,
|
|
4593
|
-
f: (_: K) => Effect.Effect<
|
|
4594
|
-
options?:
|
|
4595
|
-
readonly concurrency?: number | "unbounded" | undefined
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
): <R, E>(self: Stream<R, E, K>) => Stream<R2 | R, E2 | E, Effect.MergeRecord<K, { [k in N]: A }>>
|
|
4497
|
+
f: (_: K) => Effect.Effect<A, E2, R2>,
|
|
4498
|
+
options?:
|
|
4499
|
+
| { readonly concurrency?: number | "unbounded" | undefined; readonly bufferSize?: number | undefined }
|
|
4500
|
+
| undefined
|
|
4501
|
+
): <R, E>(self: Stream<K, E, R>) => Stream<Effect.MergeRecord<K, { [k in N]: A }>, E2 | E, R2 | R>
|
|
4599
4502
|
<R, E, N extends string, K, R2, E2, A>(
|
|
4600
|
-
self: Stream<
|
|
4503
|
+
self: Stream<K, E, R>,
|
|
4601
4504
|
tag: Exclude<N, keyof K>,
|
|
4602
|
-
f: (_: K) => Effect.Effect<
|
|
4603
|
-
options?:
|
|
4604
|
-
readonly concurrency?: number | "unbounded" | undefined
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
): Stream<R | R2, E | E2, Effect.MergeRecord<K, { [k in N]: A }>>
|
|
4505
|
+
f: (_: K) => Effect.Effect<A, E2, R2>,
|
|
4506
|
+
options?:
|
|
4507
|
+
| { readonly concurrency?: number | "unbounded" | undefined; readonly unordered?: boolean | undefined }
|
|
4508
|
+
| undefined
|
|
4509
|
+
): Stream<Effect.MergeRecord<K, { [k in N]: A }>, E | E2, R | R2>
|
|
4608
4510
|
} = _groupBy.bindEffect
|
|
4609
4511
|
|
|
4610
4512
|
/**
|
|
@@ -4612,20 +4514,20 @@ export const bindEffect: {
|
|
|
4612
4514
|
* @category do notation
|
|
4613
4515
|
*/
|
|
4614
4516
|
export const bindTo: {
|
|
4615
|
-
<N extends string>(tag: N): <
|
|
4616
|
-
<R, E, A, N extends string>(self: Stream<
|
|
4517
|
+
<N extends string>(tag: N): <A, E, R>(self: Stream<A, E, R>) => Stream<Record<N, A>, E, R>
|
|
4518
|
+
<R, E, A, N extends string>(self: Stream<A, E, R>, tag: N): Stream<Record<N, A>, E, R>
|
|
4617
4519
|
} = internal.bindTo
|
|
4618
4520
|
|
|
4619
4521
|
const let_: {
|
|
4620
4522
|
<N extends string, K, A>(
|
|
4621
4523
|
tag: Exclude<N, keyof K>,
|
|
4622
4524
|
f: (_: K) => A
|
|
4623
|
-
): <R, E>(self: Stream<
|
|
4525
|
+
): <R, E>(self: Stream<K, E, R>) => Stream<Effect.MergeRecord<K, { [k in N]: A }>, E, R>
|
|
4624
4526
|
<R, E, K, N extends string, A>(
|
|
4625
|
-
self: Stream<
|
|
4527
|
+
self: Stream<K, E, R>,
|
|
4626
4528
|
tag: Exclude<N, keyof K>,
|
|
4627
4529
|
f: (_: K) => A
|
|
4628
|
-
): Stream<
|
|
4530
|
+
): Stream<Effect.MergeRecord<K, { [k in N]: A }>, E, R>
|
|
4629
4531
|
} = internal.let_
|
|
4630
4532
|
|
|
4631
4533
|
export {
|
|
@@ -4649,8 +4551,8 @@ export {
|
|
|
4649
4551
|
* @category encoding
|
|
4650
4552
|
*/
|
|
4651
4553
|
export const decodeText: {
|
|
4652
|
-
(encoding?: string): <R, E>(self: Stream<
|
|
4653
|
-
<R, E>(self: Stream<
|
|
4554
|
+
(encoding?: string | undefined): <R, E>(self: Stream<Uint8Array, E, R>) => Stream<string, E, R>
|
|
4555
|
+
<R, E>(self: Stream<Uint8Array, E, R>, encoding?: string | undefined): Stream<string, E, R>
|
|
4654
4556
|
} = internal.decodeText
|
|
4655
4557
|
|
|
4656
4558
|
/**
|
|
@@ -4659,4 +4561,4 @@ export const decodeText: {
|
|
|
4659
4561
|
* @since 2.0.0
|
|
4660
4562
|
* @category encoding
|
|
4661
4563
|
*/
|
|
4662
|
-
export const encodeText: <R, E>(self: Stream<
|
|
4564
|
+
export const encodeText: <R, E>(self: Stream<string, E, R>) => Stream<Uint8Array, E, R> = internal.encodeText
|