//#region src/Array/maxOrThrow.d.ts /** * # maxOrThrow * * ```ts * function Array.maxOrThrow(target: readonly number[]): number * ``` * * Returns the maximum value from `array`, or throws an error if the array is empty. * * ## Example * * ```ts [data-first] * import { Array } from "@monstermann/array"; * * Array.maxOrThrow([1, 5, 3]); // 5 * Array.maxOrThrow([]); // throws FnError * ``` * * ```ts [data-last] * import { Array } from "@monstermann/array"; * * pipe([1, 5, 3], Array.maxOrThrow()); // 5 * pipe([], Array.maxOrThrow()); // throws FnError * ``` * */ declare const maxOrThrow: { (): (target: readonly number[]) => number; (target: readonly number[]): number; }; //#endregion export { maxOrThrow };