(container, symbol)
| 51674 | return exported && getSymbolIfSameReference(exported, container) ? fileSymbol : undefined; |
| 51675 | } |
| 51676 | function getAliasForSymbolInContainer(container, symbol) { |
| 51677 | if (container === getParentOfSymbol(symbol)) { |
| 51678 | // fast path, `symbol` is either already the alias or isn't aliased |
| 51679 | return symbol; |
| 51680 | } |
| 51681 | // Check if container is a thing with an `export=` which points directly at `symbol`, and if so, return |
| 51682 | // the container itself as the alias for the symbol |
| 51683 | var exportEquals = container.exports && container.exports.get("export=" /* InternalSymbolName.ExportEquals */); |
| 51684 | if (exportEquals && getSymbolIfSameReference(exportEquals, symbol)) { |
| 51685 | return container; |
| 51686 | } |
| 51687 | var exports = getExportsOfSymbol(container); |
| 51688 | var quick = exports.get(symbol.escapedName); |
| 51689 | if (quick && getSymbolIfSameReference(quick, symbol)) { |
| 51690 | return quick; |
| 51691 | } |
| 51692 | return ts.forEachEntry(exports, function (exported) { |
| 51693 | if (getSymbolIfSameReference(exported, symbol)) { |
| 51694 | return exported; |
| 51695 | } |
| 51696 | }); |
| 51697 | } |
| 51698 | /** |
| 51699 | * Checks if two symbols, through aliasing and/or merging, refer to the same thing |
| 51700 | */ |
no test coverage detected
searching dependent graphs…