@fncts/io 0.0.10 → 0.0.11

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/Sink/api.d.ts CHANGED
@@ -18,90 +18,116 @@ import { Ref } from "@fncts/io/Ref";
18
18
  import { Duration } from "@fncts/base/data/Duration";
19
19
  import { MergeDecision } from "../Channel/internal/MergeDecision.js";
20
20
  /**
21
+ * Like {@link zip }, but keeps only the result from this sink
21
22
  * @tsplus fluent fncts.io.Sink apFirst
22
23
  * @tsplus location "@fncts/io/Sink/api"
23
24
  */
24
25
  export declare function apFirst<R, E, In, L, Z, R1, E1, In1 extends In, L1 extends L, Z1>(self: Sink<R, E, In, L, Z>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>): Sink<R & R1, E | E1, In & In1, L | L1, Z>;
25
26
  /**
27
+ * Like {@link zipC }, but keeps only the result from this sink
26
28
  * @tsplus fluent fncts.io.Sink apFirstC
27
29
  * @tsplus location "@fncts/io/Sink/api"
28
30
  */
29
31
  export declare function apFirstC<R, E, In, L, Z, R1, E1, In1 extends In, L1 extends L, Z1>(self: Sink<R, E, In, L, Z>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>): Sink<R & R1, E | E1, In & In1, L | L1, Z>;
30
32
  /**
33
+ * Like {@link zip }, but keeps only the result from the `that` sink
31
34
  * @tsplus fluent fncts.io.Sink apSecond
32
35
  * @tsplus location "@fncts/io/Sink/api"
33
36
  */
34
- export declare function apSecond<R, E, In, L, Z, R1, E1, In1 extends In, L1 extends L, Z1>(self: Sink<R, E, In, L, Z>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>): Sink<R & R1, E | E1, In & In1, L | L1, Z1>;
37
+ export declare function apSecond<R, E, In, L, Z, R1, E1, In1 extends In, L1 extends L, Z1>(self: Sink<R, E, In, L, Z>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): Sink<R & R1, E | E1, In & In1, L | L1, Z1>;
35
38
  /**
39
+ * Like {@link zipC }, but keeps only the result from the `that` sink
36
40
  * @tsplus fluent fncts.io.Sink apSecondC
37
41
  * @tsplus location "@fncts/io/Sink/api"
38
42
  */
39
- export declare function apSecondC<R, E, In, L, Z, R1, E1, In1 extends In, L1 extends L, Z1>(self: Sink<R, E, In, L, Z>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>): Sink<R & R1, E | E1, In & In1, L | L1, Z1>;
43
+ export declare function apSecondC<R, E, In, L, Z, R1, E1, In1 extends In, L1 extends L, Z1>(self: Sink<R, E, In, L, Z>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): Sink<R & R1, E | E1, In & In1, L | L1, Z1>;
40
44
  /**
45
+ * Replaces this sink's result with the provided value.
41
46
  * @tsplus fluent fncts.io.Sink as
42
47
  * @tsplus location "@fncts/io/Sink/api"
43
48
  */
44
- export declare function as<R, E, In, L, Z, Z1>(self: Sink<R, E, In, L, Z>, z: Lazy<Z1>): Sink<R, E, In, L, Z1>;
49
+ export declare function as<R, E, In, L, Z, Z1>(self: Sink<R, E, In, L, Z>, z: Lazy<Z1>, __tsplusTrace?: string): Sink<R, E, In, L, Z1>;
45
50
  /**
51
+ * Repeatedly runs the sink and accumulates its results into a chunk
46
52
  * @tsplus fluent fncts.io.Sink collectAll
47
53
  * @tsplus location "@fncts/io/Sink/api"
48
54
  */
49
55
  export declare function collectAll<R, E, In extends L, L, Z>(self: Sink<R, E, In, L, Z>, __tsplusTrace?: string): Sink<R, E, In, L, Conc<Z>>;
50
56
  /**
57
+ * Repeatedly runs the sink for as long as its results satisfy the predicate
58
+ * `p`. The sink's results will be accumulated using the stepping function
59
+ * `f`.
51
60
  * @tsplus fluent fncts.io.Sink collectAllWhileWith
52
61
  * @tsplus location "@fncts/io/Sink/api"
53
62
  */
54
63
  export declare function collectAllWhileWith<R, E, In extends L, L, Z, S>(self: Sink<R, E, In, L, Z>, z: Lazy<S>, p: Predicate<Z>, f: (s: S, z: Z) => S, __tsplusTrace?: string): Sink<R, E, In, L, S>;
55
64
  /**
65
+ * Collects the leftovers from the stream when the sink succeeds and returns
66
+ * them as part of the sink's result
56
67
  * @tsplus getter fncts.io.Sink collectLeftover
57
68
  * @tsplus location "@fncts/io/Sink/api"
58
69
  */
59
70
  export declare function collectLeftover<R, E, In, L, Z>(self: Sink<R, E, In, L, Z>, __tsplusTrace?: string): Sink<R, E, In, never, readonly [Z, Conc<L>]>;
60
71
  /**
72
+ * Transforms this sink's input elements.
61
73
  * @tsplus fluent fncts.io.Sink contramap
62
74
  * @tsplus location "@fncts/io/Sink/api"
63
75
  */
64
- export declare function contramap<R, E, In, L, Z, In1>(self: Sink<R, E, In, L, Z>, f: (inp: In1) => In): Sink<R, E, In1, L, Z>;
76
+ export declare function contramap<R, E, In, L, Z, In1>(self: Sink<R, E, In, L, Z>, f: (inp: In1) => In, __tsplusTrace?: string): Sink<R, E, In1, L, Z>;
65
77
  /**
78
+ * Transforms this sink's input chunks. `f` must preserve chunking-invariance
66
79
  * @tsplus fluent fncts.io.Sink contramapChunks
67
80
  * @tsplus location "@fncts/io/Sink/api"
68
81
  */
69
- export declare function contramapChunks<R, E, In, L, Z, In1>(self: Sink<R, E, In, L, Z>, f: (chunk: Conc<In1>) => Conc<In>): Sink<R, E, In1, L, Z>;
82
+ export declare function contramapChunks<R, E, In, L, Z, In1>(self: Sink<R, E, In, L, Z>, f: (chunk: Conc<In1>) => Conc<In>, __tsplusTrace?: string): Sink<R, E, In1, L, Z>;
70
83
  /**
84
+ * Effectfully transforms this sink's input chunks. `f` must preserve
85
+ * chunking-invariance
71
86
  * @tsplus fluent fncts.io.Sink contramapChunksIO
72
87
  * @tsplus location "@fncts/io/Sink/api"
73
88
  */
