File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29973,7 +29973,10 @@ namespace ts {
2997329973 function checkAliasSymbol(node: ImportEqualsDeclaration | ImportClause | NamespaceImport | ImportSpecifier | ExportSpecifier) {
2997429974 const symbol = getSymbolOfNode(node);
2997529975 const target = resolveAlias(symbol);
29976- if (target !== unknownSymbol) {
29976+
29977+ const shouldSkipWithJSRequireTargets = !isInJSFile(node) && moduleKind !== ModuleKind.ES2015;
29978+
29979+ if (shouldSkipWithJSRequireTargets && target !== unknownSymbol) {
2997729980 // For external modules symbol represents local symbol for an alias.
2997829981 // This local symbol will merge any other local declarations (excluding other aliases)
2997929982 // and symbol.flags will contains combined representation for all merged declaration.
@@ -30004,9 +30007,7 @@ namespace ts {
3000430007 function checkImportBinding(node: ImportEqualsDeclaration | ImportClause | NamespaceImport | ImportSpecifier) {
3000530008 checkCollisionWithRequireExportsInGeneratedCode(node, node.name!);
3000630009 checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name!);
30007- if (!isInJSFile(node)) {
30008- checkAliasSymbol(node);
30009- }
30010+ checkAliasSymbol(node);
3001030011 }
3001130012
3001230013 function checkImportDeclaration(node: ImportDeclaration) {
You can’t perform that action at this time.
0 commit comments