//#region src/Array/removeLastOr.d.ts /** * # removeLastOr * * ```ts * function Array.removeLastOr( * target: readonly T[], * value: NoInfer, * or: U, * ): T[] | U * ``` * * Removes the last occurrence of `value` from `target` array. If the value is not found, returns the fallback value `or`. * * ## Example * * ```ts [data-first] * import { Array } from "@monstermann/array"; * * Array.removeLastOr([1, 2, 3, 2], 2, []); // [1, 2, 3] * Array.removeLastOr([1, 2, 3], 4, []); // [] * ``` * * ```ts [data-last] * import { Array } from "@monstermann/array"; * * pipe([1, 2, 3, 2], Array.removeLastOr(2, [])); // [1, 2, 3] * pipe([1, 2, 3], Array.removeLastOr(4, [])); // [] * ``` * */ declare const removeLastOr: { (value: NoInfer, or: U): (target: readonly T[]) => T[] | U; (target: readonly T[], value: NoInfer, or: U): T[] | U; }; //#endregion export { removeLastOr };