74
- export declare function contramapChunksIO<R, E, In, L, Z, R1, E1, In1>(self: Sink<R, E, In, L, Z>, f: (chunk: Conc<In1>) => IO<R1, E1, Conc<In>>): Sink<R & R1, E | E1, In1, L, Z>;
89
+ export declare function contramapChunksIO<R, E, In, L, Z, R1, E1, In1>(self: Sink<R, E, In, L, Z>, f: (chunk: Conc<In1>) => IO<R1, E1, Conc<In>>, __tsplusTrace?: string): Sink<R & R1, E | E1, In1, L, Z>;
75
90
  /**
91
+ * Effectfully transforms this sink's input elements.
76
92
  * @tsplus fluent fncts.io.Sink contramapIO
77
93
  * @tsplus location "@fncts/io/Sink/api"
78
94
  */
79
- export declare function contramapIO<R, E, In, L, Z, R1, E1, In1>(self: Sink<R, E, In, L, Z>, f: (inp: In1) => IO<R1, E1, In>): Sink<R & R1, E | E1, In1, L, Z>;
95
+ export declare function contramapIO<R, E, In, L, Z, R1, E1, In1>(self: Sink<R, E, In, L, Z>, f: (inp: In1) => IO<R1, E1, In>, __tsplusTrace?: string): Sink<R & R1, E | E1, In1, L, Z>;
80
96
  /**
97
+ * Transforms both inputs and result of this sink using the provided
98
+ * functions.
81
99
  * @tsplus fluent fncts.io.Sink dimap
82
100
  * @tsplus location "@fncts/io/Sink/api"
83
101
  */
84
- export declare function dimap<R, E, In, L, Z, In1, Z1>(self: Sink<R, E, In, L, Z>, f: (inp: In1) => In, g: (z: Z) => Z1): Sink<R, E, In1, L, Z1>;
102
+ export declare function dimap<R, E, In, L, Z, In1, Z1>(self: Sink<R, E, In, L, Z>, f: (inp: In1) => In, g: (z: Z) => Z1, __tsplusTrace?: string): Sink<R, E, In1, L, Z1>;
85
103
  /**
104
+ * Transforms both input chunks and result of this sink using the provided
105
+ * functions.
86
106
  * @tsplus fluent fncts.io.Sink dimapChunks
87
107
  * @tsplus location "@fncts/io/Sink/api"
88
108
  */
89
- export declare function dimapChunks<R, E, In, L, Z, In1, Z1>(self: Sink<R, E, In, L, Z>, f: (chunk: Conc<In1>) => Conc<In>, g: (z: Z) => Z1): Sink<R, E, In1, L, Z1>;
109
+ export declare function dimapChunks<R, E, In, L, Z, In1, Z1>(self: Sink<R, E, In, L, Z>, f: (chunk: Conc<In1>) => Conc<In>, g: (z: Z) => Z1, __tsplusTrace?: string): Sink<R, E, In1, L, Z1>;
90
110
  /**
111
+ * Effectfully transforms both input chunks and result of this sink using the
112
+ * provided functions. `f` and `g` must preserve chunking-invariance
91
113
  * @tsplus fluent fncts.io.Sink dimapChunksIO
92
114
  * @tsplus location "@fncts/io/Sink/api"
93
115
  */
94
- export declare function dimapChunksIO<R, E, In, L, Z, R1, E1, In1, R2, E2, Z1>(self: Sink<R, E, In, L, Z>, f: (chunk: Conc<In1>) => IO<R1, E1, Conc<In>>, g: (z: Z) => IO<R2, E2, Z1>): Sink<R & R1 & R2, E | E1 | E2, In1, L, Z1>;
116
+ export declare function dimapChunksIO<R, E, In, L, Z, R1, E1, In1, R2, E2, Z1>(self: Sink<R, E, In, L, Z>, f: (chunk: Conc<In1>) => IO<R1, E1, Conc<In>>, g: (z: Z) => IO<R2, E2, Z1>, __tsplusTrace?: string): Sink<R & R1 & R2, E | E1 | E2, In1, L, Z1>;
95
117
  /**
118
+ * Effectfully transforms both inputs and result of this sink using the
119
+ * provided functions.
96
120
  * @tsplus fluent fncts.io.Sink dimapIO
97
121
  * @tsplus location "@fncts/io/Sink/api"
98
122
  */
99
- export declare function dimapIO<R, E, In, L, Z, R1, E1, In1, R2, E2, Z1>(self: Sink<R, E, In, L, Z>, f: (inp: In1) => IO<R1, E1, In>, g: (z: Z) => IO<R2, E2, Z1>): Sink<R & R1 & R2, E | E1 | E2, In1, L, Z1>;
123
+ export declare function dimapIO<R, E, In, L, Z, R1, E1, In1, R2, E2, Z1>(self: Sink<R, E, In, L, Z>, f: (inp: In1) => IO<R1, E1, In>, g: (z: Z) => IO<R2, E2, Z1>, __tsplusTrace?: string): Sink<R & R1 & R2, E | E1 | E2, In1, L, Z1>;
100
124
  /**
125
+ * Returns a lazily constructed sink that may require effects for its
126
+ * creation.
101
127
  * @tsplus static fncts.io.SinkOps defer
102
128
  * @tsplus location "@fncts/io/Sink/api"
103
129
  */
104
- export declare function defer<R, E, In, L, Z>(sink: Lazy<Sink<R, E, In, L, Z>>): Sink<R, E, In, L, Z>;
130
+ export declare function defer<R, E, In, L, Z>(sink: Lazy<Sink<R, E, In, L, Z>>, __tsplusTrace?: string): Sink<R, E, In, L, Z>;
105
131
  /**
106
132
  * A sink that ignores all of its inputs.
107
133
  * @tsplus static fncts.io.SinkOps drain
@@ -109,137 +135,190 @@ export declare function defer<R, E, In, L, Z>(sink: Lazy<Sink<R, E, In, L, Z>>):
109
135
  */
110
136
  export declare const drain: Sink<unknown, never, unknown, never, void>;
111
137
  /**
138
+ * Drops incoming elements until the predicate `p` is satisfied.
139
+ * @tsplus static fncts.io.SinkOps dropUntil
140
+ * @tsplus location "@fncts/io/Sink/api"
141
+ */
142
+ export declare function makeDropUntil<In>(p: Predicate<In>, __tsplusTrace?: string): Sink<unknown, never, In, In, void>;
143
+ /**
144
+ * Drops incoming elements until the effectful predicate `p` is satisfied.
145
+ * @tsplus static fncts.io.SinkOps dropUntilIO
146
+ * @tsplus location "@fncts/io/Sink/api"
147
+ */
148
+ export declare function makeDropUntilIO<R, E, In>(p: (inp: In) => IO<R, E, boolean>, __tsplusTrace?: string): Sink<R, E, In, In, void>;
149
+ /**
150
+ * Drops incoming elements as long as the predicate `p` is satisfied.
112
151
  * @tsplus static fncts.io.SinkOps dropWhile
113
152
  * @tsplus location "@fncts/io/Sink/api"
114
153
  */
