//#region src/math/min.d.ts /** * Finds the smallest number in an iterable, in a single pass and without * materializing an intermediate array — so it works on lazy sequences * (generators, `Set`s, …) and stays correct where `Math.min(...array)` breaks: * it never overflows the argument/stack limit on large inputs, and returns * `undefined` (rather than `Infinity`) for an empty input. * * To find the element with the smallest *derived* value instead, use * `array/minBy`, which returns the element rather than the number. * @param items - The iterable of numbers to scan. Not mutated. * @returns The smallest number, or `undefined` if `items` is empty. * @example * // Smallest of an array * min([3, 1, 4, 1, 5]); * // 1 * @example * // Works on any iterable * min(new Set([10, 20, 30])); * // 10 * @example * // Empty input returns `undefined` * min([]); * // undefined */ declare const min: (items: Iterable) => number | undefined; //#endregion export { min };