Have code like this:
export function someFn(errorHandler:(error:Error)=>void, ...someFns: { (...param:any[]): void; }[]);
export function someFn(someFns: { (...param:any[]): void; }[]);
export function someFn(someFns:any) {
}
class Foo {
public bar() {
someFn(
function onError() {
},
function doSomething() {
console.log(this);
}
)
}
}
Hover over "this" in line 15. The type you get is "Foo" where it actually should be "any".