-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specificallyDomain: Symbol NavigationRelates to go-to-definition, find-all-references, highlighting/occurrences.Relates to go-to-definition, find-all-references, highlighting/occurrences.Effort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Fix AvailableA PR has been opened for this issueA PR has been opened for this issueVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
Milestone
Description
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
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specificallyDomain: Symbol NavigationRelates to go-to-definition, find-all-references, highlighting/occurrences.Relates to go-to-definition, find-all-references, highlighting/occurrences.Effort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Fix AvailableA PR has been opened for this issueA PR has been opened for this issueVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue