UNPKG

@types/fbjs

Version:
14 lines (11 loc) 315 B
/** * Returns the maximum element as measured by a scoring function f. Returns the * first such element if there are ties. */ declare function maxBy<A, B>( as: Iterable<A>, f: (a: A) => B, compare?: (u: B, v: B) => number | null, ): A | null | undefined; declare namespace maxBy {} export = maxBy;