File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -727,24 +727,24 @@ module ts {
727727 return symbol.flags & SymbolFlags.Module ? getExportsOfModule(symbol) : symbol.exports;
728728 }
729729
730- function getExportsOfModule(symbol : Symbol): SymbolTable {
731- var links = getSymbolLinks(symbol );
732- return links.resolvedExports || (links.resolvedExports = getExportsForModule(symbol ));
730+ function getExportsOfModule(moduleSymbol : Symbol): SymbolTable {
731+ var links = getSymbolLinks(moduleSymbol );
732+ return links.resolvedExports || (links.resolvedExports = getExportsForModule(moduleSymbol ));
733733 }
734734
735- function getExportsForModule(symbol : Symbol): SymbolTable {
735+ function getExportsForModule(moduleSymbol : Symbol): SymbolTable {
736736 var result: SymbolTable;
737737 var visitedSymbols: Symbol[] = [];
738- visit(symbol );
739- return result;
738+ visit(moduleSymbol );
739+ return result || moduleSymbol.exports ;
740740
741741 function visit(symbol: Symbol) {
742742 if (!contains(visitedSymbols, symbol)) {
743743 visitedSymbols.push(symbol);
744- if (!result ) {
745- result = symbol.exports;
746- }
747- else {
744+ if (symbol !== moduleSymbol ) {
745+ if (! result) {
746+ result = cloneSymbolTable(moduleSymbol.exports);
747+ }
748748 extendSymbolTable(result, symbol.exports);
749749 }
750750 forEach(symbol.declarations, node => {
You can’t perform that action at this time.
0 commit comments