declare function forEach( arr: T[], callback: (this: This, value: T, index: number, array: T[]) => void, thisArg?: This, ): void; declare function forEach( arr: ArrayLike, callback: (this: This, value: T, index: number, array: ArrayLike) => void, thisArg?: This, ): void; declare function forEach( obj: Record, callback: (this: This, value: V, key: K, obj: Record) => void, thisArg?: This, ): void; declare function forEach( str: string, callback: (this: This, value: string, index: number, str: string) => void, thisArg: This, ): void; export = forEach;