File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -29973,7 +29973,10 @@ namespace ts {
29973
29973
function checkAliasSymbol(node: ImportEqualsDeclaration | ImportClause | NamespaceImport | ImportSpecifier | ExportSpecifier) {
29974
29974
const symbol = getSymbolOfNode(node);
29975
29975
const target = resolveAlias(symbol);
29976
- if (target !== unknownSymbol) {
29976
+
29977
+ const shouldSkipWithJSRequireTargets = !isInJSFile(node) && moduleKind !== ModuleKind.ES2015;
29978
+
29979
+ if (shouldSkipWithJSRequireTargets && target !== unknownSymbol) {
29977
29980
// For external modules symbol represents local symbol for an alias.
29978
29981
// This local symbol will merge any other local declarations (excluding other aliases)
29979
29982
// and symbol.flags will contains combined representation for all merged declaration.
@@ -30004,9 +30007,7 @@ namespace ts {
30004
30007
function checkImportBinding(node: ImportEqualsDeclaration | ImportClause | NamespaceImport | ImportSpecifier) {
30005
30008
checkCollisionWithRequireExportsInGeneratedCode(node, node.name!);
30006
30009
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name!);
30007
- if (!isInJSFile(node)) {
30008
- checkAliasSymbol(node);
30009
- }
30010
+ checkAliasSymbol(node);
30010
30011
}
30011
30012
30012
30013
function checkImportDeclaration(node: ImportDeclaration) {
You can’t perform that action at this time.
0 commit comments