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