Skip to content

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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

3 participants