Skip to content
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

Resolve more jsdoc value references as types #34515

Merged
merged 2 commits into from
Oct 17, 2019

Conversation

sandersn
Copy link
Member

@sandersn sandersn commented Oct 16, 2019

  1. Make detection of require calls smarter.
  2. When the reference is not to the result of a require call, use the type of the value instead. This is similar to pre-3.7 behaviour.

Fixes #33106

Copy link
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

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

Honestly wish we could do away with the value fallback stuff entirely at some point though. Alas. :(

@sandersn
Copy link
Member Author

I mean, we need something, but a value fallback is probably a backward way of looking at "in JS, we wish that more values had associated types".

@sandersn sandersn merged commit f5dbcb7 into master Oct 17, 2019
@sandersn sandersn deleted the resolve-more-jsdoc-types-as-values branch October 17, 2019 18:21
@weswigham
Copy link
Member

Right - which, generally, probably means binding way more assignments as aliases, if possible.

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.

stricter jsdoc type resolution causes weird behaviour for value-only declarations
2 participants