(symbol)
| 54513 | } |
| 54514 | } |
| 54515 | function includePrivateSymbol(symbol) { |
| 54516 | if (ts.some(symbol.declarations, ts.isParameterDeclaration)) |
| 54517 | return; |
| 54518 | ts.Debug.assertIsDefined(deferredPrivatesStack[deferredPrivatesStack.length - 1]); |
| 54519 | getUnusedName(ts.unescapeLeadingUnderscores(symbol.escapedName), symbol); // Call to cache unique name for symbol |
| 54520 | // Blanket moving (import) aliases into the root private context should work, since imports are not valid within namespaces |
| 54521 | // (so they must have been in the root to begin with if they were real imports) cjs `require` aliases (an upcoming feature) |
| 54522 | // will throw a wrench in this, since those may have been nested, but we'll need to synthesize them in the outer scope |
| 54523 | // anyway, as that's the only place the import they translate to is valid. In such a case, we might need to use a unique name |
| 54524 | // for the moved import; which hopefully the above `getUnusedName` call should produce. |
| 54525 | var isExternalImportAlias = !!(symbol.flags & 2097152 /* SymbolFlags.Alias */) && !ts.some(symbol.declarations, function (d) { |
| 54526 | return !!ts.findAncestor(d, ts.isExportDeclaration) || |
| 54527 | ts.isNamespaceExport(d) || |
| 54528 | (ts.isImportEqualsDeclaration(d) && !ts.isExternalModuleReference(d.moduleReference)); |
| 54529 | }); |
| 54530 | deferredPrivatesStack[isExternalImportAlias ? 0 : (deferredPrivatesStack.length - 1)].set(getSymbolId(symbol), symbol); |
| 54531 | } |
| 54532 | function isExportingScope(enclosingDeclaration) { |
| 54533 | return ((ts.isSourceFile(enclosingDeclaration) && (ts.isExternalOrCommonJsModule(enclosingDeclaration) || ts.isJsonSourceFile(enclosingDeclaration))) || |
| 54534 | (ts.isAmbientModule(enclosingDeclaration) && !ts.isGlobalScopeAugmentation(enclosingDeclaration))); |
no test coverage detected
searching dependent graphs…