-
Notifications
You must be signed in to change notification settings - Fork 12.8k
goToTypeDefinition: Go to function return type #25952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b6f8c92
to
a8230d3
Compare
@@ -76,7 +76,7 @@ goTo.file("/index.ts"); | |||
verify.getEmitOutput(["/dist/index.js", "/dist/index.d.ts.map", "/dist/index.d.ts"]); | |||
|
|||
verify.goToDefinition("1", "2"); // getDefinitionAndBoundSpan | |||
verify.goToType("1", "2"); // getTypeDefinitionAtPosition | |||
verify.goToType("1", "SomeType"); // getTypeDefinitionAtPosition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add test case where method returns void
verify.goToType({ | ||
f0: "I", | ||
f1: "T", | ||
f2: "I", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add test case where no return type is specified and it is inferred
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another one when
- return type is union
- inferred type is union
And while at it also test case with overload be good to have.
@sheetalkamat Please re-review |
f4: "I", | ||
f5: ["I", "J"], | ||
f6: ["I", "J"], | ||
f7: [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldnt this go to f7Def ?
…ust return the function definition.
Fixes #25933