//#region src/Array/forEach.d.ts /** * # forEach * * ```ts * function Array.forEach( * target: readonly T[], * callback: ( * value: NoInfer, * index: number, * target: readonly NoInfer[], * ) => any, * ): readonly T[] * ``` * * Executes the provided `callback` function once for each element in `array` and returns the original array. * * ## Example * * ```ts [data-first] * import { Array } from "@monstermann/array"; * * Array.forEach([1, 2, 3], (x) => console.log(x)); // [1, 2, 3] * ``` * * ```ts [data-last] * import { Array } from "@monstermann/array"; * * pipe( * [1, 2, 3], * Array.forEach((x) => console.log(x)), * ); // [1, 2, 3] * ``` * */ declare const forEach: { (callback: (value: NoInfer, index: number, target: readonly NoInfer[]) => any): (target: T[]) => T[]; (callback: (value: NoInfer, index: number, target: readonly NoInfer[]) => any): (target: readonly T[]) => readonly T[]; (target: T[], callback: (value: NoInfer, index: number, target: readonly NoInfer[]) => any): T[]; (target: readonly T[], callback: (value: NoInfer, index: number, target: readonly NoInfer[]) => any): readonly T[]; }; //#endregion export { forEach };