mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
organizeImports: Fix bug in reference-testing for renamed import (#22797)
This commit is contained in:
@@ -98,7 +98,7 @@ namespace ts.OrganizeImports {
|
||||
}
|
||||
else {
|
||||
// List of named imports
|
||||
const newElements = namedBindings.elements.filter(e => isDeclarationUsed(e.propertyName || e.name));
|
||||
const newElements = namedBindings.elements.filter(e => isDeclarationUsed(e.name));
|
||||
if (newElements.length < namedBindings.elements.length) {
|
||||
namedBindings = newElements.length
|
||||
? updateNamedImports(namedBindings, newElements)
|
||||
|
||||
Reference in New Issue
Block a user