import type { Either } from "../../../Either"; import * as M from "../../Managed/_core"; import * as T from "../../Task"; import * as Push from "./Push"; export declare class Sink { readonly push: M.Managed>; constructor(push: M.Managed>); } /** * Creates a sink from a Push */ export declare const fromPush: (push: Push.Push) => Sink; /** * A sink that immediately ends with the specified value. */ export declare const succeed: (z: Z) => Sink; /** * A sink that effectfully folds its input chunks with the provided function, termination predicate and initial state. * `contFn` condition is checked only for the initial value and at the end of processing of each chunk. * `f` and `contFn` must preserve chunking-invariance. */ export declare const foldArraysM: ( z: Z ) => (contFn: (s: Z) => boolean) => (f: (s: Z, i: readonly I[]) => T.Task) => Sink; /** * A sink that folds its input chunks with the provided function, termination predicate and initial state. * `contFn` condition is checked only for the initial value and at the end of processing of each chunk. * `f` and `contFn` must preserve chunking-invariance. */ export declare const foldArrays: ( z: Z ) => (contFn: (s: Z) => boolean) => (f: (s: Z, i: readonly I[]) => Z) => Sink; /** * A sink that folds its input chunks with the provided function and initial state. * `f` must preserve chunking-invariance. */ export declare const foldLeftArrays: (z: Z) => (f: (s: Z, i: readonly I[]) => Z) => Sink; /** * A sink that collects all of its inputs into an array. */ export declare const collectAll: () => Sink; /** * Runs both sinks in parallel on the input, returning the result or the error from the * one that finishes first. */ export declare const raceBoth: ( that: Sink ) => (self: Sink) => Sink>; /** * A sink that executes the provided effectful function for every element fed to it. */ export declare const foreach: (f: (i: I) => T.Task) => Sink; //# sourceMappingURL=Sink.d.ts.map