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

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

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));
}