Handle alias symbols in getTypeOfDottedName

This commit is contained in:
Anders Hejlsberg 2019-09-26 17:24:14 -07:00
parent 0595d61606
commit a13f8621c2

View File

@ -17205,7 +17205,7 @@ namespace ts {
if (!(node.flags & NodeFlags.InWithStatement)) {
switch (node.kind) {
case SyntaxKind.Identifier:
const symbol = getResolvedSymbol(<Identifier>node);
const symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(<Identifier>node));
return getExplicitTypeOfSymbol(symbol.flags & SymbolFlags.Alias ? resolveAlias(symbol) : symbol);
case SyntaxKind.ThisKeyword:
return getExplicitThisType(node);