Merge pull request #21900 from Microsoft/fix21620

Fix emit when binder treats exported const as namespace
This commit is contained in:
Ron Buckton
2018-02-12 13:34:54 -08:00
committed by GitHub
5 changed files with 66 additions and 1 deletions

View File

@@ -25054,7 +25054,7 @@ namespace ts {
// we prefix depends on the kind of entity. SymbolFlags.ExportHasLocal encompasses all the
// kinds that we do NOT prefix.
const exportSymbol = getMergedSymbol(symbol.exportSymbol);
if (!prefixLocals && exportSymbol.flags & SymbolFlags.ExportHasLocal) {
if (!prefixLocals && exportSymbol.flags & SymbolFlags.ExportHasLocal && !(exportSymbol.flags & SymbolFlags.Variable)) {
return undefined;
}
symbol = exportSymbol;