effect 2.2.5 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +19 -19
- 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 +19 -19
- 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/dist/dts/Stream.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export declare const StreamTypeId: unique symbol;
|
|
|
40
40
|
*/
|
|
41
41
|
export type StreamTypeId = typeof StreamTypeId;
|
|
42
42
|
/**
|
|
43
|
-
* A `Stream<
|
|
43
|
+
* A `Stream<A, E, R>` is a description of a program that, when evaluated, may
|
|
44
44
|
* emit zero or more values of type `A`, may fail with errors of type `E`, and
|
|
45
45
|
* uses an context of type `R`. One way to think of `Stream` is as a
|
|
46
46
|
* `Effect` program that could emit multiple values.
|
|
@@ -59,7 +59,7 @@ export type StreamTypeId = typeof StreamTypeId;
|
|
|
59
59
|
* @since 2.0.0
|
|
60
60
|
* @category models
|
|
61
61
|
*/
|
|
62
|
-
export interface Stream<out
|
|
62
|
+
export interface Stream<out A, out E = never, out R = never> extends Stream.Variance<A, E, R>, Pipeable {
|
|
63
63
|
[Unify.typeSymbol]?: unknown;
|
|
64
64
|
[Unify.unifySymbol]?: StreamUnify<this>;
|
|
65
65
|
[Unify.ignoreSymbol]?: StreamUnifyIgnore;
|
|
@@ -71,7 +71,7 @@ export interface Stream<out R, out E, out A> extends Stream.Variance<R, E, A>, P
|
|
|
71
71
|
export interface StreamUnify<A extends {
|
|
72
72
|
[Unify.typeSymbol]?: any;
|
|
73
73
|
}> extends Effect.EffectUnify<A> {
|
|
74
|
-
Stream?: () => A[Unify.typeSymbol] extends Stream<infer
|
|
74
|
+
Stream?: () => A[Unify.typeSymbol] extends Stream<infer A0, infer E0, infer R0> | infer _ ? Stream<A0, E0, R0> : never;
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
77
|
* @category models
|
|
@@ -85,7 +85,7 @@ export interface StreamUnifyIgnore extends Effect.EffectUnifyIgnore {
|
|
|
85
85
|
* @category models
|
|
86
86
|
*/
|
|
87
87
|
declare module "./Effect.js" {
|
|
88
|
-
interface Effect<
|
|
88
|
+
interface Effect<A, E, R> extends Stream<A, E, R> {
|
|
89
89
|
}
|
|
90
90
|
interface EffectUnifyIgnore {
|
|
91
91
|
Stream?: true;
|
|
@@ -96,7 +96,7 @@ declare module "./Effect.js" {
|
|
|
96
96
|
* @since 2.0.0
|
|
97
97
|
*/
|
|
98
98
|
export interface StreamTypeLambda extends TypeLambda {
|
|
99
|
-
readonly type: Stream<this["
|
|
99
|
+
readonly type: Stream<this["Target"], this["Out1"], this["Out2"]>;
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
102
|
* @since 2.0.0
|
|
@@ -106,11 +106,11 @@ export declare namespace Stream {
|
|
|
106
106
|
* @since 2.0.0
|
|
107
107
|
* @category models
|
|
108
108
|
*/
|
|
109
|
-
interface Variance<out
|
|
109
|
+
interface Variance<out A, out E, out R> {
|
|
110
110
|
readonly [StreamTypeId]: {
|
|
111
|
-
_R: Covariant<R>;
|
|
112
|
-
_E: Covariant<E>;
|
|
113
111
|
_A: Covariant<A>;
|
|
112
|
+
_E: Covariant<E>;
|
|
113
|
+
_R: Covariant<R>;
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
@@ -139,14 +139,14 @@ export declare const DefaultChunkSize: number;
|
|
|
139
139
|
* @since 2.0.0
|
|
140
140
|
* @category utils
|
|
141
141
|
*/
|
|
142
|
-
export declare const accumulate: <
|
|
142
|
+
export declare const accumulate: <A, E, R>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R>;
|
|
143
143
|
/**
|
|
144
144
|
* Re-chunks the elements of the stream by accumulating each underlying chunk.
|
|
145
145
|
*
|
|
146
146
|
* @since 2.0.0
|
|
147
147
|
* @category utils
|
|
148
148
|
*/
|
|
149
|
-
export declare const accumulateChunks: <
|
|
149
|
+
export declare const accumulateChunks: <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
150
150
|
/**
|
|
151
151
|
* Creates a stream from a single value that will get cleaned up after the
|
|
152
152
|
* stream is consumed.
|
|
@@ -154,7 +154,7 @@ export declare const accumulateChunks: <R, E, A>(self: Stream<R, E, A>) => Strea
|
|
|
154
154
|
* @since 2.0.0
|
|
155
155
|
* @category constructors
|
|
156
156
|
*/
|
|
157
|
-
export declare const acquireRelease: <
|
|
157
|
+
export declare const acquireRelease: <A, E, R, R2, _>(acquire: Effect.Effect<A, E, R>, release: (resource: A, exit: Exit.Exit<unknown, unknown>) => Effect.Effect<_, never, R2>) => Stream<A, E, R | R2>;
|
|
158
158
|
/**
|
|
159
159
|
* Aggregates elements of this stream using the provided sink for as long as
|
|
160
160
|
* the downstream operators on the stream are busy.
|
|
@@ -172,8 +172,8 @@ export declare const acquireRelease: <R, E, A, R2, _>(acquire: Effect.Effect<R,
|
|
|
172
172
|
* @category utils
|
|
173
173
|
*/
|
|
174
174
|
export declare const aggregate: {
|
|
175
|
-
<
|
|
176
|
-
<
|
|
175
|
+
<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>;
|
|
176
|
+
<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>;
|
|
177
177
|
};
|
|
178
178
|
/**
|
|
179
179
|
* Like `aggregateWithinEither`, but only returns the `Right` results.
|
|
@@ -184,8 +184,8 @@ export declare const aggregate: {
|
|
|
184
184
|
* @category utils
|
|
185
185
|
*/
|
|
186
186
|
export declare const aggregateWithin: {
|
|
187
|
-
<
|
|
188
|
-
<
|
|
187
|
+
<B, A, A2, E2, R2, R3, C>(sink: Sink.Sink<B, A | A2, A2, E2, R2>, schedule: Schedule.Schedule<R3, Option.Option<B>, C>): <E, R>(self: Stream<A, E, R>) => Stream<B, E2 | E, R2 | R3 | R>;
|
|
188
|
+
<A, E, R, B, A2, E2, R2, R3, C>(self: Stream<A, E, R>, sink: Sink.Sink<B, A | A2, A2, E2, R2>, schedule: Schedule.Schedule<R3, Option.Option<B>, C>): Stream<B, E | E2, R | R2 | R3>;
|
|
189
189
|
};
|
|
190
190
|
/**
|
|
191
191
|
* Aggregates elements using the provided sink until it completes, or until
|
|
@@ -205,8 +205,8 @@ export declare const aggregateWithin: {
|
|
|
205
205
|
* @category utils
|
|
206
206
|
*/
|
|
207
207
|
export declare const aggregateWithinEither: {
|
|
208
|
-
<
|
|
209
|
-
<
|
|
208
|
+
<B, A, A2, E2, R2, R3, C>(sink: Sink.Sink<B, A | A2, A2, E2, R2>, schedule: Schedule.Schedule<R3, Option.Option<B>, C>): <E, R>(self: Stream<A, E, R>) => Stream<Either.Either<C, B>, E2 | E, R2 | R3 | R>;
|
|
209
|
+
<A, E, R, B, A2, E2, R2, R3, C>(self: Stream<A, E, R>, sink: Sink.Sink<B, A | A2, A2, E2, R2>, schedule: Schedule.Schedule<R3, Option.Option<B>, C>): Stream<Either.Either<C, B>, E | E2, R | R2 | R3>;
|
|
210
210
|
};
|
|
211
211
|
/**
|
|
212
212
|
* Maps the success values of this stream to the specified constant value.
|
|
@@ -215,10 +215,10 @@ export declare const aggregateWithinEither: {
|
|
|
215
215
|
* @category mapping
|
|
216
216
|
*/
|
|
217
217
|
export declare const as: {
|
|
218
|
-
<B>(value: B): <
|
|
219
|
-
<R, E, A, B>(self: Stream<
|
|
218
|
+
<B>(value: B): <A, E, R>(self: Stream<A, E, R>) => Stream<B, E, R>;
|
|
219
|
+
<R, E, A, B>(self: Stream<A, E, R>, value: B): Stream<B, E, R>;
|
|
220
220
|
};
|
|
221
|
-
declare const _async: <
|
|
221
|
+
declare const _async: <A, E = never, R = never>(register: (emit: Emit.Emit<R, E, A, void>) => void, outputBuffer?: number) => Stream<A, E, R>;
|
|
222
222
|
export {
|
|
223
223
|
/**
|
|
224
224
|
* Creates a stream from an asynchronous callback that can be called multiple
|
|
@@ -238,7 +238,7 @@ _async as async };
|
|
|
238
238
|
* @since 2.0.0
|
|
239
239
|
* @category constructors
|
|
240
240
|
*/
|
|
241
|
-
export declare const asyncEffect: <
|
|
241
|
+
export declare const asyncEffect: <A, E = never, R = never>(register: (emit: Emit.Emit<R, E, A, void>) => Effect.Effect<unknown, E, R>, outputBuffer?: number) => Stream<A, E, R>;
|
|
242
242
|
/**
|
|
243
243
|
* Creates a stream from an asynchronous callback that can be called multiple
|
|
244
244
|
* times. The registration of the callback returns either a canceler or
|
|
@@ -248,7 +248,7 @@ export declare const asyncEffect: <R, E, A>(register: (emit: Emit.Emit<R, E, A,
|
|
|
248
248
|
* @since 2.0.0
|
|
249
249
|
* @category constructors
|
|
250
250
|
*/
|
|
251
|
-
export declare const asyncInterrupt: <
|
|
251
|
+
export declare const asyncInterrupt: <A, E = never, R = never>(register: (emit: Emit.Emit<R, E, A, void>) => Either.Either<Effect.Effect<unknown, never, R>, Stream<A, E, R>>, outputBuffer?: number) => Stream<A, E, R>;
|
|
252
252
|
/**
|
|
253
253
|
* Creates a stream from an asynchronous callback that can be called multiple
|
|
254
254
|
* times. The registration of the callback can possibly return the stream
|
|
@@ -258,7 +258,7 @@ export declare const asyncInterrupt: <R, E, A>(register: (emit: Emit.Emit<R, E,
|
|
|
258
258
|
* @since 2.0.0
|
|
259
259
|
* @category constructors
|
|
260
260
|
*/
|
|
261
|
-
export declare const asyncOption: <
|
|
261
|
+
export declare const asyncOption: <A, E = never, R = never>(register: (emit: Emit.Emit<R, E, A, void>) => Option.Option<Stream<A, E, R>>, outputBuffer?: number) => Stream<A, E, R>;
|
|
262
262
|
/**
|
|
263
263
|
* Creates a stream from an asynchronous callback that can be called multiple
|
|
264
264
|
* times. The registration of the callback itself returns an a scoped
|
|
@@ -268,7 +268,7 @@ export declare const asyncOption: <R, E, A>(register: (emit: Emit.Emit<R, E, A,
|
|
|
268
268
|
* @since 2.0.0
|
|
269
269
|
* @category constructors
|
|
270
270
|
*/
|
|
271
|
-
export declare const asyncScoped: <
|
|
271
|
+
export declare const asyncScoped: <A, E = never, R = never>(register: (emit: Emit.Emit<R, E, A, void>) => Effect.Effect<unknown, E, R | Scope.Scope>, outputBuffer?: number) => Stream<A, E, Exclude<R, Scope.Scope>>;
|
|
272
272
|
/**
|
|
273
273
|
* Returns a `Stream` that first collects `n` elements from the input `Stream`,
|
|
274
274
|
* and then creates a new `Stream` using the specified function, and sends all
|
|
@@ -278,8 +278,8 @@ export declare const asyncScoped: <R, E, A>(register: (emit: Emit.Emit<R, E, A,
|
|
|
278
278
|
* @category sequencing
|
|
279
279
|
*/
|
|
280
280
|
export declare const branchAfter: {
|
|
281
|
-
<A,
|
|
282
|
-
<
|
|
281
|
+
<A, A2, E2, R2>(n: number, f: (input: Chunk.Chunk<A>) => Stream<A2, E2, R2>): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
282
|
+
<A, E, R, R2, E2, A2>(self: Stream<A, E, R>, n: number, f: (input: Chunk.Chunk<A>) => Stream<A2, E2, R2>): Stream<A2, E | E2, R | R2>;
|
|
283
283
|
};
|
|
284
284
|
/**
|
|
285
285
|
* Fan out the stream, producing a list of streams that have the same elements
|
|
@@ -290,8 +290,8 @@ export declare const branchAfter: {
|
|
|
290
290
|
* @category utils
|
|
291
291
|
*/
|
|
292
292
|
export declare const broadcast: {
|
|
293
|
-
<N extends number>(n: N, maximumLag: number): <
|
|
294
|
-
<
|
|
293
|
+
<N extends number>(n: N, maximumLag: number): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Stream.DynamicTuple<Stream<A, E>, N>, never, Scope.Scope | R>;
|
|
294
|
+
<A, E, R, N extends number>(self: Stream<A, E, R>, n: N, maximumLag: number): Effect.Effect<Stream.DynamicTuple<Stream<A, E>, N>, never, Scope.Scope | R>;
|
|
295
295
|
};
|
|
296
296
|
/**
|
|
297
297
|
* Fan out the stream, producing a dynamic number of streams that have the
|
|
@@ -302,8 +302,8 @@ export declare const broadcast: {
|
|
|
302
302
|
* @category utils
|
|
303
303
|
*/
|
|
304
304
|
export declare const broadcastDynamic: {
|
|
305
|
-
(maximumLag: number): <
|
|
306
|
-
<
|
|
305
|
+
(maximumLag: number): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Stream<A, E>, never, Scope.Scope | R>;
|
|
306
|
+
<A, E, R>(self: Stream<A, E, R>, maximumLag: number): Effect.Effect<Stream<A, E>, never, Scope.Scope | R>;
|
|
307
307
|
};
|
|
308
308
|
/**
|
|
309
309
|
* Converts the stream to a scoped list of queues. Every value will be
|
|
@@ -316,8 +316,8 @@ export declare const broadcastDynamic: {
|
|
|
316
316
|
* @category utils
|
|
317
317
|
*/
|
|
318
318
|
export declare const broadcastedQueues: {
|
|
319
|
-
<N extends number>(n: N, maximumLag: number): <
|
|
320
|
-
<
|
|
319
|
+
<N extends number>(n: N, maximumLag: number): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Stream.DynamicTuple<Queue.Dequeue<Take.Take<A, E>>, N>, never, R | Scope.Scope>;
|
|
320
|
+
<A, E, R, N extends number>(self: Stream<A, E, R>, n: N, maximumLag: number): Effect.Effect<Stream.DynamicTuple<Queue.Dequeue<Take.Take<A, E>>, N>, never, Scope.Scope | R>;
|
|
321
321
|
};
|
|
322
322
|
/**
|
|
323
323
|
* Converts the stream to a scoped dynamic amount of queues. Every chunk will
|
|
@@ -330,8 +330,8 @@ export declare const broadcastedQueues: {
|
|
|
330
330
|
* @category utils
|
|
331
331
|
*/
|
|
332
332
|
export declare const broadcastedQueuesDynamic: {
|
|
333
|
-
(maximumLag: number): <
|
|
334
|
-
<
|
|
333
|
+
(maximumLag: number): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Effect.Effect<Queue.Dequeue<Take.Take<A, E>>, never, Scope.Scope>, never, R | Scope.Scope>;
|
|
334
|
+
<A, E, R>(self: Stream<A, E, R>, maximumLag: number): Effect.Effect<Effect.Effect<Queue.Dequeue<Take.Take<A, E>>, never, Scope.Scope>, never, Scope.Scope | R>;
|
|
335
335
|
};
|
|
336
336
|
/**
|
|
337
337
|
* Allows a faster producer to progress independently of a slower consumer by
|
|
@@ -349,13 +349,13 @@ export declare const buffer: {
|
|
|
349
349
|
} | {
|
|
350
350
|
readonly capacity: number;
|
|
351
351
|
readonly strategy?: "dropping" | "sliding" | "suspend" | undefined;
|
|
352
|
-
}): <
|
|
353
|
-
<
|
|
352
|
+
}): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
353
|
+
<A, E, R>(self: Stream<A, E, R>, options: {
|
|
354
354
|
readonly capacity: "unbounded";
|
|
355
355
|
} | {
|
|
356
356
|
readonly capacity: number;
|
|
357
357
|
readonly strategy?: "dropping" | "sliding" | "suspend" | undefined;
|
|
358
|
-
}): Stream<
|
|
358
|
+
}): Stream<A, E, R>;
|
|
359
359
|
};
|
|
360
360
|
/**
|
|
361
361
|
* Allows a faster producer to progress independently of a slower consumer by
|
|
@@ -369,11 +369,11 @@ export declare const bufferChunks: {
|
|
|
369
369
|
(options: {
|
|
370
370
|
readonly capacity: number;
|
|
371
371
|
readonly strategy?: "dropping" | "sliding" | "suspend" | undefined;
|
|
372
|
-
}): <
|
|
373
|
-
<
|
|
372
|
+
}): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
373
|
+
<A, E, R>(self: Stream<A, E, R>, options: {
|
|
374
374
|
readonly capacity: number;
|
|
375
375
|
readonly strategy?: "dropping" | "sliding" | "suspend" | undefined;
|
|
376
|
-
}): Stream<
|
|
376
|
+
}): Stream<A, E, R>;
|
|
377
377
|
};
|
|
378
378
|
/**
|
|
379
379
|
* Switches over to the stream produced by the provided function in case this
|
|
@@ -383,8 +383,8 @@ export declare const bufferChunks: {
|
|
|
383
383
|
* @category error handling
|
|
384
384
|
*/
|
|
385
385
|
export declare const catchAll: {
|
|
386
|
-
<E, R2, E2, A2>(f: (error: E) => Stream<
|
|
387
|
-
<R, A, E, R2, E2, A2>(self: Stream<
|
|
386
|
+
<E, R2, E2, A2>(f: (error: E) => Stream<A2, E2, R2>): <R, A>(self: Stream<A, E, R>) => Stream<A2 | A, E2, R2 | R>;
|
|
387
|
+
<R, A, E, R2, E2, A2>(self: Stream<A, E, R>, f: (error: E) => Stream<A2, E2, R2>): Stream<A | A2, E2, R | R2>;
|
|
388
388
|
};
|
|
389
389
|
/**
|
|
390
390
|
* Switches over to the stream produced by the provided function in case this
|
|
@@ -395,8 +395,8 @@ export declare const catchAll: {
|
|
|
395
395
|
* @category error handling
|
|
396
396
|
*/
|
|
397
397
|
export declare const catchAllCause: {
|
|
398
|
-
<E, R2, E2, A2>(f: (cause: Cause.Cause<E>) => Stream<
|
|
399
|
-
<R, A, E, R2, E2, A2>(self: Stream<
|
|
398
|
+
<E, R2, E2, A2>(f: (cause: Cause.Cause<E>) => Stream<A2, E2, R2>): <R, A>(self: Stream<A, E, R>) => Stream<A2 | A, E2, R2 | R>;
|
|
399
|
+
<R, A, E, R2, E2, A2>(self: Stream<A, E, R>, f: (cause: Cause.Cause<E>) => Stream<A2, E2, R2>): Stream<A | A2, E2, R | R2>;
|
|
400
400
|
};
|
|
401
401
|
/**
|
|
402
402
|
* Switches over to the stream produced by the provided function in case this
|
|
@@ -406,8 +406,8 @@ export declare const catchAllCause: {
|
|
|
406
406
|
* @category error handling
|
|
407
407
|
*/
|
|
408
408
|
export declare const catchSome: {
|
|
409
|
-
<E, R2, E2, A2>(pf: (error: E) => Option.Option<Stream<
|
|
410
|
-
<R, A, E, R2, E2, A2>(self: Stream<
|
|
409
|
+
<E, R2, E2, A2>(pf: (error: E) => Option.Option<Stream<A2, E2, R2>>): <R, A>(self: Stream<A, E, R>) => Stream<A2 | A, E | E2, R2 | R>;
|
|
410
|
+
<R, A, E, R2, E2, A2>(self: Stream<A, E, R>, pf: (error: E) => Option.Option<Stream<A2, E2, R2>>): Stream<A | A2, E | E2, R | R2>;
|
|
411
411
|
};
|
|
412
412
|
/**
|
|
413
413
|
* Switches over to the stream produced by the provided function in case this
|
|
@@ -421,16 +421,16 @@ export declare const catchTag: {
|
|
|
421
421
|
_tag: string;
|
|
422
422
|
}, R1, E1, A1>(k: K, f: (e: Extract<E, {
|
|
423
423
|
_tag: K;
|
|
424
|
-
}>) => Stream<
|
|
424
|
+
}>) => Stream<A1, E1, R1>): <R, A>(self: Stream<A, E, R>) => Stream<A1 | A, E1 | Exclude<E, {
|
|
425
425
|
_tag: K;
|
|
426
|
-
}>,
|
|
426
|
+
}>, R1 | R>;
|
|
427
427
|
<R, E extends {
|
|
428
428
|
_tag: string;
|
|
429
|
-
}, A, K extends E["_tag"] & string, R1, E1, A1>(self: Stream<
|
|
429
|
+
}, A, K extends E["_tag"] & string, R1, E1, A1>(self: Stream<A, E, R>, k: K, f: (e: Extract<E, {
|
|
430
430
|
_tag: K;
|
|
431
|
-
}>) => Stream<
|
|
431
|
+
}>) => Stream<A1, E1, R1>): Stream<A | A1, E1 | Exclude<E, {
|
|
432
432
|
_tag: K;
|
|
433
|
-
}>,
|
|
433
|
+
}>, R | R1>;
|
|
434
434
|
};
|
|
435
435
|
/**
|
|
436
436
|
* Switches over to the stream produced by one of the provided functions, in
|
|
@@ -443,32 +443,32 @@ export declare const catchTags: {
|
|
|
443
443
|
<E extends {
|
|
444
444
|
_tag: string;
|
|
445
445
|
}, Cases extends {
|
|
446
|
-
[K in E["_tag"]]+?: (
|
|
446
|
+
[K in E["_tag"]]+?: (error: Extract<E, {
|
|
447
447
|
_tag: K;
|
|
448
|
-
}>) => Stream<any, any, any
|
|
449
|
-
}>(cases: Cases): <R, A>(self: Stream<
|
|
450
|
-
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer
|
|
448
|
+
}>) => Stream<any, any, any>;
|
|
449
|
+
}>(cases: Cases): <R, A>(self: Stream<A, E, R>) => Stream<A | {
|
|
450
|
+
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer A, infer _E, infer _R> ? A : never;
|
|
451
451
|
}[keyof Cases], Exclude<E, {
|
|
452
452
|
_tag: keyof Cases;
|
|
453
453
|
}> | {
|
|
454
|
-
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer
|
|
455
|
-
}[keyof Cases],
|
|
456
|
-
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer
|
|
454
|
+
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer _A, infer E, infer _R> ? E : never;
|
|
455
|
+
}[keyof Cases], R | {
|
|
456
|
+
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer _A, infer _E, infer R> ? R : never;
|
|
457
457
|
}[keyof Cases]>;
|
|
458
458
|
<R, E extends {
|
|
459
459
|
_tag: string;
|
|
460
460
|
}, A, Cases extends {
|
|
461
|
-
[K in E["_tag"]]+?: (
|
|
461
|
+
[K in E["_tag"]]+?: (error: Extract<E, {
|
|
462
462
|
_tag: K;
|
|
463
|
-
}>) => Stream<any, any, any
|
|
464
|
-
}>(self: Stream<
|
|
465
|
-
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer
|
|
463
|
+
}>) => Stream<any, any, any>;
|
|
464
|
+
}>(self: Stream<A, E, R>, cases: Cases): Stream<A | {
|
|
465
|
+
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer _R, infer _E, infer A> ? A : never;
|
|
466
466
|
}[keyof Cases], Exclude<E, {
|
|
467
467
|
_tag: keyof Cases;
|
|
468
468
|
}> | {
|
|
469
469
|
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer _R, infer E, infer _A> ? E : never;
|
|
470
|
-
}[keyof Cases],
|
|
471
|
-
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer
|
|
470
|
+
}[keyof Cases], R | {
|
|
471
|
+
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer R, infer _E, infer _A> ? R : never;
|
|
472
472
|
}[keyof Cases]>;
|
|
473
473
|
};
|
|
474
474
|
/**
|
|
@@ -480,8 +480,8 @@ export declare const catchTags: {
|
|
|
480
480
|
* @category error handling
|
|
481
481
|
*/
|
|
482
482
|
export declare const catchSomeCause: {
|
|
483
|
-
<E, R2, E2, A2>(pf: (cause: Cause.Cause<E>) => Option.Option<Stream<
|
|
484
|
-
<R, A, E, R2, E2, A2>(self: Stream<
|
|
483
|
+
<E, R2, E2, A2>(pf: (cause: Cause.Cause<E>) => Option.Option<Stream<A2, E2, R2>>): <R, A>(self: Stream<A, E, R>) => Stream<A2 | A, E | E2, R2 | R>;
|
|
484
|
+
<R, A, E, R2, E2, A2>(self: Stream<A, E, R>, pf: (cause: Cause.Cause<E>) => Option.Option<Stream<A2, E2, R2>>): Stream<A | A2, E | E2, R | R2>;
|
|
485
485
|
};
|
|
486
486
|
/**
|
|
487
487
|
* Returns a new stream that only emits elements that are not equal to the
|
|
@@ -491,7 +491,7 @@ export declare const catchSomeCause: {
|
|
|
491
491
|
* @since 2.0.0
|
|
492
492
|
* @category utils
|
|
493
493
|
*/
|
|
494
|
-
export declare const changes: <
|
|
494
|
+
export declare const changes: <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
495
495
|
/**
|
|
496
496
|
* Returns a new stream that only emits elements that are not equal to the
|
|
497
497
|
* previous element emitted, using the specified function to determine whether
|
|
@@ -501,8 +501,8 @@ export declare const changes: <R, E, A>(self: Stream<R, E, A>) => Stream<R, E, A
|
|
|
501
501
|
* @category utils
|
|
502
502
|
*/
|
|
503
503
|
export declare const changesWith: {
|
|
504
|
-
<A>(f: (x: A, y: A) => boolean): <R, E>(self: Stream<
|
|
505
|
-
<
|
|
504
|
+
<A>(f: (x: A, y: A) => boolean): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
505
|
+
<A, E, R>(self: Stream<A, E, R>, f: (x: A, y: A) => boolean): Stream<A, E, R>;
|
|
506
506
|
};
|
|
507
507
|
/**
|
|
508
508
|
* Returns a new stream that only emits elements that are not equal to the
|
|
@@ -513,8 +513,8 @@ export declare const changesWith: {
|
|
|
513
513
|
* @category utils
|
|
514
514
|
*/
|
|
515
515
|
export declare const changesWithEffect: {
|
|
516
|
-
<A, R2, E2>(f: (x: A, y: A) => Effect.Effect<
|
|
517
|
-
<R, E, A, R2, E2>(self: Stream<
|
|
516
|
+
<A, R2, E2>(f: (x: A, y: A) => Effect.Effect<boolean, E2, R2>): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
517
|
+
<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>;
|
|
518
518
|
};
|
|
519
519
|
/**
|
|
520
520
|
* Exposes the underlying chunks of the stream as a stream of chunks of
|
|
@@ -523,7 +523,7 @@ export declare const changesWithEffect: {
|
|
|
523
523
|
* @since 2.0.0
|
|
524
524
|
* @category utils
|
|
525
525
|
*/
|
|
526
|
-
export declare const chunks: <
|
|
526
|
+
export declare const chunks: <A, E, R>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R>;
|
|
527
527
|
/**
|
|
528
528
|
* Performs the specified stream transformation with the chunk structure of
|
|
529
529
|
* the stream exposed.
|
|
@@ -531,7 +531,10 @@ export declare const chunks: <R, E, A>(self: Stream<R, E, A>) => Stream<R, E, Ch
|
|
|
531
531
|
* @since 2.0.0
|
|
532
532
|
* @category utils
|
|
533
533
|
*/
|
|
534
|
-
export declare const chunksWith:
|
|
534
|
+
export declare const chunksWith: {
|
|
535
|
+
<R, E, A, R2, E2, A2>(f: (stream: Stream<Chunk.Chunk<A>, E, R>) => Stream<Chunk.Chunk<A2>, E2, R2>): (self: Stream<A, E, R>) => Stream<A2, E | E2, R | R2>;
|
|
536
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, f: (stream: Stream<Chunk.Chunk<A>, E, R>) => Stream<Chunk.Chunk<A2>, E2, R2>): Stream<A2, E | E2, R | R2>;
|
|
537
|
+
};
|
|
535
538
|
/**
|
|
536
539
|
* Combines the elements from this stream and the specified stream by
|
|
537
540
|
* repeatedly applying the function `f` to extract an element using both sides
|
|
@@ -546,8 +549,8 @@ export declare const chunksWith: <R, E, A, R2, E2, A2>(f: (stream: Stream<R, E,
|
|
|
546
549
|
* @category utils
|
|
547
550
|
*/
|
|
548
551
|
export declare const combine: {
|
|
549
|
-
<R2, E2, A2, S, R3, E, A, R4, R5, A3>(that: Stream<
|
|
550
|
-
<R, R2, E2, A2, S, R3, E, A, R4, R5, A3>(self: Stream<
|
|
552
|
+
<R2, E2, A2, S, R3, E, A, R4, R5, A3>(that: Stream<A2, E2, R2>, s: S, f: (s: S, pullLeft: Effect.Effect<A, Option.Option<E>, R3>, pullRight: Effect.Effect<A2, Option.Option<E2>, R4>) => Effect.Effect<Exit.Exit<readonly [A3, S], Option.Option<E2 | E>>, never, R5>): <R>(self: Stream<A, E, R>) => Stream<A3, E2 | E, R2 | R3 | R4 | R5 | R>;
|
|
553
|
+
<R, R2, E2, A2, S, R3, E, A, R4, R5, A3>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, s: S, f: (s: S, pullLeft: Effect.Effect<A, Option.Option<E>, R3>, pullRight: Effect.Effect<A2, Option.Option<E2>, R4>) => Effect.Effect<Exit.Exit<readonly [A3, S], Option.Option<E2 | E>>, never, R5>): Stream<A3, E2 | E, R | R2 | R3 | R4 | R5>;
|
|
551
554
|
};
|
|
552
555
|
/**
|
|
553
556
|
* Combines the chunks from this stream and the specified stream by repeatedly
|
|
@@ -560,8 +563,8 @@ export declare const combine: {
|
|
|
560
563
|
* @category utils
|
|
561
564
|
*/
|
|
562
565
|
export declare const combineChunks: {
|
|
563
|
-
<R2, E2, A2, S, R3, E, A, R4, R5, A3>(that: Stream<
|
|
564
|
-
<R, R2, E2, A2, S, R3, E, A, R4, R5, A3>(self: Stream<
|
|
566
|
+
<R2, E2, A2, S, R3, E, A, R4, R5, A3>(that: Stream<A2, E2, R2>, s: S, f: (s: S, pullLeft: Effect.Effect<Chunk.Chunk<A>, Option.Option<E>, R3>, pullRight: Effect.Effect<Chunk.Chunk<A2>, Option.Option<E2>, R4>) => Effect.Effect<Exit.Exit<readonly [Chunk.Chunk<A3>, S], Option.Option<E2 | E>>, never, R5>): <R>(self: Stream<A, E, R>) => Stream<A3, E2 | E, R2 | R3 | R4 | R5 | R>;
|
|
567
|
+
<R, R2, E2, A2, S, R3, E, A, R4, R5, A3>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, s: S, f: (s: S, pullLeft: Effect.Effect<Chunk.Chunk<A>, Option.Option<E>, R3>, pullRight: Effect.Effect<Chunk.Chunk<A2>, Option.Option<E2>, R4>) => Effect.Effect<Exit.Exit<readonly [Chunk.Chunk<A3>, S], Option.Option<E2 | E>>, never, R5>): Stream<A3, E2 | E, R | R2 | R3 | R4 | R5>;
|
|
565
568
|
};
|
|
566
569
|
/**
|
|
567
570
|
* Concatenates the specified stream with this stream, resulting in a stream
|
|
@@ -572,8 +575,8 @@ export declare const combineChunks: {
|
|
|
572
575
|
* @category utils
|
|
573
576
|
*/
|
|
574
577
|
export declare const concat: {
|
|
575
|
-
<R2, E2, A2>(that: Stream<
|
|
576
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
578
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E, R2 | R>;
|
|
579
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A | A2, E | E2, R | R2>;
|
|
577
580
|
};
|
|
578
581
|
/**
|
|
579
582
|
* Concatenates all of the streams in the chunk to one stream.
|
|
@@ -581,7 +584,7 @@ export declare const concat: {
|
|
|
581
584
|
* @since 2.0.0
|
|
582
585
|
* @category constructors
|
|
583
586
|
*/
|
|
584
|
-
export declare const concatAll: <
|
|
587
|
+
export declare const concatAll: <A, E, R>(streams: Chunk.Chunk<Stream<A, E, R>>) => Stream<A, E, R>;
|
|
585
588
|
/**
|
|
586
589
|
* Composes this stream with the specified stream to create a cartesian
|
|
587
590
|
* product of elements. The `that` stream would be run multiple times, for
|
|
@@ -593,8 +596,8 @@ export declare const concatAll: <R, E, A>(streams: Chunk.Chunk<Stream<R, E, A>>)
|
|
|
593
596
|
* @category utils
|
|
594
597
|
*/
|
|
595
598
|
export declare const cross: {
|
|
596
|
-
<R2, E2, A2>(that: Stream<
|
|
597
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
599
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<[A, A2], E2 | E, R2 | R>;
|
|
600
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<[A, A2], E | E2, R | R2>;
|
|
598
601
|
};
|
|
599
602
|
/**
|
|
600
603
|
* Composes this stream with the specified stream to create a cartesian
|
|
@@ -607,8 +610,8 @@ export declare const cross: {
|
|
|
607
610
|
* @category utils
|
|
608
611
|
*/
|
|
609
612
|
export declare const crossLeft: {
|
|
610
|
-
<R2, E2, A2>(that: Stream<
|
|
611
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
613
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
614
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
612
615
|
};
|
|
613
616
|
/**
|
|
614
617
|
* Composes this stream with the specified stream to create a cartesian
|
|
@@ -622,8 +625,8 @@ export declare const crossLeft: {
|
|
|
622
625
|
* @category utils
|
|
623
626
|
*/
|
|
624
627
|
export declare const crossRight: {
|
|
625
|
-
<R2, E2, A2>(that: Stream<
|
|
626
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
628
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
629
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A2, E | E2, R | R2>;
|
|
627
630
|
};
|
|
628
631
|
/**
|
|
629
632
|
* Composes this stream with the specified stream to create a cartesian
|
|
@@ -636,8 +639,8 @@ export declare const crossRight: {
|
|
|
636
639
|
* @category utils
|
|
637
640
|
*/
|
|
638
641
|
export declare const crossWith: {
|
|
639
|
-
<R2, E2, B, A, C>(that: Stream<
|
|
640
|
-
<R, E, R2, E2, B, A, C>(self: Stream<
|
|
642
|
+
<R2, E2, B, A, C>(that: Stream<B, E2, R2>, f: (a: A, b: B) => C): <R, E>(self: Stream<A, E, R>) => Stream<C, E2 | E, R2 | R>;
|
|
643
|
+
<R, E, R2, E2, B, A, C>(self: Stream<A, E, R>, that: Stream<B, E2, R2>, f: (a: A, b: B) => C): Stream<C, E | E2, R | R2>;
|
|
641
644
|
};
|
|
642
645
|
/**
|
|
643
646
|
* Delays the emission of values by holding new values for a set duration. If
|
|
@@ -654,8 +657,8 @@ export declare const crossWith: {
|
|
|
654
657
|
* @category utils
|
|
655
658
|
*/
|
|
656
659
|
export declare const debounce: {
|
|
657
|
-
(duration: Duration.DurationInput): <
|
|
658
|
-
<
|
|
660
|
+
(duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
661
|
+
<A, E, R>(self: Stream<A, E, R>, duration: Duration.DurationInput): Stream<A, E, R>;
|
|
659
662
|
};
|
|
660
663
|
/**
|
|
661
664
|
* The stream that dies with the specified defect.
|
|
@@ -663,21 +666,21 @@ export declare const debounce: {
|
|
|
663
666
|
* @since 2.0.0
|
|
664
667
|
* @category constructors
|
|
665
668
|
*/
|
|
666
|
-
export declare const die: (defect: unknown) => Stream<never
|
|
669
|
+
export declare const die: (defect: unknown) => Stream<never>;
|
|
667
670
|
/**
|
|
668
671
|
* The stream that dies with the specified lazily evaluated defect.
|
|
669
672
|
*
|
|
670
673
|
* @since 2.0.0
|
|
671
674
|
* @category constructors
|
|
672
675
|
*/
|
|
673
|
-
export declare const dieSync: (evaluate: LazyArg<unknown>) => Stream<never
|
|
676
|
+
export declare const dieSync: (evaluate: LazyArg<unknown>) => Stream<never>;
|
|
674
677
|
/**
|
|
675
678
|
* The stream that dies with an exception described by `message`.
|
|
676
679
|
*
|
|
677
680
|
* @since 2.0.0
|
|
678
681
|
* @category constructors
|
|
679
682
|
*/
|
|
680
|
-
export declare const dieMessage: (message: string) => Stream<never
|
|
683
|
+
export declare const dieMessage: (message: string) => Stream<never>;
|
|
681
684
|
/**
|
|
682
685
|
* More powerful version of `Stream.broadcast`. Allows to provide a function
|
|
683
686
|
* that determines what queues should receive which elements. The decide
|
|
@@ -690,13 +693,13 @@ export declare const distributedWith: {
|
|
|
690
693
|
<N extends number, A>(options: {
|
|
691
694
|
readonly size: N;
|
|
692
695
|
readonly maximumLag: number;
|
|
693
|
-
readonly decide: (a: A) => Effect.Effect<
|
|
694
|
-
}): <R, E>(self: Stream<
|
|
695
|
-
<R, E, N extends number, A>(self: Stream<
|
|
696
|
+
readonly decide: (a: A) => Effect.Effect<Predicate<number>>;
|
|
697
|
+
}): <R, E>(self: Stream<A, E, R>) => Effect.Effect<Stream.DynamicTuple<Queue.Dequeue<Exit.Exit<A, Option.Option<E>>>, N>, never, Scope.Scope | R>;
|
|
698
|
+
<R, E, N extends number, A>(self: Stream<A, E, R>, options: {
|
|
696
699
|
readonly size: N;
|
|
697
700
|
readonly maximumLag: number;
|
|
698
|
-
readonly decide: (a: A) => Effect.Effect<
|
|
699
|
-
}): Effect.Effect<
|
|
701
|
+
readonly decide: (a: A) => Effect.Effect<Predicate<number>>;
|
|
702
|
+
}): Effect.Effect<Stream.DynamicTuple<Queue.Dequeue<Exit.Exit<A, Option.Option<E>>>, N>, never, Scope.Scope | R>;
|
|
700
703
|
};
|
|
701
704
|
/**
|
|
702
705
|
* More powerful version of `Stream.distributedWith`. This returns a function
|
|
@@ -712,12 +715,12 @@ export declare const distributedWith: {
|
|
|
712
715
|
export declare const distributedWithDynamic: {
|
|
713
716
|
<E, A, _>(options: {
|
|
714
717
|
readonly maximumLag: number;
|
|
715
|
-
readonly decide: (a: A) => Effect.Effect<
|
|
716
|
-
}): <R>(self: Stream<
|
|
717
|
-
<R, E, A, _>(self: Stream<
|
|
718
|
+
readonly decide: (a: A) => Effect.Effect<Predicate<number>>;
|
|
719
|
+
}): <R>(self: Stream<A, E, R>) => Effect.Effect<Effect.Effect<[number, Queue.Dequeue<Exit.Exit<A, Option.Option<E>>>]>, never, Scope.Scope | R>;
|
|
720
|
+
<R, E, A, _>(self: Stream<A, E, R>, options: {
|
|
718
721
|
readonly maximumLag: number;
|
|
719
|
-
readonly decide: (a: A) => Effect.Effect<
|
|
720
|
-
}): Effect.Effect<
|
|
722
|
+
readonly decide: (a: A) => Effect.Effect<Predicate<number>>;
|
|
723
|
+
}): Effect.Effect<Effect.Effect<[number, Queue.Dequeue<Exit.Exit<A, Option.Option<E>>>]>, never, Scope.Scope | R>;
|
|
721
724
|
};
|
|
722
725
|
/**
|
|
723
726
|
* Converts this stream to a stream that executes its effects but emits no
|
|
@@ -726,7 +729,7 @@ export declare const distributedWithDynamic: {
|
|
|
726
729
|
* @since 2.0.0
|
|
727
730
|
* @category utils
|
|
728
731
|
*/
|
|
729
|
-
export declare const drain: <
|
|
732
|
+
export declare const drain: <A, E, R>(self: Stream<A, E, R>) => Stream<never, E, R>;
|
|
730
733
|
/**
|
|
731
734
|
* Drains the provided stream in the background for as long as this stream is
|
|
732
735
|
* running. If this stream ends before `other`, `other` will be interrupted.
|
|
@@ -736,8 +739,8 @@ export declare const drain: <R, E, A>(self: Stream<R, E, A>) => Stream<R, E, nev
|
|
|
736
739
|
* @category utils
|
|
737
740
|
*/
|
|
738
741
|
export declare const drainFork: {
|
|
739
|
-
<R2, E2, A2>(that: Stream<
|
|
740
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
742
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
743
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
741
744
|
};
|
|
742
745
|
/**
|
|
743
746
|
* Drops the specified number of elements from this stream.
|
|
@@ -746,8 +749,8 @@ export declare const drainFork: {
|
|
|
746
749
|
* @category utils
|
|
747
750
|
*/
|
|
748
751
|
export declare const drop: {
|
|
749
|
-
(n: number): <
|
|
750
|
-
<
|
|
752
|
+
(n: number): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
753
|
+
<A, E, R>(self: Stream<A, E, R>, n: number): Stream<A, E, R>;
|
|
751
754
|
};
|
|
752
755
|
/**
|
|
753
756
|
* Drops the last specified number of elements from this stream.
|
|
@@ -758,8 +761,8 @@ export declare const drop: {
|
|
|
758
761
|
* @category utils
|
|
759
762
|
*/
|
|
760
763
|
export declare const dropRight: {
|
|
761
|
-
(n: number): <
|
|
762
|
-
<
|
|
764
|
+
(n: number): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
765
|
+
<A, E, R>(self: Stream<A, E, R>, n: number): Stream<A, E, R>;
|
|
763
766
|
};
|
|
764
767
|
/**
|
|
765
768
|
* Drops all elements of the stream until the specified predicate evaluates to
|
|
@@ -769,8 +772,8 @@ export declare const dropRight: {
|
|
|
769
772
|
* @category utils
|
|
770
773
|
*/
|
|
771
774
|
export declare const dropUntil: {
|
|
772
|
-
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<
|
|
773
|
-
<
|
|
775
|
+
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
776
|
+
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>;
|
|
774
777
|
};
|
|
775
778
|
/**
|
|
776
779
|
* Drops all elements of the stream until the specified effectful predicate
|
|
@@ -780,8 +783,8 @@ export declare const dropUntil: {
|
|
|
780
783
|
* @category utils
|
|
781
784
|
*/
|
|
782
785
|
export declare const dropUntilEffect: {
|
|
783
|
-
<A, R2, E2>(predicate: (a: NoInfer<A>) => Effect.Effect<
|
|
784
|
-
<R, E, A, R2, E2>(self: Stream<
|
|
786
|
+
<A, R2, E2>(predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
787
|
+
<R, E, A, R2, E2>(self: Stream<A, E, R>, predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
785
788
|
};
|
|
786
789
|
/**
|
|
787
790
|
* Drops all elements of the stream for as long as the specified predicate
|
|
@@ -791,8 +794,8 @@ export declare const dropUntilEffect: {
|
|
|
791
794
|
* @category utils
|
|
792
795
|
*/
|
|
793
796
|
export declare const dropWhile: {
|
|
794
|
-
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<
|
|
795
|
-
<
|
|
797
|
+
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
798
|
+
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>;
|
|
796
799
|
};
|
|
797
800
|
/**
|
|
798
801
|
* Drops all elements of the stream for as long as the specified predicate
|
|
@@ -802,8 +805,8 @@ export declare const dropWhile: {
|
|
|
802
805
|
* @category utils
|
|
803
806
|
*/
|
|
804
807
|
export declare const dropWhileEffect: {
|
|
805
|
-
<A, R2, E2>(predicate: (a: NoInfer<A>) => Effect.Effect<
|
|
806
|
-
<R, E, A, R2, E2>(self: Stream<
|
|
808
|
+
<A, R2, E2>(predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
809
|
+
<R, E, A, R2, E2>(self: Stream<A, E, R>, predicate: (a: A) => Effect.Effect<boolean, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
807
810
|
};
|
|
808
811
|
/**
|
|
809
812
|
* Returns a stream whose failures and successes have been lifted into an
|
|
@@ -815,14 +818,14 @@ export declare const dropWhileEffect: {
|
|
|
815
818
|
* @since 2.0.0
|
|
816
819
|
* @category utils
|
|
817
820
|
*/
|
|
818
|
-
export declare const either: <
|
|
821
|
+
export declare const either: <A, E, R>(self: Stream<A, E, R>) => Stream<Either.Either<E, A>, never, R>;
|
|
819
822
|
/**
|
|
820
823
|
* The empty stream.
|
|
821
824
|
*
|
|
822
825
|
* @since 2.0.0
|
|
823
826
|
* @category constructors
|
|
824
827
|
*/
|
|
825
|
-
export declare const empty: Stream<never
|
|
828
|
+
export declare const empty: Stream<never>;
|
|
826
829
|
/**
|
|
827
830
|
* Executes the provided finalizer after this stream's finalizers run.
|
|
828
831
|
*
|
|
@@ -830,8 +833,8 @@ export declare const empty: Stream<never, never, never>;
|
|
|
830
833
|
* @category utils
|
|
831
834
|
*/
|
|
832
835
|
export declare const ensuring: {
|
|
833
|
-
<R2, _>(finalizer: Effect.Effect<
|
|
834
|
-
<R, E, A, R2, _>(self: Stream<
|
|
836
|
+
<R2, _>(finalizer: Effect.Effect<_, never, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>;
|
|
837
|
+
<R, E, A, R2, _>(self: Stream<A, E, R>, finalizer: Effect.Effect<_, never, R2>): Stream<A, E, R | R2>;
|
|
835
838
|
};
|
|
836
839
|
/**
|
|
837
840
|
* Executes the provided finalizer after this stream's finalizers run.
|
|
@@ -840,8 +843,8 @@ export declare const ensuring: {
|
|
|
840
843
|
* @category utils
|
|
841
844
|
*/
|
|
842
845
|
export declare const ensuringWith: {
|
|
843
|
-
<E, R2>(finalizer: (exit: Exit.Exit<
|
|
844
|
-
<R, E, A, R2>(self: Stream<
|
|
846
|
+
<E, R2>(finalizer: (exit: Exit.Exit<unknown, E>) => Effect.Effect<unknown, never, R2>): <R, A>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>;
|
|
847
|
+
<R, E, A, R2>(self: Stream<A, E, R>, finalizer: (exit: Exit.Exit<unknown, E>) => Effect.Effect<unknown, never, R2>): Stream<A, E, R | R2>;
|
|
845
848
|
};
|
|
846
849
|
/**
|
|
847
850
|
* Accesses the whole context of the stream.
|
|
@@ -849,63 +852,63 @@ export declare const ensuringWith: {
|
|
|
849
852
|
* @since 2.0.0
|
|
850
853
|
* @category context
|
|
851
854
|
*/
|
|
852
|
-
export declare const context: <R>() => Stream<R
|
|
855
|
+
export declare const context: <R>() => Stream<Context.Context<R>, never, R>;
|
|
853
856
|
/**
|
|
854
857
|
* Accesses the context of the stream.
|
|
855
858
|
*
|
|
856
859
|
* @since 2.0.0
|
|
857
860
|
* @category context
|
|
858
861
|
*/
|
|
859
|
-
export declare const contextWith: <R, A>(f: (env: Context.Context<R>) => A) => Stream<
|
|
862
|
+
export declare const contextWith: <R, A>(f: (env: Context.Context<R>) => A) => Stream<A, never, R>;
|
|
860
863
|
/**
|
|
861
864
|
* Accesses the context of the stream in the context of an effect.
|
|
862
865
|
*
|
|
863
866
|
* @since 2.0.0
|
|
864
867
|
* @category context
|
|
865
868
|
*/
|
|
866
|
-
export declare const contextWithEffect: <R0, R, E, A>(f: (env: Context.Context<R0>) => Effect.Effect<
|
|
869
|
+
export declare const contextWithEffect: <R0, R, E, A>(f: (env: Context.Context<R0>) => Effect.Effect<A, E, R>) => Stream<A, E, R0 | R>;
|
|
867
870
|
/**
|
|
868
871
|
* Accesses the context of the stream in the context of a stream.
|
|
869
872
|
*
|
|
870
873
|
* @since 2.0.0
|
|
871
874
|
* @category context
|
|
872
875
|
*/
|
|
873
|
-
export declare const contextWithStream: <R0, R, E, A>(f: (env: Context.Context<R0>) => Stream<
|
|
876
|
+
export declare const contextWithStream: <R0, R, E, A>(f: (env: Context.Context<R0>) => Stream<A, E, R>) => Stream<A, E, R0 | R>;
|
|
874
877
|
/**
|
|
875
878
|
* Creates a stream that executes the specified effect but emits no elements.
|
|
876
879
|
*
|
|
877
880
|
* @since 2.0.0
|
|
878
881
|
* @category constructors
|
|
879
882
|
*/
|
|
880
|
-
export declare const execute: <R, E, _>(effect: Effect.Effect<
|
|
883
|
+
export declare const execute: <R, E, _>(effect: Effect.Effect<_, E, R>) => Stream<never, E, R>;
|
|
881
884
|
/**
|
|
882
885
|
* Terminates with the specified error.
|
|
883
886
|
*
|
|
884
887
|
* @since 2.0.0
|
|
885
888
|
* @category constructors
|
|
886
889
|
*/
|
|
887
|
-
export declare const fail: <E>(error: E) => Stream<never, E
|
|
890
|
+
export declare const fail: <E>(error: E) => Stream<never, E>;
|
|
888
891
|
/**
|
|
889
892
|
* Terminates with the specified lazily evaluated error.
|
|
890
893
|
*
|
|
891
894
|
* @since 2.0.0
|
|
892
895
|
* @category constructors
|
|
893
896
|
*/
|
|
894
|
-
export declare const failSync: <E>(evaluate: LazyArg<E>) => Stream<never, E
|
|
897
|
+
export declare const failSync: <E>(evaluate: LazyArg<E>) => Stream<never, E>;
|
|
895
898
|
/**
|
|
896
899
|
* The stream that always fails with the specified `Cause`.
|
|
897
900
|
*
|
|
898
901
|
* @since 2.0.0
|
|
899
902
|
* @category constructors
|
|
900
903
|
*/
|
|
901
|
-
export declare const failCause: <E>(cause: Cause.Cause<E>) => Stream<never, E
|
|
904
|
+
export declare const failCause: <E>(cause: Cause.Cause<E>) => Stream<never, E>;
|
|
902
905
|
/**
|
|
903
906
|
* The stream that always fails with the specified lazily evaluated `Cause`.
|
|
904
907
|
*
|
|
905
908
|
* @since 2.0.0
|
|
906
909
|
* @category constructors
|
|
907
910
|
*/
|
|
908
|
-
export declare const failCauseSync: <E>(evaluate: LazyArg<Cause.Cause<E>>) => Stream<never, E
|
|
911
|
+
export declare const failCauseSync: <E>(evaluate: LazyArg<Cause.Cause<E>>) => Stream<never, E>;
|
|
909
912
|
/**
|
|
910
913
|
* Filters the elements emitted by this stream using the provided function.
|
|
911
914
|
*
|
|
@@ -913,10 +916,10 @@ export declare const failCauseSync: <E>(evaluate: LazyArg<Cause.Cause<E>>) => St
|
|
|
913
916
|
* @category filtering
|
|
914
917
|
*/
|
|
915
918
|
export declare const filter: {
|
|
916
|
-
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <R, E>(self: Stream<
|
|
917
|
-
<A>(predicate: Predicate<
|
|
918
|
-
<R, E, A, B extends A>(self: Stream<
|
|
919
|
-
<
|
|
919
|
+
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <R, E>(self: Stream<A, E, R>) => Stream<B, E, R>;
|
|
920
|
+
<A, B extends A>(predicate: Predicate<B>): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
921
|
+
<R, E, A, B extends A>(self: Stream<A, E, R>, refinement: Refinement<A, B>): Stream<B, E, R>;
|
|
922
|
+
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>;
|
|
920
923
|
};
|
|
921
924
|
/**
|
|
922
925
|
* Effectfully filters the elements emitted by this stream.
|
|
@@ -925,8 +928,8 @@ export declare const filter: {
|
|
|
925
928
|
* @category filtering
|
|
926
929
|
*/
|
|
927
930
|
export declare const filterEffect: {
|
|
928
|
-
<A, R2, E2>(f: (a: NoInfer<A>) => Effect.Effect<
|
|
929
|
-
<R, E, A, R2, E2>(self: Stream<
|
|
931
|
+
<A, R2, E2>(f: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
932
|
+
<R, E, A, R2, E2>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<boolean, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
930
933
|
};
|
|
931
934
|
/**
|
|
932
935
|
* Performs a filter and map in a single step.
|
|
@@ -935,8 +938,8 @@ export declare const filterEffect: {
|
|
|
935
938
|
* @category utils
|
|
936
939
|
*/
|
|
937
940
|
export declare const filterMap: {
|
|
938
|
-
<A, B>(pf: (a: A) => Option.Option<B>): <R, E>(self: Stream<
|
|
939
|
-
<R, E, A, B>(self: Stream<
|
|
941
|
+
<A, B>(pf: (a: A) => Option.Option<B>): <R, E>(self: Stream<A, E, R>) => Stream<B, E, R>;
|
|
942
|
+
<R, E, A, B>(self: Stream<A, E, R>, pf: (a: A) => Option.Option<B>): Stream<B, E, R>;
|
|
940
943
|
};
|
|
941
944
|
/**
|
|
942
945
|
* Performs an effectful filter and map in a single step.
|
|
@@ -945,8 +948,8 @@ export declare const filterMap: {
|
|
|
945
948
|
* @category utils
|
|
946
949
|
*/
|
|
947
950
|
export declare const filterMapEffect: {
|
|
948
|
-
<A, R2, E2, A2>(pf: (a: A) => Option.Option<Effect.Effect<
|
|
949
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
951
|
+
<A, R2, E2, A2>(pf: (a: A) => Option.Option<Effect.Effect<A2, E2, R2>>): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
952
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, pf: (a: A) => Option.Option<Effect.Effect<A2, E2, R2>>): Stream<A2, E | E2, R | R2>;
|
|
950
953
|
};
|
|
951
954
|
/**
|
|
952
955
|
* Transforms all elements of the stream for as long as the specified partial
|
|
@@ -956,8 +959,8 @@ export declare const filterMapEffect: {
|
|
|
956
959
|
* @category utils
|
|
957
960
|
*/
|
|
958
961
|
export declare const filterMapWhile: {
|
|
959
|
-
<A, A2>(pf: (a: A) => Option.Option<A2>): <R, E>(self: Stream<
|
|
960
|
-
<R, E, A, A2>(self: Stream<
|
|
962
|
+
<A, A2>(pf: (a: A) => Option.Option<A2>): <R, E>(self: Stream<A, E, R>) => Stream<A2, E, R>;
|
|
963
|
+
<R, E, A, A2>(self: Stream<A, E, R>, pf: (a: A) => Option.Option<A2>): Stream<A2, E, R>;
|
|
961
964
|
};
|
|
962
965
|
/**
|
|
963
966
|
* Effectfully transforms all elements of the stream for as long as the
|
|
@@ -967,8 +970,8 @@ export declare const filterMapWhile: {
|
|
|
967
970
|
* @category utils
|
|
968
971
|
*/
|
|
969
972
|
export declare const filterMapWhileEffect: {
|
|
970
|
-
<A, R2, E2, A2>(pf: (a: A) => Option.Option<Effect.Effect<
|
|
971
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
973
|
+
<A, R2, E2, A2>(pf: (a: A) => Option.Option<Effect.Effect<A2, E2, R2>>): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
974
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, pf: (a: A) => Option.Option<Effect.Effect<A2, E2, R2>>): Stream<A2, E | E2, R | R2>;
|
|
972
975
|
};
|
|
973
976
|
/**
|
|
974
977
|
* Creates a one-element stream that never fails and executes the finalizer
|
|
@@ -977,7 +980,7 @@ export declare const filterMapWhileEffect: {
|
|
|
977
980
|
* @since 2.0.0
|
|
978
981
|
* @category constructors
|
|
979
982
|
*/
|
|
980
|
-
export declare const finalizer: <R, _>(finalizer: Effect.Effect<
|
|
983
|
+
export declare const finalizer: <R, _>(finalizer: Effect.Effect<_, never, R>) => Stream<void, never, R>;
|
|
981
984
|
/**
|
|
982
985
|
* Finds the first element emitted by this stream that satisfies the provided
|
|
983
986
|
* predicate.
|
|
@@ -986,10 +989,10 @@ export declare const finalizer: <R, _>(finalizer: Effect.Effect<R, never, _>) =>
|
|
|
986
989
|
* @category elements
|
|
987
990
|
*/
|
|
988
991
|
export declare const find: {
|
|
989
|
-
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <R, E>(self: Stream<
|
|
990
|
-
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<
|
|
991
|
-
<R, E, A, B extends A>(self: Stream<
|
|
992
|
-
<
|
|
992
|
+
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <R, E>(self: Stream<A, E, R>) => Stream<B, E, R>;
|
|
993
|
+
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
994
|
+
<R, E, A, B extends A>(self: Stream<A, E, R>, refinement: Refinement<A, B>): Stream<B, E, R>;
|
|
995
|
+
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>;
|
|
993
996
|
};
|
|
994
997
|
/**
|
|
995
998
|
* Finds the first element emitted by this stream that satisfies the provided
|
|
@@ -999,8 +1002,8 @@ export declare const find: {
|
|
|
999
1002
|
* @category elements
|
|
1000
1003
|
*/
|
|
1001
1004
|
export declare const findEffect: {
|
|
1002
|
-
<A, R2, E2>(predicate: (a: NoInfer<A>) => Effect.Effect<
|
|
1003
|
-
<R, E, A, R2, E2>(self: Stream<
|
|
1005
|
+
<A, R2, E2>(predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
1006
|
+
<R, E, A, R2, E2>(self: Stream<A, E, R>, predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
1004
1007
|
};
|
|
1005
1008
|
/**
|
|
1006
1009
|
* Returns a stream made of the concatenation in strict order of all the
|
|
@@ -1010,16 +1013,16 @@ export declare const findEffect: {
|
|
|
1010
1013
|
* @category sequencing
|
|
1011
1014
|
*/
|
|
1012
1015
|
export declare const flatMap: {
|
|
1013
|
-
<A, R2, E2, A2>(f: (a: A) => Stream<
|
|
1016
|
+
<A, R2, E2, A2>(f: (a: A) => Stream<A2, E2, R2>, options?: {
|
|
1014
1017
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
1015
1018
|
readonly bufferSize?: number | undefined;
|
|
1016
1019
|
readonly switch?: boolean | undefined;
|
|
1017
|
-
}): <R, E>(self: Stream<
|
|
1018
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
1020
|
+
} | undefined): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
1021
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, f: (a: A) => Stream<A2, E2, R2>, options?: {
|
|
1019
1022
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
1020
1023
|
readonly bufferSize?: number | undefined;
|
|
1021
1024
|
readonly switch?: boolean | undefined;
|
|
1022
|
-
}): Stream<
|
|
1025
|
+
} | undefined): Stream<A2, E | E2, R | R2>;
|
|
1023
1026
|
};
|
|
1024
1027
|
/**
|
|
1025
1028
|
* Flattens this stream-of-streams into a stream made of the concatenation in
|
|
@@ -1032,11 +1035,11 @@ export declare const flatten: {
|
|
|
1032
1035
|
(options?: {
|
|
1033
1036
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
1034
1037
|
readonly bufferSize?: number | undefined;
|
|
1035
|
-
}): <R, E, R2, E2, A>(self: Stream<
|
|
1036
|
-
<R, E, R2, E2, A>(self: Stream<
|
|
1038
|
+
} | undefined): <R, E, R2, E2, A>(self: Stream<Stream<A, E2, R2>, E, R>) => Stream<A, E | E2, R | R2>;
|
|
1039
|
+
<R, E, R2, E2, A>(self: Stream<Stream<A, E2, R2>, E, R>, options?: {
|
|
1037
1040
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
1038
1041
|
readonly bufferSize?: number | undefined;
|
|
1039
|
-
}): Stream<
|
|
1042
|
+
} | undefined): Stream<A, E | E2, R | R2>;
|
|
1040
1043
|
};
|
|
1041
1044
|
/**
|
|
1042
1045
|
* Submerges the chunks carried by this stream into the stream's structure,
|
|
@@ -1045,7 +1048,7 @@ export declare const flatten: {
|
|
|
1045
1048
|
* @since 2.0.0
|
|
1046
1049
|
* @category sequencing
|
|
1047
1050
|
*/
|
|
1048
|
-
export declare const flattenChunks: <
|
|
1051
|
+
export declare const flattenChunks: <A, E, R>(self: Stream<Chunk.Chunk<A>, E, R>) => Stream<A, E, R>;
|
|
1049
1052
|
/**
|
|
1050
1053
|
* Flattens `Effect` values into the stream's structure, preserving all
|
|
1051
1054
|
* information about the effect.
|
|
@@ -1057,11 +1060,11 @@ export declare const flattenEffect: {
|
|
|
1057
1060
|
(options?: {
|
|
1058
1061
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
1059
1062
|
readonly unordered?: boolean | undefined;
|
|
1060
|
-
}): <R, E, R2, E2, A>(self: Stream<
|
|
1061
|
-
<R, E, R2, E2, A>(self: Stream<
|
|
1063
|
+
} | undefined): <R, E, R2, E2, A>(self: Stream<Effect.Effect<A, E2, R2>, E, R>) => Stream<A, E | E2, R | R2>;
|
|
1064
|
+
<R, E, R2, E2, A>(self: Stream<Effect.Effect<A, E2, R2>, E, R>, options?: {
|
|
1062
1065
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
1063
1066
|
readonly unordered?: boolean | undefined;
|
|
1064
|
-
}): Stream<
|
|
1067
|
+
} | undefined): Stream<A, E | E2, R | R2>;
|
|
1065
1068
|
};
|
|
1066
1069
|
/**
|
|
1067
1070
|
* Unwraps `Exit` values that also signify end-of-stream by failing with `None`.
|
|
@@ -1075,7 +1078,7 @@ export declare const flattenEffect: {
|
|
|
1075
1078
|
* @since 2.0.0
|
|
1076
1079
|
* @category sequencing
|
|
1077
1080
|
*/
|
|
1078
|
-
export declare const flattenExitOption: <R, E, E2, A>(self: Stream<
|
|
1081
|
+
export declare const flattenExitOption: <R, E, E2, A>(self: Stream<Exit.Exit<A, Option.Option<E2>>, E, R>) => Stream<A, E | E2, R>;
|
|
1079
1082
|
/**
|
|
1080
1083
|
* Submerges the iterables carried by this stream into the stream's structure,
|
|
1081
1084
|
* while still preserving them.
|
|
@@ -1083,7 +1086,7 @@ export declare const flattenExitOption: <R, E, E2, A>(self: Stream<R, E, Exit.Ex
|
|
|
1083
1086
|
* @since 2.0.0
|
|
1084
1087
|
* @category sequencing
|
|
1085
1088
|
*/
|
|
1086
|
-
export declare const flattenIterables: <
|
|
1089
|
+
export declare const flattenIterables: <A, E, R>(self: Stream<Iterable<A>, E, R>) => Stream<A, E, R>;
|
|
1087
1090
|
/**
|
|
1088
1091
|
* Unwraps `Exit` values and flatten chunks that also signify end-of-stream
|
|
1089
1092
|
* by failing with `None`.
|
|
@@ -1091,42 +1094,42 @@ export declare const flattenIterables: <R, E, A>(self: Stream<R, E, Iterable<A>>
|
|
|
1091
1094
|
* @since 2.0.0
|
|
1092
1095
|
* @category sequencing
|
|
1093
1096
|
*/
|
|
1094
|
-
export declare const flattenTake: <R, E, E2, A>(self: Stream<
|
|
1097
|
+
export declare const flattenTake: <R, E, E2, A>(self: Stream<Take.Take<A, E2>, E, R>) => Stream<A, E | E2, R>;
|
|
1095
1098
|
/**
|
|
1096
1099
|
* Repeats this stream forever.
|
|
1097
1100
|
*
|
|
1098
1101
|
* @since 2.0.0
|
|
1099
1102
|
* @category utils
|
|
1100
1103
|
*/
|
|
1101
|
-
export declare const forever: <
|
|
1104
|
+
export declare const forever: <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
1102
1105
|
/**
|
|
1103
1106
|
* Creates a stream from an `AsyncIterable`.
|
|
1104
1107
|
*
|
|
1105
1108
|
* @since 2.0.0
|
|
1106
1109
|
* @category constructors
|
|
1107
1110
|
*/
|
|
1108
|
-
export declare const fromAsyncIterable: <
|
|
1111
|
+
export declare const fromAsyncIterable: <A, E>(iterable: AsyncIterable<A>, onError: (e: unknown) => E) => Stream<A, E>;
|
|
1109
1112
|
/**
|
|
1110
1113
|
* Creates a stream from a `Channel`.
|
|
1111
1114
|
*
|
|
1112
1115
|
* @since 2.0.0
|
|
1113
1116
|
* @category constructors
|
|
1114
1117
|
*/
|
|
1115
|
-
export declare const fromChannel: <
|
|
1118
|
+
export declare const fromChannel: <A, E, R>(channel: Channel.Channel<Chunk.Chunk<A>, unknown, E, unknown, unknown, unknown, R>) => Stream<A, E, R>;
|
|
1116
1119
|
/**
|
|
1117
1120
|
* Creates a channel from a `Stream`.
|
|
1118
1121
|
*
|
|
1119
1122
|
* @since 2.0.0
|
|
1120
1123
|
* @category constructors
|
|
1121
1124
|
*/
|
|
1122
|
-
export declare const toChannel: <
|
|
1125
|
+
export declare const toChannel: <A, E, R>(stream: Stream<A, E, R>) => Channel.Channel<Chunk.Chunk<A>, unknown, E, unknown, unknown, unknown, R>;
|
|
1123
1126
|
/**
|
|
1124
1127
|
* Creates a stream from a `Chunk` of values.
|
|
1125
1128
|
*
|
|
1126
1129
|
* @since 2.0.0
|
|
1127
1130
|
* @category constructors
|
|
1128
1131
|
*/
|
|
1129
|
-
export declare const fromChunk: <A>(chunk: Chunk.Chunk<A>) => Stream<
|
|
1132
|
+
export declare const fromChunk: <A>(chunk: Chunk.Chunk<A>) => Stream<A>;
|
|
1130
1133
|
/**
|
|
1131
1134
|
* Creates a stream from a subscription to a `PubSub`.
|
|
1132
1135
|
*
|
|
@@ -1138,11 +1141,11 @@ export declare const fromChunkPubSub: {
|
|
|
1138
1141
|
<A>(pubsub: PubSub.PubSub<Chunk.Chunk<A>>, options: {
|
|
1139
1142
|
readonly scoped: true;
|
|
1140
1143
|
readonly shutdown?: boolean | undefined;
|
|
1141
|
-
}): Effect.Effect<
|
|
1144
|
+
}): Effect.Effect<Stream<A>, never, Scope.Scope>;
|
|
1142
1145
|
<A>(pubsub: PubSub.PubSub<Chunk.Chunk<A>>, options?: {
|
|
1143
1146
|
readonly scoped?: false | undefined;
|
|
1144
1147
|
readonly shutdown?: boolean | undefined;
|
|
1145
|
-
}): Stream<
|
|
1148
|
+
} | undefined): Stream<A>;
|
|
1146
1149
|
};
|
|
1147
1150
|
/**
|
|
1148
1151
|
* Creates a stream from a `Queue` of values.
|
|
@@ -1153,14 +1156,14 @@ export declare const fromChunkPubSub: {
|
|
|
1153
1156
|
*/
|
|
1154
1157
|
export declare const fromChunkQueue: <A>(queue: Queue.Dequeue<Chunk.Chunk<A>>, options?: {
|
|
1155
1158
|
readonly shutdown?: boolean | undefined;
|
|
1156
|
-
}) => Stream<
|
|
1159
|
+
}) => Stream<A>;
|
|
1157
1160
|
/**
|
|
1158
1161
|
* Creates a stream from an arbitrary number of chunks.
|
|
1159
1162
|
*
|
|
1160
1163
|
* @since 2.0.0
|
|
1161
1164
|
* @category constructors
|
|
1162
1165
|
*/
|
|
1163
|
-
export declare const fromChunks: <A>(...chunks: Array<Chunk.Chunk<A>>) => Stream<
|
|
1166
|
+
export declare const fromChunks: <A>(...chunks: Array<Chunk.Chunk<A>>) => Stream<A>;
|
|
1164
1167
|
/**
|
|
1165
1168
|
* Either emits the success value of this effect or terminates the stream
|
|
1166
1169
|
* with the failure value of this effect.
|
|
@@ -1168,7 +1171,7 @@ export declare const fromChunks: <A>(...chunks: Array<Chunk.Chunk<A>>) => Stream
|
|
|
1168
1171
|
* @since 2.0.0
|
|
1169
1172
|
* @category constructors
|
|
1170
1173
|
*/
|
|
1171
|
-
export declare const fromEffect: <
|
|
1174
|
+
export declare const fromEffect: <A, E, R>(effect: Effect.Effect<A, E, R>) => Stream<A, E, R>;
|
|
1172
1175
|
/**
|
|
1173
1176
|
* Creates a stream from an effect producing a value of type `A` or an empty
|
|
1174
1177
|
* `Stream`.
|
|
@@ -1176,7 +1179,7 @@ export declare const fromEffect: <R, E, A>(effect: Effect.Effect<R, E, A>) => St
|
|
|
1176
1179
|
* @since 2.0.0
|
|
1177
1180
|
* @category constructors
|
|
1178
1181
|
*/
|
|
1179
|
-
export declare const fromEffectOption: <
|
|
1182
|
+
export declare const fromEffectOption: <A, E, R>(effect: Effect.Effect<A, Option.Option<E>, R>) => Stream<A, E, R>;
|
|
1180
1183
|
/**
|
|
1181
1184
|
* Creates a stream from a subscription to a `PubSub`.
|
|
1182
1185
|
*
|
|
@@ -1189,12 +1192,12 @@ export declare const fromPubSub: {
|
|
|
1189
1192
|
readonly scoped: true;
|
|
1190
1193
|
readonly maxChunkSize?: number | undefined;
|
|
1191
1194
|
readonly shutdown?: boolean | undefined;
|
|
1192
|
-
}): Effect.Effect<
|
|
1195
|
+
}): Effect.Effect<Stream<A>, never, Scope.Scope>;
|
|
1193
1196
|
<A>(pubsub: PubSub.PubSub<A>, options?: {
|
|
1194
1197
|
readonly scoped?: false | undefined;
|
|
1195
1198
|
readonly maxChunkSize?: number | undefined;
|
|
1196
1199
|
readonly shutdown?: boolean | undefined;
|
|
1197
|
-
}): Stream<
|
|
1200
|
+
} | undefined): Stream<A>;
|
|
1198
1201
|
};
|
|
1199
1202
|
/**
|
|
1200
1203
|
* Creates a new `Stream` from an iterable collection of values.
|
|
@@ -1202,21 +1205,21 @@ export declare const fromPubSub: {
|
|
|
1202
1205
|
* @since 2.0.0
|
|
1203
1206
|
* @category constructors
|
|
1204
1207
|
*/
|
|
1205
|
-
export declare const fromIterable: <A>(iterable: Iterable<A>) => Stream<
|
|
1208
|
+
export declare const fromIterable: <A>(iterable: Iterable<A>) => Stream<A>;
|
|
1206
1209
|
/**
|
|
1207
1210
|
* Creates a stream from an effect producing a value of type `Iterable<A>`.
|
|
1208
1211
|
*
|
|
1209
1212
|
* @since 2.0.0
|
|
1210
1213
|
* @category constructors
|
|
1211
1214
|
*/
|
|
1212
|
-
export declare const fromIterableEffect: <
|
|
1215
|
+
export declare const fromIterableEffect: <A, E, R>(effect: Effect.Effect<Iterable<A>, E, R>) => Stream<A, E, R>;
|
|
1213
1216
|
/**
|
|
1214
1217
|
* Creates a stream from an iterator
|
|
1215
1218
|
*
|
|
1216
1219
|
* @since 2.0.0
|
|
1217
1220
|
* @category constructors
|
|
1218
1221
|
*/
|
|
1219
|
-
export declare const fromIteratorSucceed: <A>(iterator: IterableIterator<A>, maxChunkSize?: number) => Stream<
|
|
1222
|
+
export declare const fromIteratorSucceed: <A>(iterator: IterableIterator<A>, maxChunkSize?: number) => Stream<A>;
|
|
1220
1223
|
/**
|
|
1221
1224
|
* Creates a stream from an effect that pulls elements from another stream.
|
|
1222
1225
|
*
|
|
@@ -1225,7 +1228,7 @@ export declare const fromIteratorSucceed: <A>(iterator: IterableIterator<A>, max
|
|
|
1225
1228
|
* @since 2.0.0
|
|
1226
1229
|
* @category constructors
|
|
1227
1230
|
*/
|
|
1228
|
-
export declare const fromPull: <R, R2, E, A>(effect: Effect.Effect<
|
|
1231
|
+
export declare const fromPull: <R, R2, E, A>(effect: Effect.Effect<Effect.Effect<Chunk.Chunk<A>, Option.Option<E>, R2>, never, Scope.Scope | R>) => Stream<A, E, R2 | Exclude<R, Scope.Scope>>;
|
|
1229
1232
|
/**
|
|
1230
1233
|
* Creates a stream from a queue of values
|
|
1231
1234
|
*
|
|
@@ -1237,7 +1240,7 @@ export declare const fromPull: <R, R2, E, A>(effect: Effect.Effect<Scope.Scope |
|
|
|
1237
1240
|
export declare const fromQueue: <A>(queue: Queue.Dequeue<A>, options?: {
|
|
1238
1241
|
readonly maxChunkSize?: number | undefined;
|
|
1239
1242
|
readonly shutdown?: boolean | undefined;
|
|
1240
|
-
}) => Stream<
|
|
1243
|
+
}) => Stream<A>;
|
|
1241
1244
|
/**
|
|
1242
1245
|
* Creates a stream from a `ReadableStream`.
|
|
1243
1246
|
*
|
|
@@ -1246,7 +1249,7 @@ export declare const fromQueue: <A>(queue: Queue.Dequeue<A>, options?: {
|
|
|
1246
1249
|
* @since 2.0.0
|
|
1247
1250
|
* @category constructors
|
|
1248
1251
|
*/
|
|
1249
|
-
export declare const fromReadableStream: <A, E>(evaluate: LazyArg<ReadableStream<A>>, onError: (error: unknown) => E) => Stream<
|
|
1252
|
+
export declare const fromReadableStream: <A, E>(evaluate: LazyArg<ReadableStream<A>>, onError: (error: unknown) => E) => Stream<A, E>;
|
|
1250
1253
|
/**
|
|
1251
1254
|
* Creates a stream from a `ReadableStreamBYOBReader`.
|
|
1252
1255
|
*
|
|
@@ -1256,7 +1259,7 @@ export declare const fromReadableStream: <A, E>(evaluate: LazyArg<ReadableStream
|
|
|
1256
1259
|
* @since 2.0.0
|
|
1257
1260
|
* @category constructors
|
|
1258
1261
|
*/
|
|
1259
|
-
export declare const fromReadableStreamByob: <E>(evaluate: LazyArg<ReadableStream<Uint8Array>>, onError: (error: unknown) => E, allocSize?: number) => Stream<
|
|
1262
|
+
export declare const fromReadableStreamByob: <E>(evaluate: LazyArg<ReadableStream<Uint8Array>>, onError: (error: unknown) => E, allocSize?: number) => Stream<Uint8Array, E>;
|
|
1260
1263
|
/**
|
|
1261
1264
|
* Creates a stream from a `Schedule` that does not require any further
|
|
1262
1265
|
* input. The stream will emit an element for each value output from the
|
|
@@ -1265,7 +1268,7 @@ export declare const fromReadableStreamByob: <E>(evaluate: LazyArg<ReadableStrea
|
|
|
1265
1268
|
* @since 2.0.0
|
|
1266
1269
|
* @category constructors
|
|
1267
1270
|
*/
|
|
1268
|
-
export declare const fromSchedule: <R, A>(schedule: Schedule.Schedule<R, unknown, A>) => Stream<
|
|
1271
|
+
export declare const fromSchedule: <R, A>(schedule: Schedule.Schedule<R, unknown, A>) => Stream<A, never, R>;
|
|
1269
1272
|
/**
|
|
1270
1273
|
* Creates a pipeline that groups on adjacent keys, calculated by the
|
|
1271
1274
|
* specified function.
|
|
@@ -1274,8 +1277,8 @@ export declare const fromSchedule: <R, A>(schedule: Schedule.Schedule<R, unknown
|
|
|
1274
1277
|
* @category grouping
|
|
1275
1278
|
*/
|
|
1276
1279
|
export declare const groupAdjacentBy: {
|
|
1277
|
-
<A, K>(f: (a: A) => K): <R, E>(self: Stream<
|
|
1278
|
-
<R, E, A, K>(self: Stream<
|
|
1280
|
+
<A, K>(f: (a: A) => K): <R, E>(self: Stream<A, E, R>) => Stream<[K, Chunk.NonEmptyChunk<A>], E, R>;
|
|
1281
|
+
<R, E, A, K>(self: Stream<A, E, R>, f: (a: A) => K): Stream<[K, Chunk.NonEmptyChunk<A>], E, R>;
|
|
1279
1282
|
};
|
|
1280
1283
|
/**
|
|
1281
1284
|
* More powerful version of `Stream.groupByKey`.
|
|
@@ -1284,12 +1287,12 @@ export declare const groupAdjacentBy: {
|
|
|
1284
1287
|
* @category grouping
|
|
1285
1288
|
*/
|
|
1286
1289
|
export declare const groupBy: {
|
|
1287
|
-
<A, R2, E2, K, V>(f: (a: A) => Effect.Effect<
|
|
1290
|
+
<A, R2, E2, K, V>(f: (a: A) => Effect.Effect<readonly [K, V], E2, R2>, options?: {
|
|
1288
1291
|
readonly bufferSize?: number | undefined;
|
|
1289
|
-
}): <R, E>(self: Stream<
|
|
1290
|
-
<R, E, A, R2, E2, K, V>(self: Stream<
|
|
1292
|
+
} | undefined): <R, E>(self: Stream<A, E, R>) => GroupBy.GroupBy<R2 | R, E2 | E, K, V>;
|
|
1293
|
+
<R, E, A, R2, E2, K, V>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<readonly [K, V], E2, R2>, options?: {
|
|
1291
1294
|
readonly bufferSize?: number | undefined;
|
|
1292
|
-
}): GroupBy.GroupBy<R | R2, E | E2, K, V>;
|
|
1295
|
+
} | undefined): GroupBy.GroupBy<R | R2, E | E2, K, V>;
|
|
1293
1296
|
};
|
|
1294
1297
|
/**
|
|
1295
1298
|
* Partition a stream using a function and process each stream individually.
|
|
@@ -1331,8 +1334,8 @@ export declare const groupBy: {
|
|
|
1331
1334
|
export declare const groupByKey: {
|
|
1332
1335
|
<A, K>(f: (a: A) => K, options?: {
|
|
1333
1336
|
readonly bufferSize?: number | undefined;
|
|
1334
|
-
}): <R, E>(self: Stream<
|
|
1335
|
-
<R, E, A, K>(self: Stream<
|
|
1337
|
+
}): <R, E>(self: Stream<A, E, R>) => GroupBy.GroupBy<R, E, K, A>;
|
|
1338
|
+
<R, E, A, K>(self: Stream<A, E, R>, f: (a: A) => K, options?: {
|
|
1336
1339
|
readonly bufferSize?: number | undefined;
|
|
1337
1340
|
}): GroupBy.GroupBy<R, E, K, A>;
|
|
1338
1341
|
};
|
|
@@ -1343,8 +1346,8 @@ export declare const groupByKey: {
|
|
|
1343
1346
|
* @category utils
|
|
1344
1347
|
*/
|
|
1345
1348
|
export declare const grouped: {
|
|
1346
|
-
(chunkSize: number): <
|
|
1347
|
-
<
|
|
1349
|
+
(chunkSize: number): <A, E, R>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R>;
|
|
1350
|
+
<A, E, R>(self: Stream<A, E, R>, chunkSize: number): Stream<Chunk.Chunk<A>, E, R>;
|
|
1348
1351
|
};
|
|
1349
1352
|
/**
|
|
1350
1353
|
* Partitions the stream with the specified `chunkSize` or until the specified
|
|
@@ -1354,8 +1357,8 @@ export declare const grouped: {
|
|
|
1354
1357
|
* @category utils
|
|
1355
1358
|
*/
|
|
1356
1359
|
export declare const groupedWithin: {
|
|
1357
|
-
(chunkSize: number, duration: Duration.DurationInput): <
|
|
1358
|
-
<
|
|
1360
|
+
(chunkSize: number, duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R>;
|
|
1361
|
+
<A, E, R>(self: Stream<A, E, R>, chunkSize: number, duration: Duration.DurationInput): Stream<Chunk.Chunk<A>, E, R>;
|
|
1359
1362
|
};
|
|
1360
1363
|
/**
|
|
1361
1364
|
* Specialized version of haltWhen which halts the evaluation of this stream
|
|
@@ -1368,8 +1371,8 @@ export declare const groupedWithin: {
|
|
|
1368
1371
|
* @category utils
|
|
1369
1372
|
*/
|
|
1370
1373
|
export declare const haltAfter: {
|
|
1371
|
-
(duration: Duration.DurationInput): <
|
|
1372
|
-
<
|
|
1374
|
+
(duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
1375
|
+
<A, E, R>(self: Stream<A, E, R>, duration: Duration.DurationInput): Stream<A, E, R>;
|
|
1373
1376
|
};
|
|
1374
1377
|
/**
|
|
1375
1378
|
* Halts the evaluation of this stream when the provided effect completes. The
|
|
@@ -1385,8 +1388,8 @@ export declare const haltAfter: {
|
|
|
1385
1388
|
* @category utils
|
|
1386
1389
|
*/
|
|
1387
1390
|
export declare const haltWhen: {
|
|
1388
|
-
<R2, E2, _>(effect: Effect.Effect<
|
|
1389
|
-
<R, E, A, R2, E2, _>(self: Stream<
|
|
1391
|
+
<R2, E2, _>(effect: Effect.Effect<_, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
1392
|
+
<R, E, A, R2, E2, _>(self: Stream<A, E, R>, effect: Effect.Effect<_, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
1390
1393
|
};
|
|
1391
1394
|
/**
|
|
1392
1395
|
* Halts the evaluation of this stream when the provided promise resolves.
|
|
@@ -1397,8 +1400,8 @@ export declare const haltWhen: {
|
|
|
1397
1400
|
* @category utils
|
|
1398
1401
|
*/
|
|
1399
1402
|
export declare const haltWhenDeferred: {
|
|
1400
|
-
<E2, _>(deferred: Deferred.Deferred<
|
|
1401
|
-
<R, E, A, E2, _>(self: Stream<
|
|
1403
|
+
<E2, _>(deferred: Deferred.Deferred<_, E2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R>;
|
|
1404
|
+
<R, E, A, E2, _>(self: Stream<A, E, R>, deferred: Deferred.Deferred<_, E2>): Stream<A, E | E2, R>;
|
|
1402
1405
|
};
|
|
1403
1406
|
/**
|
|
1404
1407
|
* The identity pipeline, which does not modify streams in any way.
|
|
@@ -1406,7 +1409,7 @@ export declare const haltWhenDeferred: {
|
|
|
1406
1409
|
* @since 2.0.0
|
|
1407
1410
|
* @category utils
|
|
1408
1411
|
*/
|
|
1409
|
-
export declare const identity: <
|
|
1412
|
+
export declare const identity: <A, E = never, R = never>() => Stream<A, E, R>;
|
|
1410
1413
|
/**
|
|
1411
1414
|
* Interleaves this stream and the specified stream deterministically by
|
|
1412
1415
|
* alternating pulling values from this stream and the specified stream. When
|
|
@@ -1417,8 +1420,8 @@ export declare const identity: <R, E, A>() => Stream<R, E, A>;
|
|
|
1417
1420
|
* @category utils
|
|
1418
1421
|
*/
|
|
1419
1422
|
export declare const interleave: {
|
|
1420
|
-
<R2, E2, A2>(that: Stream<
|
|
1421
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
1423
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E, R2 | R>;
|
|
1424
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A | A2, E | E2, R | R2>;
|
|
1422
1425
|
};
|
|
1423
1426
|
/**
|
|
1424
1427
|
* Combines this stream and the specified stream deterministically using the
|
|
@@ -1433,8 +1436,8 @@ export declare const interleave: {
|
|
|
1433
1436
|
* @category utils
|
|
1434
1437
|
*/
|
|
1435
1438
|
export declare const interleaveWith: {
|
|
1436
|
-
<R2, E2, A2, R3, E3>(that: Stream<
|
|
1437
|
-
<R, E, A, R2, E2, A2, R3, E3>(self: Stream<
|
|
1439
|
+
<R2, E2, A2, R3, E3>(that: Stream<A2, E2, R2>, decider: Stream<boolean, E3, R3>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E3 | E, R2 | R3 | R>;
|
|
1440
|
+
<R, E, A, R2, E2, A2, R3, E3>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, decider: Stream<boolean, E3, R3>): Stream<A | A2, E | E2 | E3, R | R2 | R3>;
|
|
1438
1441
|
};
|
|
1439
1442
|
/**
|
|
1440
1443
|
* Intersperse stream with provided `element`.
|
|
@@ -1443,8 +1446,8 @@ export declare const interleaveWith: {
|
|
|
1443
1446
|
* @category utils
|
|
1444
1447
|
*/
|
|
1445
1448
|
export declare const intersperse: {
|
|
1446
|
-
<A2>(element: A2): <
|
|
1447
|
-
<R, E, A, A2>(self: Stream<
|
|
1449
|
+
<A2>(element: A2): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E, R>;
|
|
1450
|
+
<R, E, A, A2>(self: Stream<A, E, R>, element: A2): Stream<A | A2, E, R>;
|
|
1448
1451
|
};
|
|
1449
1452
|
/**
|
|
1450
1453
|
* Intersperse the specified element, also adding a prefix and a suffix.
|
|
@@ -1457,12 +1460,12 @@ export declare const intersperseAffixes: {
|
|
|
1457
1460
|
readonly start: A2;
|
|
1458
1461
|
readonly middle: A3;
|
|
1459
1462
|
readonly end: A4;
|
|
1460
|
-
}): <
|
|
1461
|
-
<R, E, A, A2, A3, A4>(self: Stream<
|
|
1463
|
+
}): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A3 | A4 | A, E, R>;
|
|
1464
|
+
<R, E, A, A2, A3, A4>(self: Stream<A, E, R>, options: {
|
|
1462
1465
|
readonly start: A2;
|
|
1463
1466
|
readonly middle: A3;
|
|
1464
1467
|
readonly end: A4;
|
|
1465
|
-
}): Stream<
|
|
1468
|
+
}): Stream<A | A2 | A3 | A4, E, R>;
|
|
1466
1469
|
};
|
|
1467
1470
|
/**
|
|
1468
1471
|
* Specialized version of `Stream.interruptWhen` which interrupts the
|
|
@@ -1472,8 +1475,8 @@ export declare const intersperseAffixes: {
|
|
|
1472
1475
|
* @category utils
|
|
1473
1476
|
*/
|
|
1474
1477
|
export declare const interruptAfter: {
|
|
1475
|
-
(duration: Duration.DurationInput): <
|
|
1476
|
-
<
|
|
1478
|
+
(duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
1479
|
+
<A, E, R>(self: Stream<A, E, R>, duration: Duration.DurationInput): Stream<A, E, R>;
|
|
1477
1480
|
};
|
|
1478
1481
|
/**
|
|
1479
1482
|
* Interrupts the evaluation of this stream when the provided effect
|
|
@@ -1488,8 +1491,8 @@ export declare const interruptAfter: {
|
|
|
1488
1491
|
* @category utils
|
|
1489
1492
|
*/
|
|
1490
1493
|
export declare const interruptWhen: {
|
|
1491
|
-
<R2, E2, _>(effect: Effect.Effect<
|
|
1492
|
-
<R, E, A, R2, E2, _>(self: Stream<
|
|
1494
|
+
<R2, E2, _>(effect: Effect.Effect<_, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
1495
|
+
<R, E, A, R2, E2, _>(self: Stream<A, E, R>, effect: Effect.Effect<_, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
1493
1496
|
};
|
|
1494
1497
|
/**
|
|
1495
1498
|
* Interrupts the evaluation of this stream when the provided promise
|
|
@@ -1502,8 +1505,8 @@ export declare const interruptWhen: {
|
|
|
1502
1505
|
* @category utils
|
|
1503
1506
|
*/
|
|
1504
1507
|
export declare const interruptWhenDeferred: {
|
|
1505
|
-
<E2, _>(deferred: Deferred.Deferred<
|
|
1506
|
-
<R, E, A, E2, _>(self: Stream<
|
|
1508
|
+
<E2, _>(deferred: Deferred.Deferred<_, E2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R>;
|
|
1509
|
+
<R, E, A, E2, _>(self: Stream<A, E, R>, deferred: Deferred.Deferred<_, E2>): Stream<A, E | E2, R>;
|
|
1507
1510
|
};
|
|
1508
1511
|
/**
|
|
1509
1512
|
* The infinite stream of iterative function application: a, f(a), f(f(a)),
|
|
@@ -1512,14 +1515,14 @@ export declare const interruptWhenDeferred: {
|
|
|
1512
1515
|
* @since 2.0.0
|
|
1513
1516
|
* @category constructors
|
|
1514
1517
|
*/
|
|
1515
|
-
export declare const iterate: <A>(value: A, next: (value: A) => A) => Stream<
|
|
1518
|
+
export declare const iterate: <A>(value: A, next: (value: A) => A) => Stream<A>;
|
|
1516
1519
|
/**
|
|
1517
1520
|
* Creates a stream from an sequence of values.
|
|
1518
1521
|
*
|
|
1519
1522
|
* @since 2.0.0
|
|
1520
1523
|
* @category constructors
|
|
1521
1524
|
*/
|
|
1522
|
-
export declare const make: <As extends Array<any>>(...as: As) => Stream<
|
|
1525
|
+
export declare const make: <As extends Array<any>>(...as: As) => Stream<As[number]>;
|
|
1523
1526
|
/**
|
|
1524
1527
|
* Transforms the elements of this stream using the supplied function.
|
|
1525
1528
|
*
|
|
@@ -1527,8 +1530,8 @@ export declare const make: <As extends Array<any>>(...as: As) => Stream<never, n
|
|
|
1527
1530
|
* @category mapping
|
|
1528
1531
|
*/
|
|
1529
1532
|
export declare const map: {
|
|
1530
|
-
<A, B>(f: (a: A) => B): <R, E>(self: Stream<
|
|
1531
|
-
<R, E, A, B>(self: Stream<
|
|
1533
|
+
<A, B>(f: (a: A) => B): <R, E>(self: Stream<A, E, R>) => Stream<B, E, R>;
|
|
1534
|
+
<R, E, A, B>(self: Stream<A, E, R>, f: (a: A) => B): Stream<B, E, R>;
|
|
1532
1535
|
};
|
|
1533
1536
|
/**
|
|
1534
1537
|
* Statefully maps over the elements of this stream to produce new elements.
|
|
@@ -1537,8 +1540,8 @@ export declare const map: {
|
|
|
1537
1540
|
* @category mapping
|
|
1538
1541
|
*/
|
|
1539
1542
|
export declare const mapAccum: {
|
|
1540
|
-
<S, A, A2>(s: S, f: (s: S, a: A) => readonly [S, A2]): <R, E>(self: Stream<
|
|
1541
|
-
<R, E, S, A, A2>(self: Stream<
|
|
1543
|
+
<S, A, A2>(s: S, f: (s: S, a: A) => readonly [S, A2]): <R, E>(self: Stream<A, E, R>) => Stream<A2, E, R>;
|
|
1544
|
+
<R, E, S, A, A2>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => readonly [S, A2]): Stream<A2, E, R>;
|
|
1542
1545
|
};
|
|
1543
1546
|
/**
|
|
1544
1547
|
* Statefully and effectfully maps over the elements of this stream to produce
|
|
@@ -1548,8 +1551,8 @@ export declare const mapAccum: {
|
|
|
1548
1551
|
* @category mapping
|
|
1549
1552
|
*/
|
|
1550
1553
|
export declare const mapAccumEffect: {
|
|
1551
|
-
<S, A,
|
|
1552
|
-
<R, E,
|
|
1554
|
+
<S, A, A2, E2, R2>(s: S, f: (s: S, a: A) => Effect.Effect<readonly [S, A2], E2, R2>): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
1555
|
+
<R, E, A, S, A2, E2, R2>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => Effect.Effect<readonly [S, A2], E2, R2>): Stream<A2, E | E2, R | R2>;
|
|
1553
1556
|
};
|
|
1554
1557
|
/**
|
|
1555
1558
|
* Returns a stream whose failure and success channels have been mapped by the
|
|
@@ -1562,11 +1565,11 @@ export declare const mapBoth: {
|
|
|
1562
1565
|
<E, E2, A, A2>(options: {
|
|
1563
1566
|
readonly onFailure: (e: E) => E2;
|
|
1564
1567
|
readonly onSuccess: (a: A) => A2;
|
|
1565
|
-
}): <R>(self: Stream<
|
|
1566
|
-
<R, E, E2, A, A2>(self: Stream<
|
|
1568
|
+
}): <R>(self: Stream<A, E, R>) => Stream<A2, E2, R>;
|
|
1569
|
+
<R, E, E2, A, A2>(self: Stream<A, E, R>, options: {
|
|
1567
1570
|
readonly onFailure: (e: E) => E2;
|
|
1568
1571
|
readonly onSuccess: (a: A) => A2;
|
|
1569
|
-
}): Stream<
|
|
1572
|
+
}): Stream<A2, E2, R>;
|
|
1570
1573
|
};
|
|
1571
1574
|
/**
|
|
1572
1575
|
* Transforms the chunks emitted by this stream.
|
|
@@ -1575,8 +1578,8 @@ export declare const mapBoth: {
|
|
|
1575
1578
|
* @category mapping
|
|
1576
1579
|
*/
|
|
1577
1580
|
export declare const mapChunks: {
|
|
1578
|
-
<A, B>(f: (chunk: Chunk.Chunk<A>) => Chunk.Chunk<B>): <
|
|
1579
|
-
<R, E, A, B>(self: Stream<
|
|
1581
|
+
<A, B>(f: (chunk: Chunk.Chunk<A>) => Chunk.Chunk<B>): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>;
|
|
1582
|
+
<R, E, A, B>(self: Stream<A, E, R>, f: (chunk: Chunk.Chunk<A>) => Chunk.Chunk<B>): Stream<B, E, R>;
|
|
1580
1583
|
};
|
|
1581
1584
|
/**
|
|
1582
1585
|
* Effectfully transforms the chunks emitted by this stream.
|
|
@@ -1585,8 +1588,8 @@ export declare const mapChunks: {
|
|
|
1585
1588
|
* @category mapping
|
|
1586
1589
|
*/
|
|
1587
1590
|
export declare const mapChunksEffect: {
|
|
1588
|
-
<A, R2, E2, B>(f: (chunk: Chunk.Chunk<A>) => Effect.Effect<
|
|
1589
|
-
<R, E, A, R2, E2, B>(self: Stream<
|
|
1591
|
+
<A, R2, E2, B>(f: (chunk: Chunk.Chunk<A>) => Effect.Effect<Chunk.Chunk<B>, E2, R2>): <R, E>(self: Stream<A, E, R>) => Stream<B, E2 | E, R2 | R>;
|
|
1592
|
+
<R, E, A, R2, E2, B>(self: Stream<A, E, R>, f: (chunk: Chunk.Chunk<A>) => Effect.Effect<Chunk.Chunk<B>, E2, R2>): Stream<B, E | E2, R | R2>;
|
|
1590
1593
|
};
|
|
1591
1594
|
/**
|
|
1592
1595
|
* Maps each element to an iterable, and flattens the iterables into the
|
|
@@ -1596,8 +1599,8 @@ export declare const mapChunksEffect: {
|
|
|
1596
1599
|
* @category mapping
|
|
1597
1600
|
*/
|
|
1598
1601
|
export declare const mapConcat: {
|
|
1599
|
-
<A, A2>(f: (a: A) => Iterable<A2>): <R, E>(self: Stream<
|
|
1600
|
-
<R, E, A, A2>(self: Stream<
|
|
1602
|
+
<A, A2>(f: (a: A) => Iterable<A2>): <R, E>(self: Stream<A, E, R>) => Stream<A2, E, R>;
|
|
1603
|
+
<R, E, A, A2>(self: Stream<A, E, R>, f: (a: A) => Iterable<A2>): Stream<A2, E, R>;
|
|
1601
1604
|
};
|
|
1602
1605
|
/**
|
|
1603
1606
|
* Maps each element to a chunk, and flattens the chunks into the output of
|
|
@@ -1607,8 +1610,8 @@ export declare const mapConcat: {
|
|
|
1607
1610
|
* @category mapping
|
|
1608
1611
|
*/
|
|
1609
1612
|
export declare const mapConcatChunk: {
|
|
1610
|
-
<A, A2>(f: (a: A) => Chunk.Chunk<A2>): <R, E>(self: Stream<
|
|
1611
|
-
<R, E, A, A2>(self: Stream<
|
|
1613
|
+
<A, A2>(f: (a: A) => Chunk.Chunk<A2>): <R, E>(self: Stream<A, E, R>) => Stream<A2, E, R>;
|
|
1614
|
+
<R, E, A, A2>(self: Stream<A, E, R>, f: (a: A) => Chunk.Chunk<A2>): Stream<A2, E, R>;
|
|
1612
1615
|
};
|
|
1613
1616
|
/**
|
|
1614
1617
|
* Effectfully maps each element to a chunk, and flattens the chunks into the
|
|
@@ -1618,8 +1621,8 @@ export declare const mapConcatChunk: {
|
|
|
1618
1621
|
* @category mapping
|
|
1619
1622
|
*/
|
|
1620
1623
|
export declare const mapConcatChunkEffect: {
|
|
1621
|
-
<A, R2, E2, A2>(f: (a: A) => Effect.Effect<
|
|
1622
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
1624
|
+
<A, R2, E2, A2>(f: (a: A) => Effect.Effect<Chunk.Chunk<A2>, E2, R2>): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
1625
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<Chunk.Chunk<A2>, E2, R2>): Stream<A2, E | E2, R | R2>;
|
|
1623
1626
|
};
|
|
1624
1627
|
/**
|
|
1625
1628
|
* Effectfully maps each element to an iterable, and flattens the iterables
|
|
@@ -1629,8 +1632,8 @@ export declare const mapConcatChunkEffect: {
|
|
|
1629
1632
|
* @category mapping
|
|
1630
1633
|
*/
|
|
1631
1634
|
export declare const mapConcatEffect: {
|
|
1632
|
-
<A, R2, E2, A2>(f: (a: A) => Effect.Effect<
|
|
1633
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
1635
|
+
<A, R2, E2, A2>(f: (a: A) => Effect.Effect<Iterable<A2>, E2, R2>): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
1636
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<Iterable<A2>, E2, R2>): Stream<A2, E | E2, R | R2>;
|
|
1634
1637
|
};
|
|
1635
1638
|
/**
|
|
1636
1639
|
* Maps over elements of the stream with the specified effectful function.
|
|
@@ -1639,22 +1642,22 @@ export declare const mapConcatEffect: {
|
|
|
1639
1642
|
* @category mapping
|
|
1640
1643
|
*/
|
|
1641
1644
|
export declare const mapEffect: {
|
|
1642
|
-
<A, R2, E2, A2>(f: (a: A) => Effect.Effect<
|
|
1645
|
+
<A, R2, E2, A2>(f: (a: A) => Effect.Effect<A2, E2, R2>, options?: {
|
|
1643
1646
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
1644
1647
|
readonly unordered?: boolean | undefined;
|
|
1645
|
-
}): <R, E>(self: Stream<
|
|
1646
|
-
<A, R2, E2, A2, K>(f: (a: A) => Effect.Effect<
|
|
1648
|
+
} | undefined): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
1649
|
+
<A, R2, E2, A2, K>(f: (a: A) => Effect.Effect<A2, E2, R2>, options: {
|
|
1647
1650
|
readonly key: (a: A) => K;
|
|
1648
1651
|
readonly bufferSize?: number | undefined;
|
|
1649
|
-
}): <R, E>(self: Stream<
|
|
1650
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
1652
|
+
}): <R, E>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
1653
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<A2, E2, R2>, options?: {
|
|
1651
1654
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
1652
1655
|
readonly unordered?: boolean | undefined;
|
|
1653
|
-
}): Stream<
|
|
1654
|
-
<R, E, A, R2, E2, A2, K>(self: Stream<
|
|
1656
|
+
} | undefined): Stream<A2, E | E2, R | R2>;
|
|
1657
|
+
<R, E, A, R2, E2, A2, K>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<A2, E2, R2>, options: {
|
|
1655
1658
|
readonly key: (a: A) => K;
|
|
1656
1659
|
readonly bufferSize?: number | undefined;
|
|
1657
|
-
}): Stream<
|
|
1660
|
+
}): Stream<A2, E | E2, R | R2>;
|
|
1658
1661
|
};
|
|
1659
1662
|
/**
|
|
1660
1663
|
* Transforms the errors emitted by this stream using `f`.
|
|
@@ -1663,8 +1666,8 @@ export declare const mapEffect: {
|
|
|
1663
1666
|
* @category mapping
|
|
1664
1667
|
*/
|
|
1665
1668
|
export declare const mapError: {
|
|
1666
|
-
<E, E2>(f: (error: E) => E2): <R, A>(self: Stream<
|
|
1667
|
-
<R, A, E, E2>(self: Stream<
|
|
1669
|
+
<E, E2>(f: (error: E) => E2): <R, A>(self: Stream<A, E, R>) => Stream<A, E2, R>;
|
|
1670
|
+
<R, A, E, E2>(self: Stream<A, E, R>, f: (error: E) => E2): Stream<A, E2, R>;
|
|
1668
1671
|
};
|
|
1669
1672
|
/**
|
|
1670
1673
|
* Transforms the full causes of failures emitted by this stream.
|
|
@@ -1673,8 +1676,8 @@ export declare const mapError: {
|
|
|
1673
1676
|
* @category mapping
|
|
1674
1677
|
*/
|
|
1675
1678
|
export declare const mapErrorCause: {
|
|
1676
|
-
<E, E2>(f: (cause: Cause.Cause<E>) => Cause.Cause<E2>): <R, A>(self: Stream<
|
|
1677
|
-
<R, A, E, E2>(self: Stream<
|
|
1679
|
+
<E, E2>(f: (cause: Cause.Cause<E>) => Cause.Cause<E2>): <R, A>(self: Stream<A, E, R>) => Stream<A, E2, R>;
|
|
1680
|
+
<R, A, E, E2>(self: Stream<A, E, R>, f: (cause: Cause.Cause<E>) => Cause.Cause<E2>): Stream<A, E2, R>;
|
|
1678
1681
|
};
|
|
1679
1682
|
/**
|
|
1680
1683
|
* Merges this stream and the specified stream together.
|
|
@@ -1686,12 +1689,12 @@ export declare const mapErrorCause: {
|
|
|
1686
1689
|
* @category utils
|
|
1687
1690
|
*/
|
|
1688
1691
|
export declare const merge: {
|
|
1689
|
-
<R2, E2, A2>(that: Stream<
|
|
1692
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>, options?: {
|
|
1690
1693
|
readonly haltStrategy?: HaltStrategy.HaltStrategyInput | undefined;
|
|
1691
|
-
}): <
|
|
1692
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
1694
|
+
} | undefined): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E, R2 | R>;
|
|
1695
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, options?: {
|
|
1693
1696
|
readonly haltStrategy?: HaltStrategy.HaltStrategyInput | undefined;
|
|
1694
|
-
}): Stream<
|
|
1697
|
+
} | undefined): Stream<A | A2, E | E2, R | R2>;
|
|
1695
1698
|
};
|
|
1696
1699
|
/**
|
|
1697
1700
|
* Merges a variable list of streams in a non-deterministic fashion. Up to `n`
|
|
@@ -1705,11 +1708,11 @@ export declare const mergeAll: {
|
|
|
1705
1708
|
(options: {
|
|
1706
1709
|
readonly concurrency: number | "unbounded";
|
|
1707
1710
|
readonly bufferSize?: number | undefined;
|
|
1708
|
-
}): <
|
|
1709
|
-
<
|
|
1711
|
+
}): <A, E, R>(streams: Iterable<Stream<A, E, R>>) => Stream<A, E, R>;
|
|
1712
|
+
<A, E, R>(streams: Iterable<Stream<A, E, R>>, options: {
|
|
1710
1713
|
readonly concurrency: number | "unbounded";
|
|
1711
1714
|
readonly bufferSize?: number | undefined;
|
|
1712
|
-
}): Stream<
|
|
1715
|
+
}): Stream<A, E, R>;
|
|
1713
1716
|
};
|
|
1714
1717
|
/**
|
|
1715
1718
|
* Merges this stream and the specified stream together to a common element
|
|
@@ -1722,16 +1725,16 @@ export declare const mergeAll: {
|
|
|
1722
1725
|
* @category utils
|
|
1723
1726
|
*/
|
|
1724
1727
|
export declare const mergeWith: {
|
|
1725
|
-
<R2, E2, A2, A, A3, A4>(other: Stream<
|
|
1728
|
+
<R2, E2, A2, A, A3, A4>(other: Stream<A2, E2, R2>, options: {
|
|
1726
1729
|
readonly onSelf: (a: A) => A3;
|
|
1727
1730
|
readonly onOther: (a2: A2) => A4;
|
|
1728
1731
|
readonly haltStrategy?: HaltStrategy.HaltStrategyInput | undefined;
|
|
1729
|
-
}): <R, E>(self: Stream<
|
|
1730
|
-
<R, E, R2, E2, A2, A, A3, A4>(self: Stream<
|
|
1732
|
+
}): <R, E>(self: Stream<A, E, R>) => Stream<A3 | A4, E2 | E, R2 | R>;
|
|
1733
|
+
<R, E, R2, E2, A2, A, A3, A4>(self: Stream<A, E, R>, other: Stream<A2, E2, R2>, options: {
|
|
1731
1734
|
readonly onSelf: (a: A) => A3;
|
|
1732
1735
|
readonly onOther: (a2: A2) => A4;
|
|
1733
1736
|
readonly haltStrategy?: HaltStrategy.HaltStrategyInput | undefined;
|
|
1734
|
-
}): Stream<
|
|
1737
|
+
}): Stream<A3 | A4, E | E2, R | R2>;
|
|
1735
1738
|
};
|
|
1736
1739
|
/**
|
|
1737
1740
|
* Merges this stream and the specified stream together to produce a stream of
|
|
@@ -1741,8 +1744,8 @@ export declare const mergeWith: {
|
|
|
1741
1744
|
* @category utils
|
|
1742
1745
|
*/
|
|
1743
1746
|
export declare const mergeEither: {
|
|
1744
|
-
<R2, E2, A2>(that: Stream<
|
|
1745
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
1747
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<Either.Either<A, A2>, E2 | E, R2 | R>;
|
|
1748
|
+
<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>;
|
|
1746
1749
|
};
|
|
1747
1750
|
/**
|
|
1748
1751
|
* Merges this stream and the specified stream together, discarding the values
|
|
@@ -1752,8 +1755,8 @@ export declare const mergeEither: {
|
|
|
1752
1755
|
* @category utils
|
|
1753
1756
|
*/
|
|
1754
1757
|
export declare const mergeLeft: {
|
|
1755
|
-
<R2, E2, A2>(that: Stream<
|
|
1756
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
1758
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
1759
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
1757
1760
|
};
|
|
1758
1761
|
/**
|
|
1759
1762
|
* Merges this stream and the specified stream together, discarding the values
|
|
@@ -1763,8 +1766,8 @@ export declare const mergeLeft: {
|
|
|
1763
1766
|
* @category utils
|
|
1764
1767
|
*/
|
|
1765
1768
|
export declare const mergeRight: {
|
|
1766
|
-
<R2, E2, A2>(that: Stream<
|
|
1767
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
1769
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
1770
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A2, E | E2, R | R2>;
|
|
1768
1771
|
};
|
|
1769
1772
|
/**
|
|
1770
1773
|
* Returns a combined string resulting from concatenating each of the values
|
|
@@ -1773,14 +1776,14 @@ export declare const mergeRight: {
|
|
|
1773
1776
|
* @since 2.0.0
|
|
1774
1777
|
* @category utils
|
|
1775
1778
|
*/
|
|
1776
|
-
export declare const mkString: <R, E>(self: Stream<
|
|
1779
|
+
export declare const mkString: <R, E>(self: Stream<string, E, R>) => Effect.Effect<string, E, R>;
|
|
1777
1780
|
/**
|
|
1778
1781
|
* The stream that never produces any value or fails with any error.
|
|
1779
1782
|
*
|
|
1780
1783
|
* @since 2.0.0
|
|
1781
1784
|
* @category constructors
|
|
1782
1785
|
*/
|
|
1783
|
-
export declare const never: Stream<never
|
|
1786
|
+
export declare const never: Stream<never>;
|
|
1784
1787
|
/**
|
|
1785
1788
|
* Runs the specified effect if this stream fails, providing the error to the
|
|
1786
1789
|
* effect if it exists.
|
|
@@ -1792,8 +1795,8 @@ export declare const never: Stream<never, never, never>;
|
|
|
1792
1795
|
* @category utils
|
|
1793
1796
|
*/
|
|
1794
1797
|
export declare const onError: {
|
|
1795
|
-
<E, R2, _>(cleanup: (cause: Cause.Cause<E>) => Effect.Effect<
|
|
1796
|
-
<R, A, E, R2, _>(self: Stream<
|
|
1798
|
+
<E, R2, _>(cleanup: (cause: Cause.Cause<E>) => Effect.Effect<_, never, R2>): <R, A>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>;
|
|
1799
|
+
<R, A, E, R2, _>(self: Stream<A, E, R>, cleanup: (cause: Cause.Cause<E>) => Effect.Effect<_, never, R2>): Stream<A, E, R | R2>;
|
|
1797
1800
|
};
|
|
1798
1801
|
/**
|
|
1799
1802
|
* Runs the specified effect if this stream ends.
|
|
@@ -1802,8 +1805,8 @@ export declare const onError: {
|
|
|
1802
1805
|
* @category utils
|
|
1803
1806
|
*/
|
|
1804
1807
|
export declare const onDone: {
|
|
1805
|
-
<R2, _>(cleanup: () => Effect.Effect<
|
|
1806
|
-
<R, E, A, R2, _>(self: Stream<
|
|
1808
|
+
<R2, _>(cleanup: () => Effect.Effect<_, never, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>;
|
|
1809
|
+
<R, E, A, R2, _>(self: Stream<A, E, R>, cleanup: () => Effect.Effect<_, never, R2>): Stream<A, E, R | R2>;
|
|
1807
1810
|
};
|
|
1808
1811
|
/**
|
|
1809
1812
|
* Translates any failure into a stream termination, making the stream
|
|
@@ -1812,7 +1815,7 @@ export declare const onDone: {
|
|
|
1812
1815
|
* @since 2.0.0
|
|
1813
1816
|
* @category error handling
|
|
1814
1817
|
*/
|
|
1815
|
-
export declare const orDie: <
|
|
1818
|
+
export declare const orDie: <A, E, R>(self: Stream<A, E, R>) => Stream<A, never, R>;
|
|
1816
1819
|
/**
|
|
1817
1820
|
* Keeps none of the errors, and terminates the stream with them, using the
|
|
1818
1821
|
* specified function to convert the `E` into a defect.
|
|
@@ -1821,8 +1824,8 @@ export declare const orDie: <R, E, A>(self: Stream<R, E, A>) => Stream<R, never,
|
|
|
1821
1824
|
* @category error handling
|
|
1822
1825
|
*/
|
|
1823
1826
|
export declare const orDieWith: {
|
|
1824
|
-
<E>(f: (e: E) => unknown): <R, A>(self: Stream<
|
|
1825
|
-
<R, A, E>(self: Stream<
|
|
1827
|
+
<E>(f: (e: E) => unknown): <R, A>(self: Stream<A, E, R>) => Stream<A, never, R>;
|
|
1828
|
+
<R, A, E>(self: Stream<A, E, R>, f: (e: E) => unknown): Stream<A, never, R>;
|
|
1826
1829
|
};
|
|
1827
1830
|
/**
|
|
1828
1831
|
* Switches to the provided stream in case this one fails with a typed error.
|
|
@@ -1833,8 +1836,8 @@ export declare const orDieWith: {
|
|
|
1833
1836
|
* @category error handling
|
|
1834
1837
|
*/
|
|
1835
1838
|
export declare const orElse: {
|
|
1836
|
-
<R2, E2, A2>(that: LazyArg<Stream<
|
|
1837
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
1839
|
+
<R2, E2, A2>(that: LazyArg<Stream<A2, E2, R2>>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2, R2 | R>;
|
|
1840
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: LazyArg<Stream<A2, E2, R2>>): Stream<A | A2, E2, R | R2>;
|
|
1838
1841
|
};
|
|
1839
1842
|
/**
|
|
1840
1843
|
* Switches to the provided stream in case this one fails with a typed error.
|
|
@@ -1845,8 +1848,8 @@ export declare const orElse: {
|
|
|
1845
1848
|
* @category error handling
|
|
1846
1849
|
*/
|
|
1847
1850
|
export declare const orElseEither: {
|
|
1848
|
-
<R2, E2, A2>(that: LazyArg<Stream<
|
|
1849
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
1851
|
+
<R2, E2, A2>(that: LazyArg<Stream<A2, E2, R2>>): <A, E, R>(self: Stream<A, E, R>) => Stream<Either.Either<A, A2>, E2, R2 | R>;
|
|
1852
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: LazyArg<Stream<A2, E2, R2>>): Stream<Either.Either<A, A2>, E2, R | R2>;
|
|
1850
1853
|
};
|
|
1851
1854
|
/**
|
|
1852
1855
|
* Fails with given error in case this one fails with a typed error.
|
|
@@ -1857,8 +1860,8 @@ export declare const orElseEither: {
|
|
|
1857
1860
|
* @category error handling
|
|
1858
1861
|
*/
|
|
1859
1862
|
export declare const orElseFail: {
|
|
1860
|
-
<E2>(error: LazyArg<E2>): <
|
|
1861
|
-
<R, E, A, E2>(self: Stream<
|
|
1863
|
+
<E2>(error: LazyArg<E2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2, R>;
|
|
1864
|
+
<R, E, A, E2>(self: Stream<A, E, R>, error: LazyArg<E2>): Stream<A, E2, R>;
|
|
1862
1865
|
};
|
|
1863
1866
|
/**
|
|
1864
1867
|
* Produces the specified element if this stream is empty.
|
|
@@ -1867,8 +1870,8 @@ export declare const orElseFail: {
|
|
|
1867
1870
|
* @category error handling
|
|
1868
1871
|
*/
|
|
1869
1872
|
export declare const orElseIfEmpty: {
|
|
1870
|
-
<A2>(element: LazyArg<A2>): <
|
|
1871
|
-
<R, E, A, A2>(self: Stream<
|
|
1873
|
+
<A2>(element: LazyArg<A2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E, R>;
|
|
1874
|
+
<R, E, A, A2>(self: Stream<A, E, R>, element: LazyArg<A2>): Stream<A | A2, E, R>;
|
|
1872
1875
|
};
|
|
1873
1876
|
/**
|
|
1874
1877
|
* Produces the specified chunk if this stream is empty.
|
|
@@ -1877,8 +1880,8 @@ export declare const orElseIfEmpty: {
|
|
|
1877
1880
|
* @category error handling
|
|
1878
1881
|
*/
|
|
1879
1882
|
export declare const orElseIfEmptyChunk: {
|
|
1880
|
-
<A2>(chunk: LazyArg<Chunk.Chunk<A2>>): <
|
|
1881
|
-
<R, E, A, A2>(self: Stream<
|
|
1883
|
+
<A2>(chunk: LazyArg<Chunk.Chunk<A2>>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E, R>;
|
|
1884
|
+
<R, E, A, A2>(self: Stream<A, E, R>, chunk: LazyArg<Chunk.Chunk<A2>>): Stream<A | A2, E, R>;
|
|
1882
1885
|
};
|
|
1883
1886
|
/**
|
|
1884
1887
|
* Switches to the provided stream in case this one is empty.
|
|
@@ -1887,8 +1890,8 @@ export declare const orElseIfEmptyChunk: {
|
|
|
1887
1890
|
* @category error handling
|
|
1888
1891
|
*/
|
|
1889
1892
|
export declare const orElseIfEmptyStream: {
|
|
1890
|
-
<R2, E2, A2>(stream: LazyArg<Stream<
|
|
1891
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
1893
|
+
<R2, E2, A2>(stream: LazyArg<Stream<A2, E2, R2>>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E, R2 | R>;
|
|
1894
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, stream: LazyArg<Stream<A2, E2, R2>>): Stream<A | A2, E | E2, R | R2>;
|
|
1892
1895
|
};
|
|
1893
1896
|
/**
|
|
1894
1897
|
* Succeeds with the specified value if this one fails with a typed error.
|
|
@@ -1897,8 +1900,8 @@ export declare const orElseIfEmptyStream: {
|
|
|
1897
1900
|
* @category error handling
|
|
1898
1901
|
*/
|
|
1899
1902
|
export declare const orElseSucceed: {
|
|
1900
|
-
<A2>(value: LazyArg<A2>): <
|
|
1901
|
-
<R, E, A, A2>(self: Stream<
|
|
1903
|
+
<A2>(value: LazyArg<A2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, never, R>;
|
|
1904
|
+
<R, E, A, A2>(self: Stream<A, E, R>, value: LazyArg<A2>): Stream<A | A2, never, R>;
|
|
1902
1905
|
};
|
|
1903
1906
|
/**
|
|
1904
1907
|
* Like `Stream.unfold`, but allows the emission of values to end one step further
|
|
@@ -1908,7 +1911,7 @@ export declare const orElseSucceed: {
|
|
|
1908
1911
|
* @since 2.0.0
|
|
1909
1912
|
* @category constructors
|
|
1910
1913
|
*/
|
|
1911
|
-
export declare const paginate: <S, A>(s: S, f: (s: S) => readonly [A, Option.Option<S>]) => Stream<
|
|
1914
|
+
export declare const paginate: <S, A>(s: S, f: (s: S) => readonly [A, Option.Option<S>]) => Stream<A>;
|
|
1912
1915
|
/**
|
|
1913
1916
|
* Like `Stream.unfoldChunk`, but allows the emission of values to end one step
|
|
1914
1917
|
* further than the unfolding of the state. This is useful for embedding
|
|
@@ -1917,7 +1920,7 @@ export declare const paginate: <S, A>(s: S, f: (s: S) => readonly [A, Option.Opt
|
|
|
1917
1920
|
* @since 2.0.0
|
|
1918
1921
|
* @category constructors
|
|
1919
1922
|
*/
|
|
1920
|
-
export declare const paginateChunk: <S, A>(s: S, f: (s: S) => readonly [Chunk.Chunk<A>, Option.Option<S>]) => Stream<
|
|
1923
|
+
export declare const paginateChunk: <S, A>(s: S, f: (s: S) => readonly [Chunk.Chunk<A>, Option.Option<S>]) => Stream<A>;
|
|
1921
1924
|
/**
|
|
1922
1925
|
* Like `Stream.unfoldChunkEffect`, but allows the emission of values to end one step
|
|
1923
1926
|
* further than the unfolding of the state. This is useful for embedding
|
|
@@ -1926,7 +1929,7 @@ export declare const paginateChunk: <S, A>(s: S, f: (s: S) => readonly [Chunk.Ch
|
|
|
1926
1929
|
* @since 2.0.0
|
|
1927
1930
|
* @category constructors
|
|
1928
1931
|
*/
|
|
1929
|
-
export declare const paginateChunkEffect: <S, R, E, A>(s: S, f: (s: S) => Effect.Effect<
|
|
1932
|
+
export declare const paginateChunkEffect: <S, R, E, A>(s: S, f: (s: S) => Effect.Effect<readonly [Chunk.Chunk<A>, Option.Option<S>], E, R>) => Stream<A, E, R>;
|
|
1930
1933
|
/**
|
|
1931
1934
|
* Like `Stream.unfoldEffect` but allows the emission of values to end one step
|
|
1932
1935
|
* further than the unfolding of the state. This is useful for embedding
|
|
@@ -1935,7 +1938,7 @@ export declare const paginateChunkEffect: <S, R, E, A>(s: S, f: (s: S) => Effect
|
|
|
1935
1938
|
* @since 2.0.0
|
|
1936
1939
|
* @category constructors
|
|
1937
1940
|
*/
|
|
1938
|
-
export declare const paginateEffect: <S, R, E, A>(s: S, f: (s: S) => Effect.Effect<
|
|
1941
|
+
export declare const paginateEffect: <S, R, E, A>(s: S, f: (s: S) => Effect.Effect<readonly [A, Option.Option<S>], E, R>) => Stream<A, E, R>;
|
|
1939
1942
|
/**
|
|
1940
1943
|
* Partition a stream using a predicate. The first stream will contain all
|
|
1941
1944
|
* element evaluated to true and the second one will contain all element
|
|
@@ -1948,16 +1951,16 @@ export declare const paginateEffect: <S, R, E, A>(s: S, f: (s: S) => Effect.Effe
|
|
|
1948
1951
|
export declare const partition: {
|
|
1949
1952
|
<C extends A, B extends A, A = C>(refinement: Refinement<NoInfer<A>, B>, options?: {
|
|
1950
1953
|
bufferSize?: number | undefined;
|
|
1951
|
-
}): <R, E>(self: Stream<
|
|
1954
|
+
} | undefined): <R, E>(self: Stream<C, E, R>) => Effect.Effect<[excluded: Stream<Exclude<C, B>, E>, satisfying: Stream<B, E>], E, Scope.Scope | R>;
|
|
1952
1955
|
<A>(predicate: Predicate<A>, options?: {
|
|
1953
1956
|
bufferSize?: number | undefined;
|
|
1954
|
-
}): <R, E
|
|
1955
|
-
<R, E, A, B extends A>(self: Stream<
|
|
1957
|
+
} | undefined): <R, E>(self: Stream<A, E, R>) => Effect.Effect<[excluded: Stream<A, E>, satisfying: Stream<A, E>], E, Scope.Scope | R>;
|
|
1958
|
+
<R, E, C extends A, B extends A, A = C>(self: Stream<C, E, R>, refinement: Refinement<A, B>, options?: {
|
|
1956
1959
|
bufferSize?: number | undefined;
|
|
1957
|
-
}): Effect.Effect<
|
|
1958
|
-
<
|
|
1960
|
+
} | undefined): Effect.Effect<[excluded: Stream<Exclude<C, B>, E>, satisfying: Stream<B, E>], E, Scope.Scope | R>;
|
|
1961
|
+
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>, options?: {
|
|
1959
1962
|
bufferSize?: number | undefined;
|
|
1960
|
-
}): Effect.Effect<
|
|
1963
|
+
} | undefined): Effect.Effect<[excluded: Stream<A, E>, satisfying: Stream<A, E>], E, Scope.Scope | R>;
|
|
1961
1964
|
};
|
|
1962
1965
|
/**
|
|
1963
1966
|
* Split a stream by an effectful predicate. The faster stream may advance by
|
|
@@ -1967,12 +1970,12 @@ export declare const partition: {
|
|
|
1967
1970
|
* @category utils
|
|
1968
1971
|
*/
|
|
1969
1972
|
export declare const partitionEither: {
|
|
1970
|
-
<A, R2, E2, A2, A3>(predicate: (a: NoInfer<A>) => Effect.Effect<
|
|
1973
|
+
<A, R2, E2, A2, A3>(predicate: (a: NoInfer<A>) => Effect.Effect<Either.Either<A2, A3>, E2, R2>, options?: {
|
|
1971
1974
|
readonly bufferSize?: number | undefined;
|
|
1972
|
-
}): <R, E>(self: Stream<
|
|
1973
|
-
<R, E, A, R2, E2, A2, A3>(self: Stream<
|
|
1975
|
+
} | undefined): <R, E>(self: Stream<A, E, R>) => Effect.Effect<[left: Stream<A2, E2 | E>, right: Stream<A3, E2 | E>], E2 | E, Scope.Scope | R2 | R>;
|
|
1976
|
+
<R, E, A, R2, E2, A2, A3>(self: Stream<A, E, R>, predicate: (a: A) => Effect.Effect<Either.Either<A2, A3>, E2, R2>, options?: {
|
|
1974
1977
|
readonly bufferSize?: number | undefined;
|
|
1975
|
-
}): Effect.Effect<
|
|
1978
|
+
} | undefined): Effect.Effect<[left: Stream<A2, E | E2>, right: Stream<A3, E | E2>], E | E2, Scope.Scope | R | R2>;
|
|
1976
1979
|
};
|
|
1977
1980
|
/**
|
|
1978
1981
|
* Peels off enough material from the stream to construct a `Z` using the
|
|
@@ -1984,8 +1987,8 @@ export declare const partitionEither: {
|
|
|
1984
1987
|
* @category utils
|
|
1985
1988
|
*/
|
|
1986
1989
|
export declare const peel: {
|
|
1987
|
-
<
|
|
1988
|
-
<
|
|
1990
|
+
<A2, A, E2, R2>(sink: Sink.Sink<A2, A, A, E2, R2>): <E, R>(self: Stream<A, E, R>) => Effect.Effect<[A2, Stream<A, E, never>], E2 | E, Scope.Scope | R2 | R>;
|
|
1991
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, sink: Sink.Sink<A2, A, A, E2, R2>): Effect.Effect<[A2, Stream<A, E, never>], E | E2, Scope.Scope | R | R2>;
|
|
1989
1992
|
};
|
|
1990
1993
|
/**
|
|
1991
1994
|
* Pipes all of the values from this stream through the provided sink.
|
|
@@ -1996,8 +1999,8 @@ export declare const peel: {
|
|
|
1996
1999
|
* @category utils
|
|
1997
2000
|
*/
|
|
1998
2001
|
export declare const pipeThrough: {
|
|
1999
|
-
<
|
|
2000
|
-
<
|
|
2002
|
+
<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>;
|
|
2003
|
+
<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>;
|
|
2001
2004
|
};
|
|
2002
2005
|
/**
|
|
2003
2006
|
* Pipes all the values from this stream through the provided channel.
|
|
@@ -2006,8 +2009,8 @@ export declare const pipeThrough: {
|
|
|
2006
2009
|
* @category utils
|
|
2007
2010
|
*/
|
|
2008
2011
|
export declare const pipeThroughChannel: {
|
|
2009
|
-
<R2, E, E2, A, A2>(channel: Channel.Channel<
|
|
2010
|
-
<R, R2, E, E2, A, A2>(self: Stream<
|
|
2012
|
+
<R2, E, E2, A, A2>(channel: Channel.Channel<Chunk.Chunk<A2>, Chunk.Chunk<A>, E2, E, unknown, unknown, R2>): <R>(self: Stream<A, E, R>) => Stream<A2, E2, R2 | R>;
|
|
2013
|
+
<R, R2, E, E2, A, A2>(self: Stream<A, E, R>, channel: Channel.Channel<Chunk.Chunk<A2>, Chunk.Chunk<A>, E2, E, unknown, unknown, R2>): Stream<A2, E2, R | R2>;
|
|
2011
2014
|
};
|
|
2012
2015
|
/**
|
|
2013
2016
|
* Pipes all values from this stream through the provided channel, passing
|
|
@@ -2017,8 +2020,8 @@ export declare const pipeThroughChannel: {
|
|
|
2017
2020
|
* @category utils
|
|
2018
2021
|
*/
|
|
2019
2022
|
export declare const pipeThroughChannelOrFail: {
|
|
2020
|
-
<R2, E, E2, A, A2>(chan: Channel.Channel<
|
|
2021
|
-
<R, R2, E, E2, A, A2>(self: Stream<
|
|
2023
|
+
<R2, E, E2, A, A2>(chan: Channel.Channel<Chunk.Chunk<A2>, Chunk.Chunk<A>, E2, E, unknown, unknown, R2>): <R>(self: Stream<A, E, R>) => Stream<A2, E | E2, R2 | R>;
|
|
2024
|
+
<R, R2, E, E2, A, A2>(self: Stream<A, E, R>, chan: Channel.Channel<Chunk.Chunk<A2>, Chunk.Chunk<A>, E2, E, unknown, unknown, R2>): Stream<A2, E | E2, R | R2>;
|
|
2022
2025
|
};
|
|
2023
2026
|
/**
|
|
2024
2027
|
* Emits the provided chunk before emitting any other value.
|
|
@@ -2027,8 +2030,8 @@ export declare const pipeThroughChannelOrFail: {
|
|
|
2027
2030
|
* @category utils
|
|
2028
2031
|
*/
|
|
2029
2032
|
export declare const prepend: {
|
|
2030
|
-
<B>(values: Chunk.Chunk<B>): <
|
|
2031
|
-
<R, E, A, B>(self: Stream<
|
|
2033
|
+
<B>(values: Chunk.Chunk<B>): <A, E, R>(self: Stream<A, E, R>) => Stream<B | A, E, R>;
|
|
2034
|
+
<R, E, A, B>(self: Stream<A, E, R>, values: Chunk.Chunk<B>): Stream<A | B, E, R>;
|
|
2032
2035
|
};
|
|
2033
2036
|
/**
|
|
2034
2037
|
* Provides the stream with its required context, which eliminates its
|
|
@@ -2038,8 +2041,8 @@ export declare const prepend: {
|
|
|
2038
2041
|
* @category context
|
|
2039
2042
|
*/
|
|
2040
2043
|
export declare const provideContext: {
|
|
2041
|
-
<R>(context: Context.Context<R>): <
|
|
2042
|
-
<
|
|
2044
|
+
<R>(context: Context.Context<R>): <A, E>(self: Stream<A, E, R>) => Stream<A, E>;
|
|
2045
|
+
<A, E, R>(self: Stream<A, E, R>, context: Context.Context<R>): Stream<A, E>;
|
|
2043
2046
|
};
|
|
2044
2047
|
/**
|
|
2045
2048
|
* Provides a `Layer` to the stream, which translates it to another level.
|
|
@@ -2048,8 +2051,8 @@ export declare const provideContext: {
|
|
|
2048
2051
|
* @category context
|
|
2049
2052
|
*/
|
|
2050
2053
|
export declare const provideLayer: {
|
|
2051
|
-
<RIn, E2, ROut>(layer: Layer.Layer<
|
|
2052
|
-
<
|
|
2054
|
+
<RIn, E2, ROut>(layer: Layer.Layer<ROut, E2, RIn>): <A, E>(self: Stream<A, E, ROut>) => Stream<A, E2 | E, RIn>;
|
|
2055
|
+
<A, E, RIn, E2, ROut>(self: Stream<A, E, ROut>, layer: Layer.Layer<ROut, E2, RIn>): Stream<A, E | E2, RIn>;
|
|
2053
2056
|
};
|
|
2054
2057
|
/**
|
|
2055
2058
|
* Provides the stream with the single service it requires. If the stream
|
|
@@ -2059,8 +2062,8 @@ export declare const provideLayer: {
|
|
|
2059
2062
|
* @category context
|
|
2060
2063
|
*/
|
|
2061
2064
|
export declare const provideService: {
|
|
2062
|
-
<T extends Context.Tag<any, any>>(tag: T, resource: Context.Tag.Service<T>): <
|
|
2063
|
-
<R, E, A, T extends Context.Tag<any, any>>(self: Stream<
|
|
2065
|
+
<T extends Context.Tag<any, any>>(tag: T, resource: Context.Tag.Service<T>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, Exclude<R, Context.Tag.Identifier<T>>>;
|
|
2066
|
+
<R, E, A, T extends Context.Tag<any, any>>(self: Stream<A, E, R>, tag: T, resource: Context.Tag.Service<T>): Stream<A, E, Exclude<R, Context.Tag.Identifier<T>>>;
|
|
2064
2067
|
};
|
|
2065
2068
|
/**
|
|
2066
2069
|
* Provides the stream with the single service it requires. If the stream
|
|
@@ -2070,8 +2073,8 @@ export declare const provideService: {
|
|
|
2070
2073
|
* @category context
|
|
2071
2074
|
*/
|
|
2072
2075
|
export declare const provideServiceEffect: {
|
|
2073
|
-
<T extends Context.Tag<any, any>, R2, E2>(tag: T, effect: Effect.Effect<
|
|
2074
|
-
<R, E, A, T extends Context.Tag<any, any>, R2, E2>(self: Stream<
|
|
2076
|
+
<T extends Context.Tag<any, any>, R2, E2>(tag: T, effect: Effect.Effect<Context.Tag.Service<T>, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | Exclude<R, Context.Tag.Identifier<T>>>;
|
|
2077
|
+
<R, E, A, T extends Context.Tag<any, any>, R2, E2>(self: Stream<A, E, R>, tag: T, effect: Effect.Effect<Context.Tag.Service<T>, E2, R2>): Stream<A, E | E2, R2 | Exclude<R, Context.Tag.Identifier<T>>>;
|
|
2075
2078
|
};
|
|
2076
2079
|
/**
|
|
2077
2080
|
* Provides the stream with the single service it requires. If the stream
|
|
@@ -2081,8 +2084,8 @@ export declare const provideServiceEffect: {
|
|
|
2081
2084
|
* @category context
|
|
2082
2085
|
*/
|
|
2083
2086
|
export declare const provideServiceStream: {
|
|
2084
|
-
<T extends Context.Tag<any, any>, R2, E2>(tag: T, stream: Stream<
|
|
2085
|
-
<R, E, A, T extends Context.Tag<any, any>, R2, E2>(self: Stream<
|
|
2087
|
+
<T extends Context.Tag<any, any>, R2, E2>(tag: T, stream: Stream<Context.Tag.Service<T>, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | Exclude<R, Context.Tag.Identifier<T>>>;
|
|
2088
|
+
<R, E, A, T extends Context.Tag<any, any>, R2, E2>(self: Stream<A, E, R>, tag: T, stream: Stream<Context.Tag.Service<T>, E2, R2>): Stream<A, E | E2, R2 | Exclude<R, Context.Tag.Identifier<T>>>;
|
|
2086
2089
|
};
|
|
2087
2090
|
/**
|
|
2088
2091
|
* Transforms the context being provided to the stream with the specified
|
|
@@ -2092,8 +2095,8 @@ export declare const provideServiceStream: {
|
|
|
2092
2095
|
* @category context
|
|
2093
2096
|
*/
|
|
2094
2097
|
export declare const mapInputContext: {
|
|
2095
|
-
<R0, R>(f: (env: Context.Context<R0>) => Context.Context<R>): <
|
|
2096
|
-
<
|
|
2098
|
+
<R0, R>(f: (env: Context.Context<R0>) => Context.Context<R>): <A, E>(self: Stream<A, E, R>) => Stream<A, E, R0>;
|
|
2099
|
+
<A, E, R0, R>(self: Stream<A, E, R>, f: (env: Context.Context<R0>) => Context.Context<R>): Stream<A, E, R0>;
|
|
2097
2100
|
};
|
|
2098
2101
|
/**
|
|
2099
2102
|
* Splits the context into two parts, providing one part using the
|
|
@@ -2103,8 +2106,8 @@ export declare const mapInputContext: {
|
|
|
2103
2106
|
* @category context
|
|
2104
2107
|
*/
|
|
2105
2108
|
export declare const provideSomeLayer: {
|
|
2106
|
-
<RIn, E2, ROut>(layer: Layer.Layer<
|
|
2107
|
-
<R, E, A, RIn, E2, ROut>(self: Stream<
|
|
2109
|
+
<RIn, E2, ROut>(layer: Layer.Layer<ROut, E2, RIn>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, RIn | Exclude<R, ROut>>;
|
|
2110
|
+
<R, E, A, RIn, E2, ROut>(self: Stream<A, E, R>, layer: Layer.Layer<ROut, E2, RIn>): Stream<A, E | E2, RIn | Exclude<R, ROut>>;
|
|
2108
2111
|
};
|
|
2109
2112
|
/**
|
|
2110
2113
|
* Constructs a stream from a range of integers, including both endpoints.
|
|
@@ -2112,7 +2115,7 @@ export declare const provideSomeLayer: {
|
|
|
2112
2115
|
* @since 2.0.0
|
|
2113
2116
|
* @category constructors
|
|
2114
2117
|
*/
|
|
2115
|
-
export declare const range: (min: number, max: number, chunkSize?: number) => Stream<
|
|
2118
|
+
export declare const range: (min: number, max: number, chunkSize?: number) => Stream<number>;
|
|
2116
2119
|
/**
|
|
2117
2120
|
* Re-chunks the elements of the stream into chunks of `n` elements each. The
|
|
2118
2121
|
* last chunk might contain less than `n` elements.
|
|
@@ -2121,8 +2124,8 @@ export declare const range: (min: number, max: number, chunkSize?: number) => St
|
|
|
2121
2124
|
* @category utils
|
|
2122
2125
|
*/
|
|
2123
2126
|
export declare const rechunk: {
|
|
2124
|
-
(n: number): <
|
|
2125
|
-
<
|
|
2127
|
+
(n: number): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
2128
|
+
<A, E, R>(self: Stream<A, E, R>, n: number): Stream<A, E, R>;
|
|
2126
2129
|
};
|
|
2127
2130
|
/**
|
|
2128
2131
|
* Keeps some of the errors, and terminates the fiber with the rest
|
|
@@ -2131,8 +2134,8 @@ export declare const rechunk: {
|
|
|
2131
2134
|
* @category error handling
|
|
2132
2135
|
*/
|
|
2133
2136
|
export declare const refineOrDie: {
|
|
2134
|
-
<E, E2>(pf: (error: E) => Option.Option<E2>): <R, A>(self: Stream<
|
|
2135
|
-
<R, A, E, E2>(self: Stream<
|
|
2137
|
+
<E, E2>(pf: (error: E) => Option.Option<E2>): <R, A>(self: Stream<A, E, R>) => Stream<A, E2, R>;
|
|
2138
|
+
<R, A, E, E2>(self: Stream<A, E, R>, pf: (error: E) => Option.Option<E2>): Stream<A, E2, R>;
|
|
2136
2139
|
};
|
|
2137
2140
|
/**
|
|
2138
2141
|
* Keeps some of the errors, and terminates the fiber with the rest, using the
|
|
@@ -2142,8 +2145,8 @@ export declare const refineOrDie: {
|
|
|
2142
2145
|
* @category error handling
|
|
2143
2146
|
*/
|
|
2144
2147
|
export declare const refineOrDieWith: {
|
|
2145
|
-
<E, E2>(pf: (error: E) => Option.Option<E2>, f: (error: E) => unknown): <R, A>(self: Stream<
|
|
2146
|
-
<R, A, E, E2>(self: Stream<
|
|
2148
|
+
<E, E2>(pf: (error: E) => Option.Option<E2>, f: (error: E) => unknown): <R, A>(self: Stream<A, E, R>) => Stream<A, E2, R>;
|
|
2149
|
+
<R, A, E, E2>(self: Stream<A, E, R>, pf: (error: E) => Option.Option<E2>, f: (error: E) => unknown): Stream<A, E2, R>;
|
|
2147
2150
|
};
|
|
2148
2151
|
/**
|
|
2149
2152
|
* Repeats the entire stream using the specified schedule. The stream will
|
|
@@ -2153,8 +2156,8 @@ export declare const refineOrDieWith: {
|
|
|
2153
2156
|
* @category utils
|
|
2154
2157
|
*/
|
|
2155
2158
|
export declare const repeat: {
|
|
2156
|
-
<R2, B>(schedule: Schedule.Schedule<R2, unknown, B>): <
|
|
2157
|
-
<R, E, A, R2, B>(self: Stream<
|
|
2159
|
+
<R2, B>(schedule: Schedule.Schedule<R2, unknown, B>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>;
|
|
2160
|
+
<R, E, A, R2, B>(self: Stream<A, E, R>, schedule: Schedule.Schedule<R2, unknown, B>): Stream<A, E, R | R2>;
|
|
2158
2161
|
};
|
|
2159
2162
|
/**
|
|
2160
2163
|
* Creates a stream from an effect producing a value of type `A` which repeats
|
|
@@ -2163,7 +2166,7 @@ export declare const repeat: {
|
|
|
2163
2166
|
* @since 2.0.0
|
|
2164
2167
|
* @category constructors
|
|
2165
2168
|
*/
|
|
2166
|
-
export declare const repeatEffect: <
|
|
2169
|
+
export declare const repeatEffect: <A, E, R>(effect: Effect.Effect<A, E, R>) => Stream<A, E, R>;
|
|
2167
2170
|
/**
|
|
2168
2171
|
* Creates a stream from an effect producing chunks of `A` values which
|
|
2169
2172
|
* repeats forever.
|
|
@@ -2171,7 +2174,7 @@ export declare const repeatEffect: <R, E, A>(effect: Effect.Effect<R, E, A>) =>
|
|
|
2171
2174
|
* @since 2.0.0
|
|
2172
2175
|
* @category constructors
|
|
2173
2176
|
*/
|
|
2174
|
-
export declare const repeatEffectChunk: <
|
|
2177
|
+
export declare const repeatEffectChunk: <A, E, R>(effect: Effect.Effect<Chunk.Chunk<A>, E, R>) => Stream<A, E, R>;
|
|
2175
2178
|
/**
|
|
2176
2179
|
* Creates a stream from an effect producing chunks of `A` values until it
|
|
2177
2180
|
* fails with `None`.
|
|
@@ -2179,7 +2182,7 @@ export declare const repeatEffectChunk: <R, E, A>(effect: Effect.Effect<R, E, Ch
|
|
|
2179
2182
|
* @since 2.0.0
|
|
2180
2183
|
* @category constructors
|
|
2181
2184
|
*/
|
|
2182
|
-
export declare const repeatEffectChunkOption: <
|
|
2185
|
+
export declare const repeatEffectChunkOption: <A, E, R>(effect: Effect.Effect<Chunk.Chunk<A>, Option.Option<E>, R>) => Stream<A, E, R>;
|
|
2183
2186
|
/**
|
|
2184
2187
|
* Creates a stream from an effect producing values of type `A` until it fails
|
|
2185
2188
|
* with `None`.
|
|
@@ -2187,7 +2190,7 @@ export declare const repeatEffectChunkOption: <R, E, A>(effect: Effect.Effect<R,
|
|
|
2187
2190
|
* @since 2.0.0
|
|
2188
2191
|
* @category constructors
|
|
2189
2192
|
*/
|
|
2190
|
-
export declare const repeatEffectOption: <
|
|
2193
|
+
export declare const repeatEffectOption: <A, E, R>(effect: Effect.Effect<A, Option.Option<E>, R>) => Stream<A, E, R>;
|
|
2191
2194
|
/**
|
|
2192
2195
|
* Creates a stream from an effect producing a value of type `A`, which is
|
|
2193
2196
|
* repeated using the specified schedule.
|
|
@@ -2195,7 +2198,7 @@ export declare const repeatEffectOption: <R, E, A>(effect: Effect.Effect<R, Opti
|
|
|
2195
2198
|
* @since 2.0.0
|
|
2196
2199
|
* @category constructors
|
|
2197
2200
|
*/
|
|
2198
|
-
export declare const repeatEffectWithSchedule: <R, E, A, A0 extends A, R2, _>(effect: Effect.Effect<
|
|
2201
|
+
export declare const repeatEffectWithSchedule: <R, E, A, A0 extends A, R2, _>(effect: Effect.Effect<A, E, R>, schedule: Schedule.Schedule<R2, A0, _>) => Stream<A, E, R | R2>;
|
|
2199
2202
|
/**
|
|
2200
2203
|
* Repeats the entire stream using the specified schedule. The stream will
|
|
2201
2204
|
* execute normally, and then repeat again according to the provided schedule.
|
|
@@ -2205,8 +2208,8 @@ export declare const repeatEffectWithSchedule: <R, E, A, A0 extends A, R2, _>(ef
|
|
|
2205
2208
|
* @category utils
|
|
2206
2209
|
*/
|
|
2207
2210
|
export declare const repeatEither: {
|
|
2208
|
-
<R2, B>(schedule: Schedule.Schedule<R2, unknown, B>): <
|
|
2209
|
-
<R, E, A, R2, B>(self: Stream<
|
|
2211
|
+
<R2, B>(schedule: Schedule.Schedule<R2, unknown, B>): <A, E, R>(self: Stream<A, E, R>) => Stream<Either.Either<B, A>, E, R2 | R>;
|
|
2212
|
+
<R, E, A, R2, B>(self: Stream<A, E, R>, schedule: Schedule.Schedule<R2, unknown, B>): Stream<Either.Either<B, A>, E, R | R2>;
|
|
2210
2213
|
};
|
|
2211
2214
|
/**
|
|
2212
2215
|
* Repeats each element of the stream using the provided schedule. Repetitions
|
|
@@ -2219,8 +2222,8 @@ export declare const repeatEither: {
|
|
|
2219
2222
|
* @category utils
|
|
2220
2223
|
*/
|
|
2221
2224
|
export declare const repeatElements: {
|
|
2222
|
-
<R2, B>(schedule: Schedule.Schedule<R2, unknown, B>): <
|
|
2223
|
-
<R, E, A, R2, B>(self: Stream<
|
|
2225
|
+
<R2, B>(schedule: Schedule.Schedule<R2, unknown, B>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>;
|
|
2226
|
+
<R, E, A, R2, B>(self: Stream<A, E, R>, schedule: Schedule.Schedule<R2, unknown, B>): Stream<A, E, R | R2>;
|
|
2224
2227
|
};
|
|
2225
2228
|
/**
|
|
2226
2229
|
* Repeats each element of the stream using the provided schedule. When the
|
|
@@ -2241,11 +2244,11 @@ export declare const repeatElementsWith: {
|
|
|
2241
2244
|
<R2, B, A, C>(schedule: Schedule.Schedule<R2, unknown, B>, options: {
|
|
2242
2245
|
readonly onElement: (a: A) => C;
|
|
2243
2246
|
readonly onSchedule: (b: B) => C;
|
|
2244
|
-
}): <R, E>(self: Stream<
|
|
2245
|
-
<R, E, R2, B, A, C>(self: Stream<
|
|
2247
|
+
}): <R, E>(self: Stream<A, E, R>) => Stream<C, E, R2 | R>;
|
|
2248
|
+
<R, E, R2, B, A, C>(self: Stream<A, E, R>, schedule: Schedule.Schedule<R2, unknown, B>, options: {
|
|
2246
2249
|
readonly onElement: (a: A) => C;
|
|
2247
2250
|
readonly onSchedule: (b: B) => C;
|
|
2248
|
-
}): Stream<R | R2
|
|
2251
|
+
}): Stream<C, E, R | R2>;
|
|
2249
2252
|
};
|
|
2250
2253
|
/**
|
|
2251
2254
|
* Repeats the provided value infinitely.
|
|
@@ -2253,7 +2256,7 @@ export declare const repeatElementsWith: {
|
|
|
2253
2256
|
* @since 2.0.0
|
|
2254
2257
|
* @category constructors
|
|
2255
2258
|
*/
|
|
2256
|
-
export declare const repeatValue: <A>(value: A) => Stream<
|
|
2259
|
+
export declare const repeatValue: <A>(value: A) => Stream<A>;
|
|
2257
2260
|
/**
|
|
2258
2261
|
* Repeats the entire stream using the specified schedule. The stream will
|
|
2259
2262
|
* execute normally, and then repeat again according to the provided schedule.
|
|
@@ -2267,11 +2270,11 @@ export declare const repeatWith: {
|
|
|
2267
2270
|
<R2, B, A, C>(schedule: Schedule.Schedule<R2, unknown, B>, options: {
|
|
2268
2271
|
readonly onElement: (a: A) => C;
|
|
2269
2272
|
readonly onSchedule: (b: B) => C;
|
|
2270
|
-
}): <R, E>(self: Stream<
|
|
2271
|
-
<R, E, R2, B, A, C>(self: Stream<
|
|
2273
|
+
}): <R, E>(self: Stream<A, E, R>) => Stream<C, E, R2 | R>;
|
|
2274
|
+
<R, E, R2, B, A, C>(self: Stream<A, E, R>, schedule: Schedule.Schedule<R2, unknown, B>, options: {
|
|
2272
2275
|
readonly onElement: (a: A) => C;
|
|
2273
2276
|
readonly onSchedule: (b: B) => C;
|
|
2274
|
-
}): Stream<R | R2
|
|
2277
|
+
}): Stream<C, E, R | R2>;
|
|
2275
2278
|
};
|
|
2276
2279
|
/**
|
|
2277
2280
|
* When the stream fails, retry it according to the given schedule
|
|
@@ -2287,8 +2290,8 @@ export declare const repeatWith: {
|
|
|
2287
2290
|
* @category utils
|
|
2288
2291
|
*/
|
|
2289
2292
|
export declare const retry: {
|
|
2290
|
-
<R2, E, E0 extends E, _>(schedule: Schedule.Schedule<R2, E0, _>): <R, A>(self: Stream<
|
|
2291
|
-
<R, A, R2, E, E0 extends E, _>(self: Stream<
|
|
2293
|
+
<R2, E, E0 extends E, _>(schedule: Schedule.Schedule<R2, E0, _>): <R, A>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>;
|
|
2294
|
+
<R, A, R2, E, E0 extends E, _>(self: Stream<A, E, R>, schedule: Schedule.Schedule<R2, E0, _>): Stream<A, E, R | R2>;
|
|
2292
2295
|
};
|
|
2293
2296
|
/**
|
|
2294
2297
|
* Runs the sink on the stream to produce either the sink's result or an error.
|
|
@@ -2297,8 +2300,8 @@ export declare const retry: {
|
|
|
2297
2300
|
* @category destructors
|
|
2298
2301
|
*/
|
|
2299
2302
|
export declare const run: {
|
|
2300
|
-
<
|
|
2301
|
-
<
|
|
2303
|
+
<A2, A, E2, R2>(sink: Sink.Sink<A2, A, unknown, E2, R2>): <E, R>(self: Stream<A, E, R>) => Effect.Effect<A2, E2 | E, R2 | R>;
|
|
2304
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, sink: Sink.Sink<A2, A, unknown, E2, R2>): Effect.Effect<A2, E | E2, R | R2>;
|
|
2302
2305
|
};
|
|
2303
2306
|
/**
|
|
2304
2307
|
* Runs the stream and collects all of its elements to a chunk.
|
|
@@ -2306,21 +2309,21 @@ export declare const run: {
|
|
|
2306
2309
|
* @since 2.0.0
|
|
2307
2310
|
* @category destructors
|
|
2308
2311
|
*/
|
|
2309
|
-
export declare const runCollect: <
|
|
2312
|
+
export declare const runCollect: <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Chunk.Chunk<A>, E, R>;
|
|
2310
2313
|
/**
|
|
2311
2314
|
* Runs the stream and emits the number of elements processed
|
|
2312
2315
|
*
|
|
2313
2316
|
* @since 2.0.0
|
|
2314
2317
|
* @category destructors
|
|
2315
2318
|
*/
|
|
2316
|
-
export declare const runCount: <
|
|
2319
|
+
export declare const runCount: <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<number, E, R>;
|
|
2317
2320
|
/**
|
|
2318
2321
|
* Runs the stream only for its effects. The emitted elements are discarded.
|
|
2319
2322
|
*
|
|
2320
2323
|
* @since 2.0.0
|
|
2321
2324
|
* @category destructors
|
|
2322
2325
|
*/
|
|
2323
|
-
export declare const runDrain: <
|
|
2326
|
+
export declare const runDrain: <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<void, E, R>;
|
|
2324
2327
|
/**
|
|
2325
2328
|
* Executes a pure fold over the stream of values - reduces all elements in
|
|
2326
2329
|
* the stream to a value of type `S`.
|
|
@@ -2329,8 +2332,8 @@ export declare const runDrain: <R, E, A>(self: Stream<R, E, A>) => Effect.Effect
|
|
|
2329
2332
|
* @category destructors
|
|
2330
2333
|
*/
|
|
2331
2334
|
export declare const runFold: {
|
|
2332
|
-
<S, A>(s: S, f: (s: S, a: A) => S): <R, E>(self: Stream<
|
|
2333
|
-
<R, E, S, A>(self: Stream<
|
|
2335
|
+
<S, A>(s: S, f: (s: S, a: A) => S): <R, E>(self: Stream<A, E, R>) => Effect.Effect<S, E, R>;
|
|
2336
|
+
<R, E, S, A>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => S): Effect.Effect<S, E, R>;
|
|
2334
2337
|
};
|
|
2335
2338
|
/**
|
|
2336
2339
|
* Executes an effectful fold over the stream of values.
|
|
@@ -2339,8 +2342,8 @@ export declare const runFold: {
|
|
|
2339
2342
|
* @category destructors
|
|
2340
2343
|
*/
|
|
2341
2344
|
export declare const runFoldEffect: {
|
|
2342
|
-
<S, A, R2, E2>(s: S, f: (s: S, a: A) => Effect.Effect<
|
|
2343
|
-
<R, E, S, A, R2, E2>(self: Stream<
|
|
2345
|
+
<S, A, R2, E2>(s: S, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): <R, E>(self: Stream<A, E, R>) => Effect.Effect<S, E2 | E, R2 | R>;
|
|
2346
|
+
<R, E, S, A, R2, E2>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): Effect.Effect<S, E | E2, R | R2>;
|
|
2344
2347
|
};
|
|
2345
2348
|
/**
|
|
2346
2349
|
* Executes a pure fold over the stream of values. Returns a scoped value that
|
|
@@ -2350,8 +2353,8 @@ export declare const runFoldEffect: {
|
|
|
2350
2353
|
* @category destructors
|
|
2351
2354
|
*/
|
|
2352
2355
|
export declare const runFoldScoped: {
|
|
2353
|
-
<S, A>(s: S, f: (s: S, a: A) => S): <R, E>(self: Stream<
|
|
2354
|
-
<R, E, S, A>(self: Stream<
|
|
2356
|
+
<S, A>(s: S, f: (s: S, a: A) => S): <R, E>(self: Stream<A, E, R>) => Effect.Effect<S, E, Scope.Scope | R>;
|
|
2357
|
+
<R, E, S, A>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => S): Effect.Effect<S, E, Scope.Scope | R>;
|
|
2355
2358
|
};
|
|
2356
2359
|
/**
|
|
2357
2360
|
* Executes an effectful fold over the stream of values. Returns a scoped
|
|
@@ -2361,8 +2364,8 @@ export declare const runFoldScoped: {
|
|
|
2361
2364
|
* @category destructors
|
|
2362
2365
|
*/
|
|
2363
2366
|
export declare const runFoldScopedEffect: {
|
|
2364
|
-
<S, A, R2, E2>(s: S, f: (s: S, a: A) => Effect.Effect<
|
|
2365
|
-
<R, E, S, A, R2, E2>(self: Stream<
|
|
2367
|
+
<S, A, R2, E2>(s: S, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): <R, E>(self: Stream<A, E, R>) => Effect.Effect<S, E2 | E, Scope.Scope | R2 | R>;
|
|
2368
|
+
<R, E, S, A, R2, E2>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): Effect.Effect<S, E | E2, Scope.Scope | R | R2>;
|
|
2366
2369
|
};
|
|
2367
2370
|
/**
|
|
2368
2371
|
* Reduces the elements in the stream to a value of type `S`. Stops the fold
|
|
@@ -2372,8 +2375,8 @@ export declare const runFoldScopedEffect: {
|
|
|
2372
2375
|
* @category destructors
|
|
2373
2376
|
*/
|
|
2374
2377
|
export declare const runFoldWhile: {
|
|
2375
|
-
<S, A>(s: S, cont: Predicate<S>, f: (s: S, a: A) => S): <R, E>(self: Stream<
|
|
2376
|
-
<R, E, S, A>(self: Stream<
|
|
2378
|
+
<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>;
|
|
2379
|
+
<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>;
|
|
2377
2380
|
};
|
|
2378
2381
|
/**
|
|
2379
2382
|
* Executes an effectful fold over the stream of values. Stops the fold early
|
|
@@ -2383,8 +2386,8 @@ export declare const runFoldWhile: {
|
|
|
2383
2386
|
* @category destructors
|
|
2384
2387
|
*/
|
|
2385
2388
|
export declare const runFoldWhileEffect: {
|
|
2386
|
-
<S, A, R2, E2>(s: S, cont: Predicate<S>, f: (s: S, a: A) => Effect.Effect<
|
|
2387
|
-
<R, E, S, A, R2, E2>(self: Stream<
|
|
2389
|
+
<S, A, R2, E2>(s: S, cont: Predicate<S>, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): <R, E>(self: Stream<A, E, R>) => Effect.Effect<S, E2 | E, R2 | R>;
|
|
2390
|
+
<R, E, S, A, R2, E2>(self: Stream<A, E, R>, s: S, cont: Predicate<S>, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): Effect.Effect<S, E | E2, R | R2>;
|
|
2388
2391
|
};
|
|
2389
2392
|
/**
|
|
2390
2393
|
* Executes a pure fold over the stream of values. Returns a scoped value that
|
|
@@ -2395,8 +2398,8 @@ export declare const runFoldWhileEffect: {
|
|
|
2395
2398
|
* @category destructors
|
|
2396
2399
|
*/
|
|
2397
2400
|
export declare const runFoldWhileScoped: {
|
|
2398
|
-
<S, A>(s: S, cont: Predicate<S>, f: (s: S, a: A) => S): <R, E>(self: Stream<
|
|
2399
|
-
<R, E, S, A>(self: Stream<
|
|
2401
|
+
<S, A>(s: S, cont: Predicate<S>, f: (s: S, a: A) => S): <R, E>(self: Stream<A, E, R>) => Effect.Effect<S, E, Scope.Scope | R>;
|
|
2402
|
+
<R, E, S, A>(self: Stream<A, E, R>, s: S, cont: Predicate<S>, f: (s: S, a: A) => S): Effect.Effect<S, E, Scope.Scope | R>;
|
|
2400
2403
|
};
|
|
2401
2404
|
/**
|
|
2402
2405
|
* Executes an effectful fold over the stream of values. Returns a scoped
|
|
@@ -2407,8 +2410,8 @@ export declare const runFoldWhileScoped: {
|
|
|
2407
2410
|
* @category destructors
|
|
2408
2411
|
*/
|
|
2409
2412
|
export declare const runFoldWhileScopedEffect: {
|
|
2410
|
-
<S, A, R2, E2>(s: S, cont: Predicate<S>, f: (s: S, a: A) => Effect.Effect<
|
|
2411
|
-
<R, E, S, A, R2, E2>(self: Stream<
|
|
2413
|
+
<S, A, R2, E2>(s: S, cont: Predicate<S>, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): <R, E>(self: Stream<A, E, R>) => Effect.Effect<S, E2 | E, Scope.Scope | R2 | R>;
|
|
2414
|
+
<R, E, S, A, R2, E2>(self: Stream<A, E, R>, s: S, cont: Predicate<S>, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): Effect.Effect<S, E | E2, Scope.Scope | R | R2>;
|
|
2412
2415
|
};
|
|
2413
2416
|
/**
|
|
2414
2417
|
* Consumes all elements of the stream, passing them to the specified
|
|
@@ -2418,8 +2421,8 @@ export declare const runFoldWhileScopedEffect: {
|
|
|
2418
2421
|
* @category destructors
|
|
2419
2422
|
*/
|
|
2420
2423
|
export declare const runForEach: {
|
|
2421
|
-
<A, R2, E2, _>(f: (a: A) => Effect.Effect<
|
|
2422
|
-
<R, E, A, R2, E2, _>(self: Stream<
|
|
2424
|
+
<A, R2, E2, _>(f: (a: A) => Effect.Effect<_, E2, R2>): <R, E>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, R2 | R>;
|
|
2425
|
+
<R, E, A, R2, E2, _>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<_, E2, R2>): Effect.Effect<void, E | E2, R | R2>;
|
|
2423
2426
|
};
|
|
2424
2427
|
/**
|
|
2425
2428
|
* Consumes all elements of the stream, passing them to the specified
|
|
@@ -2429,8 +2432,8 @@ export declare const runForEach: {
|
|
|
2429
2432
|
* @category destructors
|
|
2430
2433
|
*/
|
|
2431
2434
|
export declare const runForEachChunk: {
|
|
2432
|
-
<A, R2, E2, _>(f: (a: Chunk.Chunk<A>) => Effect.Effect<
|
|
2433
|
-
<R, E, A, R2, E2, _>(self: Stream<
|
|
2435
|
+
<A, R2, E2, _>(f: (a: Chunk.Chunk<A>) => Effect.Effect<_, E2, R2>): <R, E>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, R2 | R>;
|
|
2436
|
+
<R, E, A, R2, E2, _>(self: Stream<A, E, R>, f: (a: Chunk.Chunk<A>) => Effect.Effect<_, E2, R2>): Effect.Effect<void, E | E2, R | R2>;
|
|
2434
2437
|
};
|
|
2435
2438
|
/**
|
|
2436
2439
|
* Like `Stream.runForEachChunk`, but returns a scoped effect so the
|
|
@@ -2440,8 +2443,8 @@ export declare const runForEachChunk: {
|
|
|
2440
2443
|
* @category destructors
|
|
2441
2444
|
*/
|
|
2442
2445
|
export declare const runForEachChunkScoped: {
|
|
2443
|
-
<A, R2, E2, _>(f: (a: Chunk.Chunk<A>) => Effect.Effect<
|
|
2444
|
-
<R, E, A, R2, E2, _>(self: Stream<
|
|
2446
|
+
<A, R2, E2, _>(f: (a: Chunk.Chunk<A>) => Effect.Effect<_, E2, R2>): <R, E>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, Scope.Scope | R2 | R>;
|
|
2447
|
+
<R, E, A, R2, E2, _>(self: Stream<A, E, R>, f: (a: Chunk.Chunk<A>) => Effect.Effect<_, E2, R2>): Effect.Effect<void, E | E2, Scope.Scope | R | R2>;
|
|
2445
2448
|
};
|
|
2446
2449
|
/**
|
|
2447
2450
|
* Like `Stream.forEach`, but returns a scoped effect so the finalization
|
|
@@ -2451,8 +2454,8 @@ export declare const runForEachChunkScoped: {
|
|
|
2451
2454
|
* @category destructors
|
|
2452
2455
|
*/
|
|
2453
2456
|
export declare const runForEachScoped: {
|
|
2454
|
-
<A, R2, E2, _>(f: (a: A) => Effect.Effect<
|
|
2455
|
-
<R, E, A, R2, E2, _>(self: Stream<
|
|
2457
|
+
<A, R2, E2, _>(f: (a: A) => Effect.Effect<_, E2, R2>): <R, E>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, Scope.Scope | R2 | R>;
|
|
2458
|
+
<R, E, A, R2, E2, _>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<_, E2, R2>): Effect.Effect<void, E | E2, Scope.Scope | R | R2>;
|
|
2456
2459
|
};
|
|
2457
2460
|
/**
|
|
2458
2461
|
* Consumes elements of the stream, passing them to the specified callback,
|
|
@@ -2462,8 +2465,8 @@ export declare const runForEachScoped: {
|
|
|
2462
2465
|
* @category destructors
|
|
2463
2466
|
*/
|
|
2464
2467
|
export declare const runForEachWhile: {
|
|
2465
|
-
<A, R2, E2>(f: (a: A) => Effect.Effect<
|
|
2466
|
-
<R, E, A, R2, E2>(self: Stream<
|
|
2468
|
+
<A, R2, E2>(f: (a: A) => Effect.Effect<boolean, E2, R2>): <R, E>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, R2 | R>;
|
|
2469
|
+
<R, E, A, R2, E2>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<boolean, E2, R2>): Effect.Effect<void, E | E2, R | R2>;
|
|
2467
2470
|
};
|
|
2468
2471
|
/**
|
|
2469
2472
|
* Like `Stream.runForEachWhile`, but returns a scoped effect so the
|
|
@@ -2473,8 +2476,8 @@ export declare const runForEachWhile: {
|
|
|
2473
2476
|
* @category destructors
|
|
2474
2477
|
*/
|
|
2475
2478
|
export declare const runForEachWhileScoped: {
|
|
2476
|
-
<A, R2, E2>(f: (a: A) => Effect.Effect<
|
|
2477
|
-
<R, E, A, R2, E2>(self: Stream<
|
|
2479
|
+
<A, R2, E2>(f: (a: A) => Effect.Effect<boolean, E2, R2>): <R, E>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, Scope.Scope | R2 | R>;
|
|
2480
|
+
<R, E, A, R2, E2>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<boolean, E2, R2>): Effect.Effect<void, E | E2, Scope.Scope | R | R2>;
|
|
2478
2481
|
};
|
|
2479
2482
|
/**
|
|
2480
2483
|
* Runs the stream to completion and yields the first value emitted by it,
|
|
@@ -2483,7 +2486,7 @@ export declare const runForEachWhileScoped: {
|
|
|
2483
2486
|
* @since 2.0.0
|
|
2484
2487
|
* @category destructors
|
|
2485
2488
|
*/
|
|
2486
|
-
export declare const runHead: <
|
|
2489
|
+
export declare const runHead: <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Option.Option<A>, E, R>;
|
|
2487
2490
|
/**
|
|
2488
2491
|
* Publishes elements of this stream to a `PubSub`. Stream failure and ending will
|
|
2489
2492
|
* also be signalled.
|
|
@@ -2492,8 +2495,8 @@ export declare const runHead: <R, E, A>(self: Stream<R, E, A>) => Effect.Effect<
|
|
|
2492
2495
|
* @category destructors
|
|
2493
2496
|
*/
|
|
2494
2497
|
export declare const runIntoPubSub: {
|
|
2495
|
-
<
|
|
2496
|
-
<
|
|
2498
|
+
<A, E>(pubsub: PubSub.PubSub<Take.Take<A, E>>): <R>(self: Stream<A, E, R>) => Effect.Effect<void, never, R>;
|
|
2499
|
+
<A, E, R>(self: Stream<A, E, R>, pubsub: PubSub.PubSub<Take.Take<A, E>>): Effect.Effect<void, never, R>;
|
|
2497
2500
|
};
|
|
2498
2501
|
/**
|
|
2499
2502
|
* Like `Stream.runIntoPubSub`, but provides the result as a scoped effect to
|
|
@@ -2503,8 +2506,8 @@ export declare const runIntoPubSub: {
|
|
|
2503
2506
|
* @category destructors
|
|
2504
2507
|
*/
|
|
2505
2508
|
export declare const runIntoPubSubScoped: {
|
|
2506
|
-
<
|
|
2507
|
-
<
|
|
2509
|
+
<A, E>(pubsub: PubSub.PubSub<Take.Take<A, E>>): <R>(self: Stream<A, E, R>) => Effect.Effect<void, never, Scope.Scope | R>;
|
|
2510
|
+
<A, E, R>(self: Stream<A, E, R>, pubsub: PubSub.PubSub<Take.Take<A, E>>): Effect.Effect<void, never, Scope.Scope | R>;
|
|
2508
2511
|
};
|
|
2509
2512
|
/**
|
|
2510
2513
|
* Enqueues elements of this stream into a queue. Stream failure and ending
|
|
@@ -2514,8 +2517,8 @@ export declare const runIntoPubSubScoped: {
|
|
|
2514
2517
|
* @category destructors
|
|
2515
2518
|
*/
|
|
2516
2519
|
export declare const runIntoQueue: {
|
|
2517
|
-
<
|
|
2518
|
-
<
|
|
2520
|
+
<A, E>(queue: Queue.Enqueue<Take.Take<A, E>>): <R>(self: Stream<A, E, R>) => Effect.Effect<void, never, R>;
|
|
2521
|
+
<A, E, R>(self: Stream<A, E, R>, queue: Queue.Enqueue<Take.Take<A, E>>): Effect.Effect<void, never, R>;
|
|
2519
2522
|
};
|
|
2520
2523
|
/**
|
|
2521
2524
|
* Like `Stream.runIntoQueue`, but provides the result as a scoped [[ZIO]]
|
|
@@ -2525,8 +2528,8 @@ export declare const runIntoQueue: {
|
|
|
2525
2528
|
* @category destructors
|
|
2526
2529
|
*/
|
|
2527
2530
|
export declare const runIntoQueueElementsScoped: {
|
|
2528
|
-
<
|
|
2529
|
-
<
|
|
2531
|
+
<A, E>(queue: Queue.Enqueue<Exit.Exit<A, Option.Option<E>>>): <R>(self: Stream<A, E, R>) => Effect.Effect<void, never, Scope.Scope | R>;
|
|
2532
|
+
<A, E, R>(self: Stream<A, E, R>, queue: Queue.Enqueue<Exit.Exit<A, Option.Option<E>>>): Effect.Effect<void, never, Scope.Scope | R>;
|
|
2530
2533
|
};
|
|
2531
2534
|
/**
|
|
2532
2535
|
* Like `Stream.runIntoQueue`, but provides the result as a scoped effect
|
|
@@ -2536,8 +2539,8 @@ export declare const runIntoQueueElementsScoped: {
|
|
|
2536
2539
|
* @category destructors
|
|
2537
2540
|
*/
|
|
2538
2541
|
export declare const runIntoQueueScoped: {
|
|
2539
|
-
<
|
|
2540
|
-
<
|
|
2542
|
+
<A, E>(queue: Queue.Enqueue<Take.Take<A, E>>): <R>(self: Stream<A, E, R>) => Effect.Effect<void, never, Scope.Scope | R>;
|
|
2543
|
+
<A, E, R>(self: Stream<A, E, R>, queue: Queue.Enqueue<Take.Take<A, E>>): Effect.Effect<void, never, Scope.Scope | R>;
|
|
2541
2544
|
};
|
|
2542
2545
|
/**
|
|
2543
2546
|
* Runs the stream to completion and yields the last value emitted by it,
|
|
@@ -2546,14 +2549,14 @@ export declare const runIntoQueueScoped: {
|
|
|
2546
2549
|
* @since 2.0.0
|
|
2547
2550
|
* @category destructors
|
|
2548
2551
|
*/
|
|
2549
|
-
export declare const runLast: <
|
|
2552
|
+
export declare const runLast: <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Option.Option<A>, E, R>;
|
|
2550
2553
|
/**
|
|
2551
2554
|
* @since 2.0.0
|
|
2552
2555
|
* @category destructors
|
|
2553
2556
|
*/
|
|
2554
2557
|
export declare const runScoped: {
|
|
2555
|
-
<
|
|
2556
|
-
<
|
|
2558
|
+
<A2, A, E2, R2>(sink: Sink.Sink<A2, A, unknown, E2, R2>): <E, R>(self: Stream<A, E, R>) => Effect.Effect<A2, E2 | E, Scope.Scope | R2 | R>;
|
|
2559
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, sink: Sink.Sink<A2, A, unknown, E2, R2>): Effect.Effect<A2, E | E2, Scope.Scope | R | R2>;
|
|
2557
2560
|
};
|
|
2558
2561
|
/**
|
|
2559
2562
|
* Runs the stream to a sink which sums elements, provided they are Numeric.
|
|
@@ -2561,7 +2564,7 @@ export declare const runScoped: {
|
|
|
2561
2564
|
* @since 2.0.0
|
|
2562
2565
|
* @category destructors
|
|
2563
2566
|
*/
|
|
2564
|
-
export declare const runSum: <R, E>(self: Stream<
|
|
2567
|
+
export declare const runSum: <R, E>(self: Stream<number, E, R>) => Effect.Effect<number, E, R>;
|
|
2565
2568
|
/**
|
|
2566
2569
|
* Statefully maps over the elements of this stream to produce all
|
|
2567
2570
|
* intermediate results of type `S` given an initial S.
|
|
@@ -2570,8 +2573,8 @@ export declare const runSum: <R, E>(self: Stream<R, E, number>) => Effect.Effect
|
|
|
2570
2573
|
* @category utils
|
|
2571
2574
|
*/
|
|
2572
2575
|
export declare const scan: {
|
|
2573
|
-
<S, A>(s: S, f: (s: S, a: A) => S): <R, E>(self: Stream<
|
|
2574
|
-
<R, E, S, A>(self: Stream<
|
|
2576
|
+
<S, A>(s: S, f: (s: S, a: A) => S): <R, E>(self: Stream<A, E, R>) => Stream<S, E, R>;
|
|
2577
|
+
<R, E, S, A>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => S): Stream<S, E, R>;
|
|
2575
2578
|
};
|
|
2576
2579
|
/**
|
|
2577
2580
|
* Statefully and effectfully maps over the elements of this stream to produce
|
|
@@ -2581,8 +2584,8 @@ export declare const scan: {
|
|
|
2581
2584
|
* @category utils
|
|
2582
2585
|
*/
|
|
2583
2586
|
export declare const scanEffect: {
|
|
2584
|
-
<S, A, R2, E2>(s: S, f: (s: S, a: A) => Effect.Effect<
|
|
2585
|
-
<R, E, S, A, R2, E2>(self: Stream<
|
|
2587
|
+
<S, A, R2, E2>(s: S, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): <R, E>(self: Stream<A, E, R>) => Stream<S, E2 | E, R2 | R>;
|
|
2588
|
+
<R, E, S, A, R2, E2>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): Stream<S, E | E2, R | R2>;
|
|
2586
2589
|
};
|
|
2587
2590
|
/**
|
|
2588
2591
|
* Statefully maps over the elements of this stream to produce all
|
|
@@ -2594,8 +2597,8 @@ export declare const scanEffect: {
|
|
|
2594
2597
|
* @category utils
|
|
2595
2598
|
*/
|
|
2596
2599
|
export declare const scanReduce: {
|
|
2597
|
-
<A2, A>(f: (a2: A2 | A, a: A) => A2): <R, E>(self: Stream<
|
|
2598
|
-
<R, E, A2, A>(self: Stream<
|
|
2600
|
+
<A2, A>(f: (a2: A2 | A, a: A) => A2): <R, E>(self: Stream<A, E, R>) => Stream<A2 | A, E, R>;
|
|
2601
|
+
<R, E, A2, A>(self: Stream<A, E, R>, f: (a2: A2 | A, a: A) => A2): Stream<A2 | A, E, R>;
|
|
2599
2602
|
};
|
|
2600
2603
|
/**
|
|
2601
2604
|
* Statefully and effectfully maps over the elements of this stream to produce
|
|
@@ -2606,7 +2609,7 @@ export declare const scanReduce: {
|
|
|
2606
2609
|
* @since 2.0.0
|
|
2607
2610
|
* @category utils
|
|
2608
2611
|
*/
|
|
2609
|
-
export declare const scanReduceEffect: <A2, A, R2, E2>(f: (a2: A2 | A, a: A) => Effect.Effect<
|
|
2612
|
+
export declare const scanReduceEffect: (<A2, A, R2, E2>(f: (a2: A2 | A, a: A) => Effect.Effect<A2 | A, E2, R2>) => <R, E>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E, R2 | R>) & (<R_1, E_1, A2_1, A_1, R2_1, E2_1>(self: Stream<A_1, E_1, R_1>, f: (a2: A2_1 | A_1, a: A_1) => Effect.Effect<A2_1 | A_1, E2_1, R2_1>) => Stream<A2_1 | A_1, E_1 | E2_1, R_1 | R2_1>);
|
|
2610
2613
|
/**
|
|
2611
2614
|
* Schedules the output of the stream using the provided `schedule`.
|
|
2612
2615
|
*
|
|
@@ -2614,8 +2617,8 @@ export declare const scanReduceEffect: <A2, A, R2, E2>(f: (a2: A2 | A, a: A) =>
|
|
|
2614
2617
|
* @category utils
|
|
2615
2618
|
*/
|
|
2616
2619
|
export declare const schedule: {
|
|
2617
|
-
<R2, A, A0 extends A, _>(schedule: Schedule.Schedule<R2, A0, _>): <R, E>(self: Stream<
|
|
2618
|
-
<R, E, R2, A, A0 extends A, _>(self: Stream<
|
|
2620
|
+
<R2, A, A0 extends A, _>(schedule: Schedule.Schedule<R2, A0, _>): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>;
|
|
2621
|
+
<R, E, R2, A, A0 extends A, _>(self: Stream<A, E, R>, schedule: Schedule.Schedule<R2, A0, _>): Stream<A, E, R | R2>;
|
|
2619
2622
|
};
|
|
2620
2623
|
/**
|
|
2621
2624
|
* Schedules the output of the stream using the provided `schedule` and emits
|
|
@@ -2629,11 +2632,11 @@ export declare const scheduleWith: {
|
|
|
2629
2632
|
<R2, A, A0 extends A, B, C>(schedule: Schedule.Schedule<R2, A0, B>, options: {
|
|
2630
2633
|
readonly onElement: (a: A) => C;
|
|
2631
2634
|
readonly onSchedule: (b: B) => C;
|
|
2632
|
-
}): <R, E>(self: Stream<
|
|
2633
|
-
<R, E, R2, A, A0 extends A, B, C>(self: Stream<
|
|
2635
|
+
}): <R, E>(self: Stream<A, E, R>) => Stream<C, E, R2 | R>;
|
|
2636
|
+
<R, E, R2, A, A0 extends A, B, C>(self: Stream<A, E, R>, schedule: Schedule.Schedule<R2, A0, B>, options: {
|
|
2634
2637
|
readonly onElement: (a: A) => C;
|
|
2635
2638
|
readonly onSchedule: (b: B) => C;
|
|
2636
|
-
}): Stream<R | R2
|
|
2639
|
+
}): Stream<C, E, R | R2>;
|
|
2637
2640
|
};
|
|
2638
2641
|
/**
|
|
2639
2642
|
* Creates a single-valued stream from a scoped resource.
|
|
@@ -2641,7 +2644,7 @@ export declare const scheduleWith: {
|
|
|
2641
2644
|
* @since 2.0.0
|
|
2642
2645
|
* @category constructors
|
|
2643
2646
|
*/
|
|
2644
|
-
export declare const scoped: <
|
|
2647
|
+
export declare const scoped: <A, E, R>(effect: Effect.Effect<A, E, R>) => Stream<A, E, Exclude<R, Scope.Scope>>;
|
|
2645
2648
|
/**
|
|
2646
2649
|
* Emits a sliding window of `n` elements.
|
|
2647
2650
|
*
|
|
@@ -2661,8 +2664,8 @@ export declare const scoped: <R, E, A>(effect: Effect.Effect<R, E, A>) => Stream
|
|
|
2661
2664
|
* @category utils
|
|
2662
2665
|
*/
|
|
2663
2666
|
export declare const sliding: {
|
|
2664
|
-
(chunkSize: number): <
|
|
2665
|
-
<
|
|
2667
|
+
(chunkSize: number): <A, E, R>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R>;
|
|
2668
|
+
<A, E, R>(self: Stream<A, E, R>, chunkSize: number): Stream<Chunk.Chunk<A>, E, R>;
|
|
2666
2669
|
};
|
|
2667
2670
|
/**
|
|
2668
2671
|
* Like `sliding`, but with a configurable `stepSize` parameter.
|
|
@@ -2671,8 +2674,8 @@ export declare const sliding: {
|
|
|
2671
2674
|
* @category utils
|
|
2672
2675
|
*/
|
|
2673
2676
|
export declare const slidingSize: {
|
|
2674
|
-
(chunkSize: number, stepSize: number): <
|
|
2675
|
-
<
|
|
2677
|
+
(chunkSize: number, stepSize: number): <A, E, R>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R>;
|
|
2678
|
+
<A, E, R>(self: Stream<A, E, R>, chunkSize: number, stepSize: number): Stream<Chunk.Chunk<A>, E, R>;
|
|
2676
2679
|
};
|
|
2677
2680
|
/**
|
|
2678
2681
|
* Converts an option on values into an option on errors.
|
|
@@ -2680,7 +2683,7 @@ export declare const slidingSize: {
|
|
|
2680
2683
|
* @since 2.0.0
|
|
2681
2684
|
* @category utils
|
|
2682
2685
|
*/
|
|
2683
|
-
export declare const some: <
|
|
2686
|
+
export declare const some: <A, E, R>(self: Stream<Option.Option<A>, E, R>) => Stream<A, Option.Option<E>, R>;
|
|
2684
2687
|
/**
|
|
2685
2688
|
* Extracts the optional value, or returns the given 'default'.
|
|
2686
2689
|
*
|
|
@@ -2688,8 +2691,8 @@ export declare const some: <R, E, A>(self: Stream<R, E, Option.Option<A>>) => St
|
|
|
2688
2691
|
* @category utils
|
|
2689
2692
|
*/
|
|
2690
2693
|
export declare const someOrElse: {
|
|
2691
|
-
<A2>(fallback: LazyArg<A2>): <
|
|
2692
|
-
<R, E, A, A2>(self: Stream<
|
|
2694
|
+
<A2>(fallback: LazyArg<A2>): <A, E, R>(self: Stream<Option.Option<A>, E, R>) => Stream<A2 | A, E, R>;
|
|
2695
|
+
<R, E, A, A2>(self: Stream<Option.Option<A>, E, R>, fallback: LazyArg<A2>): Stream<A | A2, E, R>;
|
|
2693
2696
|
};
|
|
2694
2697
|
/**
|
|
2695
2698
|
* Extracts the optional value, or fails with the given error 'e'.
|
|
@@ -2698,8 +2701,8 @@ export declare const someOrElse: {
|
|
|
2698
2701
|
* @category utils
|
|
2699
2702
|
*/
|
|
2700
2703
|
export declare const someOrFail: {
|
|
2701
|
-
<E2>(error: LazyArg<E2>): <
|
|
2702
|
-
<R, E, A, E2>(self: Stream<
|
|
2704
|
+
<E2>(error: LazyArg<E2>): <A, E, R>(self: Stream<Option.Option<A>, E, R>) => Stream<A, E2 | E, R>;
|
|
2705
|
+
<R, E, A, E2>(self: Stream<Option.Option<A>, E, R>, error: LazyArg<E2>): Stream<A, E | E2, R>;
|
|
2703
2706
|
};
|
|
2704
2707
|
/**
|
|
2705
2708
|
* Splits elements based on a predicate.
|
|
@@ -2720,8 +2723,8 @@ export declare const someOrFail: {
|
|
|
2720
2723
|
* @category utils
|
|
2721
2724
|
*/
|
|
2722
2725
|
export declare const split: {
|
|
2723
|
-
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<
|
|
2724
|
-
<
|
|
2726
|
+
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R>;
|
|
2727
|
+
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<Chunk.Chunk<A>, E, R>;
|
|
2725
2728
|
};
|
|
2726
2729
|
/**
|
|
2727
2730
|
* Splits elements on a delimiter and transforms the splits into desired output.
|
|
@@ -2730,8 +2733,8 @@ export declare const split: {
|
|
|
2730
2733
|
* @category utils
|
|
2731
2734
|
*/
|
|
2732
2735
|
export declare const splitOnChunk: {
|
|
2733
|
-
<A>(delimiter: Chunk.Chunk<A>): <R, E>(self: Stream<
|
|
2734
|
-
<
|
|
2736
|
+
<A>(delimiter: Chunk.Chunk<A>): <R, E>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R>;
|
|
2737
|
+
<A, E, R>(self: Stream<A, E, R>, delimiter: Chunk.Chunk<A>): Stream<Chunk.Chunk<A>, E, R>;
|
|
2735
2738
|
};
|
|
2736
2739
|
/**
|
|
2737
2740
|
* Splits strings on newlines. Handles both Windows newlines (`\r\n`) and UNIX
|
|
@@ -2740,28 +2743,28 @@ export declare const splitOnChunk: {
|
|
|
2740
2743
|
* @since 2.0.0
|
|
2741
2744
|
* @category combinators
|
|
2742
2745
|
*/
|
|
2743
|
-
export declare const splitLines: <R, E>(self: Stream<
|
|
2746
|
+
export declare const splitLines: <R, E>(self: Stream<string, E, R>) => Stream<string, E, R>;
|
|
2744
2747
|
/**
|
|
2745
2748
|
* Creates a single-valued pure stream.
|
|
2746
2749
|
*
|
|
2747
2750
|
* @since 2.0.0
|
|
2748
2751
|
* @category constructors
|
|
2749
2752
|
*/
|
|
2750
|
-
export declare const succeed: <A>(value: A) => Stream<
|
|
2753
|
+
export declare const succeed: <A>(value: A) => Stream<A>;
|
|
2751
2754
|
/**
|
|
2752
2755
|
* Creates a single-valued pure stream.
|
|
2753
2756
|
*
|
|
2754
2757
|
* @since 2.0.0
|
|
2755
2758
|
* @category constructors
|
|
2756
2759
|
*/
|
|
2757
|
-
export declare const sync: <A>(evaluate: LazyArg<A>) => Stream<
|
|
2760
|
+
export declare const sync: <A>(evaluate: LazyArg<A>) => Stream<A>;
|
|
2758
2761
|
/**
|
|
2759
2762
|
* Returns a lazily constructed stream.
|
|
2760
2763
|
*
|
|
2761
2764
|
* @since 2.0.0
|
|
2762
2765
|
* @category constructors
|
|
2763
2766
|
*/
|
|
2764
|
-
export declare const suspend: <
|
|
2767
|
+
export declare const suspend: <A, E, R>(stream: LazyArg<Stream<A, E, R>>) => Stream<A, E, R>;
|
|
2765
2768
|
/**
|
|
2766
2769
|
* Takes the specified number of elements from this stream.
|
|
2767
2770
|
*
|
|
@@ -2769,8 +2772,8 @@ export declare const suspend: <R, E, A>(stream: LazyArg<Stream<R, E, A>>) => Str
|
|
|
2769
2772
|
* @category utils
|
|
2770
2773
|
*/
|
|
2771
2774
|
export declare const take: {
|
|
2772
|
-
(n: number): <
|
|
2773
|
-
<
|
|
2775
|
+
(n: number): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
2776
|
+
<A, E, R>(self: Stream<A, E, R>, n: number): Stream<A, E, R>;
|
|
2774
2777
|
};
|
|
2775
2778
|
/**
|
|
2776
2779
|
* Takes the last specified number of elements from this stream.
|
|
@@ -2779,8 +2782,8 @@ export declare const take: {
|
|
|
2779
2782
|
* @category utils
|
|
2780
2783
|
*/
|
|
2781
2784
|
export declare const takeRight: {
|
|
2782
|
-
(n: number): <
|
|
2783
|
-
<
|
|
2785
|
+
(n: number): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
2786
|
+
<A, E, R>(self: Stream<A, E, R>, n: number): Stream<A, E, R>;
|
|
2784
2787
|
};
|
|
2785
2788
|
/**
|
|
2786
2789
|
* Takes all elements of the stream until the specified predicate evaluates to
|
|
@@ -2790,8 +2793,8 @@ export declare const takeRight: {
|
|
|
2790
2793
|
* @category utils
|
|
2791
2794
|
*/
|
|
2792
2795
|
export declare const takeUntil: {
|
|
2793
|
-
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<
|
|
2794
|
-
<
|
|
2796
|
+
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
2797
|
+
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>;
|
|
2795
2798
|
};
|
|
2796
2799
|
/**
|
|
2797
2800
|
* Takes all elements of the stream until the specified effectual predicate
|
|
@@ -2801,8 +2804,8 @@ export declare const takeUntil: {
|
|
|
2801
2804
|
* @category utils
|
|
2802
2805
|
*/
|
|
2803
2806
|
export declare const takeUntilEffect: {
|
|
2804
|
-
<A, R2, E2>(predicate: (a: NoInfer<A>) => Effect.Effect<
|
|
2805
|
-
<R, E, A, R2, E2>(self: Stream<
|
|
2807
|
+
<A, R2, E2>(predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
2808
|
+
<R, E, A, R2, E2>(self: Stream<A, E, R>, predicate: (a: A) => Effect.Effect<boolean, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
2806
2809
|
};
|
|
2807
2810
|
/**
|
|
2808
2811
|
* Takes all elements of the stream for as long as the specified predicate
|
|
@@ -2812,10 +2815,10 @@ export declare const takeUntilEffect: {
|
|
|
2812
2815
|
* @category utils
|
|
2813
2816
|
*/
|
|
2814
2817
|
export declare const takeWhile: {
|
|
2815
|
-
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <R, E>(self: Stream<
|
|
2816
|
-
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<
|
|
2817
|
-
<R, E, A, B extends A>(self: Stream<
|
|
2818
|
-
<
|
|
2818
|
+
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <R, E>(self: Stream<A, E, R>) => Stream<B, E, R>;
|
|
2819
|
+
<A>(predicate: Predicate<NoInfer<A>>): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
2820
|
+
<R, E, A, B extends A>(self: Stream<A, E, R>, refinement: Refinement<A, B>): Stream<B, E, R>;
|
|
2821
|
+
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>;
|
|
2819
2822
|
};
|
|
2820
2823
|
/**
|
|
2821
2824
|
* Adds an effect to consumption of every element of the stream.
|
|
@@ -2824,8 +2827,8 @@ export declare const takeWhile: {
|
|
|
2824
2827
|
* @category sequencing
|
|
2825
2828
|
*/
|
|
2826
2829
|
export declare const tap: {
|
|
2827
|
-
<A, R2, E2, _>(f: (a: NoInfer<A>) => Effect.Effect<
|
|
2828
|
-
<R, E, A, R2, E2, _>(self: Stream<
|
|
2830
|
+
<A, R2, E2, _>(f: (a: NoInfer<A>) => Effect.Effect<_, E2, R2>): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
2831
|
+
<R, E, A, R2, E2, _>(self: Stream<A, E, R>, f: (a: NoInfer<A>) => Effect.Effect<_, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
2829
2832
|
};
|
|
2830
2833
|
/**
|
|
2831
2834
|
* Returns a stream that effectfully "peeks" at the failure or success of
|
|
@@ -2836,13 +2839,13 @@ export declare const tap: {
|
|
|
2836
2839
|
*/
|
|
2837
2840
|
export declare const tapBoth: {
|
|
2838
2841
|
<E, R2, E2, X1, A, R3, E3, X2>(options: {
|
|
2839
|
-
readonly onFailure: (e: NoInfer<E>) => Effect.Effect<
|
|
2840
|
-
readonly onSuccess: (a: NoInfer<A>) => Effect.Effect<
|
|
2841
|
-
}): <R>(self: Stream<
|
|
2842
|
-
<R, E, A, R2, E2, X1, R3, E3, X2>(self: Stream<
|
|
2843
|
-
readonly onFailure: (e: NoInfer<E>) => Effect.Effect<
|
|
2844
|
-
readonly onSuccess: (a: NoInfer<A>) => Effect.Effect<
|
|
2845
|
-
}): Stream<
|
|
2842
|
+
readonly onFailure: (e: NoInfer<E>) => Effect.Effect<X1, E2, R2>;
|
|
2843
|
+
readonly onSuccess: (a: NoInfer<A>) => Effect.Effect<X2, E3, R3>;
|
|
2844
|
+
}): <R>(self: Stream<A, E, R>) => Stream<A, E | E2 | E3, R2 | R3 | R>;
|
|
2845
|
+
<R, E, A, R2, E2, X1, R3, E3, X2>(self: Stream<A, E, R>, options: {
|
|
2846
|
+
readonly onFailure: (e: NoInfer<E>) => Effect.Effect<X1, E2, R2>;
|
|
2847
|
+
readonly onSuccess: (a: NoInfer<A>) => Effect.Effect<X2, E3, R3>;
|
|
2848
|
+
}): Stream<A, E | E2 | E3, R | R2 | R3>;
|
|
2846
2849
|
};
|
|
2847
2850
|
/**
|
|
2848
2851
|
* Returns a stream that effectfully "peeks" at the failure of the stream.
|
|
@@ -2851,8 +2854,8 @@ export declare const tapBoth: {
|
|
|
2851
2854
|
* @category sequencing
|
|
2852
2855
|
*/
|
|
2853
2856
|
export declare const tapError: {
|
|
2854
|
-
<E, R2, E2, _>(f: (error: NoInfer<E>) => Effect.Effect<
|
|
2855
|
-
<R, A, E, R2, E2, _>(self: Stream<
|
|
2857
|
+
<E, R2, E2, _>(f: (error: NoInfer<E>) => Effect.Effect<_, E2, R2>): <R, A>(self: Stream<A, E, R>) => Stream<A, E | E2, R2 | R>;
|
|
2858
|
+
<R, A, E, R2, E2, _>(self: Stream<A, E, R>, f: (error: E) => Effect.Effect<_, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
2856
2859
|
};
|
|
2857
2860
|
/**
|
|
2858
2861
|
* Returns a stream that effectfully "peeks" at the cause of failure of the
|
|
@@ -2862,8 +2865,8 @@ export declare const tapError: {
|
|
|
2862
2865
|
* @category utils
|
|
2863
2866
|
*/
|
|
2864
2867
|
export declare const tapErrorCause: {
|
|
2865
|
-
<E, R2, E2, _>(f: (cause: Cause.Cause<NoInfer<E>>) => Effect.Effect<
|
|
2866
|
-
<R, A, E, R2, E2, _>(self: Stream<
|
|
2868
|
+
<E, R2, E2, _>(f: (cause: Cause.Cause<NoInfer<E>>) => Effect.Effect<_, E2, R2>): <R, A>(self: Stream<A, E, R>) => Stream<A, E | E2, R2 | R>;
|
|
2869
|
+
<R, A, E, R2, E2, _>(self: Stream<A, E, R>, f: (cause: Cause.Cause<E>) => Effect.Effect<_, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
2867
2870
|
};
|
|
2868
2871
|
/**
|
|
2869
2872
|
* Sends all elements emitted by this stream to the specified sink in addition
|
|
@@ -2873,8 +2876,8 @@ export declare const tapErrorCause: {
|
|
|
2873
2876
|
* @category sequencing
|
|
2874
2877
|
*/
|
|
2875
2878
|
export declare const tapSink: {
|
|
2876
|
-
<
|
|
2877
|
-
<
|
|
2879
|
+
<A, E2, R2>(sink: Sink.Sink<unknown, A, unknown, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
2880
|
+
<A, E, R, E2, R2>(self: Stream<A, E, R>, sink: Sink.Sink<unknown, A, unknown, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
2878
2881
|
};
|
|
2879
2882
|
/**
|
|
2880
2883
|
* Delays the chunks of this stream according to the given bandwidth
|
|
@@ -2899,14 +2902,14 @@ export declare const throttle: {
|
|
|
2899
2902
|
readonly duration: Duration.DurationInput;
|
|
2900
2903
|
readonly burst?: number | undefined;
|
|
2901
2904
|
readonly strategy?: "enforce" | "shape" | undefined;
|
|
2902
|
-
}): <R, E>(self: Stream<
|
|
2903
|
-
<
|
|
2905
|
+
}): <R, E>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
2906
|
+
<A, E, R>(self: Stream<A, E, R>, options: {
|
|
2904
2907
|
readonly cost: (chunk: Chunk.Chunk<A>) => number;
|
|
2905
2908
|
readonly units: number;
|
|
2906
2909
|
readonly duration: Duration.DurationInput;
|
|
2907
2910
|
readonly burst?: number | undefined;
|
|
2908
2911
|
readonly strategy?: "enforce" | "shape" | undefined;
|
|
2909
|
-
}): Stream<
|
|
2912
|
+
}): Stream<A, E, R>;
|
|
2910
2913
|
};
|
|
2911
2914
|
/**
|
|
2912
2915
|
* Delays the chunks of this stream according to the given bandwidth
|
|
@@ -2926,19 +2929,19 @@ export declare const throttle: {
|
|
|
2926
2929
|
*/
|
|
2927
2930
|
export declare const throttleEffect: {
|
|
2928
2931
|
<A, R2, E2>(options: {
|
|
2929
|
-
readonly cost: (chunk: Chunk.Chunk<A>) => Effect.Effect<
|
|
2932
|
+
readonly cost: (chunk: Chunk.Chunk<A>) => Effect.Effect<number, E2, R2>;
|
|
2930
2933
|
readonly units: number;
|
|
2931
2934
|
readonly duration: Duration.DurationInput;
|
|
2932
2935
|
readonly burst?: number | undefined;
|
|
2933
2936
|
readonly strategy?: "enforce" | "shape" | undefined;
|
|
2934
|
-
}): <R, E>(self: Stream<
|
|
2935
|
-
<R, E, A, R2, E2>(self: Stream<
|
|
2936
|
-
readonly cost: (chunk: Chunk.Chunk<A>) => Effect.Effect<
|
|
2937
|
+
}): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
2938
|
+
<R, E, A, R2, E2>(self: Stream<A, E, R>, options: {
|
|
2939
|
+
readonly cost: (chunk: Chunk.Chunk<A>) => Effect.Effect<number, E2, R2>;
|
|
2937
2940
|
readonly units: number;
|
|
2938
2941
|
readonly duration: Duration.DurationInput;
|
|
2939
2942
|
readonly burst?: number | undefined;
|
|
2940
2943
|
readonly strategy?: "enforce" | "shape" | undefined;
|
|
2941
|
-
}): Stream<
|
|
2944
|
+
}): Stream<A, E | E2, R | R2>;
|
|
2942
2945
|
};
|
|
2943
2946
|
/**
|
|
2944
2947
|
* A stream that emits Unit values spaced by the specified duration.
|
|
@@ -2946,7 +2949,7 @@ export declare const throttleEffect: {
|
|
|
2946
2949
|
* @since 2.0.0
|
|
2947
2950
|
* @category constructors
|
|
2948
2951
|
*/
|
|
2949
|
-
export declare const tick: (interval: Duration.DurationInput) => Stream<
|
|
2952
|
+
export declare const tick: (interval: Duration.DurationInput) => Stream<void>;
|
|
2950
2953
|
/**
|
|
2951
2954
|
* Ends the stream if it does not produce a value after the specified duration.
|
|
2952
2955
|
*
|
|
@@ -2954,8 +2957,8 @@ export declare const tick: (interval: Duration.DurationInput) => Stream<never, n
|
|
|
2954
2957
|
* @category utils
|
|
2955
2958
|
*/
|
|
2956
2959
|
export declare const timeout: {
|
|
2957
|
-
(duration: Duration.DurationInput): <
|
|
2958
|
-
<
|
|
2960
|
+
(duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
2961
|
+
<A, E, R>(self: Stream<A, E, R>, duration: Duration.DurationInput): Stream<A, E, R>;
|
|
2959
2962
|
};
|
|
2960
2963
|
/**
|
|
2961
2964
|
* Fails the stream with given error if it does not produce a value after d
|
|
@@ -2965,8 +2968,8 @@ export declare const timeout: {
|
|
|
2965
2968
|
* @category utils
|
|
2966
2969
|
*/
|
|
2967
2970
|
export declare const timeoutFail: {
|
|
2968
|
-
<E2>(error: LazyArg<E2>, duration: Duration.DurationInput): <
|
|
2969
|
-
<R, E, A, E2>(self: Stream<
|
|
2971
|
+
<E2>(error: LazyArg<E2>, duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R>;
|
|
2972
|
+
<R, E, A, E2>(self: Stream<A, E, R>, error: LazyArg<E2>, duration: Duration.DurationInput): Stream<A, E | E2, R>;
|
|
2970
2973
|
};
|
|
2971
2974
|
/**
|
|
2972
2975
|
* Fails the stream with given cause if it does not produce a value after d
|
|
@@ -2976,8 +2979,8 @@ export declare const timeoutFail: {
|
|
|
2976
2979
|
* @category utils
|
|
2977
2980
|
*/
|
|
2978
2981
|
export declare const timeoutFailCause: {
|
|
2979
|
-
<E2>(cause: LazyArg<Cause.Cause<E2>>, duration: Duration.DurationInput): <
|
|
2980
|
-
<R, E, A, E2>(self: Stream<
|
|
2982
|
+
<E2>(cause: LazyArg<Cause.Cause<E2>>, duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R>;
|
|
2983
|
+
<R, E, A, E2>(self: Stream<A, E, R>, cause: LazyArg<Cause.Cause<E2>>, duration: Duration.DurationInput): Stream<A, E | E2, R>;
|
|
2981
2984
|
};
|
|
2982
2985
|
/**
|
|
2983
2986
|
* Switches the stream if it does not produce a value after the specified
|
|
@@ -2987,8 +2990,8 @@ export declare const timeoutFailCause: {
|
|
|
2987
2990
|
* @category utils
|
|
2988
2991
|
*/
|
|
2989
2992
|
export declare const timeoutTo: {
|
|
2990
|
-
<R2, E2, A2>(duration: Duration.DurationInput, that: Stream<
|
|
2991
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
2993
|
+
<R2, E2, A2>(duration: Duration.DurationInput, that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E, R2 | R>;
|
|
2994
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, duration: Duration.DurationInput, that: Stream<A2, E2, R2>): Stream<A | A2, E | E2, R | R2>;
|
|
2992
2995
|
};
|
|
2993
2996
|
/**
|
|
2994
2997
|
* Converts the stream to a scoped `PubSub` of chunks. After the scope is closed,
|
|
@@ -2998,8 +3001,8 @@ export declare const timeoutTo: {
|
|
|
2998
3001
|
* @category destructors
|
|
2999
3002
|
*/
|
|
3000
3003
|
export declare const toPubSub: {
|
|
3001
|
-
(capacity: number): <
|
|
3002
|
-
<
|
|
3004
|
+
(capacity: number): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<PubSub.PubSub<Take.Take<A, E>>, never, Scope.Scope | R>;
|
|
3005
|
+
<A, E, R>(self: Stream<A, E, R>, capacity: number): Effect.Effect<PubSub.PubSub<Take.Take<A, E>>, never, Scope.Scope | R>;
|
|
3003
3006
|
};
|
|
3004
3007
|
/**
|
|
3005
3008
|
* Returns in a scope a ZIO effect that can be used to repeatedly pull chunks
|
|
@@ -3010,7 +3013,7 @@ export declare const toPubSub: {
|
|
|
3010
3013
|
* @since 2.0.0
|
|
3011
3014
|
* @category destructors
|
|
3012
3015
|
*/
|
|
3013
|
-
export declare const toPull: <
|
|
3016
|
+
export declare const toPull: <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Effect.Effect<Chunk.Chunk<A>, Option.Option<E>, R>, never, Scope.Scope | R>;
|
|
3014
3017
|
/**
|
|
3015
3018
|
* Converts the stream to a scoped queue of chunks. After the scope is closed,
|
|
3016
3019
|
* the queue will never again produce values and should be discarded.
|
|
@@ -3026,13 +3029,13 @@ export declare const toQueue: {
|
|
|
3026
3029
|
readonly capacity?: number | undefined;
|
|
3027
3030
|
} | {
|
|
3028
3031
|
readonly strategy: "unbounded";
|
|
3029
|
-
}): <
|
|
3030
|
-
<
|
|
3032
|
+
} | undefined): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Queue.Dequeue<Take.Take<A, E>>, never, Scope.Scope | R>;
|
|
3033
|
+
<A, E, R>(self: Stream<A, E, R>, options?: {
|
|
3031
3034
|
readonly strategy?: "dropping" | "sliding" | "suspend" | undefined;
|
|
3032
3035
|
readonly capacity?: number | undefined;
|
|
3033
3036
|
} | {
|
|
3034
3037
|
readonly strategy: "unbounded";
|
|
3035
|
-
}): Effect.Effect<
|
|
3038
|
+
} | undefined): Effect.Effect<Queue.Dequeue<Take.Take<A, E>>, never, Scope.Scope | R>;
|
|
3036
3039
|
};
|
|
3037
3040
|
/**
|
|
3038
3041
|
* Converts the stream to a scoped queue of elements. After the scope is
|
|
@@ -3046,10 +3049,10 @@ export declare const toQueue: {
|
|
|
3046
3049
|
export declare const toQueueOfElements: {
|
|
3047
3050
|
(options?: {
|
|
3048
3051
|
readonly capacity?: number | undefined;
|
|
3049
|
-
}): <
|
|
3050
|
-
<
|
|
3052
|
+
} | undefined): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Queue.Dequeue<Exit.Exit<A, Option.Option<E>>>, never, Scope.Scope | R>;
|
|
3053
|
+
<A, E, R>(self: Stream<A, E, R>, options?: {
|
|
3051
3054
|
readonly capacity?: number | undefined;
|
|
3052
|
-
}): Effect.Effect<
|
|
3055
|
+
} | undefined): Effect.Effect<Queue.Dequeue<Exit.Exit<A, Option.Option<E>>>, never, Scope.Scope | R>;
|
|
3053
3056
|
};
|
|
3054
3057
|
/**
|
|
3055
3058
|
* Converts the stream to a `ReadableStream`.
|
|
@@ -3059,7 +3062,7 @@ export declare const toQueueOfElements: {
|
|
|
3059
3062
|
* @since 2.0.0
|
|
3060
3063
|
* @category destructors
|
|
3061
3064
|
*/
|
|
3062
|
-
export declare const toReadableStream: <
|
|
3065
|
+
export declare const toReadableStream: <A, E>(source: Stream<A, E>) => ReadableStream<A>;
|
|
3063
3066
|
/**
|
|
3064
3067
|
* Applies the transducer to the stream and emits its outputs.
|
|
3065
3068
|
*
|
|
@@ -3067,8 +3070,8 @@ export declare const toReadableStream: <E, A>(source: Stream<never, E, A>) => Re
|
|
|
3067
3070
|
* @category utils
|
|
3068
3071
|
*/
|
|
3069
3072
|
export declare const transduce: {
|
|
3070
|
-
<
|
|
3071
|
-
<
|
|
3073
|
+
<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>;
|
|
3074
|
+
<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>;
|
|
3072
3075
|
};
|
|
3073
3076
|
/**
|
|
3074
3077
|
* Creates a stream by peeling off the "layers" of a value of type `S`.
|
|
@@ -3076,14 +3079,14 @@ export declare const transduce: {
|
|
|
3076
3079
|
* @since 2.0.0
|
|
3077
3080
|
* @category constructors
|
|
3078
3081
|
*/
|
|
3079
|
-
export declare const unfold: <S, A>(s: S, f: (s: S) => Option.Option<readonly [A, S]>) => Stream<
|
|
3082
|
+
export declare const unfold: <S, A>(s: S, f: (s: S) => Option.Option<readonly [A, S]>) => Stream<A>;
|
|
3080
3083
|
/**
|
|
3081
3084
|
* Creates a stream by peeling off the "layers" of a value of type `S`.
|
|
3082
3085
|
*
|
|
3083
3086
|
* @since 2.0.0
|
|
3084
3087
|
* @category constructors
|
|
3085
3088
|
*/
|
|
3086
|
-
export declare const unfoldChunk: <S, A>(s: S, f: (s: S) => Option.Option<readonly [Chunk.Chunk<A>, S]>) => Stream<
|
|
3089
|
+
export declare const unfoldChunk: <S, A>(s: S, f: (s: S) => Option.Option<readonly [Chunk.Chunk<A>, S]>) => Stream<A>;
|
|
3087
3090
|
/**
|
|
3088
3091
|
* Creates a stream by effectfully peeling off the "layers" of a value of type
|
|
3089
3092
|
* `S`.
|
|
@@ -3091,7 +3094,7 @@ export declare const unfoldChunk: <S, A>(s: S, f: (s: S) => Option.Option<readon
|
|
|
3091
3094
|
* @since 2.0.0
|
|
3092
3095
|
* @category constructors
|
|
3093
3096
|
*/
|
|
3094
|
-
export declare const unfoldChunkEffect: <R, E, A, S>(s: S, f: (s: S) => Effect.Effect<
|
|
3097
|
+
export declare const unfoldChunkEffect: <R, E, A, S>(s: S, f: (s: S) => Effect.Effect<Option.Option<readonly [Chunk.Chunk<A>, S]>, E, R>) => Stream<A, E, R>;
|
|
3095
3098
|
/**
|
|
3096
3099
|
* Creates a stream by effectfully peeling off the "layers" of a value of type
|
|
3097
3100
|
* `S`.
|
|
@@ -3099,35 +3102,35 @@ export declare const unfoldChunkEffect: <R, E, A, S>(s: S, f: (s: S) => Effect.E
|
|
|
3099
3102
|
* @since 2.0.0
|
|
3100
3103
|
* @category constructors
|
|
3101
3104
|
*/
|
|
3102
|
-
export declare const unfoldEffect: <S, R, E, A>(s: S, f: (s: S) => Effect.Effect<
|
|
3105
|
+
export declare const unfoldEffect: <S, R, E, A>(s: S, f: (s: S) => Effect.Effect<Option.Option<readonly [A, S]>, E, R>) => Stream<A, E, R>;
|
|
3103
3106
|
/**
|
|
3104
3107
|
* A stream that contains a single `Unit` value.
|
|
3105
3108
|
*
|
|
3106
3109
|
* @since 2.0.0
|
|
3107
3110
|
* @category constructors
|
|
3108
3111
|
*/
|
|
3109
|
-
export declare const unit: Stream<
|
|
3112
|
+
export declare const unit: Stream<void>;
|
|
3110
3113
|
/**
|
|
3111
3114
|
* Creates a stream produced from an `Effect`.
|
|
3112
3115
|
*
|
|
3113
3116
|
* @since 2.0.0
|
|
3114
3117
|
* @category constructors
|
|
3115
3118
|
*/
|
|
3116
|
-
export declare const unwrap: <R, E, R2, E2, A>(effect: Effect.Effect<
|
|
3119
|
+
export declare const unwrap: <R, E, R2, E2, A>(effect: Effect.Effect<Stream<A, E2, R2>, E, R>) => Stream<A, E | E2, R | R2>;
|
|
3117
3120
|
/**
|
|
3118
3121
|
* Creates a stream produced from a scoped `Effect`.
|
|
3119
3122
|
*
|
|
3120
3123
|
* @since 2.0.0
|
|
3121
3124
|
* @category constructors
|
|
3122
3125
|
*/
|
|
3123
|
-
export declare const unwrapScoped: <R, E, R2, E2, A>(effect: Effect.Effect<
|
|
3126
|
+
export declare const unwrapScoped: <R, E, R2, E2, A>(effect: Effect.Effect<Stream<A, E2, R2>, E, R>) => Stream<A, E | E2, R2 | Exclude<R, Scope.Scope>>;
|
|
3124
3127
|
/**
|
|
3125
3128
|
* Updates the specified service within the context of the `Stream`.
|
|
3126
3129
|
*
|
|
3127
3130
|
* @since 2.0.0
|
|
3128
3131
|
* @category context
|
|
3129
3132
|
*/
|
|
3130
|
-
export declare const updateService: (<T extends Context.Tag<any, any>>(tag: T, f: (service: Context.Tag.Service<T>) => Context.Tag.Service<T>) => <
|
|
3133
|
+
export declare const updateService: (<T extends Context.Tag<any, any>>(tag: T, f: (service: Context.Tag.Service<T>) => Context.Tag.Service<T>) => <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, T | R>) & (<R_1, E_1, A_1, T_1 extends Context.Tag<any, any>>(self: Stream<A_1, E_1, R_1>, tag: T_1, f: (service: Context.Tag.Service<T_1>) => Context.Tag.Service<T_1>) => Stream<A_1, E_1, R_1 | T_1>);
|
|
3131
3134
|
/**
|
|
3132
3135
|
* Returns the specified stream if the given condition is satisfied, otherwise
|
|
3133
3136
|
* returns an empty stream.
|
|
@@ -3136,8 +3139,8 @@ export declare const updateService: (<T extends Context.Tag<any, any>>(tag: T, f
|
|
|
3136
3139
|
* @category utils
|
|
3137
3140
|
*/
|
|
3138
3141
|
export declare const when: {
|
|
3139
|
-
(test: LazyArg<boolean>): <
|
|
3140
|
-
<
|
|
3142
|
+
(test: LazyArg<boolean>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
3143
|
+
<A, E, R>(self: Stream<A, E, R>, test: LazyArg<boolean>): Stream<A, E, R>;
|
|
3141
3144
|
};
|
|
3142
3145
|
/**
|
|
3143
3146
|
* Returns the resulting stream when the given `PartialFunction` is defined
|
|
@@ -3146,7 +3149,7 @@ export declare const when: {
|
|
|
3146
3149
|
* @since 2.0.0
|
|
3147
3150
|
* @category constructors
|
|
3148
3151
|
*/
|
|
3149
|
-
export declare const whenCase: <A, R, E, A2>(evaluate: LazyArg<A>, pf: (a: A) => Option.Option<Stream<
|
|
3152
|
+
export declare const whenCase: <A, R, E, A2>(evaluate: LazyArg<A>, pf: (a: A) => Option.Option<Stream<A2, E, R>>) => Stream<A2, E, R>;
|
|
3150
3153
|
/**
|
|
3151
3154
|
* Returns the stream when the given partial function is defined for the given
|
|
3152
3155
|
* effectful value, otherwise returns an empty stream.
|
|
@@ -3155,8 +3158,8 @@ export declare const whenCase: <A, R, E, A2>(evaluate: LazyArg<A>, pf: (a: A) =>
|
|
|
3155
3158
|
* @category utils
|
|
3156
3159
|
*/
|
|
3157
3160
|
export declare const whenCaseEffect: {
|
|
3158
|
-
<A, R2, E2, A2>(pf: (a: A) => Option.Option<Stream<
|
|
3159
|
-
<R, E, A, R2, E2, A2>(self: Effect.Effect<
|
|
3161
|
+
<A, R2, E2, A2>(pf: (a: A) => Option.Option<Stream<A2, E2, R2>>): <R, E>(self: Effect.Effect<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
3162
|
+
<R, E, A, R2, E2, A2>(self: Effect.Effect<A, E, R>, pf: (a: A) => Option.Option<Stream<A2, E2, R2>>): Stream<A2, E | E2, R | R2>;
|
|
3160
3163
|
};
|
|
3161
3164
|
/**
|
|
3162
3165
|
* Returns the stream if the given effectful condition is satisfied, otherwise
|
|
@@ -3166,8 +3169,8 @@ export declare const whenCaseEffect: {
|
|
|
3166
3169
|
* @category utils
|
|
3167
3170
|
*/
|
|
3168
3171
|
export declare const whenEffect: {
|
|
3169
|
-
<R2, E2>(effect: Effect.Effect<
|
|
3170
|
-
<R, E, A, R2, E2>(self: Stream<
|
|
3172
|
+
<R2, E2>(effect: Effect.Effect<boolean, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
3173
|
+
<R, E, A, R2, E2>(self: Stream<A, E, R>, effect: Effect.Effect<boolean, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
3171
3174
|
};
|
|
3172
3175
|
/**
|
|
3173
3176
|
* Wraps the stream with a new span for tracing.
|
|
@@ -3182,14 +3185,14 @@ export declare const withSpan: {
|
|
|
3182
3185
|
readonly parent?: Tracer.ParentSpan | undefined;
|
|
3183
3186
|
readonly root?: boolean | undefined;
|
|
3184
3187
|
readonly context?: Context.Context<never> | undefined;
|
|
3185
|
-
}): <
|
|
3186
|
-
<
|
|
3188
|
+
} | undefined): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, Exclude<R, Tracer.ParentSpan>>;
|
|
3189
|
+
<A, E, R>(self: Stream<A, E, R>, name: string, options?: {
|
|
3187
3190
|
readonly attributes?: Record<string, unknown> | undefined;
|
|
3188
3191
|
readonly links?: ReadonlyArray<Tracer.SpanLink> | undefined;
|
|
3189
3192
|
readonly parent?: Tracer.ParentSpan | undefined;
|
|
3190
3193
|
readonly root?: boolean | undefined;
|
|
3191
3194
|
readonly context?: Context.Context<never> | undefined;
|
|
3192
|
-
}): Stream<
|
|
3195
|
+
} | undefined): Stream<A, E, Exclude<R, Tracer.ParentSpan>>;
|
|
3193
3196
|
};
|
|
3194
3197
|
/**
|
|
3195
3198
|
* Zips this stream with another point-wise and emits tuples of elements from
|
|
@@ -3201,8 +3204,8 @@ export declare const withSpan: {
|
|
|
3201
3204
|
* @category zipping
|
|
3202
3205
|
*/
|
|
3203
3206
|
export declare const zip: {
|
|
3204
|
-
<R2, E2, A2>(that: Stream<
|
|
3205
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
3207
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<[A, A2], E2 | E, R2 | R>;
|
|
3208
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<[A, A2], E | E2, R | R2>;
|
|
3206
3209
|
};
|
|
3207
3210
|
/**
|
|
3208
3211
|
* Zips this stream with another point-wise and emits tuples of elements from
|
|
@@ -3214,8 +3217,8 @@ export declare const zip: {
|
|
|
3214
3217
|
* @category zipping
|
|
3215
3218
|
*/
|
|
3216
3219
|
export declare const zipFlatten: {
|
|
3217
|
-
<R2, E2, A2>(that: Stream<
|
|
3218
|
-
<R, E, A extends ReadonlyArray<any>, R2, E2, A2>(self: Stream<
|
|
3220
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <R, E, A extends ReadonlyArray<any>>(self: Stream<A, E, R>) => Stream<[...A, A2], E2 | E, R2 | R>;
|
|
3221
|
+
<R, E, A extends ReadonlyArray<any>, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<[...A, A2], E | E2, R | R2>;
|
|
3219
3222
|
};
|
|
3220
3223
|
/**
|
|
3221
3224
|
* Zips this stream with another point-wise, creating a new stream of pairs of
|
|
@@ -3229,15 +3232,15 @@ export declare const zipFlatten: {
|
|
|
3229
3232
|
*/
|
|
3230
3233
|
export declare const zipAll: {
|
|
3231
3234
|
<R2, E2, A2, A>(options: {
|
|
3232
|
-
readonly other: Stream<
|
|
3235
|
+
readonly other: Stream<A2, E2, R2>;
|
|
3233
3236
|
readonly defaultSelf: A;
|
|
3234
3237
|
readonly defaultOther: A2;
|
|
3235
|
-
}): <R, E>(self: Stream<
|
|
3236
|
-
<R, E, R2, E2, A2, A>(self: Stream<
|
|
3237
|
-
readonly other: Stream<
|
|
3238
|
+
}): <R, E>(self: Stream<A, E, R>) => Stream<[A, A2], E2 | E, R2 | R>;
|
|
3239
|
+
<R, E, R2, E2, A2, A>(self: Stream<A, E, R>, options: {
|
|
3240
|
+
readonly other: Stream<A2, E2, R2>;
|
|
3238
3241
|
readonly defaultSelf: A;
|
|
3239
3242
|
readonly defaultOther: A2;
|
|
3240
|
-
}): Stream<
|
|
3243
|
+
}): Stream<[A, A2], E | E2, R | R2>;
|
|
3241
3244
|
};
|
|
3242
3245
|
/**
|
|
3243
3246
|
* Zips this stream with another point-wise, and keeps only elements from this
|
|
@@ -3250,8 +3253,8 @@ export declare const zipAll: {
|
|
|
3250
3253
|
* @category zipping
|
|
3251
3254
|
*/
|
|
3252
3255
|
export declare const zipAllLeft: {
|
|
3253
|
-
<R2, E2, A2, A>(that: Stream<
|
|
3254
|
-
<R, E, R2, E2, A2, A>(self: Stream<
|
|
3256
|
+
<R2, E2, A2, A>(that: Stream<A2, E2, R2>, defaultLeft: A): <R, E>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
3257
|
+
<R, E, R2, E2, A2, A>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, defaultLeft: A): Stream<A, E | E2, R | R2>;
|
|
3255
3258
|
};
|
|
3256
3259
|
/**
|
|
3257
3260
|
* Zips this stream with another point-wise, and keeps only elements from the
|
|
@@ -3264,8 +3267,8 @@ export declare const zipAllLeft: {
|
|
|
3264
3267
|
* @category zipping
|
|
3265
3268
|
*/
|
|
3266
3269
|
export declare const zipAllRight: {
|
|
3267
|
-
<R2, E2, A2>(that: Stream<
|
|
3268
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
3270
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>, defaultRight: A2): <A, E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
3271
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, defaultRight: A2): Stream<A2, E | E2, R | R2>;
|
|
3269
3272
|
};
|
|
3270
3273
|
/**
|
|
3271
3274
|
* Zips this stream that is sorted by distinct keys and the specified stream
|
|
@@ -3283,17 +3286,17 @@ export declare const zipAllRight: {
|
|
|
3283
3286
|
*/
|
|
3284
3287
|
export declare const zipAllSortedByKey: {
|
|
3285
3288
|
<R2, E2, A2, A, K>(options: {
|
|
3286
|
-
readonly other: Stream<
|
|
3289
|
+
readonly other: Stream<readonly [K, A2], E2, R2>;
|
|
3287
3290
|
readonly defaultSelf: A;
|
|
3288
3291
|
readonly defaultOther: A2;
|
|
3289
3292
|
readonly order: Order.Order<K>;
|
|
3290
|
-
}): <R, E>(self: Stream<
|
|
3291
|
-
<R, E, R2, E2, A2, A, K>(self: Stream<
|
|
3292
|
-
readonly other: Stream<
|
|
3293
|
+
}): <R, E>(self: Stream<readonly [K, A], E, R>) => Stream<[K, [A, A2]], E2 | E, R2 | R>;
|
|
3294
|
+
<R, E, R2, E2, A2, A, K>(self: Stream<readonly [K, A], E, R>, options: {
|
|
3295
|
+
readonly other: Stream<readonly [K, A2], E2, R2>;
|
|
3293
3296
|
readonly defaultSelf: A;
|
|
3294
3297
|
readonly defaultOther: A2;
|
|
3295
3298
|
readonly order: Order.Order<K>;
|
|
3296
|
-
}): Stream<
|
|
3299
|
+
}): Stream<[K, [A, A2]], E | E2, R | R2>;
|
|
3297
3300
|
};
|
|
3298
3301
|
/**
|
|
3299
3302
|
* Zips this stream that is sorted by distinct keys and the specified stream
|
|
@@ -3310,15 +3313,15 @@ export declare const zipAllSortedByKey: {
|
|
|
3310
3313
|
*/
|
|
3311
3314
|
export declare const zipAllSortedByKeyLeft: {
|
|
3312
3315
|
<R2, E2, A2, A, K>(options: {
|
|
3313
|
-
readonly other: Stream<
|
|
3316
|
+
readonly other: Stream<readonly [K, A2], E2, R2>;
|
|
3314
3317
|
readonly defaultSelf: A;
|
|
3315
3318
|
readonly order: Order.Order<K>;
|
|
3316
|
-
}): <R, E>(self: Stream<
|
|
3317
|
-
<R, E, R2, E2, A2, A, K>(self: Stream<
|
|
3318
|
-
readonly other: Stream<
|
|
3319
|
+
}): <R, E>(self: Stream<readonly [K, A], E, R>) => Stream<[K, A], E2 | E, R2 | R>;
|
|
3320
|
+
<R, E, R2, E2, A2, A, K>(self: Stream<readonly [K, A], E, R>, options: {
|
|
3321
|
+
readonly other: Stream<readonly [K, A2], E2, R2>;
|
|
3319
3322
|
readonly defaultSelf: A;
|
|
3320
3323
|
readonly order: Order.Order<K>;
|
|
3321
|
-
}): Stream<
|
|
3324
|
+
}): Stream<[K, A], E | E2, R | R2>;
|
|
3322
3325
|
};
|
|
3323
3326
|
/**
|
|
3324
3327
|
* Zips this stream that is sorted by distinct keys and the specified stream
|
|
@@ -3335,15 +3338,15 @@ export declare const zipAllSortedByKeyLeft: {
|
|
|
3335
3338
|
*/
|
|
3336
3339
|
export declare const zipAllSortedByKeyRight: {
|
|
3337
3340
|
<R2, E2, A2, K>(options: {
|
|
3338
|
-
readonly other: Stream<
|
|
3341
|
+
readonly other: Stream<readonly [K, A2], E2, R2>;
|
|
3339
3342
|
readonly defaultOther: A2;
|
|
3340
3343
|
readonly order: Order.Order<K>;
|
|
3341
|
-
}): <
|
|
3342
|
-
<R, E, A, R2, E2, A2, K>(self: Stream<
|
|
3343
|
-
readonly other: Stream<
|
|
3344
|
+
}): <A, E, R>(self: Stream<readonly [K, A], E, R>) => Stream<[K, A2], E2 | E, R2 | R>;
|
|
3345
|
+
<R, E, A, R2, E2, A2, K>(self: Stream<readonly [K, A], E, R>, options: {
|
|
3346
|
+
readonly other: Stream<readonly [K, A2], E2, R2>;
|
|
3344
3347
|
readonly defaultOther: A2;
|
|
3345
3348
|
readonly order: Order.Order<K>;
|
|
3346
|
-
}): Stream<
|
|
3349
|
+
}): Stream<[K, A2], E | E2, R | R2>;
|
|
3347
3350
|
};
|
|
3348
3351
|
/**
|
|
3349
3352
|
* Zips this stream that is sorted by distinct keys and the specified stream
|
|
@@ -3361,19 +3364,19 @@ export declare const zipAllSortedByKeyRight: {
|
|
|
3361
3364
|
*/
|
|
3362
3365
|
export declare const zipAllSortedByKeyWith: {
|
|
3363
3366
|
<R2, E2, A, A3, A2, K>(options: {
|
|
3364
|
-
readonly other: Stream<
|
|
3367
|
+
readonly other: Stream<readonly [K, A2], E2, R2>;
|
|
3365
3368
|
readonly onSelf: (a: A) => A3;
|
|
3366
3369
|
readonly onOther: (a2: A2) => A3;
|
|
3367
3370
|
readonly onBoth: (a: A, a2: A2) => A3;
|
|
3368
3371
|
readonly order: Order.Order<K>;
|
|
3369
|
-
}): <R, E>(self: Stream<
|
|
3370
|
-
<R, E, R2, E2, A, A3, A2, K>(self: Stream<
|
|
3371
|
-
readonly other: Stream<
|
|
3372
|
+
}): <R, E>(self: Stream<readonly [K, A], E, R>) => Stream<[K, A3], E2 | E, R2 | R>;
|
|
3373
|
+
<R, E, R2, E2, A, A3, A2, K>(self: Stream<readonly [K, A], E, R>, options: {
|
|
3374
|
+
readonly other: Stream<readonly [K, A2], E2, R2>;
|
|
3372
3375
|
readonly onSelf: (a: A) => A3;
|
|
3373
3376
|
readonly onOther: (a2: A2) => A3;
|
|
3374
3377
|
readonly onBoth: (a: A, a2: A2) => A3;
|
|
3375
3378
|
readonly order: Order.Order<K>;
|
|
3376
|
-
}): Stream<
|
|
3379
|
+
}): Stream<[K, A3], E | E2, R | R2>;
|
|
3377
3380
|
};
|
|
3378
3381
|
/**
|
|
3379
3382
|
* Zips this stream with another point-wise. The provided functions will be
|
|
@@ -3387,17 +3390,17 @@ export declare const zipAllSortedByKeyWith: {
|
|
|
3387
3390
|
*/
|
|
3388
3391
|
export declare const zipAllWith: {
|
|
3389
3392
|
<R2, E2, A2, A, A3>(options: {
|
|
3390
|
-
readonly other: Stream<
|
|
3393
|
+
readonly other: Stream<A2, E2, R2>;
|
|
3391
3394
|
readonly onSelf: (a: A) => A3;
|
|
3392
3395
|
readonly onOther: (a2: A2) => A3;
|
|
3393
3396
|
readonly onBoth: (a: A, a2: A2) => A3;
|
|
3394
|
-
}): <R, E>(self: Stream<
|
|
3395
|
-
<R, E, R2, E2, A2, A, A3>(self: Stream<
|
|
3396
|
-
readonly other: Stream<
|
|
3397
|
+
}): <R, E>(self: Stream<A, E, R>) => Stream<A3, E2 | E, R2 | R>;
|
|
3398
|
+
<R, E, R2, E2, A2, A, A3>(self: Stream<A, E, R>, options: {
|
|
3399
|
+
readonly other: Stream<A2, E2, R2>;
|
|
3397
3400
|
readonly onSelf: (a: A) => A3;
|
|
3398
3401
|
readonly onOther: (a2: A2) => A3;
|
|
3399
3402
|
readonly onBoth: (a: A, a2: A2) => A3;
|
|
3400
|
-
}): Stream<
|
|
3403
|
+
}): Stream<A3, E | E2, R | R2>;
|
|
3401
3404
|
};
|
|
3402
3405
|
/**
|
|
3403
3406
|
* Zips the two streams so that when a value is emitted by either of the two
|
|
@@ -3412,8 +3415,8 @@ export declare const zipAllWith: {
|
|
|
3412
3415
|
* @category zipping
|
|
3413
3416
|
*/
|
|
3414
3417
|
export declare const zipLatest: {
|
|
3415
|
-
<R2, E2, A2>(that: Stream<
|
|
3416
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
3418
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<[A, A2], E2 | E, R2 | R>;
|
|
3419
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<[A, A2], E | E2, R | R2>;
|
|
3417
3420
|
};
|
|
3418
3421
|
/**
|
|
3419
3422
|
* Zips the two streams so that when a value is emitted by either of the two
|
|
@@ -3428,8 +3431,8 @@ export declare const zipLatest: {
|
|
|
3428
3431
|
* @category zipping
|
|
3429
3432
|
*/
|
|
3430
3433
|
export declare const zipLatestWith: {
|
|
3431
|
-
<R2, E2, A2, A, A3>(that: Stream<
|
|
3432
|
-
<R, E, R2, E2, A2, A, A3>(self: Stream<
|
|
3434
|
+
<R2, E2, A2, A, A3>(that: Stream<A2, E2, R2>, f: (a: A, a2: A2) => A3): <R, E>(self: Stream<A, E, R>) => Stream<A3, E2 | E, R2 | R>;
|
|
3435
|
+
<R, E, R2, E2, A2, A, A3>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, f: (a: A, a2: A2) => A3): Stream<A3, E | E2, R | R2>;
|
|
3433
3436
|
};
|
|
3434
3437
|
/**
|
|
3435
3438
|
* Zips this stream with another point-wise, but keeps only the outputs of
|
|
@@ -3441,8 +3444,8 @@ export declare const zipLatestWith: {
|
|
|
3441
3444
|
* @category zipping
|
|
3442
3445
|
*/
|
|
3443
3446
|
export declare const zipLeft: {
|
|
3444
|
-
<R2, E2, A2>(that: Stream<
|
|
3445
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
3447
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
3448
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
3446
3449
|
};
|
|
3447
3450
|
/**
|
|
3448
3451
|
* Zips this stream with another point-wise, but keeps only the outputs of the
|
|
@@ -3454,8 +3457,8 @@ export declare const zipLeft: {
|
|
|
3454
3457
|
* @category zipping
|
|
3455
3458
|
*/
|
|
3456
3459
|
export declare const zipRight: {
|
|
3457
|
-
<R2, E2, A2>(that: Stream<
|
|
3458
|
-
<R, E, A, R2, E2, A2>(self: Stream<
|
|
3460
|
+
<R2, E2, A2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
3461
|
+
<R, E, A, R2, E2, A2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A2, E | E2, R | R2>;
|
|
3459
3462
|
};
|
|
3460
3463
|
/**
|
|
3461
3464
|
* Zips this stream with another point-wise and applies the function to the
|
|
@@ -3467,8 +3470,8 @@ export declare const zipRight: {
|
|
|
3467
3470
|
* @category zipping
|
|
3468
3471
|
*/
|
|
3469
3472
|
export declare const zipWith: {
|
|
3470
|
-
<R2, E2, A2, A, A3>(that: Stream<
|
|
3471
|
-
<R, E, R2, E2, A2, A, A3>(self: Stream<
|
|
3473
|
+
<R2, E2, A2, A, A3>(that: Stream<A2, E2, R2>, f: (a: A, a2: A2) => A3): <R, E>(self: Stream<A, E, R>) => Stream<A3, E2 | E, R2 | R>;
|
|
3474
|
+
<R, E, R2, E2, A2, A, A3>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, f: (a: A, a2: A2) => A3): Stream<A3, E | E2, R | R2>;
|
|
3472
3475
|
};
|
|
3473
3476
|
/**
|
|
3474
3477
|
* Zips this stream with another point-wise and applies the function to the
|
|
@@ -3480,8 +3483,8 @@ export declare const zipWith: {
|
|
|
3480
3483
|
* @category zipping
|
|
3481
3484
|
*/
|
|
3482
3485
|
export declare const zipWithChunks: {
|
|
3483
|
-
<R2, E2, A2, A, A3>(that: Stream<
|
|
3484
|
-
<R, E, R2, E2, A2, A, A3>(self: Stream<
|
|
3486
|
+
<R2, E2, A2, A, A3>(that: Stream<A2, E2, R2>, f: (left: Chunk.Chunk<A>, right: Chunk.Chunk<A2>) => readonly [Chunk.Chunk<A3>, Either.Either<Chunk.Chunk<A>, Chunk.Chunk<A2>>]): <R, E>(self: Stream<A, E, R>) => Stream<A3, E2 | E, R2 | R>;
|
|
3487
|
+
<R, E, R2, E2, A2, A, A3>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, f: (left: Chunk.Chunk<A>, right: Chunk.Chunk<A2>) => readonly [Chunk.Chunk<A3>, Either.Either<Chunk.Chunk<A>, Chunk.Chunk<A2>>]): Stream<A3, E | E2, R | R2>;
|
|
3485
3488
|
};
|
|
3486
3489
|
/**
|
|
3487
3490
|
* Zips each element with the next element if present.
|
|
@@ -3489,7 +3492,7 @@ export declare const zipWithChunks: {
|
|
|
3489
3492
|
* @since 2.0.0
|
|
3490
3493
|
* @category zipping
|
|
3491
3494
|
*/
|
|
3492
|
-
export declare const zipWithNext: <
|
|
3495
|
+
export declare const zipWithNext: <A, E, R>(self: Stream<A, E, R>) => Stream<[A, Option.Option<A>], E, R>;
|
|
3493
3496
|
/**
|
|
3494
3497
|
* Zips each element with the previous element. Initially accompanied by
|
|
3495
3498
|
* `None`.
|
|
@@ -3497,26 +3500,26 @@ export declare const zipWithNext: <R, E, A>(self: Stream<R, E, A>) => Stream<R,
|
|
|
3497
3500
|
* @since 2.0.0
|
|
3498
3501
|
* @category zipping
|
|
3499
3502
|
*/
|
|
3500
|
-
export declare const zipWithPrevious: <
|
|
3503
|
+
export declare const zipWithPrevious: <A, E, R>(self: Stream<A, E, R>) => Stream<[Option.Option<A>, A], E, R>;
|
|
3501
3504
|
/**
|
|
3502
3505
|
* Zips each element with both the previous and next element.
|
|
3503
3506
|
*
|
|
3504
3507
|
* @since 2.0.0
|
|
3505
3508
|
* @category zipping
|
|
3506
3509
|
*/
|
|
3507
|
-
export declare const zipWithPreviousAndNext: <
|
|
3510
|
+
export declare const zipWithPreviousAndNext: <A, E, R>(self: Stream<A, E, R>) => Stream<[Option.Option<A>, A, Option.Option<A>], E, R>;
|
|
3508
3511
|
/**
|
|
3509
3512
|
* Zips this stream together with the index of elements.
|
|
3510
3513
|
*
|
|
3511
3514
|
* @since 2.0.0
|
|
3512
3515
|
* @category zipping
|
|
3513
3516
|
*/
|
|
3514
|
-
export declare const zipWithIndex: <
|
|
3517
|
+
export declare const zipWithIndex: <A, E, R>(self: Stream<A, E, R>) => Stream<[A, number], E, R>;
|
|
3515
3518
|
/**
|
|
3516
3519
|
* @since 2.0.0
|
|
3517
3520
|
* @category do notation
|
|
3518
3521
|
*/
|
|
3519
|
-
export declare const Do: Stream<
|
|
3522
|
+
export declare const Do: Stream<{}>;
|
|
3520
3523
|
/**
|
|
3521
3524
|
* Binds a value from a stream in a `do` scope
|
|
3522
3525
|
*
|
|
@@ -3524,18 +3527,18 @@ export declare const Do: Stream<never, never, {}>;
|
|
|
3524
3527
|
* @category do notation
|
|
3525
3528
|
*/
|
|
3526
3529
|
export declare const bind: {
|
|
3527
|
-
<N extends string, K, R2, E2, A>(tag: Exclude<N, keyof K>, f: (_: K) => Stream<
|
|
3530
|
+
<N extends string, K, R2, E2, A>(tag: Exclude<N, keyof K>, f: (_: K) => Stream<A, E2, R2>, options?: {
|
|
3528
3531
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
3529
3532
|
readonly bufferSize?: number | undefined;
|
|
3530
|
-
}): <R, E>(self: Stream<
|
|
3533
|
+
} | undefined): <R, E>(self: Stream<K, E, R>) => Stream<Effect.MergeRecord<K, {
|
|
3531
3534
|
[k in N]: A;
|
|
3532
|
-
}
|
|
3533
|
-
<R, E, N extends string, K, R2, E2, A>(self: Stream<
|
|
3535
|
+
}>, E2 | E, R2 | R>;
|
|
3536
|
+
<R, E, N extends string, K, R2, E2, A>(self: Stream<K, E, R>, tag: Exclude<N, keyof K>, f: (_: K) => Stream<A, E2, R2>, options?: {
|
|
3534
3537
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
3535
3538
|
readonly bufferSize?: number | undefined;
|
|
3536
|
-
}): Stream<
|
|
3539
|
+
} | undefined): Stream<Effect.MergeRecord<K, {
|
|
3537
3540
|
[k in N]: A;
|
|
3538
|
-
}
|
|
3541
|
+
}>, E | E2, R | R2>;
|
|
3539
3542
|
};
|
|
3540
3543
|
/**
|
|
3541
3544
|
* Binds an effectful value in a `do` scope
|
|
@@ -3544,34 +3547,34 @@ export declare const bind: {
|
|
|
3544
3547
|
* @category do notation
|
|
3545
3548
|
*/
|
|
3546
3549
|
export declare const bindEffect: {
|
|
3547
|
-
<N extends string, K, R2, E2, A>(tag: Exclude<N, keyof K>, f: (_: K) => Effect.Effect<
|
|
3550
|
+
<N extends string, K, R2, E2, A>(tag: Exclude<N, keyof K>, f: (_: K) => Effect.Effect<A, E2, R2>, options?: {
|
|
3548
3551
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
3549
3552
|
readonly bufferSize?: number | undefined;
|
|
3550
|
-
}): <R, E>(self: Stream<
|
|
3553
|
+
} | undefined): <R, E>(self: Stream<K, E, R>) => Stream<Effect.MergeRecord<K, {
|
|
3551
3554
|
[k in N]: A;
|
|
3552
|
-
}
|
|
3553
|
-
<R, E, N extends string, K, R2, E2, A>(self: Stream<
|
|
3555
|
+
}>, E2 | E, R2 | R>;
|
|
3556
|
+
<R, E, N extends string, K, R2, E2, A>(self: Stream<K, E, R>, tag: Exclude<N, keyof K>, f: (_: K) => Effect.Effect<A, E2, R2>, options?: {
|
|
3554
3557
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
3555
|
-
readonly
|
|
3556
|
-
}): Stream<
|
|
3558
|
+
readonly unordered?: boolean | undefined;
|
|
3559
|
+
} | undefined): Stream<Effect.MergeRecord<K, {
|
|
3557
3560
|
[k in N]: A;
|
|
3558
|
-
}
|
|
3561
|
+
}>, E | E2, R | R2>;
|
|
3559
3562
|
};
|
|
3560
3563
|
/**
|
|
3561
3564
|
* @since 2.0.0
|
|
3562
3565
|
* @category do notation
|
|
3563
3566
|
*/
|
|
3564
3567
|
export declare const bindTo: {
|
|
3565
|
-
<N extends string>(tag: N): <
|
|
3566
|
-
<R, E, A, N extends string>(self: Stream<
|
|
3568
|
+
<N extends string>(tag: N): <A, E, R>(self: Stream<A, E, R>) => Stream<Record<N, A>, E, R>;
|
|
3569
|
+
<R, E, A, N extends string>(self: Stream<A, E, R>, tag: N): Stream<Record<N, A>, E, R>;
|
|
3567
3570
|
};
|
|
3568
3571
|
declare const let_: {
|
|
3569
|
-
<N extends string, K, A>(tag: Exclude<N, keyof K>, f: (_: K) => A): <R, E>(self: Stream<
|
|
3572
|
+
<N extends string, K, A>(tag: Exclude<N, keyof K>, f: (_: K) => A): <R, E>(self: Stream<K, E, R>) => Stream<Effect.MergeRecord<K, {
|
|
3570
3573
|
[k in N]: A;
|
|
3571
|
-
}
|
|
3572
|
-
<R, E, K, N extends string, A>(self: Stream<
|
|
3574
|
+
}>, E, R>;
|
|
3575
|
+
<R, E, K, N extends string, A>(self: Stream<K, E, R>, tag: Exclude<N, keyof K>, f: (_: K) => A): Stream<Effect.MergeRecord<K, {
|
|
3573
3576
|
[k in N]: A;
|
|
3574
|
-
}
|
|
3577
|
+
}>, E, R>;
|
|
3575
3578
|
};
|
|
3576
3579
|
export {
|
|
3577
3580
|
/**
|
|
@@ -3588,8 +3591,8 @@ let_ as let };
|
|
|
3588
3591
|
* @category encoding
|
|
3589
3592
|
*/
|
|
3590
3593
|
export declare const decodeText: {
|
|
3591
|
-
(encoding?: string): <R, E>(self: Stream<
|
|
3592
|
-
<R, E>(self: Stream<
|
|
3594
|
+
(encoding?: string | undefined): <R, E>(self: Stream<Uint8Array, E, R>) => Stream<string, E, R>;
|
|
3595
|
+
<R, E>(self: Stream<Uint8Array, E, R>, encoding?: string | undefined): Stream<string, E, R>;
|
|
3593
3596
|
};
|
|
3594
3597
|
/**
|
|
3595
3598
|
* Encode a stream of strings into a stream of Uint8Array chunks using the specified encoding.
|
|
@@ -3597,5 +3600,5 @@ export declare const decodeText: {
|
|
|
3597
3600
|
* @since 2.0.0
|
|
3598
3601
|
* @category encoding
|
|
3599
3602
|
*/
|
|
3600
|
-
export declare const encodeText: <R, E>(self: Stream<
|
|
3603
|
+
export declare const encodeText: <R, E>(self: Stream<string, E, R>) => Stream<Uint8Array, E, R>;
|
|
3601
3604
|
//# sourceMappingURL=Stream.d.ts.map
|