import type { Pipeable } from "./Pipeable.js"; import type { Predicate } from "./Predicate.js"; import type * as Queue from "./Queue.js"; import type * as Stream from "./Stream.js"; import type * as Take from "./Take.js"; import type { Covariant, NoInfer } from "./Types.js"; /** * @since 2.0.0 * @category symbols */ export declare const GroupByTypeId: unique symbol; /** * @since 2.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 2.0.0 * @category models */ export interface GroupBy extends GroupBy.Variance, Pipeable { readonly grouped: Stream.Stream>], E, R>; } /** * @since 2.0.0 */ export declare namespace GroupBy { /** * @since 2.0.0 * @category models */ interface Variance { readonly [GroupByTypeId]: { readonly _K: Covariant; readonly _V: Covariant; readonly _E: Covariant; readonly _R: Covariant; }; } } /** * Run the function across all groups, collecting the results in an * arbitrary order. * * @since 2.0.0 * @category destructors */ export declare const evaluate: { /** * Run the function across all groups, collecting the results in an * arbitrary order. * * @since 2.0.0 * @category destructors */ (f: (key: K, stream: Stream.Stream) => Stream.Stream, options?: { readonly bufferSize?: number | undefined; } | undefined): (self: GroupBy) => Stream.Stream; /** * Run the function across all groups, collecting the results in an * arbitrary order. * * @since 2.0.0 * @category destructors */ (self: GroupBy, f: (key: K, stream: Stream.Stream) => Stream.Stream, options?: { readonly bufferSize?: number | undefined; } | undefined): Stream.Stream; }; /** * Filter the groups to be processed. * * @since 2.0.0 * @category utils */ export declare const filter: { /** * Filter the groups to be processed. * * @since 2.0.0 * @category utils */ (predicate: Predicate>): (self: GroupBy) => GroupBy; /** * Filter the groups to be processed. * * @since 2.0.0 * @category utils */ (self: GroupBy, predicate: Predicate): GroupBy; }; /** * Only consider the first `n` groups found in the `Stream`. * * @since 2.0.0 * @category utils */ export declare const first: { /** * Only consider the first `n` groups found in the `Stream`. * * @since 2.0.0 * @category utils */ (n: number): (self: GroupBy) => GroupBy; /** * Only consider the first `n` groups found in the `Stream`. * * @since 2.0.0 * @category utils */ (self: GroupBy, n: number): GroupBy; }; /** * Constructs a `GroupBy` from a `Stream`. * * @since 2.0.0 * @category constructors */ export declare const make: (grouped: Stream.Stream>], E, R>) => GroupBy; //# sourceMappingURL=GroupBy.d.ts.map