(symbol, isPrivate, propertyAsAlias)
| 54318 | } |
| 54319 | } |
| 54320 | function serializeSymbol(symbol, isPrivate, propertyAsAlias) { |
| 54321 | // cache visited list based on merged symbol, since we want to use the unmerged top-level symbol, but |
| 54322 | // still skip reserializing it if we encounter the merged product later on |
| 54323 | var visitedSym = getMergedSymbol(symbol); |
| 54324 | if (visitedSymbols.has(getSymbolId(visitedSym))) { |
| 54325 | return; // Already printed |
| 54326 | } |
| 54327 | visitedSymbols.add(getSymbolId(visitedSym)); |
| 54328 | // Only actually serialize symbols within the correct enclosing declaration, otherwise do nothing with the out-of-context symbol |
| 54329 | var skipMembershipCheck = !isPrivate; // We only call this on exported symbols when we know they're in the correct scope |
| 54330 | if (skipMembershipCheck || (!!ts.length(symbol.declarations) && ts.some(symbol.declarations, function (d) { return !!ts.findAncestor(d, function (n) { return n === enclosingDeclaration; }); }))) { |
| 54331 | var oldContext = context; |
| 54332 | context = cloneNodeBuilderContext(context); |
| 54333 | var result = serializeSymbolWorker(symbol, isPrivate, propertyAsAlias); |
| 54334 | if (context.reportedDiagnostic) { |
| 54335 | oldcontext.reportedDiagnostic = context.reportedDiagnostic; // hoist diagnostic result into outer context |
| 54336 | } |
| 54337 | context = oldContext; |
| 54338 | return result; |
| 54339 | } |
| 54340 | } |
| 54341 | // Synthesize declarations for a symbol - might be an Interface, a Class, a Namespace, a Type, a Variable (const, let, or var), an Alias |
| 54342 | // or a merge of some number of those. |
| 54343 | // An interesting challenge is ensuring that when classes merge with namespaces and interfaces, is keeping |
no test coverage detected
searching dependent graphs…