diff --git a/types/forEach.d.ts b/types/forEach.d.ts index 90b1ac8..5065e86 100644 --- a/types/forEach.d.ts +++ b/types/forEach.d.ts @@ -3,3 +3,5 @@ import { Placeholder } from './util/tools'; export function forEach(fn: (x: T) => void): (list: U) => U; export function forEach(__: Placeholder, list: U): (fn: (x: U extends readonly (infer T)[] ? T : never) => void) => U; export function forEach(fn: (x: U extends readonly (infer T)[] ? T : never) => void, list: U): U; +// this last one is for addIndex(forEach) +export function forEach(fn: (item: T) => void, list: readonly T[]): T[];