Resolve SymbolFlags.Type only at first in jsdoc getTypeFromTypeReference#32947
Merged
weswigham merged 3 commits intomicrosoft:masterfrom Aug 19, 2019
Merged
Conversation
…lags.Value in its initial lookup instead
Member
Author
|
@RyanCavanaugh seeing as this fixes a regression from 3.5 (though I didn't open an issue for it), would we want to port this to the 3.6 final release? |
sandersn
approved these changes
Aug 19, 2019
Member
|
note specifically that exported |
Member
Author
|
@typescript-bot cherry-pick this to release-3.6 |
Collaborator
|
Hey @weswigham, I couldn't open a PR with the cherry-pick. (You can check the log here). You may need to squash and pick this PR into release-3.6 manually. |
weswigham
added a commit
to weswigham/TypeScript
that referenced
this pull request
Aug 19, 2019
This was referenced Aug 20, 2019
timsuchanek
pushed a commit
to timsuchanek/TypeScript
that referenced
this pull request
Sep 11, 2019
…nce (microsoft#32947) * Fix lookup of exported eunm type alias in local scope in JS * Fix by adjusting type lookup fallback behavior to not include SymbolFlags.Value in its initial lookup instead
DanielRosenwasser
added a commit
that referenced
this pull request
Sep 24, 2019
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.
Before falling back to
SymbolFlags.Value.Previously, by having both simultaneously at first, we'd find the local symbol of a merged const/type alias symbol, which only actually has value meaning applied to it. In normal codepaths, we'd skip over that to the export symbol of the same name, which has the intended type meaning.
This fixes a regression in the webpack user test. (When we started binding
@enumtags a typedefs, we started having merged const/type aliases with separate export/local symbols in js (just like in TS), which were previously much harder to make)