We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TYPE_ONLY_IMPORT
1 parent 739906b commit 73f2f52Copy full SHA for 73f2f52
javascript/extractor/src/com/semmle/js/extractor/ASTExtractor.java
@@ -1812,7 +1812,7 @@ public Label visit(ImportDeclaration nd, Context c) {
1812
public Label visit(ImportSpecifier nd, Context c) {
1813
Label lbl = super.visit(nd, c);
1814
visit(nd.getImported(), lbl, 0, IdContext.LABEL);
1815
- visit(nd.getLocal(), lbl, 1, c.idcontext);
+ visit(nd.getLocal(), lbl, 1, nd.hasTypeKeyword() ? IdContext.TYPE_ONLY_IMPORT : c.idcontext);
1816
if (nd.hasTypeKeyword()) {
1817
trapwriter.addTuple("has_type_keyword", lbl);
1818
}
0 commit comments