diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 1a20173f4c2..9546463c009 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -17205,7 +17205,7 @@ namespace ts { if (!(node.flags & NodeFlags.InWithStatement)) { switch (node.kind) { case SyntaxKind.Identifier: - const symbol = getResolvedSymbol(node); + const symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node)); return getExplicitTypeOfSymbol(symbol.flags & SymbolFlags.Alias ? resolveAlias(symbol) : symbol); case SyntaxKind.ThisKeyword: return getExplicitThisType(node);