115
- export declare function dropWhile<Err, In>(predicate: Predicate<In>): Sink<unknown, never, In, In, any>;
154
+ export declare function makeDropWhile<Err, In>(predicate: Predicate<In>, __tsplusTrace?: string): Sink<unknown, never, In, In, any>;
116
155
  /**
156
+ * Drops incoming elements as long as the effectful predicate `p` is
157
+ * satisfied.
158
+ * @tsplus static fncts.io.SinkOps dropWhileIO
159
+ * @tsplus location "@fncts/io/Sink/api"
160
+ */
161
+ export declare function dropWhileIO<R, E, In>(p: (inp: In) => IO<R, E, boolean>, __tsplusTrace?: string): Sink<R, E, In, In, void>;
162
+ /**
163
+ * Accesses the whole environment of the sink.
117
164
  * @tsplus static fncts.io.SinkOps environment
118
165
  * @tsplus location "@fncts/io/Sink/api"
119
166
  */
120
167
  export declare function environment<R>(__tsplusTrace?: string): Sink<R, never, unknown, never, Environment<R>>;
121
168
  /**
169
+ * Accesses the environment of the sink.
122
170
  * @tsplus static fncts.io.SinkOps environmentWith
123
171
  * @tsplus location "@fncts/io/Sink/api"
124
172
  */
125
173
  export declare function environmentWith<R, Z>(f: (r: Environment<R>) => Z, __tsplusTrace?: string): Sink<R, never, unknown, never, Z>;
126
174
  /**
175
+ * Accesses the environment of the sink in the context of an effect.
127
176
  * @tsplus static fncts.io.SinkOps environmentWithIO
128
177
  * @tsplus location "@fncts/io/Sink/api"
129
178
  */
130
179
  export declare function environmentWithIO<R, R1, E, Z>(f: (r: Environment<R>) => IO<R1, E, Z>, __tsplusTrace?: string): Sink<R & R1, E, unknown, never, Z>;
131
180
  /**
181
+ * Accesses the environment of the sink in the context of a sink.
132
182
  * @tsplus static fncts.io.SinkOps environmentWithSink
133
183
  * @tsplus location "@fncts/io/Sink/api"
134
184
  */
135
185
  export declare function environmentWithSink<R, R1, E, In, L, Z>(f: (r: Environment<R>) => Sink<R1, E, In, L, Z>, __tsplusTrace?: string): Sink<R & R1, E, In, L, Z>;
136
186
  /**
187
+ * A sink that always fails with the specified error.
137
188
  * @tsplus static fncts.io.SinkOps fail
138
189
  * @tsplus location "@fncts/io/Sink/api"
139
190
  */
140
- export declare function fail<E>(e: Lazy<E>): Sink<unknown, E, unknown, never, never>;
191
+ export declare function fail<E>(e: Lazy<E>, __tsplusTrace?: string): Sink<unknown, E, unknown, never, never>;
141
192
  /**
193
+ * Creates a sink halting with a specified cause.
142
194
  * @tsplus static fncts.io.SinkOps failCause
143
195
  * @tsplus location "@fncts/io/Sink/api"
144
196
  */
145
197
  export declare function failCause<E>(cause: Lazy<Cause<E>>, __tsplusTrace?: string): Sink<unknown, E, unknown, never, never>;
146
198
  /**
199
+ * Creates a sink halting with a specified cause.
147
200
  * @tsplus static fncts.io.SinkOps failCauseNow
148
201
  * @tsplus location "@fncts/io/Sink/api"
149
202
  */
150
203
  export declare function failCauseNow<E>(cause: Cause<E>, __tsplusTrace?: string): Sink<unknown, E, unknown, never, never>;
151
204
  /**
205
+ * A sink that always fails with the specified error.
152
206
  * @tsplus static fncts.io.SinkOps failNow
153
207
  * @tsplus location "@fncts/io/Sink/api"
154
208
  */
155
209
  export declare function failNow<E>(e: E, __tsplusTrace?: string): Sink<unknown, E, unknown, never, never>;
156
210
  /**
211
+ * Filters the sink's input with the given predicate
157
212
  * @tsplus static fncts.io.SinkOps filterInput
158
213
  * @tsplus location "@fncts/io/Sink/api"
159
214
  */
160
215
  export declare function filterInput<R, E, In, L, Z>(self: Sink<R, E, In, L, Z>, p: Predicate<In>, __tsplusTrace?: string): Sink<R, E, In, L, Z>;
161
216
  /**
217
+ * Filters the sink's input with the given IO predicate
162
218
  * @tsplus static fncts.io.SinkOps filterInputIO
163
219
  * @tsplus location "@fncts/io/Sink/api"
164
220
  */
165
221
  export declare function filterInputIO<R, E, In, L, Z, R1, E1>(self: Sink<R, E, In, L, Z>, p: (inp: In) => IO<R1, E1, boolean>, __tsplusTrace?: string): Sink<R & R1, E | E1, In, L, Z>;
166
222
  /**
223
+ * Creates a sink that produces values until one verifies the predicate `f`.
167
224
  * @tsplus fluent fncts.io.Sink findIO
168
225
  * @tsplus location "@fncts/io/Sink/api"
169
226
  */
170
227
  export declare function findIO<R, E, In extends L, L, Z, R1, E1>(self: Sink<R, E, In, L, Z>, f: (z: Z) => IO<R1, E1, boolean>, __tsplusTrace?: string): Sink<R & R1, E | E1, In, L, Maybe<Z>>;
171
228
  /**
229
+ * Runs this sink until it yields a result, then uses that result to create
230
+ * another sink from the provided function which will continue to run until it
231
+ * yields a result.
232
+ *
233
+ * This function essentially runs sinks in sequence.
172
234
  * @tsplus fluent fncts.io.Sink flatMap
173
235
  * @tsplus location "@fncts/io/Sink/api"
174
236
  */
175
237
  export declare function flatMap<R, E, In, L, Z, R1, E1, In1 extends In, L1, Z1>(self: Sink<R, E, In, L, Z>, f: (z: Z) => Sink<R1, E1, In1, L1, Z1>, __tsplusTrace?: string): Sink<R & R1, E | E1, In1, L | L1, Z1>;
176
238
  /**
239
+ * Creates a sink from a {@link Channel }
177
240
  * @tsplus static fncts.io.SinkOps fromChannel
178
241
  * @tsplus static fncts.io.SinkOps __call
179
242
  * @tsplus location "@fncts/io/Sink/api"
180
243
  */
