UNPKG

437 BTypeScriptView Raw
1declare module "@extra-array/range" {
2import type { mapFn, compareFn } from "./_types";
3/**
4 * Finds smallest and largest entries.
5 * @param x an array
6 * @param fc compare function (a, b)
7 * @param fm map function (v, i, x)
8 * @returns [smallest, largest]
9 */
10declare function range<T, U = T>(x: Iterable<T>, fc?: compareFn<T | U>, fm?: mapFn<T, T | U>): [[number, T], [number, T]];
11export = range;
12//# sourceMappingURL=range.d.ts.map}