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/Schedule.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare const ScheduleDriverTypeId: unique symbol;
|
|
|
36
36
|
*/
|
|
37
37
|
export type ScheduleDriverTypeId = typeof ScheduleDriverTypeId;
|
|
38
38
|
/**
|
|
39
|
-
* A `Schedule<
|
|
39
|
+
* A `Schedule<Out, In, R>` defines a recurring schedule, which consumes
|
|
40
40
|
* values of type `In`, and which returns values of type `Out`.
|
|
41
41
|
*
|
|
42
42
|
* Schedules are defined as a possibly infinite set of intervals spread out over
|
|
@@ -63,7 +63,7 @@ export type ScheduleDriverTypeId = typeof ScheduleDriverTypeId;
|
|
|
63
63
|
* @category model
|
|
64
64
|
* @since 2.0.0
|
|
65
65
|
*/
|
|
66
|
-
export interface Schedule<out
|
|
66
|
+
export interface Schedule<out Out, in In = unknown, out R = never> extends Schedule.Variance<Out, In, R>, Pipeable {
|
|
67
67
|
/**
|
|
68
68
|
* Initial State
|
|
69
69
|
*/
|
|
@@ -71,7 +71,7 @@ export interface Schedule<out Env, in In, out Out> extends Schedule.Variance<Env
|
|
|
71
71
|
/**
|
|
72
72
|
* Schedule Step
|
|
73
73
|
*/
|
|
74
|
-
step(now: number, input: In, state: any): Effect.Effect<readonly [any, Out, ScheduleDecision.ScheduleDecision], never,
|
|
74
|
+
step(now: number, input: In, state: any): Effect.Effect<readonly [any, Out, ScheduleDecision.ScheduleDecision], never, R>;
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
77
|
* @since 2.0.0
|
|
@@ -81,21 +81,21 @@ export declare namespace Schedule {
|
|
|
81
81
|
* @since 2.0.0
|
|
82
82
|
* @category models
|
|
83
83
|
*/
|
|
84
|
-
interface Variance<out
|
|
84
|
+
interface Variance<out Out, in In, out R> {
|
|
85
85
|
readonly [ScheduleTypeId]: {
|
|
86
|
-
readonly _Env: Types.Covariant<Env>;
|
|
87
|
-
readonly _In: Types.Contravariant<In>;
|
|
88
86
|
readonly _Out: Types.Covariant<Out>;
|
|
87
|
+
readonly _In: Types.Contravariant<In>;
|
|
88
|
+
readonly _R: Types.Covariant<R>;
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
92
|
* @since 2.0.0
|
|
93
93
|
*/
|
|
94
|
-
interface DriverVariance<out
|
|
94
|
+
interface DriverVariance<out Out, in In, out R> {
|
|
95
95
|
readonly [ScheduleDriverTypeId]: {
|
|
96
|
-
readonly _Env: Types.Covariant<Env>;
|
|
97
|
-
readonly _In: Types.Contravariant<In>;
|
|
98
96
|
readonly _Out: Types.Covariant<Out>;
|
|
97
|
+
readonly _In: Types.Contravariant<In>;
|
|
98
|
+
readonly _R: Types.Covariant<R>;
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -103,11 +103,11 @@ export declare namespace Schedule {
|
|
|
103
103
|
* @since 2.0.0
|
|
104
104
|
* @category models
|
|
105
105
|
*/
|
|
106
|
-
export interface ScheduleDriver<out
|
|
106
|
+
export interface ScheduleDriver<out Out, in In = unknown, out R = never> extends Schedule.DriverVariance<Out, In, R> {
|
|
107
107
|
readonly state: Effect.Effect<unknown>;
|
|
108
108
|
readonly last: Effect.Effect<Out, Cause.NoSuchElementException>;
|
|
109
109
|
readonly reset: Effect.Effect<void>;
|
|
110
|
-
next(input: In): Effect.Effect<Out, Option.Option<never>,
|
|
110
|
+
next(input: In): Effect.Effect<Out, Option.Option<never>, R>;
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
113
|
* Constructs a new `Schedule` with the specified `initial` state and the
|
|
@@ -116,7 +116,7 @@ export interface ScheduleDriver<out Env, in In, out Out> extends Schedule.Driver
|
|
|
116
116
|
* @since 2.0.0
|
|
117
117
|
* @category constructors
|
|
118
118
|
*/
|
|
119
|
-
export declare const makeWithState: <S,
|
|
119
|
+
export declare const makeWithState: <S, In, Out, R = never>(initial: S, step: (now: number, input: In, state: S) => Effect.Effect<readonly [S, Out, ScheduleDecision.ScheduleDecision], never, R>) => Schedule<Out, In, R>;
|
|
120
120
|
/**
|
|
121
121
|
* Returns a new schedule with the given delay added to every interval defined
|
|
122
122
|
* by this schedule.
|
|
@@ -125,8 +125,8 @@ export declare const makeWithState: <S, Env, In, Out>(initial: S, step: (now: nu
|
|
|
125
125
|
* @category utils
|
|
126
126
|
*/
|
|
127
127
|
export declare const addDelay: {
|
|
128
|
-
<Out>(f: (out: Out) => Duration.DurationInput): <
|
|
129
|
-
<
|
|
128
|
+
<Out>(f: (out: Out) => Duration.DurationInput): <In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R>;
|
|
129
|
+
<Out, In, R>(self: Schedule<Out, In, R>, f: (out: Out) => Duration.DurationInput): Schedule<Out, In, R>;
|
|
130
130
|
};
|
|
131
131
|
/**
|
|
132
132
|
* Returns a new schedule with the given effectfully computed delay added to
|
|
@@ -136,8 +136,8 @@ export declare const addDelay: {
|
|
|
136
136
|
* @category utils
|
|
137
137
|
*/
|
|
138
138
|
export declare const addDelayEffect: {
|
|
139
|
-
<Out,
|
|
140
|
-
<
|
|
139
|
+
<Out, R2>(f: (out: Out) => Effect.Effect<Duration.DurationInput, never, R2>): <In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R2 | R>;
|
|
140
|
+
<Out, In, R, R2>(self: Schedule<Out, In, R>, f: (out: Out) => Effect.Effect<Duration.DurationInput, never, R2>): Schedule<Out, In, R | R2>;
|
|
141
141
|
};
|
|
142
142
|
/**
|
|
143
143
|
* The same as `andThenEither`, but merges the output.
|
|
@@ -146,8 +146,8 @@ export declare const addDelayEffect: {
|
|
|
146
146
|
* @category sequencing
|
|
147
147
|
*/
|
|
148
148
|
export declare const andThen: {
|
|
149
|
-
<
|
|
150
|
-
<
|
|
149
|
+
<Out2, In2, R2>(that: Schedule<Out2, In2, R2>): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<Out2 | Out, In & In2, R2 | R>;
|
|
150
|
+
<Out, In, R, Out2, In2, R2>(self: Schedule<Out, In, R>, that: Schedule<Out2, In2, R2>): Schedule<Out | Out2, In & In2, R | R2>;
|
|
151
151
|
};
|
|
152
152
|
/**
|
|
153
153
|
* Returns a new schedule that first executes this schedule to completion, and
|
|
@@ -157,8 +157,8 @@ export declare const andThen: {
|
|
|
157
157
|
* @category sequencing
|
|
158
158
|
*/
|
|
159
159
|
export declare const andThenEither: {
|
|
160
|
-
<
|
|
161
|
-
<
|
|
160
|
+
<Out2, In2, R2>(that: Schedule<Out2, In2, R2>): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<Either.Either<Out2, Out>, In & In2, R2 | R>;
|
|
161
|
+
<Out, In, R, Out2, In2, R2>(self: Schedule<Out, In, R>, that: Schedule<Out2, In2, R2>): Schedule<Either.Either<Out2, Out>, In & In2, R | R2>;
|
|
162
162
|
};
|
|
163
163
|
/**
|
|
164
164
|
* Returns a new schedule that maps this schedule to a constant output.
|
|
@@ -167,8 +167,8 @@ export declare const andThenEither: {
|
|
|
167
167
|
* @category mapping
|
|
168
168
|
*/
|
|
169
169
|
export declare const as: {
|
|
170
|
-
<Out2>(out: Out2): <
|
|
171
|
-
<
|
|
170
|
+
<Out2>(out: Out2): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<Out2, In, R>;
|
|
171
|
+
<Out, In, R, Out2>(self: Schedule<Out, In, R>, out: Out2): Schedule<Out2, In, R>;
|
|
172
172
|
};
|
|
173
173
|
/**
|
|
174
174
|
* Returns a new schedule that maps the output of this schedule to unit.
|
|
@@ -176,7 +176,7 @@ export declare const as: {
|
|
|
176
176
|
* @since 2.0.0
|
|
177
177
|
* @category constructors
|
|
178
178
|
*/
|
|
179
|
-
export declare const asUnit: <
|
|
179
|
+
export declare const asUnit: <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<void, In, R>;
|
|
180
180
|
/**
|
|
181
181
|
* Returns a new schedule that has both the inputs and outputs of this and the
|
|
182
182
|
* specified schedule.
|
|
@@ -185,16 +185,8 @@ export declare const asUnit: <Env, In, Out>(self: Schedule<Env, In, Out>) => Sch
|
|
|
185
185
|
* @category utils
|
|
186
186
|
*/
|
|
187
187
|
export declare const bothInOut: {
|
|
188
|
-
<
|
|
189
|
-
[
|
|
190
|
-
Out,
|
|
191
|
-
Out2
|
|
192
|
-
]>;
|
|
193
|
-
<Env, In, Out, Env2, In2, Out2>(self: Schedule<Env, In, Out>, that: Schedule<Env2, In2, Out2>): Schedule<Env | Env2, readonly [In, In2], // readonly because contravariant
|
|
194
|
-
[
|
|
195
|
-
Out,
|
|
196
|
-
Out2
|
|
197
|
-
]>;
|
|
188
|
+
<Out2, In2, R2>(that: Schedule<Out2, In2, R2>): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<[Out, Out2], readonly [In, In2], R2 | R>;
|
|
189
|
+
<Out, In, R, Out2, In2, R2>(self: Schedule<Out, In, R>, that: Schedule<Out2, In2, R2>): Schedule<[Out, Out2], readonly [In, In2], R | R2>;
|
|
198
190
|
};
|
|
199
191
|
/**
|
|
200
192
|
* Returns a new schedule that passes each input and output of this schedule
|
|
@@ -205,8 +197,8 @@ export declare const bothInOut: {
|
|
|
205
197
|
* @category utils
|
|
206
198
|
*/
|
|
207
199
|
export declare const check: {
|
|
208
|
-
<In, Out>(test: (input: In, output: Out) => boolean): <
|
|
209
|
-
<
|
|
200
|
+
<In, Out>(test: (input: In, output: Out) => boolean): <R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R>;
|
|
201
|
+
<Out, In, R>(self: Schedule<Out, In, R>, test: (input: In, output: Out) => boolean): Schedule<Out, In, R>;
|
|
210
202
|
};
|
|
211
203
|
/**
|
|
212
204
|
* Returns a new schedule that passes each input and output of this schedule
|
|
@@ -217,8 +209,8 @@ export declare const check: {
|
|
|
217
209
|
* @category utils
|
|
218
210
|
*/
|
|
219
211
|
export declare const checkEffect: {
|
|
220
|
-
<In, Out,
|
|
221
|
-
<
|
|
212
|
+
<In, Out, R2>(test: (input: In, output: Out) => Effect.Effect<boolean, never, R2>): <R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R2 | R>;
|
|
213
|
+
<Out, In, R, R2>(self: Schedule<Out, In, R>, test: (input: In, output: Out) => Effect.Effect<boolean, never, R2>): Schedule<Out, In, R | R2>;
|
|
222
214
|
};
|
|
223
215
|
/**
|
|
224
216
|
* A schedule that recurs anywhere, collecting all inputs into a `Chunk`.
|
|
@@ -226,14 +218,14 @@ export declare const checkEffect: {
|
|
|
226
218
|
* @since 2.0.0
|
|
227
219
|
* @category constructors
|
|
228
220
|
*/
|
|
229
|
-
export declare const collectAllInputs: <A>() => Schedule<
|
|
221
|
+
export declare const collectAllInputs: <A>() => Schedule<Chunk.Chunk<A>, A>;
|
|
230
222
|
/**
|
|
231
223
|
* Returns a new schedule that collects the outputs of this one into a chunk.
|
|
232
224
|
*
|
|
233
225
|
* @since 2.0.0
|
|
234
226
|
* @category utils
|
|
235
227
|
*/
|
|
236
|
-
export declare const collectAllOutputs: <
|
|
228
|
+
export declare const collectAllOutputs: <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<Chunk.Chunk<Out>, In, R>;
|
|
237
229
|
/**
|
|
238
230
|
* A schedule that recurs until the condition f fails, collecting all inputs
|
|
239
231
|
* into a list.
|
|
@@ -241,7 +233,7 @@ export declare const collectAllOutputs: <Env, In, Out>(self: Schedule<Env, In, O
|
|
|
241
233
|
* @since 2.0.0
|
|
242
234
|
* @category utils
|
|
243
235
|
*/
|
|
244
|
-
export declare const collectUntil: <A>(f: Predicate<A>) => Schedule<
|
|
236
|
+
export declare const collectUntil: <A>(f: Predicate<A>) => Schedule<Chunk.Chunk<A>, A>;
|
|
245
237
|
/**
|
|
246
238
|
* A schedule that recurs until the effectful condition f fails, collecting
|
|
247
239
|
* all inputs into a list.
|
|
@@ -249,7 +241,7 @@ export declare const collectUntil: <A>(f: Predicate<A>) => Schedule<never, A, Ch
|
|
|
249
241
|
* @since 2.0.0
|
|
250
242
|
* @category utils
|
|
251
243
|
*/
|
|
252
|
-
export declare const collectUntilEffect: <
|
|
244
|
+
export declare const collectUntilEffect: <A, R>(f: (a: A) => Effect.Effect<boolean, never, R>) => Schedule<Chunk.Chunk<A>, A, R>;
|
|
253
245
|
/**
|
|
254
246
|
* A schedule that recurs as long as the condition f holds, collecting all
|
|
255
247
|
* inputs into a list.
|
|
@@ -257,7 +249,7 @@ export declare const collectUntilEffect: <Env, A>(f: (a: A) => Effect.Effect<boo
|
|
|
257
249
|
* @since 2.0.0
|
|
258
250
|
* @category utils
|
|
259
251
|
*/
|
|
260
|
-
export declare const collectWhile: <A>(f: Predicate<A>) => Schedule<
|
|
252
|
+
export declare const collectWhile: <A>(f: Predicate<A>) => Schedule<Chunk.Chunk<A>, A>;
|
|
261
253
|
/**
|
|
262
254
|
* A schedule that recurs as long as the effectful condition holds, collecting
|
|
263
255
|
* all inputs into a list.
|
|
@@ -265,7 +257,7 @@ export declare const collectWhile: <A>(f: Predicate<A>) => Schedule<never, A, Ch
|
|
|
265
257
|
* @category utils
|
|
266
258
|
* @since 2.0.0
|
|
267
259
|
*/
|
|
268
|
-
export declare const collectWhileEffect: <
|
|
260
|
+
export declare const collectWhileEffect: <A, R>(f: (a: A) => Effect.Effect<boolean, never, R>) => Schedule<Chunk.Chunk<A>, A, R>;
|
|
269
261
|
/**
|
|
270
262
|
* Returns the composition of this schedule and the specified schedule, by
|
|
271
263
|
* piping the output of this one into the input of the other. Effects
|
|
@@ -276,8 +268,8 @@ export declare const collectWhileEffect: <Env, A>(f: (a: A) => Effect.Effect<boo
|
|
|
276
268
|
* @category utils
|
|
277
269
|
*/
|
|
278
270
|
export declare const compose: {
|
|
279
|
-
<
|
|
280
|
-
<
|
|
271
|
+
<Out2, Out, R2>(that: Schedule<Out2, Out, R2>): <In, R>(self: Schedule<Out, In, R>) => Schedule<Out2, In, R2 | R>;
|
|
272
|
+
<Out, In, R, Out2, R2>(self: Schedule<Out, In, R>, that: Schedule<Out2, Out, R2>): Schedule<Out2, In, R | R2>;
|
|
281
273
|
};
|
|
282
274
|
/**
|
|
283
275
|
* Returns a new schedule that deals with a narrower class of inputs than this
|
|
@@ -287,8 +279,8 @@ export declare const compose: {
|
|
|
287
279
|
* @category mapping
|
|
288
280
|
*/
|
|
289
281
|
export declare const mapInput: {
|
|
290
|
-
<In, In2>(f: (in2: In2) => In): <
|
|
291
|
-
<
|
|
282
|
+
<In, In2>(f: (in2: In2) => In): <Out, R>(self: Schedule<Out, In, R>) => Schedule<Out, In2, R>;
|
|
283
|
+
<Out, In, R, In2>(self: Schedule<Out, In, R>, f: (in2: In2) => In): Schedule<Out, In2, R>;
|
|
292
284
|
};
|
|
293
285
|
/**
|
|
294
286
|
* Transforms the context being provided to this schedule with the
|
|
@@ -298,8 +290,8 @@ export declare const mapInput: {
|
|
|
298
290
|
* @category context
|
|
299
291
|
*/
|
|
300
292
|
export declare const mapInputContext: {
|
|
301
|
-
<
|
|
302
|
-
<
|
|
293
|
+
<R0, R>(f: (env0: Context.Context<R0>) => Context.Context<R>): <Out, In>(self: Schedule<Out, In, R>) => Schedule<Out, In, R0>;
|
|
294
|
+
<Out, In, R, R0>(self: Schedule<Out, In, R>, f: (env0: Context.Context<R0>) => Context.Context<R>): Schedule<Out, In, R0>;
|
|
303
295
|
};
|
|
304
296
|
/**
|
|
305
297
|
* Returns a new schedule that deals with a narrower class of inputs than this
|
|
@@ -309,8 +301,8 @@ export declare const mapInputContext: {
|
|
|
309
301
|
* @category mapping
|
|
310
302
|
*/
|
|
311
303
|
export declare const mapInputEffect: {
|
|
312
|
-
<
|
|
313
|
-
<
|
|
304
|
+
<In2, In, R2>(f: (in2: In2) => Effect.Effect<In, never, R2>): <Out, R>(self: Schedule<Out, In, R>) => Schedule<Out, In2, R2 | R>;
|
|
305
|
+
<Out, In, R, In2, R2>(self: Schedule<Out, In, R>, f: (in2: In2) => Effect.Effect<In, never, R2>): Schedule<Out, In2, R | R2>;
|
|
314
306
|
};
|
|
315
307
|
/**
|
|
316
308
|
* A schedule that always recurs, which counts the number of recurrences.
|
|
@@ -318,7 +310,7 @@ export declare const mapInputEffect: {
|
|
|
318
310
|
* @since 2.0.0
|
|
319
311
|
* @category constructors
|
|
320
312
|
*/
|
|
321
|
-
export declare const count: Schedule<
|
|
313
|
+
export declare const count: Schedule<number>;
|
|
322
314
|
/**
|
|
323
315
|
* Cron schedule that recurs every `minute` that matches the schedule.
|
|
324
316
|
*
|
|
@@ -329,7 +321,7 @@ export declare const count: Schedule<never, unknown, number>;
|
|
|
329
321
|
* @since 2.0.0
|
|
330
322
|
* @category constructors
|
|
331
323
|
*/
|
|
332
|
-
export declare const cron: (expression: string | Cron.Cron) => Schedule<
|
|
324
|
+
export declare const cron: (expression: string | Cron.Cron) => Schedule<[number, number]>;
|
|
333
325
|
/**
|
|
334
326
|
* Cron-like schedule that recurs every specified `day` of month. Won't recur
|
|
335
327
|
* on months containing less days than specified in `day` param.
|
|
@@ -341,7 +333,7 @@ export declare const cron: (expression: string | Cron.Cron) => Schedule<never, u
|
|
|
341
333
|
* @since 2.0.0
|
|
342
334
|
* @category constructors
|
|
343
335
|
*/
|
|
344
|
-
export declare const dayOfMonth: (day: number) => Schedule<
|
|
336
|
+
export declare const dayOfMonth: (day: number) => Schedule<number>;
|
|
345
337
|
/**
|
|
346
338
|
* Cron-like schedule that recurs every specified `day` of each week. It
|
|
347
339
|
* triggers at zero hour of the week. Producing a count of repeats: 0, 1, 2.
|
|
@@ -352,7 +344,7 @@ export declare const dayOfMonth: (day: number) => Schedule<never, unknown, numbe
|
|
|
352
344
|
* @since 2.0.0
|
|
353
345
|
* @category constructors
|
|
354
346
|
*/
|
|
355
|
-
export declare const dayOfWeek: (day: number) => Schedule<
|
|
347
|
+
export declare const dayOfWeek: (day: number) => Schedule<number>;
|
|
356
348
|
/**
|
|
357
349
|
* Returns a new schedule with the specified effectfully computed delay added
|
|
358
350
|
* before the start of each interval produced by this schedule.
|
|
@@ -361,8 +353,8 @@ export declare const dayOfWeek: (day: number) => Schedule<never, unknown, number
|
|
|
361
353
|
* @category utils
|
|
362
354
|
*/
|
|
363
355
|
export declare const delayed: {
|
|
364
|
-
(f: (duration: Duration.Duration) => Duration.DurationInput): <
|
|
365
|
-
<
|
|
356
|
+
(f: (duration: Duration.Duration) => Duration.DurationInput): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R>;
|
|
357
|
+
<Out, In, R>(self: Schedule<Out, In, R>, f: (duration: Duration.Duration) => Duration.DurationInput): Schedule<Out, In, R>;
|
|
366
358
|
};
|
|
367
359
|
/**
|
|
368
360
|
* Returns a new schedule with the specified effectfully computed delay added
|
|
@@ -372,8 +364,8 @@ export declare const delayed: {
|
|
|
372
364
|
* @category constructors
|
|
373
365
|
*/
|
|
374
366
|
export declare const delayedEffect: {
|
|
375
|
-
<
|
|
376
|
-
<
|
|
367
|
+
<R2>(f: (duration: Duration.Duration) => Effect.Effect<Duration.DurationInput, never, R2>): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R2 | R>;
|
|
368
|
+
<Out, In, R, R2>(self: Schedule<Out, In, R>, f: (duration: Duration.Duration) => Effect.Effect<Duration.DurationInput, never, R2>): Schedule<Out, In, R | R2>;
|
|
377
369
|
};
|
|
378
370
|
/**
|
|
379
371
|
* Takes a schedule that produces a delay, and returns a new schedule that
|
|
@@ -382,14 +374,14 @@ export declare const delayedEffect: {
|
|
|
382
374
|
* @since 2.0.0
|
|
383
375
|
* @category constructors
|
|
384
376
|
*/
|
|
385
|
-
export declare const delayedSchedule: <
|
|
377
|
+
export declare const delayedSchedule: <In, R>(schedule: Schedule<Duration.Duration, In, R>) => Schedule<Duration.Duration, In, R>;
|
|
386
378
|
/**
|
|
387
379
|
* Returns a new schedule that outputs the delay between each occurence.
|
|
388
380
|
*
|
|
389
381
|
* @since 2.0.0
|
|
390
382
|
* @category constructors
|
|
391
383
|
*/
|
|
392
|
-
export declare const delays: <
|
|
384
|
+
export declare const delays: <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<Duration.Duration, In, R>;
|
|
393
385
|
/**
|
|
394
386
|
* Returns a new schedule that maps both the input and output.
|
|
395
387
|
*
|
|
@@ -397,14 +389,14 @@ export declare const delays: <Env, In, Out>(self: Schedule<Env, In, Out>) => Sch
|
|
|
397
389
|
* @category mapping
|
|
398
390
|
*/
|
|
399
391
|
export declare const mapBoth: {
|
|
400
|
-
<In, Out,
|
|
392
|
+
<In2, In, Out, Out2>(options: {
|
|
401
393
|
readonly onInput: (in2: In2) => In;
|
|
402
394
|
readonly onOutput: (out: Out) => Out2;
|
|
403
|
-
}): <
|
|
404
|
-
<
|
|
395
|
+
}): <R>(self: Schedule<Out, In, R>) => Schedule<Out2, In2, R>;
|
|
396
|
+
<Out, In, R, In2, Out2>(self: Schedule<Out, In, R>, options: {
|
|
405
397
|
readonly onInput: (in2: In2) => In;
|
|
406
398
|
readonly onOutput: (out: Out) => Out2;
|
|
407
|
-
}): Schedule<
|
|
399
|
+
}): Schedule<Out2, In2, R>;
|
|
408
400
|
};
|
|
409
401
|
/**
|
|
410
402
|
* Returns a new schedule that maps both the input and output.
|
|
@@ -413,14 +405,14 @@ export declare const mapBoth: {
|
|
|
413
405
|
* @category mapping
|
|
414
406
|
*/
|
|
415
407
|
export declare const mapBothEffect: {
|
|
416
|
-
<In2,
|
|
417
|
-
readonly onInput: (input: In2) => Effect.Effect<In, never,
|
|
418
|
-
readonly onOutput: (out: Out) => Effect.Effect<Out2, never,
|
|
419
|
-
}): <
|
|
420
|
-
<
|
|
421
|
-
readonly onInput: (input: In2) => Effect.Effect<In, never,
|
|
422
|
-
readonly onOutput: (out: Out) => Effect.Effect<Out2, never,
|
|
423
|
-
}): Schedule<
|
|
408
|
+
<In2, In, R2, Out, R3, Out2>(options: {
|
|
409
|
+
readonly onInput: (input: In2) => Effect.Effect<In, never, R2>;
|
|
410
|
+
readonly onOutput: (out: Out) => Effect.Effect<Out2, never, R3>;
|
|
411
|
+
}): <R>(self: Schedule<Out, In, R>) => Schedule<Out2, In2, R2 | R3 | R>;
|
|
412
|
+
<Out, In, R, In2, R2, Out2, R3>(self: Schedule<Out, In, R>, options: {
|
|
413
|
+
readonly onInput: (input: In2) => Effect.Effect<In, never, R2>;
|
|
414
|
+
readonly onOutput: (out: Out) => Effect.Effect<Out2, never, R3>;
|
|
415
|
+
}): Schedule<Out2, In2, R | R2 | R3>;
|
|
424
416
|
};
|
|
425
417
|
/**
|
|
426
418
|
* Returns a driver that can be used to step the schedule, appropriately
|
|
@@ -429,7 +421,7 @@ export declare const mapBothEffect: {
|
|
|
429
421
|
* @since 2.0.0
|
|
430
422
|
* @category getter
|
|
431
423
|
*/
|
|
432
|
-
export declare const driver: <
|
|
424
|
+
export declare const driver: <Out, In, R>(self: Schedule<Out, In, R>) => Effect.Effect<ScheduleDriver<Out, In, R>>;
|
|
433
425
|
/**
|
|
434
426
|
* A schedule that can recur one time, the specified amount of time into the
|
|
435
427
|
* future.
|
|
@@ -437,7 +429,7 @@ export declare const driver: <Env, In, Out>(self: Schedule<Env, In, Out>) => Eff
|
|
|
437
429
|
* @since 2.0.0
|
|
438
430
|
* @category constructors
|
|
439
431
|
*/
|
|
440
|
-
export declare const duration: (duration: Duration.DurationInput) => Schedule<
|
|
432
|
+
export declare const duration: (duration: Duration.DurationInput) => Schedule<Duration.Duration>;
|
|
441
433
|
/**
|
|
442
434
|
* Returns a new schedule that performs a geometric union on the intervals
|
|
443
435
|
* defined by both schedules.
|
|
@@ -446,8 +438,8 @@ export declare const duration: (duration: Duration.DurationInput) => Schedule<ne
|
|
|
446
438
|
* @category alternatives
|
|
447
439
|
*/
|
|
448
440
|
export declare const either: {
|
|
449
|
-
<
|
|
450
|
-
<
|
|
441
|
+
<Out2, In2, R2>(that: Schedule<Out2, In2, R2>): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<[Out, Out2], In & In2, R2 | R>;
|
|
442
|
+
<Out, In, R, Out2, In2, R2>(self: Schedule<Out, In, R>, that: Schedule<Out2, In2, R2>): Schedule<[Out, Out2], In & In2, R | R2>;
|
|
451
443
|
};
|
|
452
444
|
/**
|
|
453
445
|
* The same as `either` followed by `map`.
|
|
@@ -456,8 +448,8 @@ export declare const either: {
|
|
|
456
448
|
* @category alternatives
|
|
457
449
|
*/
|
|
458
450
|
export declare const eitherWith: {
|
|
459
|
-
<
|
|
460
|
-
<
|
|
451
|
+
<Out2, In2, R2>(that: Schedule<Out2, In2, R2>, f: (x: Intervals.Intervals, y: Intervals.Intervals) => Intervals.Intervals): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<[Out, Out2], In & In2, R2 | R>;
|
|
452
|
+
<Out, In, R, Out2, In2, R2>(self: Schedule<Out, In, R>, that: Schedule<Out2, In2, R2>, f: (x: Intervals.Intervals, y: Intervals.Intervals) => Intervals.Intervals): Schedule<[Out, Out2], In & In2, R | R2>;
|
|
461
453
|
};
|
|
462
454
|
/**
|
|
463
455
|
* A schedule that occurs everywhere, which returns the total elapsed duration
|
|
@@ -466,7 +458,7 @@ export declare const eitherWith: {
|
|
|
466
458
|
* @since 2.0.0
|
|
467
459
|
* @category constructors
|
|
468
460
|
*/
|
|
469
|
-
export declare const elapsed: Schedule<
|
|
461
|
+
export declare const elapsed: Schedule<Duration.Duration>;
|
|
470
462
|
/**
|
|
471
463
|
* Returns a new schedule that will run the specified finalizer as soon as the
|
|
472
464
|
* schedule is complete. Note that unlike `Effect.ensuring`, this method does not
|
|
@@ -478,8 +470,8 @@ export declare const elapsed: Schedule<never, unknown, Duration.Duration>;
|
|
|
478
470
|
* @category finalization
|
|
479
471
|
*/
|
|
480
472
|
export declare const ensuring: {
|
|
481
|
-
<X>(finalizer: Effect.Effect<X>): <
|
|
482
|
-
<
|
|
473
|
+
<X>(finalizer: Effect.Effect<X, never, never>): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R>;
|
|
474
|
+
<Out, In, R, X>(self: Schedule<Out, In, R>, finalizer: Effect.Effect<X, never, never>): Schedule<Out, In, R>;
|
|
483
475
|
};
|
|
484
476
|
/**
|
|
485
477
|
* A schedule that always recurs, but will wait a certain amount between
|
|
@@ -489,7 +481,7 @@ export declare const ensuring: {
|
|
|
489
481
|
* @since 2.0.0
|
|
490
482
|
* @category constructors
|
|
491
483
|
*/
|
|
492
|
-
export declare const exponential: (base: Duration.DurationInput, factor?: number) => Schedule<
|
|
484
|
+
export declare const exponential: (base: Duration.DurationInput, factor?: number) => Schedule<Duration.Duration>;
|
|
493
485
|
/**
|
|
494
486
|
* A schedule that always recurs, increasing delays by summing the preceding
|
|
495
487
|
* two delays (similar to the fibonacci sequence). Returns the current
|
|
@@ -498,7 +490,7 @@ export declare const exponential: (base: Duration.DurationInput, factor?: number
|
|
|
498
490
|
* @since 2.0.0
|
|
499
491
|
* @category constructors
|
|
500
492
|
*/
|
|
501
|
-
export declare const fibonacci: (one: Duration.DurationInput) => Schedule<
|
|
493
|
+
export declare const fibonacci: (one: Duration.DurationInput) => Schedule<Duration.Duration>;
|
|
502
494
|
/**
|
|
503
495
|
* A schedule that recurs on a fixed interval. Returns the number of
|
|
504
496
|
* repetitions of the schedule so far.
|
|
@@ -514,21 +506,21 @@ export declare const fibonacci: (one: Duration.DurationInput) => Schedule<never,
|
|
|
514
506
|
* @since 2.0.0
|
|
515
507
|
* @category constructors
|
|
516
508
|
*/
|
|
517
|
-
export declare const fixed: (interval: Duration.DurationInput) => Schedule<
|
|
509
|
+
export declare const fixed: (interval: Duration.DurationInput) => Schedule<number>;
|
|
518
510
|
/**
|
|
519
511
|
* A schedule that always recurs, producing a count of repeats: 0, 1, 2.
|
|
520
512
|
*
|
|
521
513
|
* @since 2.0.0
|
|
522
514
|
* @category constructors
|
|
523
515
|
*/
|
|
524
|
-
export declare const forever: Schedule<
|
|
516
|
+
export declare const forever: Schedule<number>;
|
|
525
517
|
/**
|
|
526
518
|
* A schedule that recurs once with the specified delay.
|
|
527
519
|
*
|
|
528
520
|
* @since 2.0.0
|
|
529
521
|
* @category constructors
|
|
530
522
|
*/
|
|
531
|
-
export declare const fromDelay: (delay: Duration.DurationInput) => Schedule<
|
|
523
|
+
export declare const fromDelay: (delay: Duration.DurationInput) => Schedule<Duration.Duration>;
|
|
532
524
|
/**
|
|
533
525
|
* A schedule that recurs once for each of the specified durations, delaying
|
|
534
526
|
* each time for the length of the specified duration. Returns the length of
|
|
@@ -537,7 +529,7 @@ export declare const fromDelay: (delay: Duration.DurationInput) => Schedule<neve
|
|
|
537
529
|
* @since 2.0.0
|
|
538
530
|
* @category constructors
|
|
539
531
|
*/
|
|
540
|
-
export declare const fromDelays: (delay: Duration.DurationInput, ...delays: Array<Duration.DurationInput>) => Schedule<
|
|
532
|
+
export declare const fromDelays: (delay: Duration.DurationInput, ...delays: Array<Duration.DurationInput>) => Schedule<Duration.Duration>;
|
|
541
533
|
/**
|
|
542
534
|
* A schedule that always recurs, mapping input values through the specified
|
|
543
535
|
* function.
|
|
@@ -545,7 +537,7 @@ export declare const fromDelays: (delay: Duration.DurationInput, ...delays: Arra
|
|
|
545
537
|
* @since 2.0.0
|
|
546
538
|
* @category constructors
|
|
547
539
|
*/
|
|
548
|
-
export declare const fromFunction: <A, B>(f: (a: A) => B) => Schedule<
|
|
540
|
+
export declare const fromFunction: <A, B>(f: (a: A) => B) => Schedule<B, A>;
|
|
549
541
|
/**
|
|
550
542
|
* Cron-like schedule that recurs every specified `hour` of each day. It
|
|
551
543
|
* triggers at zero minute of the hour. Producing a count of repeats: 0, 1, 2.
|
|
@@ -555,14 +547,14 @@ export declare const fromFunction: <A, B>(f: (a: A) => B) => Schedule<never, A,
|
|
|
555
547
|
* @since 2.0.0
|
|
556
548
|
* @category constructors
|
|
557
549
|
*/
|
|
558
|
-
export declare const hourOfDay: (hour: number) => Schedule<
|
|
550
|
+
export declare const hourOfDay: (hour: number) => Schedule<number>;
|
|
559
551
|
/**
|
|
560
552
|
* A schedule that always recurs, which returns inputs as outputs.
|
|
561
553
|
*
|
|
562
554
|
* @since 2.0.0
|
|
563
555
|
* @category constructors
|
|
564
556
|
*/
|
|
565
|
-
export declare const identity: <A>() => Schedule<
|
|
557
|
+
export declare const identity: <A>() => Schedule<A, A>;
|
|
566
558
|
/**
|
|
567
559
|
* Returns a new schedule that performs a geometric intersection on the
|
|
568
560
|
* intervals defined by both schedules.
|
|
@@ -571,8 +563,8 @@ export declare const identity: <A>() => Schedule<never, A, A>;
|
|
|
571
563
|
* @category utils
|
|
572
564
|
*/
|
|
573
565
|
export declare const intersect: {
|
|
574
|
-
<
|
|
575
|
-
<
|
|
566
|
+
<Out2, In2, R2>(that: Schedule<Out2, In2, R2>): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<[Out, Out2], In & In2, R2 | R>;
|
|
567
|
+
<Out, In, R, Out2, In2, R2>(self: Schedule<Out, In, R>, that: Schedule<Out2, In2, R2>): Schedule<[Out, Out2], In & In2, R | R2>;
|
|
576
568
|
};
|
|
577
569
|
/**
|
|
578
570
|
* Returns a new schedule that combines this schedule with the specified
|
|
@@ -583,8 +575,8 @@ export declare const intersect: {
|
|
|
583
575
|
* @category utils
|
|
584
576
|
*/
|
|
585
577
|
export declare const intersectWith: {
|
|
586
|
-
<
|
|
587
|
-
<
|
|
578
|
+
<Out2, In2, R2>(that: Schedule<Out2, In2, R2>, f: (x: Intervals.Intervals, y: Intervals.Intervals) => Intervals.Intervals): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<[Out, Out2], In & In2, R2 | R>;
|
|
579
|
+
<Out, In, R, Out2, In2, R2>(self: Schedule<Out, In, R>, that: Schedule<Out2, In2, R2>, f: (x: Intervals.Intervals, y: Intervals.Intervals) => Intervals.Intervals): Schedule<[Out, Out2], In & In2, R | R2>;
|
|
588
580
|
};
|
|
589
581
|
/**
|
|
590
582
|
* Returns a new schedule that randomly modifies the size of the intervals of
|
|
@@ -598,7 +590,7 @@ export declare const intersectWith: {
|
|
|
598
590
|
* @since 2.0.0
|
|
599
591
|
* @category constructors
|
|
600
592
|
*/
|
|
601
|
-
export declare const jittered: <
|
|
593
|
+
export declare const jittered: <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R>;
|
|
602
594
|
/**
|
|
603
595
|
* Returns a new schedule that randomly modifies the size of the intervals of
|
|
604
596
|
* this schedule.
|
|
@@ -611,13 +603,13 @@ export declare const jittered: <Env, In, Out>(self: Schedule<Env, In, Out>) => S
|
|
|
611
603
|
*/
|
|
612
604
|
export declare const jitteredWith: {
|
|
613
605
|
(options: {
|
|
614
|
-
min?: number;
|
|
615
|
-
max?: number;
|
|
616
|
-
}): <
|
|
617
|
-
<
|
|
618
|
-
min?: number;
|
|
619
|
-
max?: number;
|
|
620
|
-
}): Schedule<
|
|
606
|
+
min?: number | undefined;
|
|
607
|
+
max?: number | undefined;
|
|
608
|
+
}): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R>;
|
|
609
|
+
<Out, In, R>(self: Schedule<Out, In, R>, options: {
|
|
610
|
+
min?: number | undefined;
|
|
611
|
+
max?: number | undefined;
|
|
612
|
+
}): Schedule<Out, In, R>;
|
|
621
613
|
};
|
|
622
614
|
/**
|
|
623
615
|
* A schedule that always recurs, but will repeat on a linear time interval,
|
|
@@ -627,7 +619,7 @@ export declare const jitteredWith: {
|
|
|
627
619
|
* @since 2.0.0
|
|
628
620
|
* @category constructors
|
|
629
621
|
*/
|
|
630
|
-
export declare const linear: (base: Duration.DurationInput) => Schedule<
|
|
622
|
+
export declare const linear: (base: Duration.DurationInput) => Schedule<Duration.Duration>;
|
|
631
623
|
/**
|
|
632
624
|
* Returns a new schedule that maps the output of this schedule through the
|
|
633
625
|
* specified function.
|
|
@@ -636,8 +628,8 @@ export declare const linear: (base: Duration.DurationInput) => Schedule<never, u
|
|
|
636
628
|
* @category mapping
|
|
637
629
|
*/
|
|
638
630
|
export declare const map: {
|
|
639
|
-
<Out, Out2>(f: (out: Out) => Out2): <
|
|
640
|
-
<
|
|
631
|
+
<Out, Out2>(f: (out: Out) => Out2): <In, R>(self: Schedule<Out, In, R>) => Schedule<Out2, In, R>;
|
|
632
|
+
<Out, In, R, Out2>(self: Schedule<Out, In, R>, f: (out: Out) => Out2): Schedule<Out2, In, R>;
|
|
641
633
|
};
|
|
642
634
|
/**
|
|
643
635
|
* Returns a new schedule that maps the output of this schedule through the
|
|
@@ -647,8 +639,8 @@ export declare const map: {
|
|
|
647
639
|
* @category mapping
|
|
648
640
|
*/
|
|
649
641
|
export declare const mapEffect: {
|
|
650
|
-
<Out,
|
|
651
|
-
<
|
|
642
|
+
<Out, Out2, R2>(f: (out: Out) => Effect.Effect<Out2, never, R2>): <In, R>(self: Schedule<Out, In, R>) => Schedule<Out2, In, R2 | R>;
|
|
643
|
+
<Out, In, R, Out2, R2>(self: Schedule<Out, In, R>, f: (out: Out) => Effect.Effect<Out2, never, R2>): Schedule<Out2, In, R | R2>;
|
|
652
644
|
};
|
|
653
645
|
/**
|
|
654
646
|
* Cron-like schedule that recurs every specified `minute` of each hour. It
|
|
@@ -660,7 +652,7 @@ export declare const mapEffect: {
|
|
|
660
652
|
* @since 2.0.0
|
|
661
653
|
* @category constructors
|
|
662
654
|
*/
|
|
663
|
-
export declare const minuteOfHour: (minute: number) => Schedule<
|
|
655
|
+
export declare const minuteOfHour: (minute: number) => Schedule<number>;
|
|
664
656
|
/**
|
|
665
657
|
* Returns a new schedule that modifies the delay using the specified
|
|
666
658
|
* function.
|
|
@@ -669,8 +661,8 @@ export declare const minuteOfHour: (minute: number) => Schedule<never, unknown,
|
|
|
669
661
|
* @category utils
|
|
670
662
|
*/
|
|
671
663
|
export declare const modifyDelay: {
|
|
672
|
-
<Out>(f: (out: Out, duration: Duration.Duration) => Duration.DurationInput): <
|
|
673
|
-
<
|
|
664
|
+
<Out>(f: (out: Out, duration: Duration.Duration) => Duration.DurationInput): <In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R>;
|
|
665
|
+
<Out, In, R>(self: Schedule<Out, In, R>, f: (out: Out, duration: Duration.Duration) => Duration.DurationInput): Schedule<Out, In, R>;
|
|
674
666
|
};
|
|
675
667
|
/**
|
|
676
668
|
* Returns a new schedule that modifies the delay using the specified
|
|
@@ -680,8 +672,8 @@ export declare const modifyDelay: {
|
|
|
680
672
|
* @category utils
|
|
681
673
|
*/
|
|
682
674
|
export declare const modifyDelayEffect: {
|
|
683
|
-
<Out,
|
|
684
|
-
<
|
|
675
|
+
<Out, R2>(f: (out: Out, duration: Duration.Duration) => Effect.Effect<Duration.DurationInput, never, R2>): <In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R2 | R>;
|
|
676
|
+
<Out, In, R, R2>(self: Schedule<Out, In, R>, f: (out: Out, duration: Duration.Duration) => Effect.Effect<Duration.DurationInput, never, R2>): Schedule<Out, In, R | R2>;
|
|
685
677
|
};
|
|
686
678
|
/**
|
|
687
679
|
* Returns a new schedule that applies the current one but runs the specified
|
|
@@ -692,8 +684,8 @@ export declare const modifyDelayEffect: {
|
|
|
692
684
|
* @category utils
|
|
693
685
|
*/
|
|
694
686
|
export declare const onDecision: {
|
|
695
|
-
<Out,
|
|
696
|
-
<
|
|
687
|
+
<Out, X, R2>(f: (out: Out, decision: ScheduleDecision.ScheduleDecision) => Effect.Effect<X, never, R2>): <In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R2 | R>;
|
|
688
|
+
<Out, In, R, X, R2>(self: Schedule<Out, In, R>, f: (out: Out, decision: ScheduleDecision.ScheduleDecision) => Effect.Effect<X, never, R2>): Schedule<Out, In, R | R2>;
|
|
697
689
|
};
|
|
698
690
|
/**
|
|
699
691
|
* A schedule that recurs one time.
|
|
@@ -701,14 +693,14 @@ export declare const onDecision: {
|
|
|
701
693
|
* @since 2.0.0
|
|
702
694
|
* @category constructors
|
|
703
695
|
*/
|
|
704
|
-
export declare const once: Schedule<
|
|
696
|
+
export declare const once: Schedule<void>;
|
|
705
697
|
/**
|
|
706
698
|
* Returns a new schedule that passes through the inputs of this schedule.
|
|
707
699
|
*
|
|
708
700
|
* @since 2.0.0
|
|
709
701
|
* @category utils
|
|
710
702
|
*/
|
|
711
|
-
export declare const passthrough: <
|
|
703
|
+
export declare const passthrough: <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<In, In, R>;
|
|
712
704
|
/**
|
|
713
705
|
* Returns a new schedule with its context provided to it, so the
|
|
714
706
|
* resulting schedule does not require any context.
|
|
@@ -717,8 +709,8 @@ export declare const passthrough: <Env, Input, Output>(self: Schedule<Env, Input
|
|
|
717
709
|
* @category context
|
|
718
710
|
*/
|
|
719
711
|
export declare const provideContext: {
|
|
720
|
-
<
|
|
721
|
-
<
|
|
712
|
+
<R>(context: Context.Context<R>): <Out, In>(self: Schedule<Out, In, R>) => Schedule<Out, In, never>;
|
|
713
|
+
<Out, In, R>(self: Schedule<Out, In, R>, context: Context.Context<R>): Schedule<Out, In, never>;
|
|
722
714
|
};
|
|
723
715
|
/**
|
|
724
716
|
* Returns a new schedule with the single service it requires provided to it.
|
|
@@ -729,8 +721,8 @@ export declare const provideContext: {
|
|
|
729
721
|
* @category context
|
|
730
722
|
*/
|
|
731
723
|
export declare const provideService: {
|
|
732
|
-
<T
|
|
733
|
-
<
|
|
724
|
+
<T extends Context.Tag<any, any>>(tag: T, service: Context.Tag.Service<T>): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, Exclude<R, Context.Tag.Identifier<T>>>;
|
|
725
|
+
<Out, In, R, T extends Context.Tag<any, any>>(self: Schedule<Out, In, R>, tag: T, service: Context.Tag.Service<T>): Schedule<Out, In, Exclude<R, Context.Tag.Identifier<T>>>;
|
|
734
726
|
};
|
|
735
727
|
/**
|
|
736
728
|
* A schedule that recurs for until the predicate evaluates to true.
|
|
@@ -738,14 +730,14 @@ export declare const provideService: {
|
|
|
738
730
|
* @since 2.0.0
|
|
739
731
|
* @category utils
|
|
740
732
|
*/
|
|
741
|
-
export declare const recurUntil: <A>(f: Predicate<A>) => Schedule<
|
|
733
|
+
export declare const recurUntil: <A>(f: Predicate<A>) => Schedule<A, A>;
|
|
742
734
|
/**
|
|
743
735
|
* A schedule that recurs for until the predicate evaluates to true.
|
|
744
736
|
*
|
|
745
737
|
* @since 2.0.0
|
|
746
738
|
* @category utils
|
|
747
739
|
*/
|
|
748
|
-
export declare const recurUntilEffect: <
|
|
740
|
+
export declare const recurUntilEffect: <A, R>(f: (a: A) => Effect.Effect<boolean, never, R>) => Schedule<A, A, R>;
|
|
749
741
|
/**
|
|
750
742
|
* A schedule that recurs for until the input value becomes applicable to
|
|
751
743
|
* partial function and then map that value with given function.
|
|
@@ -753,21 +745,21 @@ export declare const recurUntilEffect: <Env, A>(f: (a: A) => Effect.Effect<boole
|
|
|
753
745
|
* @since 2.0.0
|
|
754
746
|
* @category utils
|
|
755
747
|
*/
|
|
756
|
-
export declare const recurUntilOption: <A, B>(pf: (a: A) => Option.Option<B>) => Schedule<
|
|
748
|
+
export declare const recurUntilOption: <A, B>(pf: (a: A) => Option.Option<B>) => Schedule<Option.Option<B>, A>;
|
|
757
749
|
/**
|
|
758
750
|
* A schedule that recurs during the given duration.
|
|
759
751
|
*
|
|
760
752
|
* @since 2.0.0
|
|
761
753
|
* @category utils
|
|
762
754
|
*/
|
|
763
|
-
export declare const recurUpTo: (duration: Duration.DurationInput) => Schedule<
|
|
755
|
+
export declare const recurUpTo: (duration: Duration.DurationInput) => Schedule<Duration.Duration>;
|
|
764
756
|
/**
|
|
765
757
|
* A schedule that recurs for as long as the predicate evaluates to true.
|
|
766
758
|
*
|
|
767
759
|
* @since 2.0.0
|
|
768
760
|
* @category utils
|
|
769
761
|
*/
|
|
770
|
-
export declare const recurWhile: <A>(f: Predicate<A>) => Schedule<
|
|
762
|
+
export declare const recurWhile: <A>(f: Predicate<A>) => Schedule<A, A>;
|
|
771
763
|
/**
|
|
772
764
|
* A schedule that recurs for as long as the effectful predicate evaluates to
|
|
773
765
|
* true.
|
|
@@ -775,7 +767,7 @@ export declare const recurWhile: <A>(f: Predicate<A>) => Schedule<never, A, A>;
|
|
|
775
767
|
* @since 2.0.0
|
|
776
768
|
* @category utils
|
|
777
769
|
*/
|
|
778
|
-
export declare const recurWhileEffect: <
|
|
770
|
+
export declare const recurWhileEffect: <A, R>(f: (a: A) => Effect.Effect<boolean, never, R>) => Schedule<A, A, R>;
|
|
779
771
|
/**
|
|
780
772
|
* A schedule spanning all time, which can be stepped only the specified
|
|
781
773
|
* number of times before it terminates.
|
|
@@ -783,7 +775,7 @@ export declare const recurWhileEffect: <Env, A>(f: (a: A) => Effect.Effect<boole
|
|
|
783
775
|
* @category constructors
|
|
784
776
|
* @since 2.0.0
|
|
785
777
|
*/
|
|
786
|
-
export declare const recurs: (n: number) => Schedule<
|
|
778
|
+
export declare const recurs: (n: number) => Schedule<number>;
|
|
787
779
|
/**
|
|
788
780
|
* Returns a new schedule that folds over the outputs of this one.
|
|
789
781
|
*
|
|
@@ -791,8 +783,8 @@ export declare const recurs: (n: number) => Schedule<never, unknown, number>;
|
|
|
791
783
|
* @category folding
|
|
792
784
|
*/
|
|
793
785
|
export declare const reduce: {
|
|
794
|
-
<Out, Z>(zero: Z, f: (z: Z, out: Out) => Z): <
|
|
795
|
-
<
|
|
786
|
+
<Out, Z>(zero: Z, f: (z: Z, out: Out) => Z): <In, R>(self: Schedule<Out, In, R>) => Schedule<Z, In, R>;
|
|
787
|
+
<Out, In, R, Z>(self: Schedule<Out, In, R>, zero: Z, f: (z: Z, out: Out) => Z): Schedule<Z, In, R>;
|
|
796
788
|
};
|
|
797
789
|
/**
|
|
798
790
|
* Returns a new schedule that effectfully folds over the outputs of this one.
|
|
@@ -801,8 +793,8 @@ export declare const reduce: {
|
|
|
801
793
|
* @category folding
|
|
802
794
|
*/
|
|
803
795
|
export declare const reduceEffect: {
|
|
804
|
-
<
|
|
805
|
-
<
|
|
796
|
+
<Z, Out, R2>(zero: Z, f: (z: Z, out: Out) => Effect.Effect<Z, never, R2>): <In, R>(self: Schedule<Out, In, R>) => Schedule<Z, In, R2 | R>;
|
|
797
|
+
<Out, In, R, Z, R2>(self: Schedule<Out, In, R>, zero: Z, f: (z: Z, out: Out) => Effect.Effect<Z, never, R2>): Schedule<Z, In, R | R2>;
|
|
806
798
|
};
|
|
807
799
|
/**
|
|
808
800
|
* Returns a new schedule that loops this one continuously, resetting the
|
|
@@ -811,14 +803,14 @@ export declare const reduceEffect: {
|
|
|
811
803
|
* @since 2.0.0
|
|
812
804
|
* @category constructors
|
|
813
805
|
*/
|
|
814
|
-
export declare const repeatForever: Schedule<
|
|
806
|
+
export declare const repeatForever: Schedule<number>;
|
|
815
807
|
/**
|
|
816
808
|
* Returns a new schedule that outputs the number of repetitions of this one.
|
|
817
809
|
*
|
|
818
810
|
* @since 2.0.0
|
|
819
811
|
* @category utils
|
|
820
812
|
*/
|
|
821
|
-
export declare const repetitions: <
|
|
813
|
+
export declare const repetitions: <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<number, In, R>;
|
|
822
814
|
/**
|
|
823
815
|
* Return a new schedule that automatically resets the schedule to its initial
|
|
824
816
|
* state after some time of inactivity defined by `duration`.
|
|
@@ -827,8 +819,8 @@ export declare const repetitions: <Env, In, Out>(self: Schedule<Env, In, Out>) =
|
|
|
827
819
|
* @category utils
|
|
828
820
|
*/
|
|
829
821
|
export declare const resetAfter: {
|
|
830
|
-
(duration: Duration.DurationInput): <
|
|
831
|
-
<
|
|
822
|
+
(duration: Duration.DurationInput): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R>;
|
|
823
|
+
<Out, In, R>(self: Schedule<Out, In, R>, duration: Duration.DurationInput): Schedule<Out, In, R>;
|
|
832
824
|
};
|
|
833
825
|
/**
|
|
834
826
|
* Resets the schedule when the specified predicate on the schedule output
|
|
@@ -838,8 +830,8 @@ export declare const resetAfter: {
|
|
|
838
830
|
* @category utils
|
|
839
831
|
*/
|
|
840
832
|
export declare const resetWhen: {
|
|
841
|
-
<Out>(f: Predicate<Out>): <
|
|
842
|
-
<
|
|
833
|
+
<Out>(f: Predicate<Out>): <In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R>;
|
|
834
|
+
<Out, In, R>(self: Schedule<Out, In, R>, f: Predicate<Out>): Schedule<Out, In, R>;
|
|
843
835
|
};
|
|
844
836
|
/**
|
|
845
837
|
* Runs a schedule using the provided inputs, and collects all outputs.
|
|
@@ -848,8 +840,8 @@ export declare const resetWhen: {
|
|
|
848
840
|
* @category destructors
|
|
849
841
|
*/
|
|
850
842
|
export declare const run: {
|
|
851
|
-
<In>(now: number, input: Iterable<In>): <
|
|
852
|
-
<
|
|
843
|
+
<In>(now: number, input: Iterable<In>): <Out, R>(self: Schedule<Out, In, R>) => Effect.Effect<Chunk.Chunk<Out>, never, R>;
|
|
844
|
+
<Out, In, R>(self: Schedule<Out, In, R>, now: number, input: Iterable<In>): Effect.Effect<Chunk.Chunk<Out>, never, R>;
|
|
853
845
|
};
|
|
854
846
|
/**
|
|
855
847
|
* Cron-like schedule that recurs every specified `second` of each minute. It
|
|
@@ -861,7 +853,7 @@ export declare const run: {
|
|
|
861
853
|
* @since 2.0.0
|
|
862
854
|
* @category constructors
|
|
863
855
|
*/
|
|
864
|
-
export declare const secondOfMinute: (second: number) => Schedule<
|
|
856
|
+
export declare const secondOfMinute: (second: number) => Schedule<number>;
|
|
865
857
|
/**
|
|
866
858
|
* Returns a schedule that recurs continuously, each repetition spaced the
|
|
867
859
|
* specified duration from the last run.
|
|
@@ -869,14 +861,14 @@ export declare const secondOfMinute: (second: number) => Schedule<never, unknown
|
|
|
869
861
|
* @since 2.0.0
|
|
870
862
|
* @category constructors
|
|
871
863
|
*/
|
|
872
|
-
export declare const spaced: (duration: Duration.DurationInput) => Schedule<
|
|
864
|
+
export declare const spaced: (duration: Duration.DurationInput) => Schedule<number>;
|
|
873
865
|
/**
|
|
874
866
|
* A schedule that does not recur, it just stops.
|
|
875
867
|
*
|
|
876
868
|
* @since 2.0.0
|
|
877
869
|
* @category constructors
|
|
878
870
|
*/
|
|
879
|
-
export declare const stop: Schedule<
|
|
871
|
+
export declare const stop: Schedule<void>;
|
|
880
872
|
/**
|
|
881
873
|
* Returns a schedule that repeats one time, producing the specified constant
|
|
882
874
|
* value.
|
|
@@ -884,7 +876,7 @@ export declare const stop: Schedule<never, unknown, void>;
|
|
|
884
876
|
* @since 2.0.0
|
|
885
877
|
* @category constructors
|
|
886
878
|
*/
|
|
887
|
-
export declare const succeed: <A>(value: A) => Schedule<
|
|
879
|
+
export declare const succeed: <A>(value: A) => Schedule<A>;
|
|
888
880
|
/**
|
|
889
881
|
* Returns a schedule that repeats one time, producing the specified constant
|
|
890
882
|
* value.
|
|
@@ -892,7 +884,7 @@ export declare const succeed: <A>(value: A) => Schedule<never, unknown, A>;
|
|
|
892
884
|
* @category constructors
|
|
893
885
|
* @since 2.0.0
|
|
894
886
|
*/
|
|
895
|
-
export declare const sync: <A>(evaluate: LazyArg<A>) => Schedule<
|
|
887
|
+
export declare const sync: <A>(evaluate: LazyArg<A>) => Schedule<A>;
|
|
896
888
|
/**
|
|
897
889
|
* Returns a new schedule that effectfully processes every input to this
|
|
898
890
|
* schedule.
|
|
@@ -901,8 +893,8 @@ export declare const sync: <A>(evaluate: LazyArg<A>) => Schedule<never, unknown,
|
|
|
901
893
|
* @category sequencing
|
|
902
894
|
*/
|
|
903
895
|
export declare const tapInput: {
|
|
904
|
-
<
|
|
905
|
-
<
|
|
896
|
+
<In2, X, R2>(f: (input: In2) => Effect.Effect<X, never, R2>): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In & In2, R2 | R>;
|
|
897
|
+
<Out, In, R, In2, X, R2>(self: Schedule<Out, In, R>, f: (input: In2) => Effect.Effect<X, never, R2>): Schedule<Out, In & In2, R | R2>;
|
|
906
898
|
};
|
|
907
899
|
/**
|
|
908
900
|
* Returns a new schedule that effectfully processes every output from this
|
|
@@ -912,8 +904,8 @@ export declare const tapInput: {
|
|
|
912
904
|
* @category sequencing
|
|
913
905
|
*/
|
|
914
906
|
export declare const tapOutput: {
|
|
915
|
-
<
|
|
916
|
-
<
|
|
907
|
+
<XO extends Out, X, R2, Out>(f: (out: XO) => Effect.Effect<X, never, R2>): <In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R2 | R>;
|
|
908
|
+
<Out, In, R, XO extends Out, X, R2>(self: Schedule<Out, In, R>, f: (out: XO) => Effect.Effect<X, never, R2>): Schedule<Out, In, R | R2>;
|
|
917
909
|
};
|
|
918
910
|
/**
|
|
919
911
|
* Unfolds a schedule that repeats one time from the specified state and
|
|
@@ -922,7 +914,7 @@ export declare const tapOutput: {
|
|
|
922
914
|
* @since 2.0.0
|
|
923
915
|
* @category constructors
|
|
924
916
|
*/
|
|
925
|
-
export declare const unfold: <A>(initial: A, f: (a: A) => A) => Schedule<
|
|
917
|
+
export declare const unfold: <A>(initial: A, f: (a: A) => A) => Schedule<A>;
|
|
926
918
|
/**
|
|
927
919
|
* Returns a new schedule that performs a geometric union on the intervals
|
|
928
920
|
* defined by both schedules.
|
|
@@ -931,8 +923,8 @@ export declare const unfold: <A>(initial: A, f: (a: A) => A) => Schedule<never,
|
|
|
931
923
|
* @category utils
|
|
932
924
|
*/
|
|
933
925
|
export declare const union: {
|
|
934
|
-
<
|
|
935
|
-
<
|
|
926
|
+
<Out2, In2, R2>(that: Schedule<Out2, In2, R2>): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<[Out, Out2], In & In2, R2 | R>;
|
|
927
|
+
<Out, In, R, Out2, In2, R2>(self: Schedule<Out, In, R>, that: Schedule<Out2, In2, R2>): Schedule<[Out, Out2], In & In2, R | R2>;
|
|
936
928
|
};
|
|
937
929
|
/**
|
|
938
930
|
* Returns a new schedule that combines this schedule with the specified
|
|
@@ -943,8 +935,8 @@ export declare const union: {
|
|
|
943
935
|
* @category utils
|
|
944
936
|
*/
|
|
945
937
|
export declare const unionWith: {
|
|
946
|
-
<
|
|
947
|
-
<
|
|
938
|
+
<Out2, In2, R2>(that: Schedule<Out2, In2, R2>, f: (x: Intervals.Intervals, y: Intervals.Intervals) => Intervals.Intervals): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<[Out, Out2], In & In2, R2 | R>;
|
|
939
|
+
<Out, In, R, Out2, In2, R2>(self: Schedule<Out, In, R>, that: Schedule<Out2, In2, R2>, f: (x: Intervals.Intervals, y: Intervals.Intervals) => Intervals.Intervals): Schedule<[Out, Out2], In & In2, R | R2>;
|
|
948
940
|
};
|
|
949
941
|
/**
|
|
950
942
|
* Returns a new schedule that continues until the specified predicate on the
|
|
@@ -954,8 +946,8 @@ export declare const unionWith: {
|
|
|
954
946
|
* @category utils
|
|
955
947
|
*/
|
|
956
948
|
export declare const untilInput: {
|
|
957
|
-
<In>(f: Predicate<In>): <
|
|
958
|
-
<
|
|
949
|
+
<In>(f: Predicate<In>): <Out, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R>;
|
|
950
|
+
<Out, In, R>(self: Schedule<Out, In, R>, f: Predicate<In>): Schedule<Out, In, R>;
|
|
959
951
|
};
|
|
960
952
|
/**
|
|
961
953
|
* Returns a new schedule that continues until the specified effectful
|
|
@@ -965,8 +957,8 @@ export declare const untilInput: {
|
|
|
965
957
|
* @category utils
|
|
966
958
|
*/
|
|
967
959
|
export declare const untilInputEffect: {
|
|
968
|
-
<In,
|
|
969
|
-
<
|
|
960
|
+
<In, R2>(f: (input: In) => Effect.Effect<boolean, never, R2>): <Out, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R2 | R>;
|
|
961
|
+
<Out, In, R, R2>(self: Schedule<Out, In, R>, f: (input: In) => Effect.Effect<boolean, never, R2>): Schedule<Out, In, R | R2>;
|
|
970
962
|
};
|
|
971
963
|
/**
|
|
972
964
|
* Returns a new schedule that continues until the specified predicate on the
|
|
@@ -976,8 +968,8 @@ export declare const untilInputEffect: {
|
|
|
976
968
|
* @category utils
|
|
977
969
|
*/
|
|
978
970
|
export declare const untilOutput: {
|
|
979
|
-
<Out>(f: Predicate<Out>): <
|
|
980
|
-
<
|
|
971
|
+
<Out>(f: Predicate<Out>): <In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R>;
|
|
972
|
+
<Out, In, R>(self: Schedule<Out, In, R>, f: Predicate<Out>): Schedule<Out, In, R>;
|
|
981
973
|
};
|
|
982
974
|
/**
|
|
983
975
|
* Returns a new schedule that continues until the specified effectful
|
|
@@ -987,8 +979,8 @@ export declare const untilOutput: {
|
|
|
987
979
|
* @category utils
|
|
988
980
|
*/
|
|
989
981
|
export declare const untilOutputEffect: {
|
|
990
|
-
<Out,
|
|
991
|
-
<
|
|
982
|
+
<Out, R2>(f: (out: Out) => Effect.Effect<boolean, never, R2>): <In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R2 | R>;
|
|
983
|
+
<Out, In, R, R2>(self: Schedule<Out, In, R>, f: (out: Out) => Effect.Effect<boolean, never, R2>): Schedule<Out, In, R | R2>;
|
|
992
984
|
};
|
|
993
985
|
/**
|
|
994
986
|
* A schedule that recurs during the given duration.
|
|
@@ -997,8 +989,8 @@ export declare const untilOutputEffect: {
|
|
|
997
989
|
* @category utils
|
|
998
990
|
*/
|
|
999
991
|
export declare const upTo: {
|
|
1000
|
-
(duration: Duration.DurationInput): <
|
|
1001
|
-
<
|
|
992
|
+
(duration: Duration.DurationInput): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R>;
|
|
993
|
+
<Out, In, R>(self: Schedule<Out, In, R>, duration: Duration.DurationInput): Schedule<Out, In, R>;
|
|
1002
994
|
};
|
|
1003
995
|
/**
|
|
1004
996
|
* Returns a new schedule that continues for as long the specified predicate
|
|
@@ -1008,8 +1000,8 @@ export declare const upTo: {
|
|
|
1008
1000
|
* @category utils
|
|
1009
1001
|
*/
|
|
1010
1002
|
export declare const whileInput: {
|
|
1011
|
-
<In>(f: Predicate<In>): <
|
|
1012
|
-
<
|
|
1003
|
+
<In>(f: Predicate<In>): <Out, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R>;
|
|
1004
|
+
<Out, In, R>(self: Schedule<Out, In, R>, f: Predicate<In>): Schedule<Out, In, R>;
|
|
1013
1005
|
};
|
|
1014
1006
|
/**
|
|
1015
1007
|
* Returns a new schedule that continues for as long the specified effectful
|
|
@@ -1019,8 +1011,8 @@ export declare const whileInput: {
|
|
|
1019
1011
|
* @category utils
|
|
1020
1012
|
*/
|
|
1021
1013
|
export declare const whileInputEffect: {
|
|
1022
|
-
<In,
|
|
1023
|
-
<
|
|
1014
|
+
<In, R2>(f: (input: In) => Effect.Effect<boolean, never, R2>): <Out, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R2 | R>;
|
|
1015
|
+
<Out, In, R, R2>(self: Schedule<Out, In, R>, f: (input: In) => Effect.Effect<boolean, never, R2>): Schedule<Out, In, R | R2>;
|
|
1024
1016
|
};
|
|
1025
1017
|
/**
|
|
1026
1018
|
* Returns a new schedule that continues for as long the specified predicate
|
|
@@ -1030,8 +1022,8 @@ export declare const whileInputEffect: {
|
|
|
1030
1022
|
* @category utils
|
|
1031
1023
|
*/
|
|
1032
1024
|
export declare const whileOutput: {
|
|
1033
|
-
<Out>(f: Predicate<Out>): <
|
|
1034
|
-
<
|
|
1025
|
+
<Out>(f: Predicate<Out>): <In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R>;
|
|
1026
|
+
<Out, In, R>(self: Schedule<Out, In, R>, f: Predicate<Out>): Schedule<Out, In, R>;
|
|
1035
1027
|
};
|
|
1036
1028
|
/**
|
|
1037
1029
|
* Returns a new schedule that continues for as long the specified effectful
|
|
@@ -1041,8 +1033,8 @@ export declare const whileOutput: {
|
|
|
1041
1033
|
* @category utils
|
|
1042
1034
|
*/
|
|
1043
1035
|
export declare const whileOutputEffect: {
|
|
1044
|
-
<Out,
|
|
1045
|
-
<
|
|
1036
|
+
<Out, R2>(f: (out: Out) => Effect.Effect<boolean, never, R2>): <In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In, R2 | R>;
|
|
1037
|
+
<Out, In, R, R2>(self: Schedule<Out, In, R>, f: (out: Out) => Effect.Effect<boolean, never, R2>): Schedule<Out, In, R | R2>;
|
|
1046
1038
|
};
|
|
1047
1039
|
/**
|
|
1048
1040
|
* A schedule that divides the timeline to `interval`-long windows, and sleeps
|
|
@@ -1060,7 +1052,7 @@ export declare const whileOutputEffect: {
|
|
|
1060
1052
|
* @since 2.0.0
|
|
1061
1053
|
* @category constructors
|
|
1062
1054
|
*/
|
|
1063
|
-
export declare const windowed: (interval: Duration.DurationInput) => Schedule<
|
|
1055
|
+
export declare const windowed: (interval: Duration.DurationInput) => Schedule<number>;
|
|
1064
1056
|
/**
|
|
1065
1057
|
* The same as `intersect` but ignores the right output.
|
|
1066
1058
|
*
|
|
@@ -1068,8 +1060,8 @@ export declare const windowed: (interval: Duration.DurationInput) => Schedule<ne
|
|
|
1068
1060
|
* @category zipping
|
|
1069
1061
|
*/
|
|
1070
1062
|
export declare const zipLeft: {
|
|
1071
|
-
<
|
|
1072
|
-
<
|
|
1063
|
+
<Out2, In2, R2>(that: Schedule<Out2, In2, R2>): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<Out, In & In2, R2 | R>;
|
|
1064
|
+
<Out, In, R, Out2, In2, R2>(self: Schedule<Out, In, R>, that: Schedule<Out2, In2, R2>): Schedule<Out, In & In2, R | R2>;
|
|
1073
1065
|
};
|
|
1074
1066
|
/**
|
|
1075
1067
|
* The same as `intersect` but ignores the left output.
|
|
@@ -1078,8 +1070,8 @@ export declare const zipLeft: {
|
|
|
1078
1070
|
* @category zipping
|
|
1079
1071
|
*/
|
|
1080
1072
|
export declare const zipRight: {
|
|
1081
|
-
<
|
|
1082
|
-
<
|
|
1073
|
+
<Out2, In2, R2>(that: Schedule<Out2, In2, R2>): <Out, In, R>(self: Schedule<Out, In, R>) => Schedule<Out2, In & In2, R2 | R>;
|
|
1074
|
+
<Out, In, R, Out2, In2, R2>(self: Schedule<Out, In, R>, that: Schedule<Out2, In2, R2>): Schedule<Out2, In & In2, R | R2>;
|
|
1083
1075
|
};
|
|
1084
1076
|
/**
|
|
1085
1077
|
* Equivalent to `intersect` followed by `map`.
|
|
@@ -1088,7 +1080,7 @@ export declare const zipRight: {
|
|
|
1088
1080
|
* @category zipping
|
|
1089
1081
|
*/
|
|
1090
1082
|
export declare const zipWith: {
|
|
1091
|
-
<
|
|
1092
|
-
<
|
|
1083
|
+
<Out2, In2, R2, Out, Out3>(that: Schedule<Out2, In2, R2>, f: (out: Out, out2: Out2) => Out3): <In, R>(self: Schedule<Out, In, R>) => Schedule<Out3, In & In2, R2 | R>;
|
|
1084
|
+
<Out, In, R, Out2, In2, R2, Out3>(self: Schedule<Out, In, R>, that: Schedule<Out2, In2, R2>, f: (out: Out, out2: Out2) => Out3): Schedule<Out3, In & In2, R | R2>;
|
|
1093
1085
|
};
|
|
1094
1086
|
//# sourceMappingURL=Schedule.d.ts.map
|