Avoid the double-symbol trick for enums#39955
Merged
elibarzilay merged 1 commit intomicrosoft:masterfrom Aug 12, 2020
Merged
Conversation
39a980b to
22cb2e6
Compare
Nameless jsdoc typedefs have their exportedness controlled by the exportedness of the location they pull their name from. Fixes microsoft#33575.
sandersn
reviewed
Aug 12, 2020
Member
sandersn
left a comment
There was a problem hiding this comment.
One question before I sign off.
| // 1. It has an explicit name (since by default typedefs are always directly exported, either at the top level or in a container), or | ||
| if (!isJSDocEnumTag(node) && !!node.fullName) return true; | ||
| // 2. The thing a nameless typedef pulls its name from is implicitly a direct export (either by assignment or actual export flag). | ||
| const declName = getNameOfDeclaration(node); |
Member
There was a problem hiding this comment.
is the code below here only for nameless typedefs, or can declName be a node inside a jsdoc comment?
sandersn
approved these changes
Aug 12, 2020
Member
sandersn
left a comment
There was a problem hiding this comment.
I convinced myself that the last half of the new function will do the right thing, but I think there may be jsdoc-only/named typedef cases that fall through to the final return false
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.
Nameless jsdoc typedefs have their exportedness controlled by the
exportedness of the location they pull their name from.
Fixes #33575.