Closed
Description
This code was working for me before but broken in the latest:
class A {
forEach(callback: (a: number) => void): void
forEach(callback: (a: number, b: number) => void): void
forEach(callback: (a: number, b?: number) => void): void {
}
}
const a = new A();
a.forEach((a, b)=> { // Parameter 'a' and 'b' implicitly has an 'any' type
})