-
Notifications
You must be signed in to change notification settings - Fork 12.8k
getTypeFromJSDocValueReference: handle import types #34683
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
Previously it only handled types whose declaration was from `require`, but now it handles types whose reference is an import type as well.
class C { | ||
s() { } | ||
} | ||
module.exports.C = C |
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.
This PR is needed because this line isn't treated like an alias declaration, right?
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.
Yes, and the fixup code in getTypeFromJSDocValueReference didn't handle import types before this.
@typescript-bot cherry-pick this to release-3.7 |
Component commits: 2aa257d getTypeFromJSDocValueReference: handle import types Previously it only handled types whose declaration was from `require`, but now it handles types whose reference is an import type as well.
Component commits: 2aa257d getTypeFromJSDocValueReference: handle import types Previously it only handled types whose declaration was from `require`, but now it handles types whose reference is an import type as well.
Previously it only handled types whose declaration was from `require`, but now it handles types whose reference is an import type as well.
Previously it only handled types whose declaration was from
require
, but now it handles types whose reference is an import type as well.Fixes #34671
This doesn't explain the differences in chrome-devtools-frontend, so I'm going to investigate those now.