effect 2.3.8 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BigInt.js +14 -1
- package/dist/cjs/BigInt.js.map +1 -1
- package/dist/cjs/Effect.js +48 -61
- package/dist/cjs/Effect.js.map +1 -1
- package/dist/cjs/Either.js +35 -6
- package/dist/cjs/Either.js.map +1 -1
- package/dist/cjs/Equal.js +1 -1
- package/dist/cjs/Equal.js.map +1 -1
- package/dist/cjs/Exit.js +1 -1
- package/dist/cjs/Number.js +25 -1
- package/dist/cjs/Number.js.map +1 -1
- package/dist/cjs/Predicate.js +40 -3
- package/dist/cjs/Predicate.js.map +1 -1
- package/dist/cjs/ReadonlyArray.js +2 -2
- package/dist/cjs/ReadonlyArray.js.map +1 -1
- package/dist/cjs/ReadonlyRecord.js +71 -76
- package/dist/cjs/ReadonlyRecord.js.map +1 -1
- package/dist/cjs/STM.js.map +1 -1
- package/dist/cjs/Schedule.js.map +1 -1
- package/dist/cjs/Sink.js.map +1 -1
- package/dist/cjs/Stream.js +3 -23
- package/dist/cjs/Stream.js.map +1 -1
- package/dist/cjs/Struct.js +3 -1
- package/dist/cjs/Struct.js.map +1 -1
- package/dist/cjs/TestAnnotation.js.map +1 -1
- package/dist/cjs/internal/channel/channelExecutor.js +5 -5
- package/dist/cjs/internal/channel/channelExecutor.js.map +1 -1
- package/dist/cjs/internal/channel/channelState.js +5 -5
- package/dist/cjs/internal/channel/channelState.js.map +1 -1
- package/dist/cjs/internal/channel.js.map +1 -1
- package/dist/cjs/internal/clock.js +3 -4
- package/dist/cjs/internal/clock.js.map +1 -1
- package/dist/cjs/internal/core-effect.js +6 -23
- package/dist/cjs/internal/core-effect.js.map +1 -1
- package/dist/cjs/internal/core.js +11 -27
- package/dist/cjs/internal/core.js.map +1 -1
- package/dist/cjs/internal/effect/circular.js +4 -5
- package/dist/cjs/internal/effect/circular.js.map +1 -1
- package/dist/cjs/internal/either.js +3 -3
- package/dist/cjs/internal/either.js.map +1 -1
- package/dist/cjs/internal/groupBy.js.map +1 -1
- package/dist/cjs/internal/layer.js +0 -2
- package/dist/cjs/internal/layer.js.map +1 -1
- package/dist/cjs/internal/runtime.js +12 -1
- package/dist/cjs/internal/runtime.js.map +1 -1
- package/dist/cjs/internal/schedule.js +4 -4
- package/dist/cjs/internal/schedule.js.map +1 -1
- package/dist/cjs/internal/sink.js +0 -2
- package/dist/cjs/internal/sink.js.map +1 -1
- package/dist/cjs/internal/stm/stm.js +1 -0
- package/dist/cjs/internal/stm/stm.js.map +1 -1
- package/dist/cjs/internal/stream.js +51 -64
- package/dist/cjs/internal/stream.js.map +1 -1
- package/dist/cjs/internal/version.js +1 -1
- package/dist/dts/BigInt.d.ts +7 -0
- package/dist/dts/BigInt.d.ts.map +1 -1
- package/dist/dts/Brand.d.ts +1 -1
- package/dist/dts/Brand.d.ts.map +1 -1
- package/dist/dts/Cause.d.ts +1 -1
- package/dist/dts/Cause.d.ts.map +1 -1
- package/dist/dts/Channel.d.ts +11 -11
- package/dist/dts/Channel.d.ts.map +1 -1
- package/dist/dts/Chunk.d.ts +3 -3
- package/dist/dts/Config.d.ts +4 -4
- package/dist/dts/Config.d.ts.map +1 -1
- package/dist/dts/Cron.d.ts +1 -1
- package/dist/dts/Cron.d.ts.map +1 -1
- package/dist/dts/Differ.d.ts +2 -2
- package/dist/dts/Differ.d.ts.map +1 -1
- package/dist/dts/Effect.d.ts +84 -108
- package/dist/dts/Effect.d.ts.map +1 -1
- package/dist/dts/Either.d.ts +126 -83
- package/dist/dts/Either.d.ts.map +1 -1
- package/dist/dts/Encoding.d.ts +6 -6
- package/dist/dts/Encoding.d.ts.map +1 -1
- package/dist/dts/Equal.d.ts.map +1 -1
- package/dist/dts/Exit.d.ts +2 -2
- package/dist/dts/Fiber.d.ts +2 -2
- package/dist/dts/Fiber.d.ts.map +1 -1
- package/dist/dts/GroupBy.d.ts +12 -12
- package/dist/dts/GroupBy.d.ts.map +1 -1
- package/dist/dts/Layer.d.ts +26 -26
- package/dist/dts/Layer.d.ts.map +1 -1
- package/dist/dts/List.d.ts +2 -2
- package/dist/dts/Logger.d.ts +4 -4
- package/dist/dts/Match.d.ts +2 -2
- package/dist/dts/Match.d.ts.map +1 -1
- package/dist/dts/MergeDecision.d.ts +1 -1
- package/dist/dts/MergeState.d.ts +5 -5
- package/dist/dts/MergeState.d.ts.map +1 -1
- package/dist/dts/Metric.d.ts +13 -13
- package/dist/dts/Metric.d.ts.map +1 -1
- package/dist/dts/MetricPolling.d.ts +4 -4
- package/dist/dts/MetricPolling.d.ts.map +1 -1
- package/dist/dts/Number.d.ts +8 -0
- package/dist/dts/Number.d.ts.map +1 -1
- package/dist/dts/Option.d.ts +11 -11
- package/dist/dts/Predicate.d.ts +37 -2
- package/dist/dts/Predicate.d.ts.map +1 -1
- package/dist/dts/ReadonlyArray.d.ts +9 -8
- package/dist/dts/ReadonlyArray.d.ts.map +1 -1
- package/dist/dts/ReadonlyRecord.d.ts +111 -94
- package/dist/dts/ReadonlyRecord.d.ts.map +1 -1
- package/dist/dts/Reloadable.d.ts +4 -4
- package/dist/dts/Reloadable.d.ts.map +1 -1
- package/dist/dts/RequestResolver.d.ts +13 -13
- package/dist/dts/RequestResolver.d.ts.map +1 -1
- package/dist/dts/Resource.d.ts +1 -1
- package/dist/dts/Resource.d.ts.map +1 -1
- package/dist/dts/STM.d.ts +144 -139
- package/dist/dts/STM.d.ts.map +1 -1
- package/dist/dts/Schedule.d.ts +171 -179
- package/dist/dts/Schedule.d.ts.map +1 -1
- package/dist/dts/SingleProducerAsyncInput.d.ts +1 -1
- package/dist/dts/SingleProducerAsyncInput.d.ts.map +1 -1
- package/dist/dts/Sink.d.ts +13 -13
- package/dist/dts/Sink.d.ts.map +1 -1
- package/dist/dts/Stream.d.ts +355 -366
- package/dist/dts/Stream.d.ts.map +1 -1
- package/dist/dts/Struct.d.ts +3 -3
- package/dist/dts/Struct.d.ts.map +1 -1
- package/dist/dts/SubscriptionRef.d.ts +2 -2
- package/dist/dts/TArray.d.ts +2 -2
- package/dist/dts/TDeferred.d.ts +3 -3
- package/dist/dts/TMap.d.ts +10 -10
- package/dist/dts/TSet.d.ts +4 -4
- package/dist/dts/Take.d.ts +2 -2
- package/dist/dts/TestAnnotation.d.ts +2 -2
- package/dist/dts/TestAnnotation.d.ts.map +1 -1
- package/dist/dts/Types.d.ts +7 -0
- package/dist/dts/Types.d.ts.map +1 -1
- package/dist/dts/internal/stm/stm.d.ts +2 -15
- package/dist/dts/internal/stm/stm.d.ts.map +1 -1
- package/dist/esm/BigInt.js +12 -0
- package/dist/esm/BigInt.js.map +1 -1
- package/dist/esm/Effect.js +45 -58
- package/dist/esm/Effect.js.map +1 -1
- package/dist/esm/Either.js +42 -5
- package/dist/esm/Either.js.map +1 -1
- package/dist/esm/Equal.js +1 -1
- package/dist/esm/Equal.js.map +1 -1
- package/dist/esm/Exit.js +1 -1
- package/dist/esm/Number.js +23 -0
- package/dist/esm/Number.js.map +1 -1
- package/dist/esm/Predicate.js +37 -2
- package/dist/esm/Predicate.js.map +1 -1
- package/dist/esm/ReadonlyArray.js +2 -2
- package/dist/esm/ReadonlyArray.js.map +1 -1
- package/dist/esm/ReadonlyRecord.js +70 -75
- package/dist/esm/ReadonlyRecord.js.map +1 -1
- package/dist/esm/STM.js.map +1 -1
- package/dist/esm/Schedule.js.map +1 -1
- package/dist/esm/Sink.js.map +1 -1
- package/dist/esm/Stream.js +5 -22
- package/dist/esm/Stream.js.map +1 -1
- package/dist/esm/Struct.js +3 -1
- package/dist/esm/Struct.js.map +1 -1
- package/dist/esm/TestAnnotation.js.map +1 -1
- package/dist/esm/internal/channel/channelExecutor.js +5 -5
- package/dist/esm/internal/channel/channelExecutor.js.map +1 -1
- package/dist/esm/internal/channel/channelState.js +3 -3
- package/dist/esm/internal/channel/channelState.js.map +1 -1
- package/dist/esm/internal/channel.js.map +1 -1
- package/dist/esm/internal/clock.js +3 -4
- package/dist/esm/internal/clock.js.map +1 -1
- package/dist/esm/internal/core-effect.js +4 -20
- package/dist/esm/internal/core-effect.js.map +1 -1
- package/dist/esm/internal/core.js +8 -22
- package/dist/esm/internal/core.js.map +1 -1
- package/dist/esm/internal/effect/circular.js +4 -5
- package/dist/esm/internal/effect/circular.js.map +1 -1
- package/dist/esm/internal/either.js +3 -3
- package/dist/esm/internal/either.js.map +1 -1
- package/dist/esm/internal/groupBy.js.map +1 -1
- package/dist/esm/internal/layer.js +0 -2
- package/dist/esm/internal/layer.js.map +1 -1
- package/dist/esm/internal/runtime.js +12 -1
- package/dist/esm/internal/runtime.js.map +1 -1
- package/dist/esm/internal/schedule.js +4 -4
- package/dist/esm/internal/schedule.js.map +1 -1
- package/dist/esm/internal/sink.js +0 -2
- package/dist/esm/internal/sink.js.map +1 -1
- package/dist/esm/internal/stm/stm.js +1 -0
- package/dist/esm/internal/stm/stm.js.map +1 -1
- package/dist/esm/internal/stream.js +49 -59
- package/dist/esm/internal/stream.js.map +1 -1
- package/dist/esm/internal/version.js +1 -1
- package/package.json +1 -1
- package/src/BigInt.ts +13 -0
- package/src/Brand.ts +4 -4
- package/src/Cause.ts +1 -1
- package/src/Channel.ts +17 -17
- package/src/Chunk.ts +4 -4
- package/src/Config.ts +4 -4
- package/src/Cron.ts +2 -2
- package/src/Differ.ts +2 -2
- package/src/Effect.ts +100 -145
- package/src/Either.ts +215 -133
- package/src/Encoding.ts +3 -3
- package/src/Equal.ts +1 -1
- package/src/Exit.ts +2 -2
- package/src/Fiber.ts +2 -2
- package/src/GroupBy.ts +16 -16
- package/src/Layer.ts +32 -32
- package/src/List.ts +3 -3
- package/src/Logger.ts +4 -4
- package/src/Match.ts +3 -3
- package/src/MergeDecision.ts +1 -1
- package/src/MergeState.ts +8 -8
- package/src/Metric.ts +13 -13
- package/src/MetricPolling.ts +9 -9
- package/src/Number.ts +26 -0
- package/src/Option.ts +17 -17
- package/src/Predicate.ts +39 -2
- package/src/ReadonlyArray.ts +23 -15
- package/src/ReadonlyRecord.ts +421 -265
- package/src/Reloadable.ts +4 -4
- package/src/RequestResolver.ts +19 -19
- package/src/Resource.ts +3 -3
- package/src/STM.ts +166 -213
- package/src/Schedule.ts +331 -361
- package/src/SingleProducerAsyncInput.ts +1 -1
- package/src/Sink.ts +19 -19
- package/src/Stream.ts +449 -456
- package/src/Struct.ts +8 -5
- package/src/SubscriptionRef.ts +2 -2
- package/src/TArray.ts +2 -2
- package/src/TDeferred.ts +4 -4
- package/src/TMap.ts +10 -10
- package/src/TSet.ts +4 -4
- package/src/Take.ts +4 -4
- package/src/TestAnnotation.ts +5 -8
- package/src/Types.ts +11 -0
- package/src/internal/blockedRequests.ts +2 -2
- package/src/internal/cause.ts +2 -2
- package/src/internal/channel/channelExecutor.ts +26 -26
- package/src/internal/channel/channelState.ts +13 -13
- package/src/internal/channel/mergeDecision.ts +1 -1
- package/src/internal/channel/mergeState.ts +6 -6
- package/src/internal/channel/singleProducerAsyncInput.ts +5 -5
- package/src/internal/channel.ts +43 -43
- package/src/internal/clock.ts +3 -4
- package/src/internal/config.ts +7 -7
- package/src/internal/configError.ts +1 -1
- package/src/internal/configProvider/pathPatch.ts +2 -2
- package/src/internal/configProvider.ts +1 -1
- package/src/internal/core-effect.ts +28 -43
- package/src/internal/core.ts +15 -40
- package/src/internal/dataSource.ts +26 -26
- package/src/internal/differ/orPatch.ts +7 -7
- package/src/internal/differ.ts +2 -2
- package/src/internal/effect/circular.ts +9 -10
- package/src/internal/either.ts +25 -22
- package/src/internal/encoding/base64.ts +1 -1
- package/src/internal/encoding/base64Url.ts +1 -1
- package/src/internal/encoding/hex.ts +1 -1
- package/src/internal/fiber.ts +2 -2
- package/src/internal/fiberRuntime.ts +9 -9
- package/src/internal/groupBy.ts +40 -40
- package/src/internal/layer/circular.ts +4 -4
- package/src/internal/layer.ts +52 -54
- package/src/internal/matcher.ts +5 -5
- package/src/internal/metric/polling.ts +8 -8
- package/src/internal/metric.ts +6 -6
- package/src/internal/reloadable.ts +4 -4
- package/src/internal/resource.ts +2 -2
- package/src/internal/runtime.ts +32 -19
- package/src/internal/schedule.ts +430 -500
- package/src/internal/sink.ts +27 -29
- package/src/internal/stm/core.ts +23 -23
- package/src/internal/stm/stm.ts +158 -157
- package/src/internal/stm/tArray.ts +3 -3
- package/src/internal/stm/tDeferred.ts +5 -5
- package/src/internal/stm/tMap.ts +13 -13
- package/src/internal/stm/tSet.ts +4 -4
- package/src/internal/stream.ts +688 -723
- package/src/internal/subscriptionRef.ts +3 -3
- package/src/internal/take.ts +6 -6
- package/src/internal/version.ts +1 -1
package/dist/dts/Stream.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ import type * as Emit from "./StreamEmit.js";
|
|
|
27
27
|
import type * as HaltStrategy from "./StreamHaltStrategy.js";
|
|
28
28
|
import type * as Take from "./Take.js";
|
|
29
29
|
import type * as Tracer from "./Tracer.js";
|
|
30
|
-
import type { Covariant, NoInfer } from "./Types.js";
|
|
30
|
+
import type { Covariant, MergeRecord, NoInfer } from "./Types.js";
|
|
31
31
|
import type * as Unify from "./Unify.js";
|
|
32
32
|
/**
|
|
33
33
|
* @since 2.0.0
|
|
@@ -154,7 +154,7 @@ export declare const accumulateChunks: <A, E, R>(self: Stream<A, E, R>) => Strea
|
|
|
154
154
|
* @since 2.0.0
|
|
155
155
|
* @category constructors
|
|
156
156
|
*/
|
|
157
|
-
export declare const acquireRelease: <A, E, R, R2,
|
|
157
|
+
export declare const acquireRelease: <A, E, R, R2, X>(acquire: Effect.Effect<A, E, R>, release: (resource: A, exit: Exit.Exit<unknown, unknown>) => Effect.Effect<X, 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.
|
|
@@ -184,8 +184,8 @@ export declare const aggregate: {
|
|
|
184
184
|
* @category utils
|
|
185
185
|
*/
|
|
186
186
|
export declare const aggregateWithin: {
|
|
187
|
-
<B, A, A2, E2, R2,
|
|
188
|
-
<A, E, R, B, A2, E2, R2,
|
|
187
|
+
<B, A, A2, E2, R2, C, R3>(sink: Sink.Sink<B, A | A2, A2, E2, R2>, schedule: Schedule.Schedule<C, Option.Option<B>, R3>): <E, R>(self: Stream<A, E, R>) => Stream<B, E2 | E, R2 | R3 | R>;
|
|
188
|
+
<A, E, R, B, A2, E2, R2, C, R3>(self: Stream<A, E, R>, sink: Sink.Sink<B, A | A2, A2, E2, R2>, schedule: Schedule.Schedule<C, Option.Option<B>, R3>): 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
|
-
<B, A, A2, E2, R2,
|
|
209
|
-
<A, E, R, B, A2, E2, R2,
|
|
208
|
+
<B, A, A2, E2, R2, C, R3>(sink: Sink.Sink<B, A | A2, A2, E2, R2>, schedule: Schedule.Schedule<C, Option.Option<B>, R3>): <E, R>(self: Stream<A, E, R>) => Stream<Either.Either<B, C>, E2 | E, R2 | R3 | R>;
|
|
209
|
+
<A, E, R, B, A2, E2, R2, C, R3>(self: Stream<A, E, R>, sink: Sink.Sink<B, A | A2, A2, E2, R2>, schedule: Schedule.Schedule<C, Option.Option<B>, R3>): Stream<Either.Either<B, C>, E | E2, R | R2 | R3>;
|
|
210
210
|
};
|
|
211
211
|
/**
|
|
212
212
|
* Maps the success values of this stream to the specified constant value.
|
|
@@ -216,14 +216,17 @@ export declare const aggregateWithinEither: {
|
|
|
216
216
|
*/
|
|
217
217
|
export declare const as: {
|
|
218
218
|
<B>(value: B): <A, E, R>(self: Stream<A, E, R>) => Stream<B, E, R>;
|
|
219
|
-
<
|
|
219
|
+
<A, E, R, B>(self: Stream<A, E, R>, value: B): Stream<B, E, R>;
|
|
220
220
|
};
|
|
221
|
-
declare const _async: <A, E = never, R = never>(register: (emit: Emit.Emit<R, E, A, void>) => void, outputBuffer?: number) => Stream<A, E, R>;
|
|
221
|
+
declare const _async: <A, E = never, R = never>(register: (emit: Emit.Emit<R, E, A, void>) => Effect.Effect<void, never, R> | 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
|
|
225
|
-
* times. The optionality of the error type `E` can be used to
|
|
226
|
-
* of the stream
|
|
225
|
+
* times. The optionality of the error type `E` in `Emit` can be used to
|
|
226
|
+
* signal the end of the stream by setting it to `None`.
|
|
227
|
+
*
|
|
228
|
+
* The registration function can optionally return an `Effect`, which will be
|
|
229
|
+
* executed if the `Fiber` executing this Effect is interrupted.
|
|
227
230
|
*
|
|
228
231
|
* @since 2.0.0
|
|
229
232
|
* @category constructors
|
|
@@ -239,26 +242,6 @@ _async as async };
|
|
|
239
242
|
* @category constructors
|
|
240
243
|
*/
|
|
241
244
|
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
|
-
/**
|
|
243
|
-
* Creates a stream from an asynchronous callback that can be called multiple
|
|
244
|
-
* times. The registration of the callback returns either a canceler or
|
|
245
|
-
* synchronously returns a stream. The optionality of the error type `E` can
|
|
246
|
-
* be used to signal the end of the stream, by setting it to `None`.
|
|
247
|
-
*
|
|
248
|
-
* @since 2.0.0
|
|
249
|
-
* @category constructors
|
|
250
|
-
*/
|
|
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
|
-
/**
|
|
253
|
-
* Creates a stream from an asynchronous callback that can be called multiple
|
|
254
|
-
* times. The registration of the callback can possibly return the stream
|
|
255
|
-
* synchronously. The optionality of the error type `E` can be used to signal
|
|
256
|
-
* the end of the stream, by setting it to `None`.
|
|
257
|
-
*
|
|
258
|
-
* @since 2.0.0
|
|
259
|
-
* @category constructors
|
|
260
|
-
*/
|
|
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
245
|
/**
|
|
263
246
|
* Creates a stream from an asynchronous callback that can be called multiple
|
|
264
247
|
* times. The registration of the callback itself returns an a scoped
|
|
@@ -278,8 +261,8 @@ export declare const asyncScoped: <A, E = never, R = never>(register: (emit: Emi
|
|
|
278
261
|
* @category sequencing
|
|
279
262
|
*/
|
|
280
263
|
export declare const branchAfter: {
|
|
281
|
-
<A, A2, E2, R2>(n: number, f: (input: Chunk.Chunk<A>) => Stream<A2, E2, R2>): <
|
|
282
|
-
<A, E, R,
|
|
264
|
+
<A, A2, E2, R2>(n: number, f: (input: Chunk.Chunk<A>) => Stream<A2, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
265
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, n: number, f: (input: Chunk.Chunk<A>) => Stream<A2, E2, R2>): Stream<A2, E | E2, R | R2>;
|
|
283
266
|
};
|
|
284
267
|
/**
|
|
285
268
|
* Fan out the stream, producing a list of streams that have the same elements
|
|
@@ -383,8 +366,8 @@ export declare const bufferChunks: {
|
|
|
383
366
|
* @category error handling
|
|
384
367
|
*/
|
|
385
368
|
export declare const catchAll: {
|
|
386
|
-
<E,
|
|
387
|
-
<
|
|
369
|
+
<E, A2, E2, R2>(f: (error: E) => Stream<A2, E2, R2>): <A, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2, R2 | R>;
|
|
370
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, f: (error: E) => Stream<A2, E2, R2>): Stream<A | A2, E2, R | R2>;
|
|
388
371
|
};
|
|
389
372
|
/**
|
|
390
373
|
* Switches over to the stream produced by the provided function in case this
|
|
@@ -395,8 +378,8 @@ export declare const catchAll: {
|
|
|
395
378
|
* @category error handling
|
|
396
379
|
*/
|
|
397
380
|
export declare const catchAllCause: {
|
|
398
|
-
<E,
|
|
399
|
-
<
|
|
381
|
+
<E, A2, E2, R2>(f: (cause: Cause.Cause<E>) => Stream<A2, E2, R2>): <A, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2, R2 | R>;
|
|
382
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, f: (cause: Cause.Cause<E>) => Stream<A2, E2, R2>): Stream<A | A2, E2, R | R2>;
|
|
400
383
|
};
|
|
401
384
|
/**
|
|
402
385
|
* Switches over to the stream produced by the provided function in case this
|
|
@@ -406,8 +389,8 @@ export declare const catchAllCause: {
|
|
|
406
389
|
* @category error handling
|
|
407
390
|
*/
|
|
408
391
|
export declare const catchSome: {
|
|
409
|
-
<E,
|
|
410
|
-
<
|
|
392
|
+
<E, A2, E2, R2>(pf: (error: E) => Option.Option<Stream<A2, E2, R2>>): <A, R>(self: Stream<A, E, R>) => Stream<A2 | A, E | E2, R2 | R>;
|
|
393
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, pf: (error: E) => Option.Option<Stream<A2, E2, R2>>): Stream<A | A2, E | E2, R | R2>;
|
|
411
394
|
};
|
|
412
395
|
/**
|
|
413
396
|
* Switches over to the stream produced by the provided function in case this
|
|
@@ -419,14 +402,14 @@ export declare const catchSome: {
|
|
|
419
402
|
export declare const catchTag: {
|
|
420
403
|
<K extends E["_tag"] & string, E extends {
|
|
421
404
|
_tag: string;
|
|
422
|
-
},
|
|
405
|
+
}, A1, E1, R1>(k: K, f: (e: Extract<E, {
|
|
423
406
|
_tag: K;
|
|
424
|
-
}>) => Stream<A1, E1, R1>): <
|
|
407
|
+
}>) => Stream<A1, E1, R1>): <A, R>(self: Stream<A, E, R>) => Stream<A1 | A, E1 | Exclude<E, {
|
|
425
408
|
_tag: K;
|
|
426
409
|
}>, R1 | R>;
|
|
427
|
-
<
|
|
410
|
+
<A, E extends {
|
|
428
411
|
_tag: string;
|
|
429
|
-
},
|
|
412
|
+
}, R, K extends E["_tag"] & string, A1, E1, R1>(self: Stream<A, E, R>, k: K, f: (e: Extract<E, {
|
|
430
413
|
_tag: K;
|
|
431
414
|
}>) => Stream<A1, E1, R1>): Stream<A | A1, E1 | Exclude<E, {
|
|
432
415
|
_tag: K;
|
|
@@ -446,7 +429,7 @@ export declare const catchTags: {
|
|
|
446
429
|
[K in E["_tag"]]+?: (error: Extract<E, {
|
|
447
430
|
_tag: K;
|
|
448
431
|
}>) => Stream<any, any, any>;
|
|
449
|
-
}>(cases: Cases): <
|
|
432
|
+
}>(cases: Cases): <A, R>(self: Stream<A, E, R>) => Stream<A | {
|
|
450
433
|
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer A, infer _E, infer _R> ? A : never;
|
|
451
434
|
}[keyof Cases], Exclude<E, {
|
|
452
435
|
_tag: keyof Cases;
|
|
@@ -455,9 +438,9 @@ export declare const catchTags: {
|
|
|
455
438
|
}[keyof Cases], R | {
|
|
456
439
|
[K in keyof Cases]: Cases[K] extends (...args: Array<any>) => Stream.Variance<infer _A, infer _E, infer R> ? R : never;
|
|
457
440
|
}[keyof Cases]>;
|
|
458
|
-
<
|
|
441
|
+
<A, E extends {
|
|
459
442
|
_tag: string;
|
|
460
|
-
},
|
|
443
|
+
}, R, Cases extends {
|
|
461
444
|
[K in E["_tag"]]+?: (error: Extract<E, {
|
|
462
445
|
_tag: K;
|
|
463
446
|
}>) => Stream<any, any, any>;
|
|
@@ -480,8 +463,8 @@ export declare const catchTags: {
|
|
|
480
463
|
* @category error handling
|
|
481
464
|
*/
|
|
482
465
|
export declare const catchSomeCause: {
|
|
483
|
-
<E,
|
|
484
|
-
<
|
|
466
|
+
<E, A2, E2, R2>(pf: (cause: Cause.Cause<E>) => Option.Option<Stream<A2, E2, R2>>): <A, R>(self: Stream<A, E, R>) => Stream<A2 | A, E | E2, R2 | R>;
|
|
467
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, pf: (cause: Cause.Cause<E>) => Option.Option<Stream<A2, E2, R2>>): Stream<A | A2, E | E2, R | R2>;
|
|
485
468
|
};
|
|
486
469
|
/**
|
|
487
470
|
* Returns a new stream that only emits elements that are not equal to the
|
|
@@ -501,7 +484,7 @@ export declare const changes: <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R
|
|
|
501
484
|
* @category utils
|
|
502
485
|
*/
|
|
503
486
|
export declare const changesWith: {
|
|
504
|
-
<A>(f: (x: A, y: A) => boolean): <
|
|
487
|
+
<A>(f: (x: A, y: A) => boolean): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
505
488
|
<A, E, R>(self: Stream<A, E, R>, f: (x: A, y: A) => boolean): Stream<A, E, R>;
|
|
506
489
|
};
|
|
507
490
|
/**
|
|
@@ -513,8 +496,8 @@ export declare const changesWith: {
|
|
|
513
496
|
* @category utils
|
|
514
497
|
*/
|
|
515
498
|
export declare const changesWithEffect: {
|
|
516
|
-
<A,
|
|
517
|
-
<
|
|
499
|
+
<A, E2, R2>(f: (x: A, y: A) => Effect.Effect<boolean, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
500
|
+
<A, E, R, E2, R2>(self: Stream<A, E, R>, f: (x: A, y: A) => Effect.Effect<boolean, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
518
501
|
};
|
|
519
502
|
/**
|
|
520
503
|
* Exposes the underlying chunks of the stream as a stream of chunks of
|
|
@@ -532,8 +515,8 @@ export declare const chunks: <A, E, R>(self: Stream<A, E, R>) => Stream<Chunk.Ch
|
|
|
532
515
|
* @category utils
|
|
533
516
|
*/
|
|
534
517
|
export declare const chunksWith: {
|
|
535
|
-
<
|
|
536
|
-
<
|
|
518
|
+
<A, E, R, A2, E2, R2>(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>;
|
|
519
|
+
<A, E, R, A2, E2, R2>(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
520
|
};
|
|
538
521
|
/**
|
|
539
522
|
* Combines the elements from this stream and the specified stream by
|
|
@@ -549,8 +532,8 @@ export declare const chunksWith: {
|
|
|
549
532
|
* @category utils
|
|
550
533
|
*/
|
|
551
534
|
export declare const combine: {
|
|
552
|
-
<
|
|
553
|
-
<R,
|
|
535
|
+
<A2, E2, R2, 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>;
|
|
536
|
+
<R, A2, E2, R2, 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>;
|
|
554
537
|
};
|
|
555
538
|
/**
|
|
556
539
|
* Combines the chunks from this stream and the specified stream by repeatedly
|
|
@@ -563,8 +546,8 @@ export declare const combine: {
|
|
|
563
546
|
* @category utils
|
|
564
547
|
*/
|
|
565
548
|
export declare const combineChunks: {
|
|
566
|
-
<
|
|
567
|
-
<R,
|
|
549
|
+
<A2, E2, R2, 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>;
|
|
550
|
+
<R, A2, E2, R2, 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>;
|
|
568
551
|
};
|
|
569
552
|
/**
|
|
570
553
|
* Concatenates the specified stream with this stream, resulting in a stream
|
|
@@ -575,8 +558,8 @@ export declare const combineChunks: {
|
|
|
575
558
|
* @category utils
|
|
576
559
|
*/
|
|
577
560
|
export declare const concat: {
|
|
578
|
-
<
|
|
579
|
-
<
|
|
561
|
+
<A2, E2, R2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E, R2 | R>;
|
|
562
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A | A2, E | E2, R | R2>;
|
|
580
563
|
};
|
|
581
564
|
/**
|
|
582
565
|
* Concatenates all of the streams in the chunk to one stream.
|
|
@@ -596,8 +579,8 @@ export declare const concatAll: <A, E, R>(streams: Chunk.Chunk<Stream<A, E, R>>)
|
|
|
596
579
|
* @category utils
|
|
597
580
|
*/
|
|
598
581
|
export declare const cross: {
|
|
599
|
-
<
|
|
600
|
-
<
|
|
582
|
+
<A2, E2, R2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<[A, A2], E2 | E, R2 | R>;
|
|
583
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<[A, A2], E | E2, R | R2>;
|
|
601
584
|
};
|
|
602
585
|
/**
|
|
603
586
|
* Composes this stream with the specified stream to create a cartesian
|
|
@@ -610,8 +593,8 @@ export declare const cross: {
|
|
|
610
593
|
* @category utils
|
|
611
594
|
*/
|
|
612
595
|
export declare const crossLeft: {
|
|
613
|
-
<
|
|
614
|
-
<
|
|
596
|
+
<A2, E2, R2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
597
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
615
598
|
};
|
|
616
599
|
/**
|
|
617
600
|
* Composes this stream with the specified stream to create a cartesian
|
|
@@ -625,8 +608,8 @@ export declare const crossLeft: {
|
|
|
625
608
|
* @category utils
|
|
626
609
|
*/
|
|
627
610
|
export declare const crossRight: {
|
|
628
|
-
<
|
|
629
|
-
<
|
|
611
|
+
<A2, E2, R2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
612
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A2, E | E2, R | R2>;
|
|
630
613
|
};
|
|
631
614
|
/**
|
|
632
615
|
* Composes this stream with the specified stream to create a cartesian
|
|
@@ -639,8 +622,8 @@ export declare const crossRight: {
|
|
|
639
622
|
* @category utils
|
|
640
623
|
*/
|
|
641
624
|
export declare const crossWith: {
|
|
642
|
-
<
|
|
643
|
-
<
|
|
625
|
+
<B, E2, R2, A, C>(that: Stream<B, E2, R2>, f: (a: A, b: B) => C): <E, R>(self: Stream<A, E, R>) => Stream<C, E2 | E, R2 | R>;
|
|
626
|
+
<A, E, R, B, E2, R2, C>(self: Stream<A, E, R>, that: Stream<B, E2, R2>, f: (a: A, b: B) => C): Stream<C, E | E2, R | R2>;
|
|
644
627
|
};
|
|
645
628
|
/**
|
|
646
629
|
* Delays the emission of values by holding new values for a set duration. If
|
|
@@ -694,8 +677,8 @@ export declare const distributedWith: {
|
|
|
694
677
|
readonly size: N;
|
|
695
678
|
readonly maximumLag: number;
|
|
696
679
|
readonly decide: (a: A) => Effect.Effect<Predicate<number>>;
|
|
697
|
-
}): <
|
|
698
|
-
<
|
|
680
|
+
}): <E, R>(self: Stream<A, E, R>) => Effect.Effect<Stream.DynamicTuple<Queue.Dequeue<Exit.Exit<A, Option.Option<E>>>, N>, never, Scope.Scope | R>;
|
|
681
|
+
<A, E, R, N extends number>(self: Stream<A, E, R>, options: {
|
|
699
682
|
readonly size: N;
|
|
700
683
|
readonly maximumLag: number;
|
|
701
684
|
readonly decide: (a: A) => Effect.Effect<Predicate<number>>;
|
|
@@ -713,14 +696,14 @@ export declare const distributedWith: {
|
|
|
713
696
|
* @category utils
|
|
714
697
|
*/
|
|
715
698
|
export declare const distributedWithDynamic: {
|
|
716
|
-
<
|
|
699
|
+
<A>(options: {
|
|
717
700
|
readonly maximumLag: number;
|
|
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
|
-
<
|
|
701
|
+
readonly decide: (a: A) => Effect.Effect<Predicate<number>, never, never>;
|
|
702
|
+
}): <E, R>(self: Stream<A, E, R>) => Effect.Effect<Effect.Effect<[number, Queue.Dequeue<Exit.Exit<A, Option.Option<E>>>], never, never>, never, Scope.Scope | R>;
|
|
703
|
+
<A, E, R>(self: Stream<A, E, R>, options: {
|
|
721
704
|
readonly maximumLag: number;
|
|
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>;
|
|
705
|
+
readonly decide: (a: A) => Effect.Effect<Predicate<number>, never, never>;
|
|
706
|
+
}): Effect.Effect<Effect.Effect<[number, Queue.Dequeue<Exit.Exit<A, Option.Option<E>>>], never, never>, never, Scope.Scope | R>;
|
|
724
707
|
};
|
|
725
708
|
/**
|
|
726
709
|
* Converts this stream to a stream that executes its effects but emits no
|
|
@@ -739,8 +722,8 @@ export declare const drain: <A, E, R>(self: Stream<A, E, R>) => Stream<never, E,
|
|
|
739
722
|
* @category utils
|
|
740
723
|
*/
|
|
741
724
|
export declare const drainFork: {
|
|
742
|
-
<
|
|
743
|
-
<
|
|
725
|
+
<A2, E2, R2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
726
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
744
727
|
};
|
|
745
728
|
/**
|
|
746
729
|
* Drops the specified number of elements from this stream.
|
|
@@ -772,7 +755,7 @@ export declare const dropRight: {
|
|
|
772
755
|
* @category utils
|
|
773
756
|
*/
|
|
774
757
|
export declare const dropUntil: {
|
|
775
|
-
<A>(predicate: Predicate<NoInfer<A>>): <
|
|
758
|
+
<A>(predicate: Predicate<NoInfer<A>>): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
776
759
|
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>;
|
|
777
760
|
};
|
|
778
761
|
/**
|
|
@@ -783,8 +766,8 @@ export declare const dropUntil: {
|
|
|
783
766
|
* @category utils
|
|
784
767
|
*/
|
|
785
768
|
export declare const dropUntilEffect: {
|
|
786
|
-
<A,
|
|
787
|
-
<
|
|
769
|
+
<A, E2, R2>(predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
770
|
+
<A, E, R, E2, R2>(self: Stream<A, E, R>, predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
788
771
|
};
|
|
789
772
|
/**
|
|
790
773
|
* Drops all elements of the stream for as long as the specified predicate
|
|
@@ -794,7 +777,7 @@ export declare const dropUntilEffect: {
|
|
|
794
777
|
* @category utils
|
|
795
778
|
*/
|
|
796
779
|
export declare const dropWhile: {
|
|
797
|
-
<A>(predicate: Predicate<NoInfer<A>>): <
|
|
780
|
+
<A>(predicate: Predicate<NoInfer<A>>): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
798
781
|
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>;
|
|
799
782
|
};
|
|
800
783
|
/**
|
|
@@ -805,8 +788,8 @@ export declare const dropWhile: {
|
|
|
805
788
|
* @category utils
|
|
806
789
|
*/
|
|
807
790
|
export declare const dropWhileEffect: {
|
|
808
|
-
<A,
|
|
809
|
-
<
|
|
791
|
+
<A, E2, R2>(predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
792
|
+
<A, E, R, E2, R2>(self: Stream<A, E, R>, predicate: (a: A) => Effect.Effect<boolean, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
810
793
|
};
|
|
811
794
|
/**
|
|
812
795
|
* Returns a stream whose failures and successes have been lifted into an
|
|
@@ -818,7 +801,7 @@ export declare const dropWhileEffect: {
|
|
|
818
801
|
* @since 2.0.0
|
|
819
802
|
* @category utils
|
|
820
803
|
*/
|
|
821
|
-
export declare const either: <A, E, R>(self: Stream<A, E, R>) => Stream<Either.Either<
|
|
804
|
+
export declare const either: <A, E, R>(self: Stream<A, E, R>) => Stream<Either.Either<A, E>, never, R>;
|
|
822
805
|
/**
|
|
823
806
|
* The empty stream.
|
|
824
807
|
*
|
|
@@ -833,8 +816,8 @@ export declare const empty: Stream<never>;
|
|
|
833
816
|
* @category utils
|
|
834
817
|
*/
|
|
835
818
|
export declare const ensuring: {
|
|
836
|
-
<
|
|
837
|
-
<
|
|
819
|
+
<X, R2>(finalizer: Effect.Effect<X, never, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>;
|
|
820
|
+
<A, E, R, X, R2>(self: Stream<A, E, R>, finalizer: Effect.Effect<X, never, R2>): Stream<A, E, R | R2>;
|
|
838
821
|
};
|
|
839
822
|
/**
|
|
840
823
|
* Executes the provided finalizer after this stream's finalizers run.
|
|
@@ -843,8 +826,8 @@ export declare const ensuring: {
|
|
|
843
826
|
* @category utils
|
|
844
827
|
*/
|
|
845
828
|
export declare const ensuringWith: {
|
|
846
|
-
<E, R2>(finalizer: (exit: Exit.Exit<unknown, E>) => Effect.Effect<unknown, never, R2>): <
|
|
847
|
-
<
|
|
829
|
+
<E, R2>(finalizer: (exit: Exit.Exit<unknown, E>) => Effect.Effect<unknown, never, R2>): <A, R>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>;
|
|
830
|
+
<A, E, R, R2>(self: Stream<A, E, R>, finalizer: (exit: Exit.Exit<unknown, E>) => Effect.Effect<unknown, never, R2>): Stream<A, E, R | R2>;
|
|
848
831
|
};
|
|
849
832
|
/**
|
|
850
833
|
* Accesses the whole context of the stream.
|
|
@@ -866,21 +849,21 @@ export declare const contextWith: <R, A>(f: (env: Context.Context<R>) => A) => S
|
|
|
866
849
|
* @since 2.0.0
|
|
867
850
|
* @category context
|
|
868
851
|
*/
|
|
869
|
-
export declare const contextWithEffect: <R0,
|
|
852
|
+
export declare const contextWithEffect: <R0, A, E, R>(f: (env: Context.Context<R0>) => Effect.Effect<A, E, R>) => Stream<A, E, R0 | R>;
|
|
870
853
|
/**
|
|
871
854
|
* Accesses the context of the stream in the context of a stream.
|
|
872
855
|
*
|
|
873
856
|
* @since 2.0.0
|
|
874
857
|
* @category context
|
|
875
858
|
*/
|
|
876
|
-
export declare const contextWithStream: <R0,
|
|
859
|
+
export declare const contextWithStream: <R0, A, E, R>(f: (env: Context.Context<R0>) => Stream<A, E, R>) => Stream<A, E, R0 | R>;
|
|
877
860
|
/**
|
|
878
861
|
* Creates a stream that executes the specified effect but emits no elements.
|
|
879
862
|
*
|
|
880
863
|
* @since 2.0.0
|
|
881
864
|
* @category constructors
|
|
882
865
|
*/
|
|
883
|
-
export declare const execute: <
|
|
866
|
+
export declare const execute: <X, E, R>(effect: Effect.Effect<X, E, R>) => Stream<never, E, R>;
|
|
884
867
|
/**
|
|
885
868
|
* Terminates with the specified error.
|
|
886
869
|
*
|
|
@@ -916,9 +899,9 @@ export declare const failCauseSync: <E>(evaluate: LazyArg<Cause.Cause<E>>) => St
|
|
|
916
899
|
* @category filtering
|
|
917
900
|
*/
|
|
918
901
|
export declare const filter: {
|
|
919
|
-
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <
|
|
920
|
-
<A, B extends A>(predicate: Predicate<B>): <
|
|
921
|
-
<
|
|
902
|
+
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>;
|
|
903
|
+
<A, B extends A>(predicate: Predicate<B>): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
904
|
+
<A, E, R, B extends A>(self: Stream<A, E, R>, refinement: Refinement<A, B>): Stream<B, E, R>;
|
|
922
905
|
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>;
|
|
923
906
|
};
|
|
924
907
|
/**
|
|
@@ -928,8 +911,8 @@ export declare const filter: {
|
|
|
928
911
|
* @category filtering
|
|
929
912
|
*/
|
|
930
913
|
export declare const filterEffect: {
|
|
931
|
-
<A,
|
|
932
|
-
<
|
|
914
|
+
<A, E2, R2>(f: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
915
|
+
<A, E, R, E2, R2>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<boolean, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
933
916
|
};
|
|
934
917
|
/**
|
|
935
918
|
* Performs a filter and map in a single step.
|
|
@@ -938,8 +921,8 @@ export declare const filterEffect: {
|
|
|
938
921
|
* @category utils
|
|
939
922
|
*/
|
|
940
923
|
export declare const filterMap: {
|
|
941
|
-
<A, B>(pf: (a: A) => Option.Option<B>): <
|
|
942
|
-
<
|
|
924
|
+
<A, B>(pf: (a: A) => Option.Option<B>): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>;
|
|
925
|
+
<A, E, R, B>(self: Stream<A, E, R>, pf: (a: A) => Option.Option<B>): Stream<B, E, R>;
|
|
943
926
|
};
|
|
944
927
|
/**
|
|
945
928
|
* Performs an effectful filter and map in a single step.
|
|
@@ -948,8 +931,8 @@ export declare const filterMap: {
|
|
|
948
931
|
* @category utils
|
|
949
932
|
*/
|
|
950
933
|
export declare const filterMapEffect: {
|
|
951
|
-
<A,
|
|
952
|
-
<
|
|
934
|
+
<A, A2, E2, R2>(pf: (a: A) => Option.Option<Effect.Effect<A2, E2, R2>>): <E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
935
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, pf: (a: A) => Option.Option<Effect.Effect<A2, E2, R2>>): Stream<A2, E | E2, R | R2>;
|
|
953
936
|
};
|
|
954
937
|
/**
|
|
955
938
|
* Transforms all elements of the stream for as long as the specified partial
|
|
@@ -959,8 +942,8 @@ export declare const filterMapEffect: {
|
|
|
959
942
|
* @category utils
|
|
960
943
|
*/
|
|
961
944
|
export declare const filterMapWhile: {
|
|
962
|
-
<A, A2>(pf: (a: A) => Option.Option<A2>): <
|
|
963
|
-
<
|
|
945
|
+
<A, A2>(pf: (a: A) => Option.Option<A2>): <E, R>(self: Stream<A, E, R>) => Stream<A2, E, R>;
|
|
946
|
+
<A, E, R, A2>(self: Stream<A, E, R>, pf: (a: A) => Option.Option<A2>): Stream<A2, E, R>;
|
|
964
947
|
};
|
|
965
948
|
/**
|
|
966
949
|
* Effectfully transforms all elements of the stream for as long as the
|
|
@@ -970,8 +953,8 @@ export declare const filterMapWhile: {
|
|
|
970
953
|
* @category utils
|
|
971
954
|
*/
|
|
972
955
|
export declare const filterMapWhileEffect: {
|
|
973
|
-
<A,
|
|
974
|
-
<
|
|
956
|
+
<A, A2, E2, R2>(pf: (a: A) => Option.Option<Effect.Effect<A2, E2, R2>>): <E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
957
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, pf: (a: A) => Option.Option<Effect.Effect<A2, E2, R2>>): Stream<A2, E | E2, R | R2>;
|
|
975
958
|
};
|
|
976
959
|
/**
|
|
977
960
|
* Creates a one-element stream that never fails and executes the finalizer
|
|
@@ -980,7 +963,7 @@ export declare const filterMapWhileEffect: {
|
|
|
980
963
|
* @since 2.0.0
|
|
981
964
|
* @category constructors
|
|
982
965
|
*/
|
|
983
|
-
export declare const finalizer: <R,
|
|
966
|
+
export declare const finalizer: <R, X>(finalizer: Effect.Effect<X, never, R>) => Stream<void, never, R>;
|
|
984
967
|
/**
|
|
985
968
|
* Finds the first element emitted by this stream that satisfies the provided
|
|
986
969
|
* predicate.
|
|
@@ -989,9 +972,9 @@ export declare const finalizer: <R, _>(finalizer: Effect.Effect<_, never, R>) =>
|
|
|
989
972
|
* @category elements
|
|
990
973
|
*/
|
|
991
974
|
export declare const find: {
|
|
992
|
-
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <
|
|
993
|
-
<A>(predicate: Predicate<NoInfer<A>>): <
|
|
994
|
-
<
|
|
975
|
+
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>;
|
|
976
|
+
<A>(predicate: Predicate<NoInfer<A>>): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
977
|
+
<A, E, R, B extends A>(self: Stream<A, E, R>, refinement: Refinement<A, B>): Stream<B, E, R>;
|
|
995
978
|
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>;
|
|
996
979
|
};
|
|
997
980
|
/**
|
|
@@ -1002,8 +985,8 @@ export declare const find: {
|
|
|
1002
985
|
* @category elements
|
|
1003
986
|
*/
|
|
1004
987
|
export declare const findEffect: {
|
|
1005
|
-
<A,
|
|
1006
|
-
<
|
|
988
|
+
<A, E2, R2>(predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
989
|
+
<A, E, R, E2, R2>(self: Stream<A, E, R>, predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
1007
990
|
};
|
|
1008
991
|
/**
|
|
1009
992
|
* Returns a stream made of the concatenation in strict order of all the
|
|
@@ -1013,12 +996,12 @@ export declare const findEffect: {
|
|
|
1013
996
|
* @category sequencing
|
|
1014
997
|
*/
|
|
1015
998
|
export declare const flatMap: {
|
|
1016
|
-
<A,
|
|
999
|
+
<A, A2, E2, R2>(f: (a: A) => Stream<A2, E2, R2>, options?: {
|
|
1017
1000
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
1018
1001
|
readonly bufferSize?: number | undefined;
|
|
1019
1002
|
readonly switch?: boolean | undefined;
|
|
1020
|
-
} | undefined): <
|
|
1021
|
-
<
|
|
1003
|
+
} | undefined): <E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
1004
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, f: (a: A) => Stream<A2, E2, R2>, options?: {
|
|
1022
1005
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
1023
1006
|
readonly bufferSize?: number | undefined;
|
|
1024
1007
|
readonly switch?: boolean | undefined;
|
|
@@ -1035,11 +1018,11 @@ export declare const flatten: {
|
|
|
1035
1018
|
(options?: {
|
|
1036
1019
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
1037
1020
|
readonly bufferSize?: number | undefined;
|
|
1038
|
-
} | undefined): <
|
|
1039
|
-
<
|
|
1021
|
+
} | undefined): <A, E2, R2, E, R>(self: Stream<Stream<A, E2, R2>, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
1022
|
+
<A, E2, R2, E, R>(self: Stream<Stream<A, E2, R2>, E, R>, options?: {
|
|
1040
1023
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
1041
1024
|
readonly bufferSize?: number | undefined;
|
|
1042
|
-
} | undefined): Stream<A,
|
|
1025
|
+
} | undefined): Stream<A, E2 | E, R2 | R>;
|
|
1043
1026
|
};
|
|
1044
1027
|
/**
|
|
1045
1028
|
* Submerges the chunks carried by this stream into the stream's structure,
|
|
@@ -1060,11 +1043,11 @@ export declare const flattenEffect: {
|
|
|
1060
1043
|
(options?: {
|
|
1061
1044
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
1062
1045
|
readonly unordered?: boolean | undefined;
|
|
1063
|
-
} | undefined): <
|
|
1064
|
-
<
|
|
1046
|
+
} | undefined): <A, E2, R2, E, R>(self: Stream<Effect.Effect<A, E2, R2>, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
1047
|
+
<A, E2, R2, E, R>(self: Stream<Effect.Effect<A, E2, R2>, E, R>, options?: {
|
|
1065
1048
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
1066
1049
|
readonly unordered?: boolean | undefined;
|
|
1067
|
-
} | undefined): Stream<A,
|
|
1050
|
+
} | undefined): Stream<A, E2 | E, R2 | R>;
|
|
1068
1051
|
};
|
|
1069
1052
|
/**
|
|
1070
1053
|
* Unwraps `Exit` values that also signify end-of-stream by failing with `None`.
|
|
@@ -1078,7 +1061,7 @@ export declare const flattenEffect: {
|
|
|
1078
1061
|
* @since 2.0.0
|
|
1079
1062
|
* @category sequencing
|
|
1080
1063
|
*/
|
|
1081
|
-
export declare const flattenExitOption: <
|
|
1064
|
+
export declare const flattenExitOption: <A, E2, E, R>(self: Stream<Exit.Exit<A, Option.Option<E2>>, E, R>) => Stream<A, E | E2, R>;
|
|
1082
1065
|
/**
|
|
1083
1066
|
* Submerges the iterables carried by this stream into the stream's structure,
|
|
1084
1067
|
* while still preserving them.
|
|
@@ -1094,7 +1077,7 @@ export declare const flattenIterables: <A, E, R>(self: Stream<Iterable<A>, E, R>
|
|
|
1094
1077
|
* @since 2.0.0
|
|
1095
1078
|
* @category sequencing
|
|
1096
1079
|
*/
|
|
1097
|
-
export declare const flattenTake: <
|
|
1080
|
+
export declare const flattenTake: <A, E2, E, R>(self: Stream<Take.Take<A, E2>, E, R>) => Stream<A, E | E2, R>;
|
|
1098
1081
|
/**
|
|
1099
1082
|
* Repeats this stream forever.
|
|
1100
1083
|
*
|
|
@@ -1268,7 +1251,7 @@ export declare const fromReadableStreamByob: <E>(evaluate: LazyArg<ReadableStrea
|
|
|
1268
1251
|
* @since 2.0.0
|
|
1269
1252
|
* @category constructors
|
|
1270
1253
|
*/
|
|
1271
|
-
export declare const fromSchedule: <
|
|
1254
|
+
export declare const fromSchedule: <A, R>(schedule: Schedule.Schedule<A, unknown, R>) => Stream<A, never, R>;
|
|
1272
1255
|
/**
|
|
1273
1256
|
* Creates a pipeline that groups on adjacent keys, calculated by the
|
|
1274
1257
|
* specified function.
|
|
@@ -1277,8 +1260,8 @@ export declare const fromSchedule: <R, A>(schedule: Schedule.Schedule<R, unknown
|
|
|
1277
1260
|
* @category grouping
|
|
1278
1261
|
*/
|
|
1279
1262
|
export declare const groupAdjacentBy: {
|
|
1280
|
-
<A, K>(f: (a: A) => K): <
|
|
1281
|
-
<
|
|
1263
|
+
<A, K>(f: (a: A) => K): <E, R>(self: Stream<A, E, R>) => Stream<[K, Chunk.NonEmptyChunk<A>], E, R>;
|
|
1264
|
+
<A, E, R, K>(self: Stream<A, E, R>, f: (a: A) => K): Stream<[K, Chunk.NonEmptyChunk<A>], E, R>;
|
|
1282
1265
|
};
|
|
1283
1266
|
/**
|
|
1284
1267
|
* More powerful version of `Stream.groupByKey`.
|
|
@@ -1287,12 +1270,12 @@ export declare const groupAdjacentBy: {
|
|
|
1287
1270
|
* @category grouping
|
|
1288
1271
|
*/
|
|
1289
1272
|
export declare const groupBy: {
|
|
1290
|
-
<A,
|
|
1273
|
+
<A, K, V, E2, R2>(f: (a: A) => Effect.Effect<readonly [K, V], E2, R2>, options?: {
|
|
1291
1274
|
readonly bufferSize?: number | undefined;
|
|
1292
|
-
} | undefined): <
|
|
1293
|
-
<
|
|
1275
|
+
} | undefined): <E, R>(self: Stream<A, E, R>) => GroupBy.GroupBy<K, V, E2 | E, R2 | R>;
|
|
1276
|
+
<A, E, R, K, V, E2, R2>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<readonly [K, V], E2, R2>, options?: {
|
|
1294
1277
|
readonly bufferSize?: number | undefined;
|
|
1295
|
-
} | undefined): GroupBy.GroupBy<
|
|
1278
|
+
} | undefined): GroupBy.GroupBy<K, V, E | E2, R | R2>;
|
|
1296
1279
|
};
|
|
1297
1280
|
/**
|
|
1298
1281
|
* Partition a stream using a function and process each stream individually.
|
|
@@ -1334,10 +1317,10 @@ export declare const groupBy: {
|
|
|
1334
1317
|
export declare const groupByKey: {
|
|
1335
1318
|
<A, K>(f: (a: A) => K, options?: {
|
|
1336
1319
|
readonly bufferSize?: number | undefined;
|
|
1337
|
-
}): <
|
|
1338
|
-
<
|
|
1320
|
+
}): <E, R>(self: Stream<A, E, R>) => GroupBy.GroupBy<K, A, E, R>;
|
|
1321
|
+
<A, E, R, K>(self: Stream<A, E, R>, f: (a: A) => K, options?: {
|
|
1339
1322
|
readonly bufferSize?: number | undefined;
|
|
1340
|
-
}): GroupBy.GroupBy<
|
|
1323
|
+
}): GroupBy.GroupBy<K, A, E, R>;
|
|
1341
1324
|
};
|
|
1342
1325
|
/**
|
|
1343
1326
|
* Partitions the stream with specified `chunkSize`.
|
|
@@ -1388,8 +1371,8 @@ export declare const haltAfter: {
|
|
|
1388
1371
|
* @category utils
|
|
1389
1372
|
*/
|
|
1390
1373
|
export declare const haltWhen: {
|
|
1391
|
-
<
|
|
1392
|
-
<
|
|
1374
|
+
<X, E2, R2>(effect: Effect.Effect<X, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
1375
|
+
<A, E, R, X, E2, R2>(self: Stream<A, E, R>, effect: Effect.Effect<X, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
1393
1376
|
};
|
|
1394
1377
|
/**
|
|
1395
1378
|
* Halts the evaluation of this stream when the provided promise resolves.
|
|
@@ -1400,8 +1383,8 @@ export declare const haltWhen: {
|
|
|
1400
1383
|
* @category utils
|
|
1401
1384
|
*/
|
|
1402
1385
|
export declare const haltWhenDeferred: {
|
|
1403
|
-
<
|
|
1404
|
-
<
|
|
1386
|
+
<X, E2>(deferred: Deferred.Deferred<X, E2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R>;
|
|
1387
|
+
<A, E, R, X, E2>(self: Stream<A, E, R>, deferred: Deferred.Deferred<X, E2>): Stream<A, E | E2, R>;
|
|
1405
1388
|
};
|
|
1406
1389
|
/**
|
|
1407
1390
|
* The identity pipeline, which does not modify streams in any way.
|
|
@@ -1420,8 +1403,8 @@ export declare const identity: <A, E = never, R = never>() => Stream<A, E, R>;
|
|
|
1420
1403
|
* @category utils
|
|
1421
1404
|
*/
|
|
1422
1405
|
export declare const interleave: {
|
|
1423
|
-
<
|
|
1424
|
-
<
|
|
1406
|
+
<A2, E2, R2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E, R2 | R>;
|
|
1407
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A | A2, E | E2, R | R2>;
|
|
1425
1408
|
};
|
|
1426
1409
|
/**
|
|
1427
1410
|
* Combines this stream and the specified stream deterministically using the
|
|
@@ -1436,8 +1419,8 @@ export declare const interleave: {
|
|
|
1436
1419
|
* @category utils
|
|
1437
1420
|
*/
|
|
1438
1421
|
export declare const interleaveWith: {
|
|
1439
|
-
<
|
|
1440
|
-
<
|
|
1422
|
+
<A2, E2, R2, E3, R3>(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>;
|
|
1423
|
+
<A, E, R, A2, E2, R2, E3, R3>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, decider: Stream<boolean, E3, R3>): Stream<A | A2, E | E2 | E3, R | R2 | R3>;
|
|
1441
1424
|
};
|
|
1442
1425
|
/**
|
|
1443
1426
|
* Intersperse stream with provided `element`.
|
|
@@ -1447,7 +1430,7 @@ export declare const interleaveWith: {
|
|
|
1447
1430
|
*/
|
|
1448
1431
|
export declare const intersperse: {
|
|
1449
1432
|
<A2>(element: A2): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E, R>;
|
|
1450
|
-
<
|
|
1433
|
+
<A, E, R, A2>(self: Stream<A, E, R>, element: A2): Stream<A | A2, E, R>;
|
|
1451
1434
|
};
|
|
1452
1435
|
/**
|
|
1453
1436
|
* Intersperse the specified element, also adding a prefix and a suffix.
|
|
@@ -1461,7 +1444,7 @@ export declare const intersperseAffixes: {
|
|
|
1461
1444
|
readonly middle: A3;
|
|
1462
1445
|
readonly end: A4;
|
|
1463
1446
|
}): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A3 | A4 | A, E, R>;
|
|
1464
|
-
<
|
|
1447
|
+
<A, E, R, A2, A3, A4>(self: Stream<A, E, R>, options: {
|
|
1465
1448
|
readonly start: A2;
|
|
1466
1449
|
readonly middle: A3;
|
|
1467
1450
|
readonly end: A4;
|
|
@@ -1491,8 +1474,8 @@ export declare const interruptAfter: {
|
|
|
1491
1474
|
* @category utils
|
|
1492
1475
|
*/
|
|
1493
1476
|
export declare const interruptWhen: {
|
|
1494
|
-
<
|
|
1495
|
-
<
|
|
1477
|
+
<X, E2, R2>(effect: Effect.Effect<X, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
1478
|
+
<A, E, R, X, E2, R2>(self: Stream<A, E, R>, effect: Effect.Effect<X, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
1496
1479
|
};
|
|
1497
1480
|
/**
|
|
1498
1481
|
* Interrupts the evaluation of this stream when the provided promise
|
|
@@ -1505,8 +1488,8 @@ export declare const interruptWhen: {
|
|
|
1505
1488
|
* @category utils
|
|
1506
1489
|
*/
|
|
1507
1490
|
export declare const interruptWhenDeferred: {
|
|
1508
|
-
<
|
|
1509
|
-
<
|
|
1491
|
+
<X, E2>(deferred: Deferred.Deferred<X, E2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R>;
|
|
1492
|
+
<A, E, R, X, E2>(self: Stream<A, E, R>, deferred: Deferred.Deferred<X, E2>): Stream<A, E | E2, R>;
|
|
1510
1493
|
};
|
|
1511
1494
|
/**
|
|
1512
1495
|
* The infinite stream of iterative function application: a, f(a), f(f(a)),
|
|
@@ -1530,8 +1513,8 @@ export declare const make: <As extends Array<any>>(...as: As) => Stream<As[numbe
|
|
|
1530
1513
|
* @category mapping
|
|
1531
1514
|
*/
|
|
1532
1515
|
export declare const map: {
|
|
1533
|
-
<A, B>(f: (a: A) => B): <
|
|
1534
|
-
<
|
|
1516
|
+
<A, B>(f: (a: A) => B): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>;
|
|
1517
|
+
<A, E, R, B>(self: Stream<A, E, R>, f: (a: A) => B): Stream<B, E, R>;
|
|
1535
1518
|
};
|
|
1536
1519
|
/**
|
|
1537
1520
|
* Statefully maps over the elements of this stream to produce new elements.
|
|
@@ -1540,8 +1523,8 @@ export declare const map: {
|
|
|
1540
1523
|
* @category mapping
|
|
1541
1524
|
*/
|
|
1542
1525
|
export declare const mapAccum: {
|
|
1543
|
-
<S, A, A2>(s: S, f: (s: S, a: A) => readonly [S, A2]): <
|
|
1544
|
-
<
|
|
1526
|
+
<S, A, A2>(s: S, f: (s: S, a: A) => readonly [S, A2]): <E, R>(self: Stream<A, E, R>) => Stream<A2, E, R>;
|
|
1527
|
+
<A, E, R, S, A2>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => readonly [S, A2]): Stream<A2, E, R>;
|
|
1545
1528
|
};
|
|
1546
1529
|
/**
|
|
1547
1530
|
* Statefully and effectfully maps over the elements of this stream to produce
|
|
@@ -1551,8 +1534,8 @@ export declare const mapAccum: {
|
|
|
1551
1534
|
* @category mapping
|
|
1552
1535
|
*/
|
|
1553
1536
|
export declare const mapAccumEffect: {
|
|
1554
|
-
<S, A, A2, E2, R2>(s: S, f: (s: S, a: A) => Effect.Effect<readonly [S, A2], E2, R2>): <
|
|
1555
|
-
<
|
|
1537
|
+
<S, A, A2, E2, R2>(s: S, f: (s: S, a: A) => Effect.Effect<readonly [S, A2], E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
1538
|
+
<A, E, R, 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>;
|
|
1556
1539
|
};
|
|
1557
1540
|
/**
|
|
1558
1541
|
* Returns a stream whose failure and success channels have been mapped by the
|
|
@@ -1566,7 +1549,7 @@ export declare const mapBoth: {
|
|
|
1566
1549
|
readonly onFailure: (e: E) => E2;
|
|
1567
1550
|
readonly onSuccess: (a: A) => A2;
|
|
1568
1551
|
}): <R>(self: Stream<A, E, R>) => Stream<A2, E2, R>;
|
|
1569
|
-
<
|
|
1552
|
+
<A, E, R, E2, A2>(self: Stream<A, E, R>, options: {
|
|
1570
1553
|
readonly onFailure: (e: E) => E2;
|
|
1571
1554
|
readonly onSuccess: (a: A) => A2;
|
|
1572
1555
|
}): Stream<A2, E2, R>;
|
|
@@ -1579,7 +1562,7 @@ export declare const mapBoth: {
|
|
|
1579
1562
|
*/
|
|
1580
1563
|
export declare const mapChunks: {
|
|
1581
1564
|
<A, B>(f: (chunk: Chunk.Chunk<A>) => Chunk.Chunk<B>): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>;
|
|
1582
|
-
<
|
|
1565
|
+
<A, E, R, B>(self: Stream<A, E, R>, f: (chunk: Chunk.Chunk<A>) => Chunk.Chunk<B>): Stream<B, E, R>;
|
|
1583
1566
|
};
|
|
1584
1567
|
/**
|
|
1585
1568
|
* Effectfully transforms the chunks emitted by this stream.
|
|
@@ -1588,8 +1571,8 @@ export declare const mapChunks: {
|
|
|
1588
1571
|
* @category mapping
|
|
1589
1572
|
*/
|
|
1590
1573
|
export declare const mapChunksEffect: {
|
|
1591
|
-
<A,
|
|
1592
|
-
<
|
|
1574
|
+
<A, B, E2, R2>(f: (chunk: Chunk.Chunk<A>) => Effect.Effect<Chunk.Chunk<B>, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<B, E2 | E, R2 | R>;
|
|
1575
|
+
<A, E, R, B, E2, R2>(self: Stream<A, E, R>, f: (chunk: Chunk.Chunk<A>) => Effect.Effect<Chunk.Chunk<B>, E2, R2>): Stream<B, E | E2, R | R2>;
|
|
1593
1576
|
};
|
|
1594
1577
|
/**
|
|
1595
1578
|
* Maps each element to an iterable, and flattens the iterables into the
|
|
@@ -1599,8 +1582,8 @@ export declare const mapChunksEffect: {
|
|
|
1599
1582
|
* @category mapping
|
|
1600
1583
|
*/
|
|
1601
1584
|
export declare const mapConcat: {
|
|
1602
|
-
<A, A2>(f: (a: A) => Iterable<A2>): <
|
|
1603
|
-
<
|
|
1585
|
+
<A, A2>(f: (a: A) => Iterable<A2>): <E, R>(self: Stream<A, E, R>) => Stream<A2, E, R>;
|
|
1586
|
+
<A, E, R, A2>(self: Stream<A, E, R>, f: (a: A) => Iterable<A2>): Stream<A2, E, R>;
|
|
1604
1587
|
};
|
|
1605
1588
|
/**
|
|
1606
1589
|
* Maps each element to a chunk, and flattens the chunks into the output of
|
|
@@ -1610,8 +1593,8 @@ export declare const mapConcat: {
|
|
|
1610
1593
|
* @category mapping
|
|
1611
1594
|
*/
|
|
1612
1595
|
export declare const mapConcatChunk: {
|
|
1613
|
-
<A, A2>(f: (a: A) => Chunk.Chunk<A2>): <
|
|
1614
|
-
<
|
|
1596
|
+
<A, A2>(f: (a: A) => Chunk.Chunk<A2>): <E, R>(self: Stream<A, E, R>) => Stream<A2, E, R>;
|
|
1597
|
+
<A, E, R, A2>(self: Stream<A, E, R>, f: (a: A) => Chunk.Chunk<A2>): Stream<A2, E, R>;
|
|
1615
1598
|
};
|
|
1616
1599
|
/**
|
|
1617
1600
|
* Effectfully maps each element to a chunk, and flattens the chunks into the
|
|
@@ -1621,8 +1604,8 @@ export declare const mapConcatChunk: {
|
|
|
1621
1604
|
* @category mapping
|
|
1622
1605
|
*/
|
|
1623
1606
|
export declare const mapConcatChunkEffect: {
|
|
1624
|
-
<A,
|
|
1625
|
-
<
|
|
1607
|
+
<A, A2, E2, R2>(f: (a: A) => Effect.Effect<Chunk.Chunk<A2>, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
1608
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<Chunk.Chunk<A2>, E2, R2>): Stream<A2, E | E2, R | R2>;
|
|
1626
1609
|
};
|
|
1627
1610
|
/**
|
|
1628
1611
|
* Effectfully maps each element to an iterable, and flattens the iterables
|
|
@@ -1632,8 +1615,8 @@ export declare const mapConcatChunkEffect: {
|
|
|
1632
1615
|
* @category mapping
|
|
1633
1616
|
*/
|
|
1634
1617
|
export declare const mapConcatEffect: {
|
|
1635
|
-
<A,
|
|
1636
|
-
<
|
|
1618
|
+
<A, A2, E2, R2>(f: (a: A) => Effect.Effect<Iterable<A2>, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
1619
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<Iterable<A2>, E2, R2>): Stream<A2, E | E2, R | R2>;
|
|
1637
1620
|
};
|
|
1638
1621
|
/**
|
|
1639
1622
|
* Maps over elements of the stream with the specified effectful function.
|
|
@@ -1642,19 +1625,19 @@ export declare const mapConcatEffect: {
|
|
|
1642
1625
|
* @category mapping
|
|
1643
1626
|
*/
|
|
1644
1627
|
export declare const mapEffect: {
|
|
1645
|
-
<A,
|
|
1628
|
+
<A, A2, E2, R2>(f: (a: A) => Effect.Effect<A2, E2, R2>, options?: {
|
|
1646
1629
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
1647
1630
|
readonly unordered?: boolean | undefined;
|
|
1648
|
-
} | undefined): <
|
|
1649
|
-
<A,
|
|
1631
|
+
} | undefined): <E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
1632
|
+
<A, A2, E2, R2, K>(f: (a: A) => Effect.Effect<A2, E2, R2>, options: {
|
|
1650
1633
|
readonly key: (a: A) => K;
|
|
1651
1634
|
readonly bufferSize?: number | undefined;
|
|
1652
|
-
}): <
|
|
1653
|
-
<
|
|
1635
|
+
}): <E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
1636
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<A2, E2, R2>, options?: {
|
|
1654
1637
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
1655
1638
|
readonly unordered?: boolean | undefined;
|
|
1656
1639
|
} | undefined): Stream<A2, E | E2, R | R2>;
|
|
1657
|
-
<
|
|
1640
|
+
<A, E, R, A2, E2, R2, K>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<A2, E2, R2>, options: {
|
|
1658
1641
|
readonly key: (a: A) => K;
|
|
1659
1642
|
readonly bufferSize?: number | undefined;
|
|
1660
1643
|
}): Stream<A2, E | E2, R | R2>;
|
|
@@ -1666,8 +1649,8 @@ export declare const mapEffect: {
|
|
|
1666
1649
|
* @category mapping
|
|
1667
1650
|
*/
|
|
1668
1651
|
export declare const mapError: {
|
|
1669
|
-
<E, E2>(f: (error: E) => E2): <
|
|
1670
|
-
<
|
|
1652
|
+
<E, E2>(f: (error: E) => E2): <A, R>(self: Stream<A, E, R>) => Stream<A, E2, R>;
|
|
1653
|
+
<A, E, R, E2>(self: Stream<A, E, R>, f: (error: E) => E2): Stream<A, E2, R>;
|
|
1671
1654
|
};
|
|
1672
1655
|
/**
|
|
1673
1656
|
* Transforms the full causes of failures emitted by this stream.
|
|
@@ -1676,8 +1659,8 @@ export declare const mapError: {
|
|
|
1676
1659
|
* @category mapping
|
|
1677
1660
|
*/
|
|
1678
1661
|
export declare const mapErrorCause: {
|
|
1679
|
-
<E, E2>(f: (cause: Cause.Cause<E>) => Cause.Cause<E2>): <
|
|
1680
|
-
<
|
|
1662
|
+
<E, E2>(f: (cause: Cause.Cause<E>) => Cause.Cause<E2>): <A, R>(self: Stream<A, E, R>) => Stream<A, E2, R>;
|
|
1663
|
+
<A, E, R, E2>(self: Stream<A, E, R>, f: (cause: Cause.Cause<E>) => Cause.Cause<E2>): Stream<A, E2, R>;
|
|
1681
1664
|
};
|
|
1682
1665
|
/**
|
|
1683
1666
|
* Merges this stream and the specified stream together.
|
|
@@ -1689,10 +1672,10 @@ export declare const mapErrorCause: {
|
|
|
1689
1672
|
* @category utils
|
|
1690
1673
|
*/
|
|
1691
1674
|
export declare const merge: {
|
|
1692
|
-
<
|
|
1675
|
+
<A2, E2, R2>(that: Stream<A2, E2, R2>, options?: {
|
|
1693
1676
|
readonly haltStrategy?: HaltStrategy.HaltStrategyInput | undefined;
|
|
1694
1677
|
} | undefined): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E, R2 | R>;
|
|
1695
|
-
<
|
|
1678
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, options?: {
|
|
1696
1679
|
readonly haltStrategy?: HaltStrategy.HaltStrategyInput | undefined;
|
|
1697
1680
|
} | undefined): Stream<A | A2, E | E2, R | R2>;
|
|
1698
1681
|
};
|
|
@@ -1725,12 +1708,12 @@ export declare const mergeAll: {
|
|
|
1725
1708
|
* @category utils
|
|
1726
1709
|
*/
|
|
1727
1710
|
export declare const mergeWith: {
|
|
1728
|
-
<
|
|
1711
|
+
<A2, E2, R2, A, A3, A4>(other: Stream<A2, E2, R2>, options: {
|
|
1729
1712
|
readonly onSelf: (a: A) => A3;
|
|
1730
1713
|
readonly onOther: (a2: A2) => A4;
|
|
1731
1714
|
readonly haltStrategy?: HaltStrategy.HaltStrategyInput | undefined;
|
|
1732
|
-
}): <
|
|
1733
|
-
<
|
|
1715
|
+
}): <E, R>(self: Stream<A, E, R>) => Stream<A3 | A4, E2 | E, R2 | R>;
|
|
1716
|
+
<A, E, R, A2, E2, R2, A3, A4>(self: Stream<A, E, R>, other: Stream<A2, E2, R2>, options: {
|
|
1734
1717
|
readonly onSelf: (a: A) => A3;
|
|
1735
1718
|
readonly onOther: (a2: A2) => A4;
|
|
1736
1719
|
readonly haltStrategy?: HaltStrategy.HaltStrategyInput | undefined;
|
|
@@ -1744,8 +1727,8 @@ export declare const mergeWith: {
|
|
|
1744
1727
|
* @category utils
|
|
1745
1728
|
*/
|
|
1746
1729
|
export declare const mergeEither: {
|
|
1747
|
-
<
|
|
1748
|
-
<
|
|
1730
|
+
<A2, E2, R2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<Either.Either<A2, A>, E2 | E, R2 | R>;
|
|
1731
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<Either.Either<A2, A>, E | E2, R | R2>;
|
|
1749
1732
|
};
|
|
1750
1733
|
/**
|
|
1751
1734
|
* Merges this stream and the specified stream together, discarding the values
|
|
@@ -1755,8 +1738,8 @@ export declare const mergeEither: {
|
|
|
1755
1738
|
* @category utils
|
|
1756
1739
|
*/
|
|
1757
1740
|
export declare const mergeLeft: {
|
|
1758
|
-
<
|
|
1759
|
-
<
|
|
1741
|
+
<A2, E2, R2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
1742
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
1760
1743
|
};
|
|
1761
1744
|
/**
|
|
1762
1745
|
* Merges this stream and the specified stream together, discarding the values
|
|
@@ -1766,8 +1749,8 @@ export declare const mergeLeft: {
|
|
|
1766
1749
|
* @category utils
|
|
1767
1750
|
*/
|
|
1768
1751
|
export declare const mergeRight: {
|
|
1769
|
-
<
|
|
1770
|
-
<
|
|
1752
|
+
<A2, E2, R2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
1753
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A2, E | E2, R | R2>;
|
|
1771
1754
|
};
|
|
1772
1755
|
/**
|
|
1773
1756
|
* Returns a combined string resulting from concatenating each of the values
|
|
@@ -1776,7 +1759,7 @@ export declare const mergeRight: {
|
|
|
1776
1759
|
* @since 2.0.0
|
|
1777
1760
|
* @category utils
|
|
1778
1761
|
*/
|
|
1779
|
-
export declare const mkString: <
|
|
1762
|
+
export declare const mkString: <E, R>(self: Stream<string, E, R>) => Effect.Effect<string, E, R>;
|
|
1780
1763
|
/**
|
|
1781
1764
|
* The stream that never produces any value or fails with any error.
|
|
1782
1765
|
*
|
|
@@ -1795,8 +1778,8 @@ export declare const never: Stream<never>;
|
|
|
1795
1778
|
* @category utils
|
|
1796
1779
|
*/
|
|
1797
1780
|
export declare const onError: {
|
|
1798
|
-
<E,
|
|
1799
|
-
<
|
|
1781
|
+
<E, X, R2>(cleanup: (cause: Cause.Cause<E>) => Effect.Effect<X, never, R2>): <A, R>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>;
|
|
1782
|
+
<A, E, R, X, R2>(self: Stream<A, E, R>, cleanup: (cause: Cause.Cause<E>) => Effect.Effect<X, never, R2>): Stream<A, E, R | R2>;
|
|
1800
1783
|
};
|
|
1801
1784
|
/**
|
|
1802
1785
|
* Runs the specified effect if this stream ends.
|
|
@@ -1805,8 +1788,8 @@ export declare const onError: {
|
|
|
1805
1788
|
* @category utils
|
|
1806
1789
|
*/
|
|
1807
1790
|
export declare const onDone: {
|
|
1808
|
-
<
|
|
1809
|
-
<
|
|
1791
|
+
<X, R2>(cleanup: () => Effect.Effect<X, never, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>;
|
|
1792
|
+
<A, E, R, X, R2>(self: Stream<A, E, R>, cleanup: () => Effect.Effect<X, never, R2>): Stream<A, E, R | R2>;
|
|
1810
1793
|
};
|
|
1811
1794
|
/**
|
|
1812
1795
|
* Translates any failure into a stream termination, making the stream
|
|
@@ -1824,8 +1807,8 @@ export declare const orDie: <A, E, R>(self: Stream<A, E, R>) => Stream<A, never,
|
|
|
1824
1807
|
* @category error handling
|
|
1825
1808
|
*/
|
|
1826
1809
|
export declare const orDieWith: {
|
|
1827
|
-
<E>(f: (e: E) => unknown): <
|
|
1828
|
-
<
|
|
1810
|
+
<E>(f: (e: E) => unknown): <A, R>(self: Stream<A, E, R>) => Stream<A, never, R>;
|
|
1811
|
+
<A, E, R>(self: Stream<A, E, R>, f: (e: E) => unknown): Stream<A, never, R>;
|
|
1829
1812
|
};
|
|
1830
1813
|
/**
|
|
1831
1814
|
* Switches to the provided stream in case this one fails with a typed error.
|
|
@@ -1836,8 +1819,8 @@ export declare const orDieWith: {
|
|
|
1836
1819
|
* @category error handling
|
|
1837
1820
|
*/
|
|
1838
1821
|
export declare const orElse: {
|
|
1839
|
-
<
|
|
1840
|
-
<
|
|
1822
|
+
<A2, E2, R2>(that: LazyArg<Stream<A2, E2, R2>>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2, R2 | R>;
|
|
1823
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: LazyArg<Stream<A2, E2, R2>>): Stream<A | A2, E2, R | R2>;
|
|
1841
1824
|
};
|
|
1842
1825
|
/**
|
|
1843
1826
|
* Switches to the provided stream in case this one fails with a typed error.
|
|
@@ -1848,8 +1831,8 @@ export declare const orElse: {
|
|
|
1848
1831
|
* @category error handling
|
|
1849
1832
|
*/
|
|
1850
1833
|
export declare const orElseEither: {
|
|
1851
|
-
<
|
|
1852
|
-
<
|
|
1834
|
+
<A2, E2, R2>(that: LazyArg<Stream<A2, E2, R2>>): <A, E, R>(self: Stream<A, E, R>) => Stream<Either.Either<A2, A>, E2, R2 | R>;
|
|
1835
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: LazyArg<Stream<A2, E2, R2>>): Stream<Either.Either<A2, A>, E2, R | R2>;
|
|
1853
1836
|
};
|
|
1854
1837
|
/**
|
|
1855
1838
|
* Fails with given error in case this one fails with a typed error.
|
|
@@ -1861,7 +1844,7 @@ export declare const orElseEither: {
|
|
|
1861
1844
|
*/
|
|
1862
1845
|
export declare const orElseFail: {
|
|
1863
1846
|
<E2>(error: LazyArg<E2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2, R>;
|
|
1864
|
-
<
|
|
1847
|
+
<A, E, R, E2>(self: Stream<A, E, R>, error: LazyArg<E2>): Stream<A, E2, R>;
|
|
1865
1848
|
};
|
|
1866
1849
|
/**
|
|
1867
1850
|
* Produces the specified element if this stream is empty.
|
|
@@ -1871,7 +1854,7 @@ export declare const orElseFail: {
|
|
|
1871
1854
|
*/
|
|
1872
1855
|
export declare const orElseIfEmpty: {
|
|
1873
1856
|
<A2>(element: LazyArg<A2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E, R>;
|
|
1874
|
-
<
|
|
1857
|
+
<A, E, R, A2>(self: Stream<A, E, R>, element: LazyArg<A2>): Stream<A | A2, E, R>;
|
|
1875
1858
|
};
|
|
1876
1859
|
/**
|
|
1877
1860
|
* Produces the specified chunk if this stream is empty.
|
|
@@ -1881,7 +1864,7 @@ export declare const orElseIfEmpty: {
|
|
|
1881
1864
|
*/
|
|
1882
1865
|
export declare const orElseIfEmptyChunk: {
|
|
1883
1866
|
<A2>(chunk: LazyArg<Chunk.Chunk<A2>>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E, R>;
|
|
1884
|
-
<
|
|
1867
|
+
<A, E, R, A2>(self: Stream<A, E, R>, chunk: LazyArg<Chunk.Chunk<A2>>): Stream<A | A2, E, R>;
|
|
1885
1868
|
};
|
|
1886
1869
|
/**
|
|
1887
1870
|
* Switches to the provided stream in case this one is empty.
|
|
@@ -1890,8 +1873,8 @@ export declare const orElseIfEmptyChunk: {
|
|
|
1890
1873
|
* @category error handling
|
|
1891
1874
|
*/
|
|
1892
1875
|
export declare const orElseIfEmptyStream: {
|
|
1893
|
-
<
|
|
1894
|
-
<
|
|
1876
|
+
<A2, E2, R2>(stream: LazyArg<Stream<A2, E2, R2>>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E, R2 | R>;
|
|
1877
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, stream: LazyArg<Stream<A2, E2, R2>>): Stream<A | A2, E | E2, R | R2>;
|
|
1895
1878
|
};
|
|
1896
1879
|
/**
|
|
1897
1880
|
* Succeeds with the specified value if this one fails with a typed error.
|
|
@@ -1901,7 +1884,7 @@ export declare const orElseIfEmptyStream: {
|
|
|
1901
1884
|
*/
|
|
1902
1885
|
export declare const orElseSucceed: {
|
|
1903
1886
|
<A2>(value: LazyArg<A2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, never, R>;
|
|
1904
|
-
<
|
|
1887
|
+
<A, E, R, A2>(self: Stream<A, E, R>, value: LazyArg<A2>): Stream<A | A2, never, R>;
|
|
1905
1888
|
};
|
|
1906
1889
|
/**
|
|
1907
1890
|
* Like `Stream.unfold`, but allows the emission of values to end one step further
|
|
@@ -1929,7 +1912,7 @@ export declare const paginateChunk: <S, A>(s: S, f: (s: S) => readonly [Chunk.Ch
|
|
|
1929
1912
|
* @since 2.0.0
|
|
1930
1913
|
* @category constructors
|
|
1931
1914
|
*/
|
|
1932
|
-
export declare const paginateChunkEffect: <S,
|
|
1915
|
+
export declare const paginateChunkEffect: <S, A, E, R>(s: S, f: (s: S) => Effect.Effect<readonly [Chunk.Chunk<A>, Option.Option<S>], E, R>) => Stream<A, E, R>;
|
|
1933
1916
|
/**
|
|
1934
1917
|
* Like `Stream.unfoldEffect` but allows the emission of values to end one step
|
|
1935
1918
|
* further than the unfolding of the state. This is useful for embedding
|
|
@@ -1938,7 +1921,7 @@ export declare const paginateChunkEffect: <S, R, E, A>(s: S, f: (s: S) => Effect
|
|
|
1938
1921
|
* @since 2.0.0
|
|
1939
1922
|
* @category constructors
|
|
1940
1923
|
*/
|
|
1941
|
-
export declare const paginateEffect: <S,
|
|
1924
|
+
export declare const paginateEffect: <S, A, E, R>(s: S, f: (s: S) => Effect.Effect<readonly [A, Option.Option<S>], E, R>) => Stream<A, E, R>;
|
|
1942
1925
|
/**
|
|
1943
1926
|
* Partition a stream using a predicate. The first stream will contain all
|
|
1944
1927
|
* element evaluated to true and the second one will contain all element
|
|
@@ -1951,16 +1934,16 @@ export declare const paginateEffect: <S, R, E, A>(s: S, f: (s: S) => Effect.Effe
|
|
|
1951
1934
|
export declare const partition: {
|
|
1952
1935
|
<C extends A, B extends A, A = C>(refinement: Refinement<NoInfer<A>, B>, options?: {
|
|
1953
1936
|
bufferSize?: number | undefined;
|
|
1954
|
-
} | undefined): <
|
|
1937
|
+
} | undefined): <E, R>(self: Stream<C, E, R>) => Effect.Effect<[excluded: Stream<Exclude<C, B>, E, never>, satisfying: Stream<B, E, never>], E, R | Scope.Scope>;
|
|
1955
1938
|
<A>(predicate: Predicate<A>, options?: {
|
|
1956
1939
|
bufferSize?: number | undefined;
|
|
1957
|
-
} | undefined): <
|
|
1958
|
-
<
|
|
1940
|
+
} | undefined): <E, R>(self: Stream<A, E, R>) => Effect.Effect<[excluded: Stream<A, E, never>, satisfying: Stream<A, E, never>], E, Scope.Scope | R>;
|
|
1941
|
+
<C extends A, E, R, B extends A, A = C>(self: Stream<C, E, R>, refinement: Refinement<A, B>, options?: {
|
|
1959
1942
|
bufferSize?: number | undefined;
|
|
1960
|
-
} | undefined): Effect.Effect<[excluded: Stream<Exclude<C, B>, E>, satisfying: Stream<B, E>], E, Scope.Scope
|
|
1943
|
+
} | undefined): Effect.Effect<[excluded: Stream<Exclude<C, B>, E, never>, satisfying: Stream<B, E, never>], E, R | Scope.Scope>;
|
|
1961
1944
|
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>, options?: {
|
|
1962
1945
|
bufferSize?: number | undefined;
|
|
1963
|
-
} | undefined): Effect.Effect<[excluded: Stream<A, E>, satisfying: Stream<A, E>], E, Scope.Scope
|
|
1946
|
+
} | undefined): Effect.Effect<[excluded: Stream<A, E, never>, satisfying: Stream<A, E, never>], E, R | Scope.Scope>;
|
|
1964
1947
|
};
|
|
1965
1948
|
/**
|
|
1966
1949
|
* Split a stream by an effectful predicate. The faster stream may advance by
|
|
@@ -1970,12 +1953,12 @@ export declare const partition: {
|
|
|
1970
1953
|
* @category utils
|
|
1971
1954
|
*/
|
|
1972
1955
|
export declare const partitionEither: {
|
|
1973
|
-
<A,
|
|
1956
|
+
<A, A3, A2, E2, R2>(predicate: (a: NoInfer<A>) => Effect.Effect<Either.Either<A3, A2>, E2, R2>, options?: {
|
|
1974
1957
|
readonly bufferSize?: number | undefined;
|
|
1975
|
-
} | undefined): <
|
|
1976
|
-
<
|
|
1958
|
+
} | undefined): <E, R>(self: Stream<A, E, R>) => Effect.Effect<[left: Stream<A2, E2 | E, never>, right: Stream<A3, E2 | E, never>], E2 | E, Scope.Scope | R2 | R>;
|
|
1959
|
+
<A, E, R, A3, A2, E2, R2>(self: Stream<A, E, R>, predicate: (a: A) => Effect.Effect<Either.Either<A3, A2>, E2, R2>, options?: {
|
|
1977
1960
|
readonly bufferSize?: number | undefined;
|
|
1978
|
-
} | undefined): Effect.Effect<[left: Stream<A2, E | E2>, right: Stream<A3, E | E2>], E | E2, Scope.Scope | R | R2>;
|
|
1961
|
+
} | undefined): Effect.Effect<[left: Stream<A2, E | E2, never>, right: Stream<A3, E | E2, never>], E | E2, Scope.Scope | R | R2>;
|
|
1979
1962
|
};
|
|
1980
1963
|
/**
|
|
1981
1964
|
* Peels off enough material from the stream to construct a `Z` using the
|
|
@@ -2031,7 +2014,7 @@ export declare const pipeThroughChannelOrFail: {
|
|
|
2031
2014
|
*/
|
|
2032
2015
|
export declare const prepend: {
|
|
2033
2016
|
<B>(values: Chunk.Chunk<B>): <A, E, R>(self: Stream<A, E, R>) => Stream<B | A, E, R>;
|
|
2034
|
-
<
|
|
2017
|
+
<A, E, R, B>(self: Stream<A, E, R>, values: Chunk.Chunk<B>): Stream<A | B, E, R>;
|
|
2035
2018
|
};
|
|
2036
2019
|
/**
|
|
2037
2020
|
* Provides the stream with its required context, which eliminates its
|
|
@@ -2063,7 +2046,7 @@ export declare const provideLayer: {
|
|
|
2063
2046
|
*/
|
|
2064
2047
|
export declare const provideService: {
|
|
2065
2048
|
<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
|
-
<
|
|
2049
|
+
<A, E, R, 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>>>;
|
|
2067
2050
|
};
|
|
2068
2051
|
/**
|
|
2069
2052
|
* Provides the stream with the single service it requires. If the stream
|
|
@@ -2073,8 +2056,8 @@ export declare const provideService: {
|
|
|
2073
2056
|
* @category context
|
|
2074
2057
|
*/
|
|
2075
2058
|
export declare const provideServiceEffect: {
|
|
2076
|
-
<T extends Context.Tag<any, any>,
|
|
2077
|
-
<
|
|
2059
|
+
<T extends Context.Tag<any, any>, E2, R2>(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>>>;
|
|
2060
|
+
<A, E, R, T extends Context.Tag<any, any>, E2, R2>(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>>>;
|
|
2078
2061
|
};
|
|
2079
2062
|
/**
|
|
2080
2063
|
* Provides the stream with the single service it requires. If the stream
|
|
@@ -2084,8 +2067,8 @@ export declare const provideServiceEffect: {
|
|
|
2084
2067
|
* @category context
|
|
2085
2068
|
*/
|
|
2086
2069
|
export declare const provideServiceStream: {
|
|
2087
|
-
<T extends Context.Tag<any, any>,
|
|
2088
|
-
<
|
|
2070
|
+
<T extends Context.Tag<any, any>, E2, R2>(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>>>;
|
|
2071
|
+
<A, E, R, T extends Context.Tag<any, any>, E2, R2>(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>>>;
|
|
2089
2072
|
};
|
|
2090
2073
|
/**
|
|
2091
2074
|
* Transforms the context being provided to the stream with the specified
|
|
@@ -2107,7 +2090,7 @@ export declare const mapInputContext: {
|
|
|
2107
2090
|
*/
|
|
2108
2091
|
export declare const provideSomeLayer: {
|
|
2109
2092
|
<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
|
-
<
|
|
2093
|
+
<A, E, R, RIn, E2, ROut>(self: Stream<A, E, R>, layer: Layer.Layer<ROut, E2, RIn>): Stream<A, E | E2, RIn | Exclude<R, ROut>>;
|
|
2111
2094
|
};
|
|
2112
2095
|
/**
|
|
2113
2096
|
* Constructs a stream from a range of integers, including both endpoints.
|
|
@@ -2134,8 +2117,8 @@ export declare const rechunk: {
|
|
|
2134
2117
|
* @category error handling
|
|
2135
2118
|
*/
|
|
2136
2119
|
export declare const refineOrDie: {
|
|
2137
|
-
<E, E2>(pf: (error: E) => Option.Option<E2>): <
|
|
2138
|
-
<
|
|
2120
|
+
<E, E2>(pf: (error: E) => Option.Option<E2>): <A, R>(self: Stream<A, E, R>) => Stream<A, E2, R>;
|
|
2121
|
+
<A, E, R, E2>(self: Stream<A, E, R>, pf: (error: E) => Option.Option<E2>): Stream<A, E2, R>;
|
|
2139
2122
|
};
|
|
2140
2123
|
/**
|
|
2141
2124
|
* Keeps some of the errors, and terminates the fiber with the rest, using the
|
|
@@ -2145,8 +2128,8 @@ export declare const refineOrDie: {
|
|
|
2145
2128
|
* @category error handling
|
|
2146
2129
|
*/
|
|
2147
2130
|
export declare const refineOrDieWith: {
|
|
2148
|
-
<E, E2>(pf: (error: E) => Option.Option<E2>, f: (error: E) => unknown): <
|
|
2149
|
-
<
|
|
2131
|
+
<E, E2>(pf: (error: E) => Option.Option<E2>, f: (error: E) => unknown): <A, R>(self: Stream<A, E, R>) => Stream<A, E2, R>;
|
|
2132
|
+
<A, E, R, E2>(self: Stream<A, E, R>, pf: (error: E) => Option.Option<E2>, f: (error: E) => unknown): Stream<A, E2, R>;
|
|
2150
2133
|
};
|
|
2151
2134
|
/**
|
|
2152
2135
|
* Repeats the entire stream using the specified schedule. The stream will
|
|
@@ -2156,8 +2139,8 @@ export declare const refineOrDieWith: {
|
|
|
2156
2139
|
* @category utils
|
|
2157
2140
|
*/
|
|
2158
2141
|
export declare const repeat: {
|
|
2159
|
-
<
|
|
2160
|
-
<
|
|
2142
|
+
<B, R2>(schedule: Schedule.Schedule<B, unknown, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>;
|
|
2143
|
+
<A, E, R, B, R2>(self: Stream<A, E, R>, schedule: Schedule.Schedule<B, unknown, R2>): Stream<A, E, R | R2>;
|
|
2161
2144
|
};
|
|
2162
2145
|
/**
|
|
2163
2146
|
* Creates a stream from an effect producing a value of type `A` which repeats
|
|
@@ -2198,7 +2181,7 @@ export declare const repeatEffectOption: <A, E, R>(effect: Effect.Effect<A, Opti
|
|
|
2198
2181
|
* @since 2.0.0
|
|
2199
2182
|
* @category constructors
|
|
2200
2183
|
*/
|
|
2201
|
-
export declare const repeatEffectWithSchedule: <
|
|
2184
|
+
export declare const repeatEffectWithSchedule: <A, E, R, X, A0 extends A, R2>(effect: Effect.Effect<A, E, R>, schedule: Schedule.Schedule<X, A0, R2>) => Stream<A, E, R | R2>;
|
|
2202
2185
|
/**
|
|
2203
2186
|
* Repeats the entire stream using the specified schedule. The stream will
|
|
2204
2187
|
* execute normally, and then repeat again according to the provided schedule.
|
|
@@ -2208,8 +2191,8 @@ export declare const repeatEffectWithSchedule: <R, E, A, A0 extends A, R2, _>(ef
|
|
|
2208
2191
|
* @category utils
|
|
2209
2192
|
*/
|
|
2210
2193
|
export declare const repeatEither: {
|
|
2211
|
-
<
|
|
2212
|
-
<
|
|
2194
|
+
<B, R2>(schedule: Schedule.Schedule<B, unknown, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<Either.Either<A, B>, E, R2 | R>;
|
|
2195
|
+
<A, E, R, B, R2>(self: Stream<A, E, R>, schedule: Schedule.Schedule<B, unknown, R2>): Stream<Either.Either<A, B>, E, R | R2>;
|
|
2213
2196
|
};
|
|
2214
2197
|
/**
|
|
2215
2198
|
* Repeats each element of the stream using the provided schedule. Repetitions
|
|
@@ -2222,8 +2205,8 @@ export declare const repeatEither: {
|
|
|
2222
2205
|
* @category utils
|
|
2223
2206
|
*/
|
|
2224
2207
|
export declare const repeatElements: {
|
|
2225
|
-
<
|
|
2226
|
-
<
|
|
2208
|
+
<B, R2>(schedule: Schedule.Schedule<B, unknown, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>;
|
|
2209
|
+
<A, E, R, B, R2>(self: Stream<A, E, R>, schedule: Schedule.Schedule<B, unknown, R2>): Stream<A, E, R | R2>;
|
|
2227
2210
|
};
|
|
2228
2211
|
/**
|
|
2229
2212
|
* Repeats each element of the stream using the provided schedule. When the
|
|
@@ -2241,11 +2224,11 @@ export declare const repeatElements: {
|
|
|
2241
2224
|
* @category utils
|
|
2242
2225
|
*/
|
|
2243
2226
|
export declare const repeatElementsWith: {
|
|
2244
|
-
<
|
|
2227
|
+
<B, R2, A, C>(schedule: Schedule.Schedule<B, unknown, R2>, options: {
|
|
2245
2228
|
readonly onElement: (a: A) => C;
|
|
2246
2229
|
readonly onSchedule: (b: B) => C;
|
|
2247
|
-
}): <
|
|
2248
|
-
<
|
|
2230
|
+
}): <E, R>(self: Stream<A, E, R>) => Stream<C, E, R2 | R>;
|
|
2231
|
+
<A, E, R, B, R2, C>(self: Stream<A, E, R>, schedule: Schedule.Schedule<B, unknown, R2>, options: {
|
|
2249
2232
|
readonly onElement: (a: A) => C;
|
|
2250
2233
|
readonly onSchedule: (b: B) => C;
|
|
2251
2234
|
}): Stream<C, E, R | R2>;
|
|
@@ -2267,11 +2250,11 @@ export declare const repeatValue: <A>(value: A) => Stream<A>;
|
|
|
2267
2250
|
* @category utils
|
|
2268
2251
|
*/
|
|
2269
2252
|
export declare const repeatWith: {
|
|
2270
|
-
<
|
|
2253
|
+
<B, R2, A, C>(schedule: Schedule.Schedule<B, unknown, R2>, options: {
|
|
2271
2254
|
readonly onElement: (a: A) => C;
|
|
2272
2255
|
readonly onSchedule: (b: B) => C;
|
|
2273
|
-
}): <
|
|
2274
|
-
<
|
|
2256
|
+
}): <E, R>(self: Stream<A, E, R>) => Stream<C, E, R2 | R>;
|
|
2257
|
+
<A, E, R, B, R2, C>(self: Stream<A, E, R>, schedule: Schedule.Schedule<B, unknown, R2>, options: {
|
|
2275
2258
|
readonly onElement: (a: A) => C;
|
|
2276
2259
|
readonly onSchedule: (b: B) => C;
|
|
2277
2260
|
}): Stream<C, E, R | R2>;
|
|
@@ -2290,8 +2273,8 @@ export declare const repeatWith: {
|
|
|
2290
2273
|
* @category utils
|
|
2291
2274
|
*/
|
|
2292
2275
|
export declare const retry: {
|
|
2293
|
-
<
|
|
2294
|
-
<
|
|
2276
|
+
<E0 extends E, R2, E, X>(schedule: Schedule.Schedule<X, E0, R2>): <A, R>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>;
|
|
2277
|
+
<A, E, R, X, E0 extends E, R2>(self: Stream<A, E, R>, schedule: Schedule.Schedule<X, E0, R2>): Stream<A, E, R | R2>;
|
|
2295
2278
|
};
|
|
2296
2279
|
/**
|
|
2297
2280
|
* Runs the sink on the stream to produce either the sink's result or an error.
|
|
@@ -2332,8 +2315,8 @@ export declare const runDrain: <A, E, R>(self: Stream<A, E, R>) => Effect.Effect
|
|
|
2332
2315
|
* @category destructors
|
|
2333
2316
|
*/
|
|
2334
2317
|
export declare const runFold: {
|
|
2335
|
-
<S, A>(s: S, f: (s: S, a: A) => S): <
|
|
2336
|
-
<
|
|
2318
|
+
<S, A>(s: S, f: (s: S, a: A) => S): <E, R>(self: Stream<A, E, R>) => Effect.Effect<S, E, R>;
|
|
2319
|
+
<A, E, R, S>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => S): Effect.Effect<S, E, R>;
|
|
2337
2320
|
};
|
|
2338
2321
|
/**
|
|
2339
2322
|
* Executes an effectful fold over the stream of values.
|
|
@@ -2342,8 +2325,8 @@ export declare const runFold: {
|
|
|
2342
2325
|
* @category destructors
|
|
2343
2326
|
*/
|
|
2344
2327
|
export declare const runFoldEffect: {
|
|
2345
|
-
<S, A,
|
|
2346
|
-
<
|
|
2328
|
+
<S, A, E2, R2>(s: S, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): <E, R>(self: Stream<A, E, R>) => Effect.Effect<S, E2 | E, R2 | R>;
|
|
2329
|
+
<A, E, R, S, E2, R2>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): Effect.Effect<S, E | E2, R | R2>;
|
|
2347
2330
|
};
|
|
2348
2331
|
/**
|
|
2349
2332
|
* Executes a pure fold over the stream of values. Returns a scoped value that
|
|
@@ -2353,8 +2336,8 @@ export declare const runFoldEffect: {
|
|
|
2353
2336
|
* @category destructors
|
|
2354
2337
|
*/
|
|
2355
2338
|
export declare const runFoldScoped: {
|
|
2356
|
-
<S, A>(s: S, f: (s: S, a: A) => S): <
|
|
2357
|
-
<
|
|
2339
|
+
<S, A>(s: S, f: (s: S, a: A) => S): <E, R>(self: Stream<A, E, R>) => Effect.Effect<S, E, Scope.Scope | R>;
|
|
2340
|
+
<A, E, R, S>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => S): Effect.Effect<S, E, Scope.Scope | R>;
|
|
2358
2341
|
};
|
|
2359
2342
|
/**
|
|
2360
2343
|
* Executes an effectful fold over the stream of values. Returns a scoped
|
|
@@ -2364,8 +2347,8 @@ export declare const runFoldScoped: {
|
|
|
2364
2347
|
* @category destructors
|
|
2365
2348
|
*/
|
|
2366
2349
|
export declare const runFoldScopedEffect: {
|
|
2367
|
-
<S, A,
|
|
2368
|
-
<
|
|
2350
|
+
<S, A, E2, R2>(s: S, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): <E, R>(self: Stream<A, E, R>) => Effect.Effect<S, E2 | E, Scope.Scope | R2 | R>;
|
|
2351
|
+
<A, E, R, S, E2, R2>(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>;
|
|
2369
2352
|
};
|
|
2370
2353
|
/**
|
|
2371
2354
|
* Reduces the elements in the stream to a value of type `S`. Stops the fold
|
|
@@ -2375,8 +2358,8 @@ export declare const runFoldScopedEffect: {
|
|
|
2375
2358
|
* @category destructors
|
|
2376
2359
|
*/
|
|
2377
2360
|
export declare const runFoldWhile: {
|
|
2378
|
-
<S, A>(s: S, cont: Predicate<S>, f: (s: S, a: A) => S): <
|
|
2379
|
-
<
|
|
2361
|
+
<S, A>(s: S, cont: Predicate<S>, f: (s: S, a: A) => S): <E, R>(self: Stream<A, E, R>) => Effect.Effect<S, E, R>;
|
|
2362
|
+
<A, E, R, S>(self: Stream<A, E, R>, s: S, cont: Predicate<S>, f: (s: S, a: A) => S): Effect.Effect<S, E, R>;
|
|
2380
2363
|
};
|
|
2381
2364
|
/**
|
|
2382
2365
|
* Executes an effectful fold over the stream of values. Stops the fold early
|
|
@@ -2386,8 +2369,8 @@ export declare const runFoldWhile: {
|
|
|
2386
2369
|
* @category destructors
|
|
2387
2370
|
*/
|
|
2388
2371
|
export declare const runFoldWhileEffect: {
|
|
2389
|
-
<S, A,
|
|
2390
|
-
<
|
|
2372
|
+
<S, A, E2, R2>(s: S, cont: Predicate<S>, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): <E, R>(self: Stream<A, E, R>) => Effect.Effect<S, E2 | E, R2 | R>;
|
|
2373
|
+
<A, E, R, S, E2, R2>(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>;
|
|
2391
2374
|
};
|
|
2392
2375
|
/**
|
|
2393
2376
|
* Executes a pure fold over the stream of values. Returns a scoped value that
|
|
@@ -2398,8 +2381,8 @@ export declare const runFoldWhileEffect: {
|
|
|
2398
2381
|
* @category destructors
|
|
2399
2382
|
*/
|
|
2400
2383
|
export declare const runFoldWhileScoped: {
|
|
2401
|
-
<S, A>(s: S, cont: Predicate<S>, f: (s: S, a: A) => S): <
|
|
2402
|
-
<
|
|
2384
|
+
<S, A>(s: S, cont: Predicate<S>, f: (s: S, a: A) => S): <E, R>(self: Stream<A, E, R>) => Effect.Effect<S, E, Scope.Scope | R>;
|
|
2385
|
+
<A, E, R, S>(self: Stream<A, E, R>, s: S, cont: Predicate<S>, f: (s: S, a: A) => S): Effect.Effect<S, E, Scope.Scope | R>;
|
|
2403
2386
|
};
|
|
2404
2387
|
/**
|
|
2405
2388
|
* Executes an effectful fold over the stream of values. Returns a scoped
|
|
@@ -2410,8 +2393,8 @@ export declare const runFoldWhileScoped: {
|
|
|
2410
2393
|
* @category destructors
|
|
2411
2394
|
*/
|
|
2412
2395
|
export declare const runFoldWhileScopedEffect: {
|
|
2413
|
-
<S, A,
|
|
2414
|
-
<
|
|
2396
|
+
<S, A, E2, R2>(s: S, cont: Predicate<S>, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): <E, R>(self: Stream<A, E, R>) => Effect.Effect<S, E2 | E, R2 | R | Scope.Scope>;
|
|
2397
|
+
<A, E, R, S, E2, R2>(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>;
|
|
2415
2398
|
};
|
|
2416
2399
|
/**
|
|
2417
2400
|
* Consumes all elements of the stream, passing them to the specified
|
|
@@ -2421,8 +2404,8 @@ export declare const runFoldWhileScopedEffect: {
|
|
|
2421
2404
|
* @category destructors
|
|
2422
2405
|
*/
|
|
2423
2406
|
export declare const runForEach: {
|
|
2424
|
-
<A,
|
|
2425
|
-
<
|
|
2407
|
+
<A, X, E2, R2>(f: (a: A) => Effect.Effect<X, E2, R2>): <E, R>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, R2 | R>;
|
|
2408
|
+
<A, E, R, X, E2, R2>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<X, E2, R2>): Effect.Effect<void, E | E2, R | R2>;
|
|
2426
2409
|
};
|
|
2427
2410
|
/**
|
|
2428
2411
|
* Consumes all elements of the stream, passing them to the specified
|
|
@@ -2432,8 +2415,8 @@ export declare const runForEach: {
|
|
|
2432
2415
|
* @category destructors
|
|
2433
2416
|
*/
|
|
2434
2417
|
export declare const runForEachChunk: {
|
|
2435
|
-
<A,
|
|
2436
|
-
<
|
|
2418
|
+
<A, X, E2, R2>(f: (a: Chunk.Chunk<A>) => Effect.Effect<X, E2, R2>): <E, R>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, R2 | R>;
|
|
2419
|
+
<A, E, R, X, E2, R2>(self: Stream<A, E, R>, f: (a: Chunk.Chunk<A>) => Effect.Effect<X, E2, R2>): Effect.Effect<void, E | E2, R | R2>;
|
|
2437
2420
|
};
|
|
2438
2421
|
/**
|
|
2439
2422
|
* Like `Stream.runForEachChunk`, but returns a scoped effect so the
|
|
@@ -2443,8 +2426,8 @@ export declare const runForEachChunk: {
|
|
|
2443
2426
|
* @category destructors
|
|
2444
2427
|
*/
|
|
2445
2428
|
export declare const runForEachChunkScoped: {
|
|
2446
|
-
<A,
|
|
2447
|
-
<
|
|
2429
|
+
<A, X, E2, R2>(f: (a: Chunk.Chunk<A>) => Effect.Effect<X, E2, R2>): <E, R>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, Scope.Scope | R2 | R>;
|
|
2430
|
+
<A, E, R, X, E2, R2>(self: Stream<A, E, R>, f: (a: Chunk.Chunk<A>) => Effect.Effect<X, E2, R2>): Effect.Effect<void, E | E2, Scope.Scope | R | R2>;
|
|
2448
2431
|
};
|
|
2449
2432
|
/**
|
|
2450
2433
|
* Like `Stream.forEach`, but returns a scoped effect so the finalization
|
|
@@ -2454,8 +2437,8 @@ export declare const runForEachChunkScoped: {
|
|
|
2454
2437
|
* @category destructors
|
|
2455
2438
|
*/
|
|
2456
2439
|
export declare const runForEachScoped: {
|
|
2457
|
-
<A,
|
|
2458
|
-
<
|
|
2440
|
+
<A, X, E2, R2>(f: (a: A) => Effect.Effect<X, E2, R2>): <E, R>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, Scope.Scope | R2 | R>;
|
|
2441
|
+
<A, E, R, X, E2, R2>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<X, E2, R2>): Effect.Effect<void, E | E2, Scope.Scope | R | R2>;
|
|
2459
2442
|
};
|
|
2460
2443
|
/**
|
|
2461
2444
|
* Consumes elements of the stream, passing them to the specified callback,
|
|
@@ -2465,8 +2448,8 @@ export declare const runForEachScoped: {
|
|
|
2465
2448
|
* @category destructors
|
|
2466
2449
|
*/
|
|
2467
2450
|
export declare const runForEachWhile: {
|
|
2468
|
-
<A,
|
|
2469
|
-
<
|
|
2451
|
+
<A, E2, R2>(f: (a: A) => Effect.Effect<boolean, E2, R2>): <E, R>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, R2 | R>;
|
|
2452
|
+
<A, E, R, E2, R2>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<boolean, E2, R2>): Effect.Effect<void, E | E2, R | R2>;
|
|
2470
2453
|
};
|
|
2471
2454
|
/**
|
|
2472
2455
|
* Like `Stream.runForEachWhile`, but returns a scoped effect so the
|
|
@@ -2476,8 +2459,8 @@ export declare const runForEachWhile: {
|
|
|
2476
2459
|
* @category destructors
|
|
2477
2460
|
*/
|
|
2478
2461
|
export declare const runForEachWhileScoped: {
|
|
2479
|
-
<A,
|
|
2480
|
-
<
|
|
2462
|
+
<A, E2, R2>(f: (a: A) => Effect.Effect<boolean, E2, R2>): <E, R>(self: Stream<A, E, R>) => Effect.Effect<void, E2 | E, Scope.Scope | R2 | R>;
|
|
2463
|
+
<A, E, R, E2, R2>(self: Stream<A, E, R>, f: (a: A) => Effect.Effect<boolean, E2, R2>): Effect.Effect<void, E | E2, Scope.Scope | R | R2>;
|
|
2481
2464
|
};
|
|
2482
2465
|
/**
|
|
2483
2466
|
* Runs the stream to completion and yields the first value emitted by it,
|
|
@@ -2564,7 +2547,7 @@ export declare const runScoped: {
|
|
|
2564
2547
|
* @since 2.0.0
|
|
2565
2548
|
* @category destructors
|
|
2566
2549
|
*/
|
|
2567
|
-
export declare const runSum: <
|
|
2550
|
+
export declare const runSum: <E, R>(self: Stream<number, E, R>) => Effect.Effect<number, E, R>;
|
|
2568
2551
|
/**
|
|
2569
2552
|
* Statefully maps over the elements of this stream to produce all
|
|
2570
2553
|
* intermediate results of type `S` given an initial S.
|
|
@@ -2573,8 +2556,8 @@ export declare const runSum: <R, E>(self: Stream<number, E, R>) => Effect.Effect
|
|
|
2573
2556
|
* @category utils
|
|
2574
2557
|
*/
|
|
2575
2558
|
export declare const scan: {
|
|
2576
|
-
<S, A>(s: S, f: (s: S, a: A) => S): <
|
|
2577
|
-
<
|
|
2559
|
+
<S, A>(s: S, f: (s: S, a: A) => S): <E, R>(self: Stream<A, E, R>) => Stream<S, E, R>;
|
|
2560
|
+
<A, E, R, S>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => S): Stream<S, E, R>;
|
|
2578
2561
|
};
|
|
2579
2562
|
/**
|
|
2580
2563
|
* Statefully and effectfully maps over the elements of this stream to produce
|
|
@@ -2584,8 +2567,8 @@ export declare const scan: {
|
|
|
2584
2567
|
* @category utils
|
|
2585
2568
|
*/
|
|
2586
2569
|
export declare const scanEffect: {
|
|
2587
|
-
<S, A,
|
|
2588
|
-
<
|
|
2570
|
+
<S, A, E2, R2>(s: S, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<S, E2 | E, R2 | R>;
|
|
2571
|
+
<A, E, R, S, E2, R2>(self: Stream<A, E, R>, s: S, f: (s: S, a: A) => Effect.Effect<S, E2, R2>): Stream<S, E | E2, R | R2>;
|
|
2589
2572
|
};
|
|
2590
2573
|
/**
|
|
2591
2574
|
* Statefully maps over the elements of this stream to produce all
|
|
@@ -2597,8 +2580,8 @@ export declare const scanEffect: {
|
|
|
2597
2580
|
* @category utils
|
|
2598
2581
|
*/
|
|
2599
2582
|
export declare const scanReduce: {
|
|
2600
|
-
<A2, A>(f: (a2: A2 | A, a: A) => A2): <
|
|
2601
|
-
<
|
|
2583
|
+
<A2, A>(f: (a2: A2 | A, a: A) => A2): <E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E, R>;
|
|
2584
|
+
<A, E, R, A2>(self: Stream<A, E, R>, f: (a2: A | A2, a: A) => A2): Stream<A | A2, E, R>;
|
|
2602
2585
|
};
|
|
2603
2586
|
/**
|
|
2604
2587
|
* Statefully and effectfully maps over the elements of this stream to produce
|
|
@@ -2609,7 +2592,10 @@ export declare const scanReduce: {
|
|
|
2609
2592
|
* @since 2.0.0
|
|
2610
2593
|
* @category utils
|
|
2611
2594
|
*/
|
|
2612
|
-
export declare const scanReduceEffect:
|
|
2595
|
+
export declare const scanReduceEffect: {
|
|
2596
|
+
<A2, A, E2, R2>(f: (a2: A2 | A, a: A) => Effect.Effect<A2 | A, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E, R2 | R>;
|
|
2597
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, f: (a2: A | A2, a: A) => Effect.Effect<A | A2, E2, R2>): Stream<A | A2, E | E2, R | R2>;
|
|
2598
|
+
};
|
|
2613
2599
|
/**
|
|
2614
2600
|
* Schedules the output of the stream using the provided `schedule`.
|
|
2615
2601
|
*
|
|
@@ -2617,8 +2603,8 @@ export declare const scanReduceEffect: (<A2, A, R2, E2>(f: (a2: A2 | A, a: A) =>
|
|
|
2617
2603
|
* @category utils
|
|
2618
2604
|
*/
|
|
2619
2605
|
export declare const schedule: {
|
|
2620
|
-
<
|
|
2621
|
-
<
|
|
2606
|
+
<X, A0 extends A, R2, A>(schedule: Schedule.Schedule<X, A0, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R2 | R>;
|
|
2607
|
+
<A, E, R, X, A0 extends A, R2>(self: Stream<A, E, R>, schedule: Schedule.Schedule<X, A0, R2>): Stream<A, E, R | R2>;
|
|
2622
2608
|
};
|
|
2623
2609
|
/**
|
|
2624
2610
|
* Schedules the output of the stream using the provided `schedule` and emits
|
|
@@ -2629,11 +2615,11 @@ export declare const schedule: {
|
|
|
2629
2615
|
* @category utils
|
|
2630
2616
|
*/
|
|
2631
2617
|
export declare const scheduleWith: {
|
|
2632
|
-
<
|
|
2618
|
+
<B, A0 extends A, R2, A, C>(schedule: Schedule.Schedule<B, A0, R2>, options: {
|
|
2633
2619
|
readonly onElement: (a: A) => C;
|
|
2634
2620
|
readonly onSchedule: (b: B) => C;
|
|
2635
|
-
}): <
|
|
2636
|
-
<
|
|
2621
|
+
}): <E, R>(self: Stream<A, E, R>) => Stream<C, E, R2 | R>;
|
|
2622
|
+
<A, E, R, B, A0 extends A, R2, C>(self: Stream<A, E, R>, schedule: Schedule.Schedule<B, A0, R2>, options: {
|
|
2637
2623
|
readonly onElement: (a: A) => C;
|
|
2638
2624
|
readonly onSchedule: (b: B) => C;
|
|
2639
2625
|
}): Stream<C, E, R | R2>;
|
|
@@ -2692,7 +2678,7 @@ export declare const some: <A, E, R>(self: Stream<Option.Option<A>, E, R>) => St
|
|
|
2692
2678
|
*/
|
|
2693
2679
|
export declare const someOrElse: {
|
|
2694
2680
|
<A2>(fallback: LazyArg<A2>): <A, E, R>(self: Stream<Option.Option<A>, E, R>) => Stream<A2 | A, E, R>;
|
|
2695
|
-
<
|
|
2681
|
+
<A, E, R, A2>(self: Stream<Option.Option<A>, E, R>, fallback: LazyArg<A2>): Stream<A | A2, E, R>;
|
|
2696
2682
|
};
|
|
2697
2683
|
/**
|
|
2698
2684
|
* Extracts the optional value, or fails with the given error 'e'.
|
|
@@ -2702,7 +2688,7 @@ export declare const someOrElse: {
|
|
|
2702
2688
|
*/
|
|
2703
2689
|
export declare const someOrFail: {
|
|
2704
2690
|
<E2>(error: LazyArg<E2>): <A, E, R>(self: Stream<Option.Option<A>, E, R>) => Stream<A, E2 | E, R>;
|
|
2705
|
-
<
|
|
2691
|
+
<A, E, R, E2>(self: Stream<Option.Option<A>, E, R>, error: LazyArg<E2>): Stream<A, E | E2, R>;
|
|
2706
2692
|
};
|
|
2707
2693
|
/**
|
|
2708
2694
|
* Splits elements based on a predicate.
|
|
@@ -2723,7 +2709,7 @@ export declare const someOrFail: {
|
|
|
2723
2709
|
* @category utils
|
|
2724
2710
|
*/
|
|
2725
2711
|
export declare const split: {
|
|
2726
|
-
<A>(predicate: Predicate<NoInfer<A>>): <
|
|
2712
|
+
<A>(predicate: Predicate<NoInfer<A>>): <E, R>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R>;
|
|
2727
2713
|
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<Chunk.Chunk<A>, E, R>;
|
|
2728
2714
|
};
|
|
2729
2715
|
/**
|
|
@@ -2733,7 +2719,7 @@ export declare const split: {
|
|
|
2733
2719
|
* @category utils
|
|
2734
2720
|
*/
|
|
2735
2721
|
export declare const splitOnChunk: {
|
|
2736
|
-
<A>(delimiter: Chunk.Chunk<A>): <
|
|
2722
|
+
<A>(delimiter: Chunk.Chunk<A>): <E, R>(self: Stream<A, E, R>) => Stream<Chunk.Chunk<A>, E, R>;
|
|
2737
2723
|
<A, E, R>(self: Stream<A, E, R>, delimiter: Chunk.Chunk<A>): Stream<Chunk.Chunk<A>, E, R>;
|
|
2738
2724
|
};
|
|
2739
2725
|
/**
|
|
@@ -2743,7 +2729,7 @@ export declare const splitOnChunk: {
|
|
|
2743
2729
|
* @since 2.0.0
|
|
2744
2730
|
* @category combinators
|
|
2745
2731
|
*/
|
|
2746
|
-
export declare const splitLines: <
|
|
2732
|
+
export declare const splitLines: <E, R>(self: Stream<string, E, R>) => Stream<string, E, R>;
|
|
2747
2733
|
/**
|
|
2748
2734
|
* Creates a single-valued pure stream.
|
|
2749
2735
|
*
|
|
@@ -2793,7 +2779,7 @@ export declare const takeRight: {
|
|
|
2793
2779
|
* @category utils
|
|
2794
2780
|
*/
|
|
2795
2781
|
export declare const takeUntil: {
|
|
2796
|
-
<A>(predicate: Predicate<NoInfer<A>>): <
|
|
2782
|
+
<A>(predicate: Predicate<NoInfer<A>>): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
2797
2783
|
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>;
|
|
2798
2784
|
};
|
|
2799
2785
|
/**
|
|
@@ -2804,8 +2790,8 @@ export declare const takeUntil: {
|
|
|
2804
2790
|
* @category utils
|
|
2805
2791
|
*/
|
|
2806
2792
|
export declare const takeUntilEffect: {
|
|
2807
|
-
<A,
|
|
2808
|
-
<
|
|
2793
|
+
<A, E2, R2>(predicate: (a: NoInfer<A>) => Effect.Effect<boolean, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
2794
|
+
<A, E, R, E2, R2>(self: Stream<A, E, R>, predicate: (a: A) => Effect.Effect<boolean, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
2809
2795
|
};
|
|
2810
2796
|
/**
|
|
2811
2797
|
* Takes all elements of the stream for as long as the specified predicate
|
|
@@ -2815,9 +2801,9 @@ export declare const takeUntilEffect: {
|
|
|
2815
2801
|
* @category utils
|
|
2816
2802
|
*/
|
|
2817
2803
|
export declare const takeWhile: {
|
|
2818
|
-
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <
|
|
2819
|
-
<A>(predicate: Predicate<NoInfer<A>>): <
|
|
2820
|
-
<
|
|
2804
|
+
<A, B extends A>(refinement: Refinement<NoInfer<A>, B>): <E, R>(self: Stream<A, E, R>) => Stream<B, E, R>;
|
|
2805
|
+
<A>(predicate: Predicate<NoInfer<A>>): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
2806
|
+
<A, E, R, B extends A>(self: Stream<A, E, R>, refinement: Refinement<A, B>): Stream<B, E, R>;
|
|
2821
2807
|
<A, E, R>(self: Stream<A, E, R>, predicate: Predicate<A>): Stream<A, E, R>;
|
|
2822
2808
|
};
|
|
2823
2809
|
/**
|
|
@@ -2827,8 +2813,8 @@ export declare const takeWhile: {
|
|
|
2827
2813
|
* @category sequencing
|
|
2828
2814
|
*/
|
|
2829
2815
|
export declare const tap: {
|
|
2830
|
-
<A,
|
|
2831
|
-
<
|
|
2816
|
+
<A, X, E2, R2>(f: (a: NoInfer<A>) => Effect.Effect<X, E2, R2>): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
2817
|
+
<A, E, R, X, E2, R2>(self: Stream<A, E, R>, f: (a: NoInfer<A>) => Effect.Effect<X, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
2832
2818
|
};
|
|
2833
2819
|
/**
|
|
2834
2820
|
* Returns a stream that effectfully "peeks" at the failure or success of
|
|
@@ -2838,11 +2824,11 @@ export declare const tap: {
|
|
|
2838
2824
|
* @category sequencing
|
|
2839
2825
|
*/
|
|
2840
2826
|
export declare const tapBoth: {
|
|
2841
|
-
<E,
|
|
2827
|
+
<E, X1, E2, R2, A, X2, E3, R3>(options: {
|
|
2842
2828
|
readonly onFailure: (e: NoInfer<E>) => Effect.Effect<X1, E2, R2>;
|
|
2843
2829
|
readonly onSuccess: (a: NoInfer<A>) => Effect.Effect<X2, E3, R3>;
|
|
2844
2830
|
}): <R>(self: Stream<A, E, R>) => Stream<A, E | E2 | E3, R2 | R3 | R>;
|
|
2845
|
-
<
|
|
2831
|
+
<A, E, R, X1, E2, R2, X2, E3, R3>(self: Stream<A, E, R>, options: {
|
|
2846
2832
|
readonly onFailure: (e: NoInfer<E>) => Effect.Effect<X1, E2, R2>;
|
|
2847
2833
|
readonly onSuccess: (a: NoInfer<A>) => Effect.Effect<X2, E3, R3>;
|
|
2848
2834
|
}): Stream<A, E | E2 | E3, R | R2 | R3>;
|
|
@@ -2854,8 +2840,8 @@ export declare const tapBoth: {
|
|
|
2854
2840
|
* @category sequencing
|
|
2855
2841
|
*/
|
|
2856
2842
|
export declare const tapError: {
|
|
2857
|
-
<E,
|
|
2858
|
-
<
|
|
2843
|
+
<E, X, E2, R2>(f: (error: NoInfer<E>) => Effect.Effect<X, E2, R2>): <A, R>(self: Stream<A, E, R>) => Stream<A, E | E2, R2 | R>;
|
|
2844
|
+
<A, E, R, X, E2, R2>(self: Stream<A, E, R>, f: (error: E) => Effect.Effect<X, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
2859
2845
|
};
|
|
2860
2846
|
/**
|
|
2861
2847
|
* Returns a stream that effectfully "peeks" at the cause of failure of the
|
|
@@ -2865,8 +2851,8 @@ export declare const tapError: {
|
|
|
2865
2851
|
* @category utils
|
|
2866
2852
|
*/
|
|
2867
2853
|
export declare const tapErrorCause: {
|
|
2868
|
-
<E,
|
|
2869
|
-
<
|
|
2854
|
+
<E, X, E2, R2>(f: (cause: Cause.Cause<NoInfer<E>>) => Effect.Effect<X, E2, R2>): <A, R>(self: Stream<A, E, R>) => Stream<A, E | E2, R2 | R>;
|
|
2855
|
+
<A, E, R, X, E2, R2>(self: Stream<A, E, R>, f: (cause: Cause.Cause<E>) => Effect.Effect<X, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
2870
2856
|
};
|
|
2871
2857
|
/**
|
|
2872
2858
|
* Sends all elements emitted by this stream to the specified sink in addition
|
|
@@ -2902,7 +2888,7 @@ export declare const throttle: {
|
|
|
2902
2888
|
readonly duration: Duration.DurationInput;
|
|
2903
2889
|
readonly burst?: number | undefined;
|
|
2904
2890
|
readonly strategy?: "enforce" | "shape" | undefined;
|
|
2905
|
-
}): <
|
|
2891
|
+
}): <E, R>(self: Stream<A, E, R>) => Stream<A, E, R>;
|
|
2906
2892
|
<A, E, R>(self: Stream<A, E, R>, options: {
|
|
2907
2893
|
readonly cost: (chunk: Chunk.Chunk<A>) => number;
|
|
2908
2894
|
readonly units: number;
|
|
@@ -2928,14 +2914,14 @@ export declare const throttle: {
|
|
|
2928
2914
|
* @category utils
|
|
2929
2915
|
*/
|
|
2930
2916
|
export declare const throttleEffect: {
|
|
2931
|
-
<A,
|
|
2917
|
+
<A, E2, R2>(options: {
|
|
2932
2918
|
readonly cost: (chunk: Chunk.Chunk<A>) => Effect.Effect<number, E2, R2>;
|
|
2933
2919
|
readonly units: number;
|
|
2934
2920
|
readonly duration: Duration.DurationInput;
|
|
2935
2921
|
readonly burst?: number | undefined;
|
|
2936
2922
|
readonly strategy?: "enforce" | "shape" | undefined;
|
|
2937
|
-
}): <
|
|
2938
|
-
<
|
|
2923
|
+
}): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
2924
|
+
<A, E, R, E2, R2>(self: Stream<A, E, R>, options: {
|
|
2939
2925
|
readonly cost: (chunk: Chunk.Chunk<A>) => Effect.Effect<number, E2, R2>;
|
|
2940
2926
|
readonly units: number;
|
|
2941
2927
|
readonly duration: Duration.DurationInput;
|
|
@@ -2969,7 +2955,7 @@ export declare const timeout: {
|
|
|
2969
2955
|
*/
|
|
2970
2956
|
export declare const timeoutFail: {
|
|
2971
2957
|
<E2>(error: LazyArg<E2>, duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R>;
|
|
2972
|
-
<
|
|
2958
|
+
<A, E, R, E2>(self: Stream<A, E, R>, error: LazyArg<E2>, duration: Duration.DurationInput): Stream<A, E | E2, R>;
|
|
2973
2959
|
};
|
|
2974
2960
|
/**
|
|
2975
2961
|
* Fails the stream with given cause if it does not produce a value after d
|
|
@@ -2980,7 +2966,7 @@ export declare const timeoutFail: {
|
|
|
2980
2966
|
*/
|
|
2981
2967
|
export declare const timeoutFailCause: {
|
|
2982
2968
|
<E2>(cause: LazyArg<Cause.Cause<E2>>, duration: Duration.DurationInput): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R>;
|
|
2983
|
-
<
|
|
2969
|
+
<A, E, R, E2>(self: Stream<A, E, R>, cause: LazyArg<Cause.Cause<E2>>, duration: Duration.DurationInput): Stream<A, E | E2, R>;
|
|
2984
2970
|
};
|
|
2985
2971
|
/**
|
|
2986
2972
|
* Switches the stream if it does not produce a value after the specified
|
|
@@ -2990,8 +2976,8 @@ export declare const timeoutFailCause: {
|
|
|
2990
2976
|
* @category utils
|
|
2991
2977
|
*/
|
|
2992
2978
|
export declare const timeoutTo: {
|
|
2993
|
-
<
|
|
2994
|
-
<
|
|
2979
|
+
<A2, E2, R2>(duration: Duration.DurationInput, that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2 | A, E2 | E, R2 | R>;
|
|
2980
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, duration: Duration.DurationInput, that: Stream<A2, E2, R2>): Stream<A | A2, E | E2, R | R2>;
|
|
2995
2981
|
};
|
|
2996
2982
|
/**
|
|
2997
2983
|
* Converts the stream to a scoped `PubSub` of chunks. After the scope is closed,
|
|
@@ -3094,7 +3080,7 @@ export declare const unfoldChunk: <S, A>(s: S, f: (s: S) => Option.Option<readon
|
|
|
3094
3080
|
* @since 2.0.0
|
|
3095
3081
|
* @category constructors
|
|
3096
3082
|
*/
|
|
3097
|
-
export declare const unfoldChunkEffect: <
|
|
3083
|
+
export declare const unfoldChunkEffect: <S, A, E, R>(s: S, f: (s: S) => Effect.Effect<Option.Option<readonly [Chunk.Chunk<A>, S]>, E, R>) => Stream<A, E, R>;
|
|
3098
3084
|
/**
|
|
3099
3085
|
* Creates a stream by effectfully peeling off the "layers" of a value of type
|
|
3100
3086
|
* `S`.
|
|
@@ -3102,7 +3088,7 @@ export declare const unfoldChunkEffect: <R, E, A, S>(s: S, f: (s: S) => Effect.E
|
|
|
3102
3088
|
* @since 2.0.0
|
|
3103
3089
|
* @category constructors
|
|
3104
3090
|
*/
|
|
3105
|
-
export declare const unfoldEffect: <S,
|
|
3091
|
+
export declare const unfoldEffect: <S, A, E, R>(s: S, f: (s: S) => Effect.Effect<Option.Option<readonly [A, S]>, E, R>) => Stream<A, E, R>;
|
|
3106
3092
|
/**
|
|
3107
3093
|
* A stream that contains a single `Unit` value.
|
|
3108
3094
|
*
|
|
@@ -3116,21 +3102,24 @@ export declare const unit: Stream<void>;
|
|
|
3116
3102
|
* @since 2.0.0
|
|
3117
3103
|
* @category constructors
|
|
3118
3104
|
*/
|
|
3119
|
-
export declare const unwrap: <
|
|
3105
|
+
export declare const unwrap: <A, E2, R2, E, R>(effect: Effect.Effect<Stream<A, E2, R2>, E, R>) => Stream<A, E | E2, R | R2>;
|
|
3120
3106
|
/**
|
|
3121
3107
|
* Creates a stream produced from a scoped `Effect`.
|
|
3122
3108
|
*
|
|
3123
3109
|
* @since 2.0.0
|
|
3124
3110
|
* @category constructors
|
|
3125
3111
|
*/
|
|
3126
|
-
export declare const unwrapScoped: <
|
|
3112
|
+
export declare const unwrapScoped: <A, E2, R2, E, R>(effect: Effect.Effect<Stream<A, E2, R2>, E, R>) => Stream<A, E | E2, R2 | Exclude<R, Scope.Scope>>;
|
|
3127
3113
|
/**
|
|
3128
3114
|
* Updates the specified service within the context of the `Stream`.
|
|
3129
3115
|
*
|
|
3130
3116
|
* @since 2.0.0
|
|
3131
3117
|
* @category context
|
|
3132
3118
|
*/
|
|
3133
|
-
export declare const updateService:
|
|
3119
|
+
export declare const updateService: {
|
|
3120
|
+
<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>;
|
|
3121
|
+
<A, E, R, T extends Context.Tag<any, any>>(self: Stream<A, E, R>, tag: T, f: (service: Context.Tag.Service<T>) => Context.Tag.Service<T>): Stream<A, E, R | T>;
|
|
3122
|
+
};
|
|
3134
3123
|
/**
|
|
3135
3124
|
* Returns the specified stream if the given condition is satisfied, otherwise
|
|
3136
3125
|
* returns an empty stream.
|
|
@@ -3149,7 +3138,7 @@ export declare const when: {
|
|
|
3149
3138
|
* @since 2.0.0
|
|
3150
3139
|
* @category constructors
|
|
3151
3140
|
*/
|
|
3152
|
-
export declare const whenCase: <A,
|
|
3141
|
+
export declare const whenCase: <A, A2, E, R>(evaluate: LazyArg<A>, pf: (a: A) => Option.Option<Stream<A2, E, R>>) => Stream<A2, E, R>;
|
|
3153
3142
|
/**
|
|
3154
3143
|
* Returns the stream when the given partial function is defined for the given
|
|
3155
3144
|
* effectful value, otherwise returns an empty stream.
|
|
@@ -3158,8 +3147,8 @@ export declare const whenCase: <A, R, E, A2>(evaluate: LazyArg<A>, pf: (a: A) =>
|
|
|
3158
3147
|
* @category utils
|
|
3159
3148
|
*/
|
|
3160
3149
|
export declare const whenCaseEffect: {
|
|
3161
|
-
<A,
|
|
3162
|
-
<
|
|
3150
|
+
<A, A2, E2, R2>(pf: (a: A) => Option.Option<Stream<A2, E2, R2>>): <E, R>(self: Effect.Effect<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
3151
|
+
<A, E, R, A2, E2, R2>(self: Effect.Effect<A, E, R>, pf: (a: A) => Option.Option<Stream<A2, E2, R2>>): Stream<A2, E | E2, R | R2>;
|
|
3163
3152
|
};
|
|
3164
3153
|
/**
|
|
3165
3154
|
* Returns the stream if the given effectful condition is satisfied, otherwise
|
|
@@ -3169,8 +3158,8 @@ export declare const whenCaseEffect: {
|
|
|
3169
3158
|
* @category utils
|
|
3170
3159
|
*/
|
|
3171
3160
|
export declare const whenEffect: {
|
|
3172
|
-
<
|
|
3173
|
-
<
|
|
3161
|
+
<E2, R2>(effect: Effect.Effect<boolean, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
3162
|
+
<A, E, R, E2, R2>(self: Stream<A, E, R>, effect: Effect.Effect<boolean, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
3174
3163
|
};
|
|
3175
3164
|
/**
|
|
3176
3165
|
* Wraps the stream with a new span for tracing.
|
|
@@ -3204,8 +3193,8 @@ export declare const withSpan: {
|
|
|
3204
3193
|
* @category zipping
|
|
3205
3194
|
*/
|
|
3206
3195
|
export declare const zip: {
|
|
3207
|
-
<
|
|
3208
|
-
<
|
|
3196
|
+
<A2, E2, R2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<[A, A2], E2 | E, R2 | R>;
|
|
3197
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<[A, A2], E | E2, R | R2>;
|
|
3209
3198
|
};
|
|
3210
3199
|
/**
|
|
3211
3200
|
* Zips this stream with another point-wise and emits tuples of elements from
|
|
@@ -3217,8 +3206,8 @@ export declare const zip: {
|
|
|
3217
3206
|
* @category zipping
|
|
3218
3207
|
*/
|
|
3219
3208
|
export declare const zipFlatten: {
|
|
3220
|
-
<
|
|
3221
|
-
<
|
|
3209
|
+
<A2, E2, R2>(that: Stream<A2, E2, R2>): <A extends ReadonlyArray<any>, E, R>(self: Stream<A, E, R>) => Stream<[...A, A2], E2 | E, R2 | R>;
|
|
3210
|
+
<A extends ReadonlyArray<any>, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<[...A, A2], E | E2, R | R2>;
|
|
3222
3211
|
};
|
|
3223
3212
|
/**
|
|
3224
3213
|
* Zips this stream with another point-wise, creating a new stream of pairs of
|
|
@@ -3231,12 +3220,12 @@ export declare const zipFlatten: {
|
|
|
3231
3220
|
* @category zipping
|
|
3232
3221
|
*/
|
|
3233
3222
|
export declare const zipAll: {
|
|
3234
|
-
<
|
|
3223
|
+
<A2, E2, R2, A>(options: {
|
|
3235
3224
|
readonly other: Stream<A2, E2, R2>;
|
|
3236
3225
|
readonly defaultSelf: A;
|
|
3237
3226
|
readonly defaultOther: A2;
|
|
3238
|
-
}): <
|
|
3239
|
-
<
|
|
3227
|
+
}): <E, R>(self: Stream<A, E, R>) => Stream<[A, A2], E2 | E, R2 | R>;
|
|
3228
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, options: {
|
|
3240
3229
|
readonly other: Stream<A2, E2, R2>;
|
|
3241
3230
|
readonly defaultSelf: A;
|
|
3242
3231
|
readonly defaultOther: A2;
|
|
@@ -3253,8 +3242,8 @@ export declare const zipAll: {
|
|
|
3253
3242
|
* @category zipping
|
|
3254
3243
|
*/
|
|
3255
3244
|
export declare const zipAllLeft: {
|
|
3256
|
-
<
|
|
3257
|
-
<
|
|
3245
|
+
<A2, E2, R2, A>(that: Stream<A2, E2, R2>, defaultLeft: A): <E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
3246
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, defaultLeft: A): Stream<A, E | E2, R | R2>;
|
|
3258
3247
|
};
|
|
3259
3248
|
/**
|
|
3260
3249
|
* Zips this stream with another point-wise, and keeps only elements from the
|
|
@@ -3267,8 +3256,8 @@ export declare const zipAllLeft: {
|
|
|
3267
3256
|
* @category zipping
|
|
3268
3257
|
*/
|
|
3269
3258
|
export declare const zipAllRight: {
|
|
3270
|
-
<
|
|
3271
|
-
<
|
|
3259
|
+
<A2, E2, R2>(that: Stream<A2, E2, R2>, defaultRight: A2): <A, E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
3260
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, defaultRight: A2): Stream<A2, E | E2, R | R2>;
|
|
3272
3261
|
};
|
|
3273
3262
|
/**
|
|
3274
3263
|
* Zips this stream that is sorted by distinct keys and the specified stream
|
|
@@ -3285,13 +3274,13 @@ export declare const zipAllRight: {
|
|
|
3285
3274
|
* @category zipping
|
|
3286
3275
|
*/
|
|
3287
3276
|
export declare const zipAllSortedByKey: {
|
|
3288
|
-
<
|
|
3277
|
+
<A2, E2, R2, A, K>(options: {
|
|
3289
3278
|
readonly other: Stream<readonly [K, A2], E2, R2>;
|
|
3290
3279
|
readonly defaultSelf: A;
|
|
3291
3280
|
readonly defaultOther: A2;
|
|
3292
3281
|
readonly order: Order.Order<K>;
|
|
3293
|
-
}): <
|
|
3294
|
-
<
|
|
3282
|
+
}): <E, R>(self: Stream<readonly [K, A], E, R>) => Stream<[K, [A, A2]], E2 | E, R2 | R>;
|
|
3283
|
+
<K, A, E, R, A2, E2, R2>(self: Stream<readonly [K, A], E, R>, options: {
|
|
3295
3284
|
readonly other: Stream<readonly [K, A2], E2, R2>;
|
|
3296
3285
|
readonly defaultSelf: A;
|
|
3297
3286
|
readonly defaultOther: A2;
|
|
@@ -3312,12 +3301,12 @@ export declare const zipAllSortedByKey: {
|
|
|
3312
3301
|
* @category zipping
|
|
3313
3302
|
*/
|
|
3314
3303
|
export declare const zipAllSortedByKeyLeft: {
|
|
3315
|
-
<
|
|
3304
|
+
<A2, E2, R2, A, K>(options: {
|
|
3316
3305
|
readonly other: Stream<readonly [K, A2], E2, R2>;
|
|
3317
3306
|
readonly defaultSelf: A;
|
|
3318
3307
|
readonly order: Order.Order<K>;
|
|
3319
|
-
}): <
|
|
3320
|
-
<
|
|
3308
|
+
}): <E, R>(self: Stream<readonly [K, A], E, R>) => Stream<[K, A], E2 | E, R2 | R>;
|
|
3309
|
+
<K, A, E, R, A2, E2, R2>(self: Stream<readonly [K, A], E, R>, options: {
|
|
3321
3310
|
readonly other: Stream<readonly [K, A2], E2, R2>;
|
|
3322
3311
|
readonly defaultSelf: A;
|
|
3323
3312
|
readonly order: Order.Order<K>;
|
|
@@ -3337,12 +3326,12 @@ export declare const zipAllSortedByKeyLeft: {
|
|
|
3337
3326
|
* @category zipping
|
|
3338
3327
|
*/
|
|
3339
3328
|
export declare const zipAllSortedByKeyRight: {
|
|
3340
|
-
<
|
|
3329
|
+
<K, A2, E2, R2>(options: {
|
|
3341
3330
|
readonly other: Stream<readonly [K, A2], E2, R2>;
|
|
3342
3331
|
readonly defaultOther: A2;
|
|
3343
3332
|
readonly order: Order.Order<K>;
|
|
3344
3333
|
}): <A, E, R>(self: Stream<readonly [K, A], E, R>) => Stream<[K, A2], E2 | E, R2 | R>;
|
|
3345
|
-
<
|
|
3334
|
+
<A, E, R, K, A2, E2, R2>(self: Stream<readonly [K, A], E, R>, options: {
|
|
3346
3335
|
readonly other: Stream<readonly [K, A2], E2, R2>;
|
|
3347
3336
|
readonly defaultOther: A2;
|
|
3348
3337
|
readonly order: Order.Order<K>;
|
|
@@ -3363,14 +3352,14 @@ export declare const zipAllSortedByKeyRight: {
|
|
|
3363
3352
|
* @category zipping
|
|
3364
3353
|
*/
|
|
3365
3354
|
export declare const zipAllSortedByKeyWith: {
|
|
3366
|
-
<
|
|
3355
|
+
<K, A2, E2, R2, A, A3>(options: {
|
|
3367
3356
|
readonly other: Stream<readonly [K, A2], E2, R2>;
|
|
3368
3357
|
readonly onSelf: (a: A) => A3;
|
|
3369
3358
|
readonly onOther: (a2: A2) => A3;
|
|
3370
3359
|
readonly onBoth: (a: A, a2: A2) => A3;
|
|
3371
3360
|
readonly order: Order.Order<K>;
|
|
3372
|
-
}): <
|
|
3373
|
-
<
|
|
3361
|
+
}): <E, R>(self: Stream<readonly [K, A], E, R>) => Stream<[K, A3], E2 | E, R2 | R>;
|
|
3362
|
+
<K, A, E, R, A2, E2, R2, A3>(self: Stream<readonly [K, A], E, R>, options: {
|
|
3374
3363
|
readonly other: Stream<readonly [K, A2], E2, R2>;
|
|
3375
3364
|
readonly onSelf: (a: A) => A3;
|
|
3376
3365
|
readonly onOther: (a2: A2) => A3;
|
|
@@ -3389,13 +3378,13 @@ export declare const zipAllSortedByKeyWith: {
|
|
|
3389
3378
|
* @category zipping
|
|
3390
3379
|
*/
|
|
3391
3380
|
export declare const zipAllWith: {
|
|
3392
|
-
<
|
|
3381
|
+
<A2, E2, R2, A, A3>(options: {
|
|
3393
3382
|
readonly other: Stream<A2, E2, R2>;
|
|
3394
3383
|
readonly onSelf: (a: A) => A3;
|
|
3395
3384
|
readonly onOther: (a2: A2) => A3;
|
|
3396
3385
|
readonly onBoth: (a: A, a2: A2) => A3;
|
|
3397
|
-
}): <
|
|
3398
|
-
<
|
|
3386
|
+
}): <E, R>(self: Stream<A, E, R>) => Stream<A3, E2 | E, R2 | R>;
|
|
3387
|
+
<A, E, R, A2, E2, R2, A3>(self: Stream<A, E, R>, options: {
|
|
3399
3388
|
readonly other: Stream<A2, E2, R2>;
|
|
3400
3389
|
readonly onSelf: (a: A) => A3;
|
|
3401
3390
|
readonly onOther: (a2: A2) => A3;
|
|
@@ -3415,8 +3404,8 @@ export declare const zipAllWith: {
|
|
|
3415
3404
|
* @category zipping
|
|
3416
3405
|
*/
|
|
3417
3406
|
export declare const zipLatest: {
|
|
3418
|
-
<
|
|
3419
|
-
<
|
|
3407
|
+
<A2, E2, R2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<[A, A2], E2 | E, R2 | R>;
|
|
3408
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<[A, A2], E | E2, R | R2>;
|
|
3420
3409
|
};
|
|
3421
3410
|
/**
|
|
3422
3411
|
* Zips the two streams so that when a value is emitted by either of the two
|
|
@@ -3431,8 +3420,8 @@ export declare const zipLatest: {
|
|
|
3431
3420
|
* @category zipping
|
|
3432
3421
|
*/
|
|
3433
3422
|
export declare const zipLatestWith: {
|
|
3434
|
-
<
|
|
3435
|
-
<
|
|
3423
|
+
<A2, E2, R2, A, A3>(that: Stream<A2, E2, R2>, f: (a: A, a2: A2) => A3): <E, R>(self: Stream<A, E, R>) => Stream<A3, E2 | E, R2 | R>;
|
|
3424
|
+
<A, E, R, A2, E2, R2, A3>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, f: (a: A, a2: A2) => A3): Stream<A3, E | E2, R | R2>;
|
|
3436
3425
|
};
|
|
3437
3426
|
/**
|
|
3438
3427
|
* Zips this stream with another point-wise, but keeps only the outputs of
|
|
@@ -3444,8 +3433,8 @@ export declare const zipLatestWith: {
|
|
|
3444
3433
|
* @category zipping
|
|
3445
3434
|
*/
|
|
3446
3435
|
export declare const zipLeft: {
|
|
3447
|
-
<
|
|
3448
|
-
<
|
|
3436
|
+
<A2, E2, R2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E2 | E, R2 | R>;
|
|
3437
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A, E | E2, R | R2>;
|
|
3449
3438
|
};
|
|
3450
3439
|
/**
|
|
3451
3440
|
* Zips this stream with another point-wise, but keeps only the outputs of the
|
|
@@ -3457,8 +3446,8 @@ export declare const zipLeft: {
|
|
|
3457
3446
|
* @category zipping
|
|
3458
3447
|
*/
|
|
3459
3448
|
export declare const zipRight: {
|
|
3460
|
-
<
|
|
3461
|
-
<
|
|
3449
|
+
<A2, E2, R2>(that: Stream<A2, E2, R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A2, E2 | E, R2 | R>;
|
|
3450
|
+
<A, E, R, A2, E2, R2>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>): Stream<A2, E | E2, R | R2>;
|
|
3462
3451
|
};
|
|
3463
3452
|
/**
|
|
3464
3453
|
* Zips this stream with another point-wise and applies the function to the
|
|
@@ -3470,8 +3459,8 @@ export declare const zipRight: {
|
|
|
3470
3459
|
* @category zipping
|
|
3471
3460
|
*/
|
|
3472
3461
|
export declare const zipWith: {
|
|
3473
|
-
<
|
|
3474
|
-
<
|
|
3462
|
+
<A2, E2, R2, A, A3>(that: Stream<A2, E2, R2>, f: (a: A, a2: A2) => A3): <E, R>(self: Stream<A, E, R>) => Stream<A3, E2 | E, R2 | R>;
|
|
3463
|
+
<A, E, R, A2, E2, R2, A3>(self: Stream<A, E, R>, that: Stream<A2, E2, R2>, f: (a: A, a2: A2) => A3): Stream<A3, E | E2, R | R2>;
|
|
3475
3464
|
};
|
|
3476
3465
|
/**
|
|
3477
3466
|
* Zips this stream with another point-wise and applies the function to the
|
|
@@ -3483,8 +3472,8 @@ export declare const zipWith: {
|
|
|
3483
3472
|
* @category zipping
|
|
3484
3473
|
*/
|
|
3485
3474
|
export declare const zipWithChunks: {
|
|
3486
|
-
<
|
|
3487
|
-
<
|
|
3475
|
+
<A2, E2, R2, A, A3>(that: Stream<A2, E2, R2>, f: (left: Chunk.Chunk<A>, right: Chunk.Chunk<A2>) => readonly [Chunk.Chunk<A3>, Either.Either<Chunk.Chunk<A2>, Chunk.Chunk<A>>]): <E, R>(self: Stream<A, E, R>) => Stream<A3, E2 | E, R2 | R>;
|
|
3476
|
+
<A, E, R, A2, E2, R2, 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<A2>, Chunk.Chunk<A>>]): Stream<A3, E | E2, R | R2>;
|
|
3488
3477
|
};
|
|
3489
3478
|
/**
|
|
3490
3479
|
* Zips each element with the next element if present.
|
|
@@ -3527,16 +3516,16 @@ export declare const Do: Stream<{}>;
|
|
|
3527
3516
|
* @category do notation
|
|
3528
3517
|
*/
|
|
3529
3518
|
export declare const bind: {
|
|
3530
|
-
<N extends string, K,
|
|
3519
|
+
<N extends string, K, A, E2, R2>(tag: Exclude<N, keyof K>, f: (_: K) => Stream<A, E2, R2>, options?: {
|
|
3531
3520
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
3532
3521
|
readonly bufferSize?: number | undefined;
|
|
3533
|
-
} | undefined): <
|
|
3522
|
+
} | undefined): <E, R>(self: Stream<K, E, R>) => Stream<MergeRecord<K, {
|
|
3534
3523
|
[k in N]: A;
|
|
3535
3524
|
}>, E2 | E, R2 | R>;
|
|
3536
|
-
<
|
|
3525
|
+
<K, E, R, N extends string, A, E2, R2>(self: Stream<K, E, R>, tag: Exclude<N, keyof K>, f: (_: K) => Stream<A, E2, R2>, options?: {
|
|
3537
3526
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
3538
3527
|
readonly bufferSize?: number | undefined;
|
|
3539
|
-
} | undefined): Stream<
|
|
3528
|
+
} | undefined): Stream<MergeRecord<K, {
|
|
3540
3529
|
[k in N]: A;
|
|
3541
3530
|
}>, E | E2, R | R2>;
|
|
3542
3531
|
};
|
|
@@ -3547,16 +3536,16 @@ export declare const bind: {
|
|
|
3547
3536
|
* @category do notation
|
|
3548
3537
|
*/
|
|
3549
3538
|
export declare const bindEffect: {
|
|
3550
|
-
<N extends string, K,
|
|
3539
|
+
<N extends string, K, A, E2, R2>(tag: Exclude<N, keyof K>, f: (_: K) => Effect.Effect<A, E2, R2>, options?: {
|
|
3551
3540
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
3552
3541
|
readonly bufferSize?: number | undefined;
|
|
3553
|
-
} | undefined): <
|
|
3542
|
+
} | undefined): <E, R>(self: Stream<K, E, R>) => Stream<MergeRecord<K, {
|
|
3554
3543
|
[k in N]: A;
|
|
3555
3544
|
}>, E2 | E, R2 | R>;
|
|
3556
|
-
<
|
|
3545
|
+
<K, E, R, N extends string, A, E2, R2>(self: Stream<K, E, R>, tag: Exclude<N, keyof K>, f: (_: K) => Effect.Effect<A, E2, R2>, options?: {
|
|
3557
3546
|
readonly concurrency?: number | "unbounded" | undefined;
|
|
3558
3547
|
readonly unordered?: boolean | undefined;
|
|
3559
|
-
} | undefined): Stream<
|
|
3548
|
+
} | undefined): Stream<MergeRecord<K, {
|
|
3560
3549
|
[k in N]: A;
|
|
3561
3550
|
}>, E | E2, R | R2>;
|
|
3562
3551
|
};
|
|
@@ -3566,13 +3555,13 @@ export declare const bindEffect: {
|
|
|
3566
3555
|
*/
|
|
3567
3556
|
export declare const bindTo: {
|
|
3568
3557
|
<N extends string>(tag: N): <A, E, R>(self: Stream<A, E, R>) => Stream<Record<N, A>, E, R>;
|
|
3569
|
-
<
|
|
3558
|
+
<A, E, R, N extends string>(self: Stream<A, E, R>, tag: N): Stream<Record<N, A>, E, R>;
|
|
3570
3559
|
};
|
|
3571
3560
|
declare const let_: {
|
|
3572
|
-
<N extends string, K, A>(tag: Exclude<N, keyof K>, f: (_: K) => A): <
|
|
3561
|
+
<N extends string, K, A>(tag: Exclude<N, keyof K>, f: (_: K) => A): <E, R>(self: Stream<K, E, R>) => Stream<MergeRecord<K, {
|
|
3573
3562
|
[k in N]: A;
|
|
3574
3563
|
}>, E, R>;
|
|
3575
|
-
<
|
|
3564
|
+
<K, E, R, N extends string, A>(self: Stream<K, E, R>, tag: Exclude<N, keyof K>, f: (_: K) => A): Stream<MergeRecord<K, {
|
|
3576
3565
|
[k in N]: A;
|
|
3577
3566
|
}>, E, R>;
|
|
3578
3567
|
};
|
|
@@ -3591,8 +3580,8 @@ let_ as let };
|
|
|
3591
3580
|
* @category encoding
|
|
3592
3581
|
*/
|
|
3593
3582
|
export declare const decodeText: {
|
|
3594
|
-
(encoding?: string | undefined): <
|
|
3595
|
-
<
|
|
3583
|
+
(encoding?: string | undefined): <E, R>(self: Stream<Uint8Array, E, R>) => Stream<string, E, R>;
|
|
3584
|
+
<E, R>(self: Stream<Uint8Array, E, R>, encoding?: string | undefined): Stream<string, E, R>;
|
|
3596
3585
|
};
|
|
3597
3586
|
/**
|
|
3598
3587
|
* Encode a stream of strings into a stream of Uint8Array chunks using the specified encoding.
|
|
@@ -3600,5 +3589,5 @@ export declare const decodeText: {
|
|
|
3600
3589
|
* @since 2.0.0
|
|
3601
3590
|
* @category encoding
|
|
3602
3591
|
*/
|
|
3603
|
-
export declare const encodeText: <
|
|
3592
|
+
export declare const encodeText: <E, R>(self: Stream<string, E, R>) => Stream<Uint8Array, E, R>;
|
|
3604
3593
|
//# sourceMappingURL=Stream.d.ts.map
|