Better fix for bogus duplicate identifier in module exports (#24491)

This commit is contained in:
Nathan Shively-Sanders authored and GitHub committed 2018-05-30 09:59:14 -07:00
1 parent fc3e88e26f
commit 22cdff59e4
4 files changed
+53 -1

No files matched your search

+1 -1
View File
@@ -20428,7 +20428,7 @@ namespace ts {
if (propType.symbol && propType.symbol.flags & SymbolFlags.Class) {
const name = prop.escapedName;
const symbol = resolveName(prop.valueDeclaration, name, SymbolFlags.Type, undefined, name, /*isUse*/ false);
if (symbol && propType.symbol !== symbol) {
if (symbol && symbol.declarations.some(d => d.kind === SyntaxKind.JSDocTypedefTag)) {
grammarErrorOnNode(symbol.declarations[0], Diagnostics.Duplicate_identifier_0, unescapeLeadingUnderscores(name));
return grammarErrorOnNode(prop.valueDeclaration, Diagnostics.Duplicate_identifier_0, unescapeLeadingUnderscores(name));
}