1

Closed

Wrong type found for "this" in this case

description

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".
Closed Mar 1, 2013 at 5:10 PM by RyanCavanaugh
Fixed in 0.8.3.0

comments

RyanCavanaugh wrote Jan 28, 2013 at 6:40 PM

Marking active