//#region src/Array/findMapLastOr.d.ts /** * # findMapLastOr * * ```ts * function Array.findMapLastOr( * target: readonly T[], * predicate: ( * value: NoInfer, * index: number, * target: readonly NoInfer[], * ) => boolean, * mapper: ( * value: NoInfer, * index: number, * target: readonly NoInfer[], * ) => T, * or: V, * ): readonly T[] | V * ``` * * Finds the last element in `array` that satisfies the provided `predicate` function and applies the `mapper` function to it, returning a new array with the mapped element, or `fallback` if no element is found. * * ## Example * * ```ts [data-first] * import { Array } from "@monstermann/array"; * * Array.findMapLastOr( * [1, 2, 3, 4], * (x) => x > 10, * (x) => x * 10, * [], * ); // [] * ``` * * ```ts [data-last] * import { Array } from "@monstermann/array"; * * pipe( * [1, 2, 3, 4], * Array.findMapLastOr( * (x) => x > 10, * (x) => x * 10, * [], * ), * ); // [] * ``` * */ declare const findMapLastOr: { (predicate: (value: NoInfer, index: number, target: readonly NoInfer[]) => value is U, mapper: (value: NoInfer, index: number, target: readonly NoInfer[]) => T, or: V): (target: T[]) => T[] | V; (predicate: (value: NoInfer, index: number, target: readonly NoInfer[]) => value is U, mapper: (value: NoInfer, index: number, target: readonly NoInfer[]) => T, or: V): (target: readonly T[]) => readonly T[] | V; (predicate: (value: NoInfer, index: number, target: readonly NoInfer[]) => boolean, mapper: (value: NoInfer, index: number, target: readonly NoInfer[]) => T, or: V): (target: T[]) => T[] | V; (predicate: (value: NoInfer, index: number, target: readonly NoInfer[]) => boolean, mapper: (value: NoInfer, index: number, target: readonly NoInfer[]) => T, or: V): (target: readonly T[]) => readonly T[] | V; (target: T[], predicate: (value: NoInfer, index: number, target: readonly NoInfer[]) => value is U, mapper: (value: NoInfer, index: number, target: readonly NoInfer[]) => T, or: V): T[] | V; (target: readonly T[], predicate: (value: NoInfer, index: number, target: readonly NoInfer[]) => value is U, mapper: (value: NoInfer, index: number, target: readonly NoInfer[]) => T, or: V): readonly T[] | V; (target: T[], predicate: (value: NoInfer, index: number, target: readonly NoInfer[]) => boolean, mapper: (value: NoInfer, index: number, target: readonly NoInfer[]) => T, or: V): T[] | V; (target: readonly T[], predicate: (value: NoInfer, index: number, target: readonly NoInfer[]) => boolean, mapper: (value: NoInfer, index: number, target: readonly NoInfer[]) => T, or: V): readonly T[] | V; }; //#endregion export { findMapLastOr };