-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Fix find all refs in shorthand properties for imports and exports #6376
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
return declaration.kind === SyntaxKind.ImportSpecifier || declaration.kind === SyntaxKind.ExportSpecifier; | ||
}); | ||
function isImportSpecifierSymbol(symbol: Symbol) { | ||
return (symbol.flags & SymbolFlags.Alias) && forEach(symbol.declarations, declaration => declaration.kind === SyntaxKind.ImportSpecifier); |
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.
Use getDeclarationOfKind
@DanielRosenwasser any more comments? |
would this address #3688 as well? |
Nice catch @adidahiya! I think it should. @mhegazy can you confirm that? Consider adding a document highlights test if you think it would be appropriate. I'm still not huge on the naming, but if you think it's fine, 👍 |
@mhegazy friendly ping here. would be great to have this fixed in 1.8. thanks |
this does not handle #3688. i will need to send a different PR for that one. |
Fix find all refs in shorthand properties for imports and exports
Follow up to the issue reported in #6367. the change include:
SymbolFlags.Alias
to the search ingetShorthandAssignmentValueSymbol
to avoid resolving import aliases to their target.