181
244
  export declare function fromChannel<R, E, In, L, Z>(channel: Channel<R, never, Conc<In>, unknown, E, Conc<L>, Z>): Sink<R, E, In, L, Z>;
182
245
  /**
246
+ * Creates a sink from a chunk processing function.
183
247
  * @tsplus static fncts.io.SinkOps fromPush
184
248
  * @tsplus location "@fncts/io/Sink/api"
185
249
  */
186
250
  export declare function fromPush<R, E, In, L, Z, R1>(push: IO<Has<Scope> & R, never, (_: Maybe<Conc<In>>) => IO<R1, readonly [Either<E, Z>, Conc<L>], void>>, __tsplusTrace?: string): Sink<R & R1, E, In, L, Z>;
187
251
  /**
252
+ * Create a sink which enqueues each element into the specified queue.
188
253
  * @tsplus static fncts.io.SinkOps fromQueue
189
254
  * @tsplus location "@fncts/io/Sink/api"
190
255
  */
191
- export declare function fromQueue<In>(queue: Lazy<Queue.Enqueue<In>>): Sink<unknown, never, In, never, void>;
256
+ export declare function fromQueue<In>(queue: Lazy<Queue.Enqueue<In>>, __tsplusTrace?: string): Sink<unknown, never, In, never, void>;
192
257
  /**
258
+ * Create a sink which enqueues each element into the specified queue. The
259
+ * queue will be shutdown once the stream is closed.
193
260
  * @tsplus static fncts.io.SinkOps fromQueueWithShutdown
194
261
  * @tsplus location "@fncts/io/Sink/api"
195
262
  */
196
- export declare function fromQueueWithShutdown<In>(queue: Lazy<Queue.Enqueue<In>>): Sink<unknown, never, In, never, void>;
263
+ export declare function fromQueueWithShutdown<In>(queue: Lazy<Queue.Enqueue<In>>, __tsplusTrace?: string): Sink<unknown, never, In, never, void>;
197
264
  /**
265
+ * Create a sink which publishes each element to the specified hub.
198
266
  * @tsplus static fncts.io.SinkOps fromHub
199
267
  * @tsplus location "@fncts/io/Sink/api"
200
268
  */
201
- export declare function fromHub<In>(hub: Lazy<Hub<In>>): Sink<unknown, never, In, never, void>;
269
+ export declare function fromHub<In>(hub: Lazy<Hub<In>>, __tsplusTrace?: string): Sink<unknown, never, In, never, void>;
202
270
  /**
271
+ * Create a sink which publishes each element to the specified hub. The hub
272
+ * will be shutdown once the stream is closed.
203
273
  * @tsplus static fncts.io.SinkOps fromHubWithShutdown
204
274
  * @tsplus location "@fncts/io/Sink/api"
205
275
  */
206
- export declare function fromHubWithShutdown<In>(hub: Lazy<Hub<In>>): Sink<unknown, never, In, never, void>;
276
+ export declare function fromHubWithShutdown<In>(hub: Lazy<Hub<In>>, __tsplusTrace?: string): Sink<unknown, never, In, never, void>;
207
277
  /**
278
+ * Creates a single-value sink produced from an effect
208
279
  * @tsplus static fncts.io.SinkOps fromIO
209
280
  * @tsplus location "@fncts/io/Sink/api"
210
281
  */
211
- export declare function fromIO<R, E, Z>(b: Lazy<IO<R, E, Z>>): Sink<R, E, unknown, never, Z>;
282
+ export declare function fromIO<R, E, Z>(b: Lazy<IO<R, E, Z>>, __tsplusTrace?: string): Sink<R, E, unknown, never, Z>;
212
283
  /**
284
+ * Creates a sink halting with the specified unchecked value.
213
285
  * @tsplus static fncts.io.SinkOps halt
214
286
  * @tsplus location "@fncts/io/Sink/api"
215
287
  */
216
288
  export declare function halt(defect: Lazy<unknown>, __tsplusTrace?: string): Sink<unknown, never, unknown, never, never>;
217
289
  /**
290
+ * Creates a sink halting with the specified unchecked value.
218
291
  * @tsplus static fncts.io.SinkOps haltNow
219
292
  * @tsplus location "@fncts/io/Sink/api"
220
293
  */
221
294
  export declare function haltNow(defect: unknown, __tsplusTrace?: string): Sink<unknown, never, unknown, never, never>;
222
295
  /**
296
+ * Creates a sink containing the first value.
223
297
  * @tsplus static fncts.io.SinkOps head
224
298
  * @tsplus location "@fncts/io/Sink/api"
225
299
  */
226
300
  export declare function head<In>(__tsplusTrace?: string): Sink<unknown, never, In, In, Maybe<In>>;
227
301
  /**
302
+ * Drains the remaining elements from the stream after the sink finishes
228
303
  * @tsplus getter fncts.io.Sink ignoreLeftover
229
304
  * @tsplus location "@fncts/io/Sink/api"
230
305
  */
231
306
  export declare function ignoreLeftover<R, E, In, L, Z>(self: Sink<R, E, In, L, Z>, __tsplusTrace?: string): Sink<R, E, In, never, Z>;
232
307
  /**
308
+ * Creates a sink containing the last value.
233
309
  * @tsplus static fncts.io.SinkOps last
234
310
  * @tsplus location "@fncts/io/Sink/api"
235
311
  */
236
312
  export declare function last<In>(__tsplusTrace?: string): Sink<unknown, never, In, In, Maybe<In>>;
237
313
  /**
314
+ * Creates a sink that does not consume any input but provides the given chunk
315
+ * as its leftovers
238
316
  * @tsplus static fncts.io.SinkOps leftover
239
317
  * @tsplus location "@fncts/io/Sink/api"
240
318
  */
241
319
  export declare function leftover<L>(c: Lazy<Conc<L>>, __tsplusTrace?: string): Sink<unknown, never, unknown, L, void>;
242
320
  /**
321
+ * Logs the specified message at the current log level.
243
322
  * @tsplus static fncts.io.SinkOps log
244
323
  * @tsplus location "@fncts/io/Sink/api"
245
324
  */
@@ -250,6 +329,12 @@ export declare function log(message: Lazy<string>, __tsplusTrace?: string): Sink
250
329
  * @tsplus location "@fncts/io/Sink/api"
251
330
  */
252
331
  export declare function makeCollectAll<In>(): Sink<unknown, never, In, never, Conc<In>>;
332
+ /**
333
+ * A sink that collects first `n` elements into a chunk. Note that the chunk
334
+ * is preallocated and must fit in memory.
335
+ * @tsplus static fncts.io.SinkOps collectAllN
336
+ * @tsplus location "@fncts/io/Sink/api"
337
+ */
253
338
  export declare function makeCollectAllN<In>(n: Lazy<number>): Sink<unknown, never, In, In, Conc<In>>;
