//#region src/Array/removeAtOr.d.ts /** * # removeAtOr * * ```ts * function Array.removeAtOr( * target: readonly T[], * idx: number, * or: U, * ): T[] | U * ``` * * Removes the element at index `idx` from `target` array. Supports negative indices to count from the end. If the index is out of bounds, returns the fallback value `or`. * * ## Example * * ```ts [data-first] * import { Array } from "@monstermann/array"; * * Array.removeAtOr([1, 2, 3], 1, []); // [1, 3] * Array.removeAtOr([1, 2, 3], 5, []); // [] * ``` * * ```ts [data-last] * import { Array } from "@monstermann/array"; * * pipe([1, 2, 3], Array.removeAtOr(1, [])); // [1, 3] * pipe([1, 2, 3], Array.removeAtOr(5, [])); // [] * ``` * */ declare const removeAtOr: { (idx: number, or: U): (target: readonly T[]) => T[] | U; (target: readonly T[], idx: number, or: U): T[] | U; }; //#endregion export { removeAtOr };