/** * @since 1.0.0 */ import type { Pipeable } from "@effect/data/Pipeable"; import type { Predicate } from "@effect/data/Predicate"; import type * as Queue from "@effect/io/Queue"; import type * as Stream from "@effect/stream/Stream"; import type * as Take from "@effect/stream/Take"; /** * @since 1.0.0 * @category symbols */ export declare const GroupByTypeId: unique symbol; /** * @since 1.0.0 * @category symbols */ export type GroupByTypeId = typeof GroupByTypeId; /** * Representation of a grouped stream. This allows to filter which groups will * be processed. Once this is applied all groups will be processed in parallel * and the results will be merged in arbitrary order. * * @since 1.0.0 * @category models */ export interface GroupBy extends GroupBy.Variance, Pipeable { readonly grouped: Stream.Stream>]>; } /** * @since 1.0.0 */ export declare namespace GroupBy { /** * @since 1.0.0 * @category models */ interface Variance { readonly [GroupByTypeId]: { readonly _R: (_: never) => R; readonly _E: (_: never) => E; readonly _K: (_: never) => K; readonly _V: (_: never) => V; }; } } /** * Run the function across all groups, collecting the results in an * arbitrary order. * * @since 1.0.0 * @category destructors */ export declare const evaluate: { (f: (key: K, stream: Stream.Stream) => Stream.Stream, options?: { readonly bufferSize?: number; }): (self: GroupBy) => Stream.Stream; (self: GroupBy, f: (key: K, stream: Stream.Stream) => Stream.Stream, options?: { readonly bufferSize?: number; }): Stream.Stream; }; /** * Filter the groups to be processed. * * @since 1.0.0 * @category utils */ export declare const filter: { (predicate: Predicate): (self: GroupBy) => GroupBy; (self: GroupBy, predicate: Predicate): GroupBy; }; /** * Only consider the first `n` groups found in the `Stream`. * * @since 1.0.0 * @category utils */ export declare const first: { (n: number): (self: GroupBy) => GroupBy; (self: GroupBy, n: number): GroupBy; }; /** * Constructs a `GroupBy` from a `Stream`. * * @since 1.0.0 * @category constructors */ export declare const make: (grouped: Stream.Stream>]>) => GroupBy; //# sourceMappingURL=GroupBy.d.ts.map