254
339
  /**
255
340
  * A sink that executes the provided effectful function for every element fed to it.
@@ -258,6 +343,8 @@ export declare function makeCollectAllN<In>(n: Lazy<number>): Sink<unknown, neve
258
343
  */
259
344
  export declare function makeForeach<R, Err, In>(f: (inp: In) => IO<R, Err, any>, __tsplusTrace?: string): Sink<R, Err, In, In, void>;
260
345
  /**
346
+ * A sink that executes the provided effectful function for every chunk fed to
347
+ * it.
261
348
  * @tsplus static fncts.io.SinkOps foreachChunk
262
349
  * @tsplus location "@fncts/io/Sink/api"
263
350
  */
@@ -270,80 +357,146 @@ export declare function makeForeachChunk<R, E, In>(f: (inp: Conc<In>) => IO<R, E
270
357
  */
271
358
  export declare function makeForeachWhile<R, Err, In>(f: (_: In) => IO<R, Err, boolean>, __tsplusTrace?: string): Sink<R, Err, In, In, void>;
272
359
  /**
360
+ * A sink that executes the provided effectful function for every chunk fed to
361
+ * it until `f` evaluates to `false`.
273
362
  * @tsplus static fncts.io.SinkOps foreachChunkWhile
274
363
  * @tsplus location "@fncts/io/Sink/api"
275
364
  */
276
365
  export declare function makeForeachChunkWhile<R, E, In>(f: (chunk: Conc<In>) => IO<R, E, boolean>, __tsplusTrace?: string): Sink<R, E, In, In, void>;
277
366
  /**
367
+ * A sink that folds its inputs with the provided function, termination
368
+ * predicate and initial state.
278
369
  * @tsplus static fncts.io.SinkOps fold
279
370
  * @tsplus location "@fncts/io/Sink/api"
280
371
  */
281
372
  export declare function makeFold<In, S>(z: Lazy<S>, contFn: Predicate<S>, f: (s: S, inp: In) => S, __tsplusTrace?: string): Sink<unknown, never, In, In, S>;
282
373
  /**
374
+ * Creates a sink that folds elements of type `In` into a structure of type
375
+ * `S` until `max` elements have been folded.
376
+ *
377
+ * Like {@link foldWeighted }, but with a constant cost function of 1.
283
378
  * @tsplus static fncts.io.SinkOps foldUntil
284
379
  * @tsplus location "@fncts/io/Sink/api"
285
380
  */
286
381
  export declare function makeFoldUntil<In, S>(z: Lazy<S>, max: Lazy<number>, f: (s: S, inp: In) => S, __tsplusTrace?: string): Sink<unknown, never, In, In, S>;
287
382
  /**
383
+ * A sink that folds its input chunks with the provided function, termination
384
+ * predicate and initial state. `contFn` condition is checked only for the
385
+ * initial value and at the end of processing of each chunk. `f` and `contFn`
386
+ * must preserve chunking-invariance.
288
387
  * @tsplus static fncts.io.SinkOps foldChunks
289
388
  * @tsplus location "@fncts/io/Sink/api"
290
389
  */
291
- export declare function makeFoldChunks<In, S>(z: Lazy<S>, contFn: Predicate<S>, f: (s: S, inp: Conc<In>) => S): Sink<unknown, never, In, never, S>;
390
+ export declare function makeFoldChunks<In, S>(z: Lazy<S>, contFn: Predicate<S>, f: (s: S, inp: Conc<In>) => S, __tsplusTrace?: string): Sink<unknown, never, In, never, S>;
292
391
  /**
392
+ * A sink that effectfully folds its input chunks with the provided function,
393
+ * termination predicate and initial state. `contFn` condition is checked only
394
+ * for the initial value and at the end of processing of each chunk. `f` and
395
+ * `contFn` must preserve chunking-invariance.
293
396
  * @tsplus static fncts.io.SinkOps foldChunksIO
294
397
  * @tsplus location "@fncts/io/Sink/api"
295
398
  */
296
- export declare function makeFoldChunksIO<Env, Err, In, S>(z: Lazy<S>, contFn: Predicate<S>, f: (s: S, inp: Conc<In>) => IO<Env, Err, S>): Sink<Env, Err, In, In, S>;
399
+ export declare function makeFoldChunksIO<Env, Err, In, S>(z: Lazy<S>, contFn: Predicate<S>, f: (s: S, inp: Conc<In>) => IO<Env, Err, S>, __tsplusTrace?: string): Sink<Env, Err, In, In, S>;
297
400
  /**
401
+ * A sink that folds its inputs with the provided function and initial state.
298
402
  * @tsplus static fncts.io.SinkOps foldLeft
299
403
  * @tsplus location "@fncts/io/Sink/api"
300
404
  */
301
405
  export declare function makeFoldLeft<In, S>(z: Lazy<S>, f: (s: S, inp: In) => S): Sink<unknown, never, In, never, S>;
302
406
  /**
407
+ * A sink that folds its input chunks with the provided function and initial
408
+ * state. `f` must preserve chunking-invariance.
303
409
  * @tsplus static fncts.io.SinkOps foldLeftChunks
304
410
  * @tsplus location "@fncts/io/Sink/api"
305
411
  */
306
412
  export declare function makeFoldLeftChunks<In, S>(z: Lazy<S>, f: (s: S, inp: Conc<In>) => S): Sink<unknown, never, In, never, S>;
307
413
  /**
414
+ * A sink that effectfully folds its input chunks with the provided function
415
+ * and initial state. `f` must preserve chunking-invariance.
308
416
  * @tsplus static fncts.io.SinkOps foldLeftChunksIO
309
417
  * @tsplus location "@fncts/io/Sink/api"
310
418
  */
311
- export declare function makeFoldLeftChunksIO<R, E, In, S>(z: Lazy<S>, f: (s: S, inp: Conc<In>) => IO<R, E, S>): Sink<R, E, In, In, S>;
419
+ export declare function makeFoldLeftChunksIO<R, E, In, S>(z: Lazy<S>, f: (s: S, inp: Conc<In>) => IO<R, E, S>, __tsplusTrace?: string): Sink<R, E, In, In, S>;
312
420
  /**
421
+ * A sink that effectfully folds its inputs with the provided function and
422
+ * initial state.
313
423
  * @tsplus static fncts.io.SinkOps foldLeftIO
314
424
  * @tsplus location "@fncts/io/Sink/api"
315
425
  */
316
- export declare function makeFoldLeftIO<R, E, In, S>(z: Lazy<S>, f: (s: S, inp: In) => IO<R, E, S>): Sink<R, E, In, In, S>;
426
+ export declare function makeFoldLeftIO<R, E, In, S>(z: Lazy<S>, f: (s: S, inp: In) => IO<R, E, S>, __tsplusTrace?: string): Sink<R, E, In, In, S>;
317
427
  /**
428
+ * A sink that effectfully folds its inputs with the provided function,
429
+ * termination predicate and initial state.
318
430
  * @tsplus static fncts.io.SinkOps foldIO
319
431
  * @tsplus location "@fncts/io/Sink/api"
320
432
  */
321
433
  export declare function makeFoldIO<R, E, In, S>(z: Lazy<S>, contFn: Predicate<S>, f: (s: S, inp: In) => IO<R, E, S>): Sink<R, E, In, In, S>;
322
434
  /**
435
+ * Creates a sink that effectfully folds elements of type `In` into a
436
+ * structure of type `S` until `max` elements have been folded.
437
+ *
438
+ * Like {@link makeFoldWeightedIO }, but with a constant cost function of 1.
323
439
  * @tsplus static fncts.io.SinkOps foldUntilIO
324
440
  * @tsplus location "@fncts/io/Sink/api"
325
441
  */
326
- export declare function makeFoldUntilIO<R, E, In, S>(z: Lazy<S>, max: Lazy<number>, f: (s: S, inp: In) => IO<R, E, S>): Sink<R, E, In, In, S>;
442
+ export declare function makeFoldUntilIO<R, E, In, S>(z: Lazy<S>, max: Lazy<number>, f: (s: S, inp: In) => IO<R, E, S>, __tsplusTrace?: string): Sink<R, E, In, In, S>;
327
443
  /**
444
+ * Creates a sink that folds elements of type `In` into a structure of type
445
+ * `S`, until `max` worth of elements (determined by the `costFn`) have been
446
+ * folded.
447
+ *
448
+ * The `decompose` function will be used for decomposing elements that cause
449
+ * an `S` aggregate to cross `max` into smaller elements.
450
+ *
451
+ *
452
+ * Be vigilant with this function, it has to generate "simpler" values or the
453
+ * fold may never end. A value is considered indivisible if `decompose` yields
454
+ * the empty chunk or a single-valued chunk. In these cases, there is no other
455
+ * choice than to yield a value that will cross the threshold.
456
+ *
457
+ * The {@link makeFoldWeightedDecomposeIO } allows the decompose function to return a
458
+ * `IO` value, and consequently it allows the sink to fail.
328
459
  * @tsplus static fncts.io.SinkOps foldWeightedDecompose
329
460
  * @tsplus location "@fncts/io/Sink/api"
330
461
  */
331
- export declare function makeFoldWeightedDecompose<In, S>(z: Lazy<S>, costFn: (s: S, inp: In) => number, max: Lazy<number>, decompose: (inp: In) => Conc<In>, f: (s: S, inp: In) => S): Sink<unknown, never, In, In, S>;
462
+ export declare function makeFoldWeightedDecompose<In, S>(z: Lazy<S>, costFn: (s: S, inp: In) => number, max: Lazy<number>, decompose: (inp: In) => Conc<In>, f: (s: S, inp: In) => S, __tsplusTrace?: string): Sink<unknown, never, In, In, S>;
332
463
  /**
464
+ * Creates a sink that effectfully folds elements of type `In` into a
465
+ * structure of type `S`, until `max` worth of elements (determined by the
466
+ * `costFn`) have been folded.
467
+ *
468
+ * The `decompose` function will be used for decomposing elements that cause
469
+ * an `S` aggregate to cross `max` into smaller elements. Be vigilant with
470
+ * this function, it has to generate "simpler" values or the fold may never
471
+ * end. A value is considered indivisible if `decompose` yields the empty
472
+ * chunk or a single-valued chunk. In these cases, there is no other choice
473
+ * than to yield a value that will cross the threshold.
333
474
  * @tsplus static fncts.io.SinkOps foldWeightedDecomposeIO
334
475
  * @tsplus location "@fncts/io/Sink/api"
335
476
  */
336
- export declare function makeFoldWeightedDecomposeIO<R, E, In, S, R1, E1, R2, E2>(z: Lazy<S>, costFn: (s: S, inp: In) => IO<R1, E1, number>, max: Lazy<number>, decompose: (inp: In) => IO<R2, E2, Conc<In>>, f: (s: S, inp: In) => IO<R, E, S>): Sink<R & R1 & R2, E | E1 | E2, In, In, S>;
477
+ export declare function makeFoldWeightedDecomposeIO<R, E, In, S, R1, E1, R2, E2>(z: Lazy<S>, costFn: (s: S, inp: In) => IO<R1, E1, number>, max: Lazy<number>, decompose: (inp: In) => IO<R2, E2, Conc<In>>, f: (s: S, inp: In) => IO<R, E, S>, __tsplusTrace?: string): Sink<R & R1 & R2, E | E1 | E2, In, In, S>;
337
478
  /**
479
+ * Creates a sink that folds elements of type `In` into a structure of type
480
+ * `S`, until `max` worth of elements (determined by the `costFn`) have been
481
+ * folded.
482
+ * @note Elements that have an individual cost larger than `max` will force the
483
+ sink to cross the `max` cost. See {@link makeFoldWeightedDecompose } for a variant
484
+ that can handle these cases.
338
485
  * @tsplus static fncts.io.SinkOps foldWeighted
339
486
  * @tsplus location "@fncts/io/Sink/api"
340
487
  */
341
- export declare function makeFoldWeighted<In, S>(z: Lazy<S>, costFn: (s: S, inp: In) => number, max: Lazy<number>, f: (s: S, inp: In) => S): Sink<unknown, never, In, In, S>;
488
+ export declare function makeFoldWeighted<In, S>(z: Lazy<S>, costFn: (s: S, inp: In) => number, max: Lazy<number>, f: (s: S, inp: In) => S, __tsplusTrace?: string): Sink<unknown, never, In, In, S>;
342
489
  /**
490
+ * Creates a sink that effectfully folds elements of type `In` into a
491
+ * structure of type `S`, until `max` worth of elements (determined by the
492
+ * `costFn`) have been folded.
493
+ * @note Elements that have an individual cost larger than `max` will force the
494
+ sink to cross the `max` cost. See {@link makeFoldWeightedDecomposeIO } for a
495
+ variant that can handle these cases.
343
496
  * @tsplus static fncts.io.SinkOps foldWeightedIO
344
497
  * @tsplus location "@fncts/io/Sink/api"
345
498
  */
346
- export declare function makeFoldWeightedIO<R, E, In, S, R1, E1>(z: Lazy<S>, costFn: (s: S, inp: In) => IO<R, E, number>, max: Lazy<number>, f: (s: S, inp: In) => IO<R1, E1, S>): Sink<R & R1, E | E1, In, In, S>;
499
+ export declare function makeFoldWeightedIO<R, E, In, S, R1, E1>(z: Lazy<S>, costFn: (s: S, inp: In) => IO<R, E, number>, max: Lazy<number>, f: (s: S, inp: In) => IO<R1, E1, S>, __tsplusTrace?: string): Sink<R & R1, E | E1, In, In, S>;
347
500
  /**
348
501
  * Transforms this sink's result.
349
502
  * @tsplus fluent fncts.io.Sink map
@@ -373,69 +526,91 @@ export declare function mapIO_<R, E, In, L, Z, R1, E1, Z1>(self: Sink<R, E, In,
373
526
  */
374
527
  export declare function matchSink_<R, E, In, L, Z, R1, E1, In1 extends In, L1, Z1, R2, E2, In2 extends In, L2, Z2>(self: Sink<R, E, In, L, Z>, onFailure: (e: E) => Sink<R1, E1, In1, L1, Z1>, onSuccess: (z: Z) => Sink<R2, E2, In2, L2, Z2>, __tsplusTrace?: string): Sink<R & R1 & R2, E1 | E2, In1 & In2, L | L1 | L2, Z1 | Z2>;
375
528
  /**
529
+ * Switch to another sink in case of failure
376
530
  * @tsplus fluent fncts.io.Sink orElse
377
531
  * @tsplus location "@fncts/io/Sink/api"
378
532
  */
379
533
  export declare function orElse<R, E, In, L, Z, R1, E1, In1, L1, Z1>(self: Sink<R, E, In, L, Z>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): Sink<R & R1, E | E1, In & In1, L | L1, Z | Z1>;
380
534
  /**
535
+ * Provides the sink with its required environment, which eliminates its
536
+ * dependency on `R`.
381
537
  * @tsplus fluent fncts.io.Sink provideEnvironment
382
538
  * @tsplus location "@fncts/io/Sink/api"
383
539
  */
384
540
  export declare function provideEnvironment<R, E, In, L, Z>(self: Sink<R, E, In, L, Z>, r: Lazy<Environment<R>>, __tsplusTrace?: string): Sink<unknown, E, In, L, Z>;
385
541
  /**
542
+ * Runs both sinks in parallel on the input, returning the result or the
543
+ * error from the one that finishes first.
386
544
  * @tsplus fluent fncts.io.Sink race
387
545
  * @tsplus location "@fncts/io/Sink/api"
388
546
  */
389
- export declare function race<R, E, In, L, Z, R1, E1, In1, L1, Z1>(self: Sink<R, E, In, L, Z>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>): Sink<R & R1, E | E1, In & In1, L | L1, Z | Z1>;
547
+ export declare function race<R, E, In, L, Z, R1, E1, In1, L1, Z1>(self: Sink<R, E, In, L, Z>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): Sink<R & R1, E | E1, In & In1, L | L1, Z | Z1>;
390
548
  /**
549
+ * Runs both sinks in parallel on the input, returning the result or the error
550
+ * from the one that finishes first.
391
551
  * @tsplus fluent fncts.io.Sink raceBoth
392
552
  * @tsplus location "@fncts/io/Sink/api"
393
553
  */
394
- export declare function raceBoth<R, E, In, L, Z, R1, E1, In1, L1, Z1>(self: Sink<R, E, In, L, Z>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>, capacity?: Lazy<number>): Sink<R & R1, E | E1, In & In1, L | L1, Either<Z, Z1>>;
554
+ export declare function raceBoth<R, E, In, L, Z, R1, E1, In1, L1, Z1>(self: Sink<R, E, In, L, Z>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>, capacity?: Lazy<number>, __tsplusTrace?: string): Sink<R & R1, E | E1, In & In1, L | L1, Either<Z, Z1>>;
395
555
  /**
556
+ * Runs both sinks in parallel on the input, using the specified merge
557
+ * function as soon as one result or the other has been computed.
396
558
  * @tsplus fluent fncts.io.Sink raceWith
397
559
  * @tsplus location "@fncts/io/Sink/api"
398
560
  */
399
561
  export declare function raceWith<R, E, In, L, Z, R1, E1, In1, L1, Z1, R2, E2, Z2, R3, E3, Z3>(self: Sink<R, E, In, L, Z>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>, leftDone: (exit: Exit<E, Z>) => MergeDecision<R1, E1, Z1, E2, Z2>, rightDone: (exit: Exit<E1, Z1>) => MergeDecision<R, E, Z, E3, Z3>, capacity?: Lazy<number>, __tsplusTrace?: string): Sink<R & R1 & R2 & R3, E2 | E3, In & In1, L | L1, Z2 | Z3>;
400
562
  /**
563
+ * Accesses the specified service in the environment of the effect.
401
564
  * @tsplus static fncts.io.SinkOps service
402
565
  * @tsplus location "@fncts/io/Sink/api"
403
566
  */
404
567
  export declare function service<S>(/** @tsplus auto */ tag: Tag<S>): Sink<Has<S>, never, unknown, never, S>;
405
568
  /**
569
+ * Accesses the specified service in the environment of the sink.
406
570
  * @tsplus static fncts.io.SinkOps serviceWith
407
571
  * @tsplus location "@fncts/io/Sink/api"
408
572
  */
409
573
  export declare function serviceWith<S, Z>(f: (service: S) => Z,
410
574
  /** @tsplus auto */ tag: Tag<S>): Sink<Has<S>, never, unknown, never, Z>;
411
575
  /**
576
+ * Accesses the specified service in the environment of the sink in the
577
+ * context of an effect.
412
578
  * @tsplus static fncts.io.SinkOps serviceWithIO
413
579
  * @tsplus location "@fncts/io/Sink/api"
414
580
  */
415
581
  export declare function serviceWithIO<S, R, E, Z>(f: (service: S) => IO<R, E, Z>,
416
582
  /** @tsplus auto */ tag: Tag<S>): Sink<Has<S> & R, E, unknown, never, Z>;
417
583
  /**
584
+ * Accesses the specified service in the environment of the sink in the
585
+ * context of a sink.
418
586
  * @tsplus static fncts.io.SinkOps serviceWithSink
419
587
  * @tsplus location "@fncts/io/Sink/api"
420
588
  */
421
589
  export declare function serviceWithSink<S, R, E, In, L, Z>(f: (service: S) => Sink<R, E, In, L, Z>,
422
590
  /** @tsplus auto */ tag: Tag<S>): Sink<Has<S> & R, E, In, L, Z>;
423
591
  /**
592
+ * Splits the sink on the specified predicate, returning a new sink that
593
+ * consumes elements until an element after the first satisfies the specified
594
+ * predicate.
424
595
  * @tsplus fluent fncts.io.Sink splitWhere
425
596
  * @tsplus location "@fncts/io/Sink/api"
426
597
  */
427
- export declare function splitWhere<R, E, In, L extends In, Z>(self: Sink<R, E, In, L, Z>, p: Predicate<In>): Sink<R, E, In, In, Z>;
598
+ export declare function splitWhere<R, E, In, L extends In, Z>(self: Sink<R, E, In, L, Z>, p: Predicate<In>, __tsplusTrace?: string): Sink<R, E, In, In, Z>;
428
599
  /**
600
+ * A sink that immediately ends with the specified value.
429
601
  * @tsplus static fncts.io.SinkOps succeed
430
602
  * @tsplus location "@fncts/io/Sink/api"
431
603
  */
432
604
  export declare function succeed<Z>(z: Lazy<Z>, __tsplusTrace?: string): Sink<unknown, never, unknown, never, Z>;
433
605
  /**
606
+ * A sink that immediately ends with the specified value.
434
607
  * @tsplus static fncts.io.SinkOps succeedNow
435
608
  * @tsplus location "@fncts/io/Sink/api"
436
609
  */
437
610
  export declare function succeedNow<Z>(z: Z, __tsplusTrace?: string): Sink<unknown, never, unknown, never, Z>;
438
611
  /**
612
+ * Summarize a sink by running an effect when the sink starts and again when
613
+ * it completes
439
614
  * @tsplus fluent fncts.io.Sink summarized
440
615
  * @tsplus location "@fncts/io/Sink/api"
441
616
  */
@@ -446,6 +621,7 @@ export declare function summarized<R, E, In, L, Z, R1, E1, B, C>(self: Sink<R, E
446
621
  */
447
622
  export declare function timed<R, E, In, L, Z>(self: Sink<R, E, In, L, Z>, __tsplusTrace?: string): Sink<R, E, In, L, readonly [Z, Duration]>;
448
623
  /**
624
+ * Creates a sink produced from an effect.
449
625
  * @tsplus static fncts.io.SinkOps unwrap
450
626
  * @tsplus location "@fncts/io/Sink/api"
451
627
  */
@@ -455,17 +631,22 @@ export declare function unwrap<R, E, R1, E1, In, L, Z>(io: Lazy<IO<R, E, Sink<R1
455
631
  * @tsplus static fncts.io.SinkOps unwrapScoped
456
632
  * @tsplus location "@fncts/io/Sink/api"
457
633
  */
458
- export declare function unwrapScoped<R, E, R1, E1, In, L, Z>(scoped: Lazy<IO<Has<Scope> & R, E, Sink<R1, E1, In, L, Z>>>): Sink<R & R1, E | E1, In, L, Z>;
634
+ export declare function unwrapScoped<R, E, R1, E1, In, L, Z>(scoped: Lazy<IO<Has<Scope> & R, E, Sink<R1, E1, In, L, Z>>>, __tsplusTrace?: string): Sink<R & R1, E | E1, In, L, Z>;
459
635
  /**
636
+ * Feeds inputs to this sink until it yields a result, then switches over to
637
+ * the provided sink until it yields a result, finally combining the two
638
+ * results into a tuple.
460
639
  * @tsplus fluent fncts.io.Sink zip
461
640
  * @tsplus location "@fncts/io/Sink/api"
462
641
  */
463
- export declare function zip<R, E, In, L, Z, R1, E1, In1 extends In, L1 extends L, Z1>(self: Sink<R, E, In, L, Z>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>): Sink<R & R1, E | E1, In & In1, L | L1, readonly [Z, Z1]>;
642
+ export declare function zip<R, E, In, L, Z, R1, E1, In1 extends In, L1 extends L, Z1>(self: Sink<R, E, In, L, Z>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): Sink<R & R1, E | E1, In & In1, L | L1, readonly [Z, Z1]>;
464
643
  /**
644
+ * Runs both sinks in parallel on the input and combines the results in a
645
+ * tuple.
465
646
  * @tsplus fluent fncts.io.Sink zipC
466
647
  * @tsplus location "@fncts/io/Sink/api"
467
648
  */
468
- export declare function zipC<R, E, In, L, Z, R1, E1, In1 extends In, L1 extends L, Z1>(self: Sink<R, E, In, L, Z>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>): Sink<R & R1, E | E1, In & In1, L | L1, readonly [Z, Z1]>;
649
+ export declare function zipC<R, E, In, L, Z, R1, E1, In1 extends In, L1 extends L, Z1>(self: Sink<R, E, In, L, Z>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>, __tsplusTrace?: string): Sink<R & R1, E | E1, In & In1, L | L1, readonly [Z, Z1]>;
469
650
  /**
470
651
  * Feeds inputs to this sink until it yields a result, then switches over to
471
652
  * the provided sink until it yields a result, finally combining the two
@@ -473,11 +654,11 @@ export declare function zipC<R, E, In, L, Z, R1, E1, In1 extends In, L1 extends
473
654
  * @tsplus fluent fncts.io.Sink zipWith
474
655
  * @tsplus location "@fncts/io/Sink/api"
475
656
  */
476
- export declare function zipWith<R, E, In, L, Z, R1, E1, In1 extends In, L1 extends L, Z1, Z2>(self: Lazy<Sink<R, E, In, L, Z>>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>, f: (z: Z, z1: Z1) => Z2): Sink<R & R1, E | E1, In & In1, L | L1, Z2>;
657
+ export declare function zipWith<R, E, In, L, Z, R1, E1, In1 extends In, L1 extends L, Z1, Z2>(self: Lazy<Sink<R, E, In, L, Z>>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>, f: (z: Z, z1: Z1) => Z2, __tsplusTrace?: string): Sink<R & R1, E | E1, In & In1, L | L1, Z2>;
477
658
  /**
478
659
  * Runs both sinks in parallel on the input and combines the results using the
479
660
  * provided function.
480
661
  * @tsplus fluent fncts.io.Sink zipWithC
481
662
  * @tsplus location "@fncts/io/Sink/api"
482
663
  */
483
- export declare function zipWithC<R, E, In, L, Z, R1, E1, In1, L1, Z1, Z2>(self: Lazy<Sink<R, E, In, L, Z>>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>, f: (z: Z, z1: Z1) => Z2): Sink<R & R1, E | E1, In & In1, L | L1, Z2>;
664
+ export declare function zipWithC<R, E, In, L, Z, R1, E1, In1, L1, Z1, Z2>(self: Lazy<Sink<R, E, In, L, Z>>, that: Lazy<Sink<R1, E1, In1, L1, Z1>>, f: (z: Z, z1: Z1) => Z2, __tsplusTrace?: string): Sink<R & R1, E | E1, In & In1, L | L1, Z2>;