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