Skip to content

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

Merged
3 commits merged into from
Aug 7, 2018
Merged

Conversation

ghost
Copy link

@ghost ghost commented Jul 26, 2018

Fixes #25933

@ghost ghost force-pushed the goToTypeDef_returnType branch from b6f8c92 to a8230d3 Compare July 26, 2018 00:49
@ghost ghost requested review from DanielRosenwasser, mhegazy and sheetalkamat July 26, 2018 00:49
@@ -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
Copy link
Member

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",
Copy link
Member

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

Copy link
Member

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.

@ghost
Copy link
Author

ghost commented Aug 6, 2018

@sheetalkamat Please re-review

f4: "I",
f5: ["I", "J"],
f6: ["I", "J"],
f7: [],
Copy link
Member

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 ?

@ghost ghost merged commit 794f3a5 into master Aug 7, 2018
@ghost ghost deleted the goToTypeDef_returnType branch August 7, 2018 19:54
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant