getTypeFromJSDocValueReference: handle import types#34683
Merged
Conversation
Previously it only handled types whose declaration was from `require`, but now it handles types whose reference is an import type as well.
weswigham
reviewed
Oct 23, 2019
| class C { | ||
| s() { } | ||
| } | ||
| module.exports.C = C |
Member
There was a problem hiding this comment.
This PR is needed because this line isn't treated like an alias declaration, right?
Member
Author
There was a problem hiding this comment.
Yes, and the fixup code in getTypeFromJSDocValueReference didn't handle import types before this.
weswigham
approved these changes
Oct 23, 2019
Member
Author
|
@typescript-bot cherry-pick this to release-3.7 |
Collaborator
typescript-bot
pushed a commit
to typescript-bot/TypeScript
that referenced
this pull request
Oct 24, 2019
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.
sandersn
pushed a commit
that referenced
this pull request
Oct 24, 2019
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.
mheiber
pushed a commit
to mheiber/TypeScript
that referenced
this pull request
Oct 25, 2019
Previously it only handled types whose declaration was from `require`, but now it handles types whose reference is an import type as well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.