sequency
Version:
Functional sequences for processing iterable data in JavaScript
12 lines (11 loc) • 392 B
TypeScript
import Sequence from "./Sequence";
export declare class MinBy {
/**
* Returns the minimum element by comparing the results of the given `selector` function
* for each element of the sequence or `null` if the sequence is empty.
*
* @param {(value: T) => R} selector
* @returns {T}
*/
minBy<T, R>(this: Sequence<T>, selector: (value: T) => R): T | null;
}