Skip to content

getJSDocReturnType gets return type from @type tags #25486

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
merged 4 commits into from
Jul 6, 2018

Conversation

sandersn
Copy link
Member

@sandersn sandersn commented Jul 6, 2018

Previously, getJSDocReturnType did not check the @type tag for a type node that has a return type. Now it does.

Fixes #25424

This PR was aided by TypeScript AST Viewer. Thanks @dsherret for making it easy to write AST-wrangling code!

sandersn added 3 commits July 6, 2018 10:12
Previously, getJSDocReturnType did not check the `@type` tag for a type
node that has a return type. Now it does.
@sandersn sandersn requested review from mhegazy and a user July 6, 2018 17:23
@@ -6572,45 +6585,6 @@ namespace ts {
return !!(node as HasType).type;
}

/* True if the node could have a type node a `.type` */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I discovered this function was unused and deleted it along the way.

@sandersn sandersn merged commit 6589e86 into master Jul 6, 2018
@sandersn sandersn deleted the jsdoc/get-return-type-from-type-tags branch July 6, 2018 17:46
@dsherret
Copy link
Contributor

dsherret commented Jul 6, 2018

@sandersn cool, I'm very happy it's useful for you! 😄

By the way, I will try to add typescript@next in the options soon.

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.

3 participants