import * as E from "../../Either"; import type { Option } from "../../Option"; import type { Exit } from "../Exit"; import type { Cause } from "../Exit/Cause"; import * as T from "../Task"; import type { IO, RIO } from "./model"; import { Stream } from "./model"; /** * Creates a single-valued pure stream */ export declare const pure: (a: A) => IO; /** * Taskfully transforms the chunks emitted by this stream. */ export declare const mapChunksM_: ( fa: Stream, f: (chunks: readonly A[]) => T.Task ) => Stream; /** * Taskfully transforms the chunks emitted by this stream. */ export declare const mapChunksM: ( f: (chunks: readonly A[]) => T.Task ) => (fa: Stream) => Stream; /** * Transforms the chunks emitted by this stream. */ export declare const mapChunks_: ( fa: Stream, f: (chunks: readonly A[]) => readonly B[] ) => Stream; /** * Transforms the chunks emitted by this stream. */ export declare const mapChunks: ( f: (chunks: readonly A[]) => readonly B[] ) => (fa: Stream) => Stream; /** * Transforms the chunks emitted by this stream. */ export declare const map_: (fa: Stream, f: (a: A) => B) => Stream; /** * Transforms the chunks emitted by this stream. */ export declare const map: (f: (a: A) => B) => (fa: Stream) => Stream; /** * Maps over elements of the stream with the specified effectful function. */ export declare const mapM_: ( fa: Stream, f: (a: A) => T.Task ) => Stream; /** * Maps over elements of the stream with the specified effectful function. */ export declare const mapM: ( f: (o: A) => T.Task ) => (fa: Stream) => Stream; export declare const first_: (pab: Stream, f: (e: E) => D) => Stream; export declare const first: (f: (e: E) => D) => (pab: Stream) => Stream; export declare const mapError: (f: (e: E) => D) => (pab: Stream) => Stream; export declare const mapErrorCause_: ( stream: Stream, f: (e: Cause) => Cause ) => Stream; export declare const mapErrorCause: ( f: (e: Cause) => Cause ) => (stream: Stream) => Stream; /** * Returns a stream made of the concatenation in strict order of all the streams * produced by passing each element of this stream to `f0` */ export declare const chain_: ( fa: Stream, f: (a: A) => Stream ) => Stream; /** * Returns a stream made of the concatenation in strict order of all the streams * produced by passing each element of this stream to `f0` */ export declare const chain: ( f: (a: A) => Stream ) => (fa: Stream) => Stream; /** * Flattens this stream-of-streams into a stream made of the concatenation in * strict order of all the streams. */ export declare const flatten: (ffa: Stream>) => Stream; export declare const absolve: (stream: Stream>) => Stream; export declare const ask: () => RIO; export declare const asks: (f: (_: R) => A) => Stream; export declare const asksTask: (f: (_: R0) => T.Task) => Stream; export declare const asksM: (f: (_: R0) => Stream) => Stream; /** * Statefully and effectfully maps over the elements of this stream to produce * new elements. */ export declare const mapAccumM_: ( stream: Stream, z: Z, f: (z: Z, a: A) => T.Task ) => Stream; export declare const mapAccumM: ( z: Z ) => ( f: (z: Z, a: A) => T.Task ) => (stream: Stream) => Stream; export declare const mapAccum_: ( stream: Stream, z: Z, f: (z: Z, a: A) => [Z, B] ) => Stream; export declare const mapAccum: ( z: Z ) => (f: (z: Z, a: A) => [Z, B]) => (stream: Stream) => Stream; export declare const mapConcat_: (stream: Stream, f: (a: A) => Iterable) => Stream; export declare const mapConcat: (f: (a: A) => Iterable) => (stream: Stream) => Stream; export declare const mapConcatChunk_: ( stream: Stream, f: (a: A) => readonly B[] ) => Stream; export declare const mapConcatChunk: ( f: (a: A) => readonly B[] ) => (stream: Stream) => Stream; export declare const mapConcatChunkM_: ( stream: Stream, f: (a: A) => T.Task ) => Stream; export declare const mapConcatChunkM: ( f: (a: A) => T.Task ) => (stream: Stream) => Stream; export declare const mapConcatM_: ( stream: Stream, f: (a: A) => T.Task> ) => Stream; /** * Maps over elements of the stream with the specified effectful function, * executing up to `n` invocations of `f` concurrently. Transformed elements * will be emitted in the original order. */ export declare const mapMPar_: ( n: number ) => (stream: Stream, f: (a: A) => T.Task) => Stream; /** * Maps over elements of the stream with the specified effectful function, * executing up to `n` invocations of `f` concurrently. Transformed elements * will be emitted in the original order. */ export declare const mapMPar: ( n: number ) => (f: (a: A) => T.Task) => (stream: Stream) => Stream; /** * Creates a stream from an asynchronous callback that can be called multiple times * The registration of the callback itself returns a task. The optionality of the * error type `E` can be used to signal the end of the stream, by setting it to `None`. */ export declare const asyncTask: ( register: ( cb: ( next: T.Task, readonly A[]>, offerCb?: ((e: Exit) => void) | undefined ) => T.IO> ) => T.Task, outputBuffer?: number ) => Stream; //# sourceMappingURL=methods.d.ts.map