UNPKG

315 BTypeScriptView Raw
1/**
2 * Returns the maximum element as measured by a scoring function f. Returns the
3 * first such element if there are ties.
4 */
5declare function maxBy<A, B>(
6 as: Iterable<A>,
7 f: (a: A) => B,
8 compare?: (u: B, v: B) => number | null,
9): A | null | undefined;
10
11declare namespace maxBy {}
12
13export = maxBy;