Skip to content

Commit 4145fef

Browse files
committed
Ensure that when import/export are used natively in the JS runtime that the check for alias symbol is re-applied - re comment in #26912
1 parent 946a14f commit 4145fef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/compiler/checker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30004,7 +30004,7 @@ namespace ts {
3000430004
function checkImportBinding(node: ImportEqualsDeclaration | ImportClause | NamespaceImport | ImportSpecifier) {
3000530005
checkCollisionWithRequireExportsInGeneratedCode(node, node.name!);
3000630006
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name!);
30007-
if (!isInJSFile(node)) {
30007+
if (!isInJSFile(node) || languageVersion < ScriptTarget.ES2020) {
3000830008
checkAliasSymbol(node);
3000930009
}
3001030010
}

0 commit comments

Comments
 (0)