Skip to content

Commit 8ce3888

Browse files
committed
fix(removeImportsFromReferences): exclude default import pattern from references
1 parent b78e9f8 commit 8ce3888

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

typescript/src/references.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ export default (proxy: ts.LanguageService, languageService: ts.LanguageService,
4242
let node = findChildContainingPositionMaxDepth(sourceFile, end, 6)
4343
if (!node) return true
4444
if (ts.isIdentifier(node)) node = node.parent
45-
if (approveCast(node, ts.isNamedImports, ts.isImportSpecifier, ts.isImportClause, ts.isImportEqualsDeclaration)) return false
45+
if (
46+
approveCast(node, ts.isNamedImports, ts.isImportSpecifier, ts.isImportClause, ts.isImportEqualsDeclaration, ts.isImportDeclaration)
47+
) {
48+
return false
49+
}
4650
return true
4751
}),
4852
}

0 commit comments

Comments
 (0)