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