//#region src/Array/insertAtOr.d.ts /** * # insertAtOr * * ```ts * function Array.insertAtOr( * target: readonly T[], * idx: number, * value: NoInfer, * or: U, * ): T[] | U * ``` * * Inserts `value` at the specified `index` in `array`, returning a new array with the inserted element, or `fallback` if the index is out of bounds. * * ## Example * * ```ts [data-first] * import { Array } from "@monstermann/array"; * * Array.insertAtOr([1, 2, 3], 10, 99, []); // [] * ``` * * ```ts [data-last] * import { Array } from "@monstermann/array"; * * pipe([1, 2, 3], Array.insertAtOr(10, 99, [])); // [] * ``` * */ declare const insertAtOr: { (idx: number, value: NoInfer, or: U): (target: readonly T[]) => T[] | U; (target: readonly T[], idx: number, value: NoInfer, or: U): T[] | U; }; //#endregion export { insertAtOr };