GroupBy
Constructors
Destructors
Run the function across all groups, collecting the results in an arbitrary order.
Signature
declare const evaluate: {
<K, V, E, A, E2, R2>(
f: (key: K, stream: Stream<V, E, never>) => Stream<A, E2, R2>,
options?: {
readonly bufferSize?: number;
},
): <R>(self: GroupBy<K, V, E, R>) => Stream<A, E | E2, R2 | R>;
<K, V, E, R, A, E2, R2>(
self: GroupBy<K, V, E, R>,
f: (key: K, stream: Stream<V, E, never>) => Stream<A, E2, R2>,
options?: {
readonly bufferSize?: number;
},
): Stream<A, E | E2, R | R2>;
};Models
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.
Signature
interface GroupBy<out K, out V, out E = never, out R = never>
extends Variance<K, V, E, R>, Pipeable {
readonly grouped: Stream<readonly [K, Dequeue<Take<V, E>>], E, R>;
}Other
Symbols
GroupByTypeId
Added in v2.0.0
Source
Signature
declare const GroupByTypeId: unique symbol;GroupByTypeId type
Added in v2.0.0
Source
Signature
type GroupByTypeId = typeof GroupByTypeId;Utils
Filter the groups to be processed.
Signature
declare const filter: {
<K>(
predicate: Predicate<NoInfer<K>>,
): <V, E, R>(self: GroupBy<K, V, E, R>) => GroupBy<K, V, E, R>;
<K, V, E, R>(self: GroupBy<K, V, E, R>, predicate: Predicate<K>): GroupBy<K, V, E, R>;
};Only consider the first n groups found in the Stream.
Signature
declare const first: {
(n: number): <K, V, E, R>(self: GroupBy<K, V, E, R>) => GroupBy<K, V, E, R>;
<K, V, E, R>(self: GroupBy<K, V, E, R>, n: number): GroupBy<K, V, E, R>;
};
Constructs a
GroupByfrom aStream.