export declare const StreamSym: unique symbol; export type StreamSym = typeof StreamSym; export declare const _R: unique symbol; export type _R = typeof _R; export declare const _E: unique symbol; export type _E = typeof _E; export declare const _A: unique symbol; export type _A = typeof _A; /** * A `Stream` is a description of a program that, when evaluated, may * emit zero or more values of type `A`, may fail with errors of type `E`, and * uses an environment of type `R`. One way to think of `Stream` is as a * `Effect` program that could emit multiple values. * * `Stream` is a purely functional *pull* based stream. Pull based streams offer * inherent laziness and backpressure, relieving users of the need to manage * buffers between operators. As an optimization, `Stream` does not emit * single values, but rather an array of values. This allows the cost of effect * evaluation to be amortized. * * `Stream` forms a monad on its `A` type parameter, and has error management * facilities for its `E` type parameter, modeled similarly to `Effect` (with * some adjustments for the multiple-valued nature of `Stream`). These aspects * allow for rich and expressive composition of streams. * * @tsplus type effect/core/stream/Stream */ export interface Stream { readonly [StreamSym]: StreamSym; readonly [_R]: () => R; readonly [_E]: () => E; readonly [_A]: () => A; } export declare namespace Stream { type IO = Stream; type RIO = Stream; type UIO = Stream; } /** * @tsplus type effect/core/stream/Stream.Ops */ export interface StreamOps { $: StreamAspects; } export declare const Stream: StreamOps; /** * @tsplus type effect/core/stream/Stream.Aspects */ export interface StreamAspects { } /** * The default chunk size used by the various combinators and constructors of * `Stream`. */ export declare const DEFAULT_CHUNK_SIZE = 4096; /** * Determines if the provided `unknown` value is a `Stream`. * @tsplus static effect/core/stream/Stream.Ops isStream * @tsplus location "@effect/core/stream/Stream/definition" */ export declare function isStream(u: unknown): u is Stream; //# sourceMappingURL=definition.d.ts.map