1 | /**
|
2 | * Returns the maximum element as measured by a scoring function f. Returns the
|
3 | * first such element if there are ties.
|
4 | */
|
5 | declare 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 |
|
11 | declare namespace maxBy {}
|
12 |
|
13 | export = maxBy;
|