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