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