Returns the element in the source that has the minimum value according to the comparer.
Type of items in the source.
Comparer function to determine the minimum value.
Collector that returns the element in the source that has the minimum value according to the comparer.
const result = minBy<number>((a, b) => a - b)([1, 2, 3]);console.log(result); // 1 Copy
const result = minBy<number>((a, b) => a - b)([1, 2, 3]);console.log(result); // 1
Returns the element in the source that has the minimum value according to the comparer.