data-collectors
Version:
A collection of composable reduction operations for arbitrary streams of values
5 lines (4 loc) • 308 B
TypeScript
import { Collector } from "../collector";
import { Comparator } from "../queries/math";
export declare function sorting<T, A, R>(comparator: Comparator<T>, collector: Collector<T, A, R>): Collector<T, T[], R>;
export declare function sorting<T, A, R>(comparator?: Comparator<T>): Collector<T, T[], T[]>;