Skip to content

Commit 9df64ef

Browse files
committed
check for exported type name for conflict
1 parent 111b73a commit 9df64ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30078,7 +30078,7 @@ namespace ts {
3007830078
}
3007930079

3008030080
function checkAliasSymbol(node: ImportEqualsDeclaration | ImportClause | NamespaceImport | ImportSpecifier | ExportSpecifier) {
30081-
const symbol = getSymbolOfNode(node);
30081+
let symbol = getSymbolOfNode(node);
3008230082
const target = resolveAlias(symbol);
3008330083

3008430084
const shouldSkipWithJSExpandoTargets = symbol.flags & SymbolFlags.Assignment;
@@ -30089,6 +30089,7 @@ namespace ts {
3008930089
// Based on symbol.flags we can compute a set of excluded meanings (meaning that resolved alias should not have,
3009030090
// otherwise it will conflict with some local declaration). Note that in addition to normal flags we include matching SymbolFlags.Export*
3009130091
// in order to prevent collisions with declarations that were exported from the current module (they still contribute to local names).
30092+
symbol = getMergedSymbol(symbol.exportSymbol || symbol);
3009230093
const excludedMeanings =
3009330094
(symbol.flags & (SymbolFlags.Value | SymbolFlags.ExportValue) ? SymbolFlags.Value : 0) |
3009430095
(symbol.flags & SymbolFlags.Type ? SymbolFlags.Type : 0) |

0 commit comments

Comments
 (0)