UNPKG

@thi.ng/transducers

Version:

Collection of ~170 lightweight, composable transducers, reducers, generators, iterators for functional data transformations

12 lines 514 B
import type { Comparator, Maybe } from "@thi.ng/api"; import type { Reducer } from "./api.js"; /** * Similar to {@link push}, but sorts result array upon completion using * optionally given comparator (default * [`compare`](https://docs.thi.ng/umbrella/compare/functions/compare.html)). * * @param cmp - */ export declare function pushSort<T>(cmp?: Comparator<T>): Reducer<T, T[]>; export declare function pushSort<T>(cmp: Maybe<Comparator<T>>, src: Iterable<T>): T[]; //# sourceMappingURL=push-sort.d.ts.map