TypeScript Version: 2.5.1
Code
For the JS:
function Foo() {
this.init();
}
Foo.prototype.init = function () {
// code
}
const a = new Foo();
a.init()
Expected behavior:
In the function Foo, this is the type of Foo and you can run go to definition on this.init
Actual behavior:
this is any. go to definition does not work on this.init but does on a.init
TypeScript Version: 2.5.1
Code
For the JS:
Expected behavior:
In the function
Foo,thisis the type ofFooand you can rungo to definitiononthis.initActual behavior:
thisisany.go to definitiondoes not work onthis.initbut does ona.init