MCPcopy Index your code
hub / github.com/nodejs/node / visitSymbolTable

Function visitSymbolTable

test/fixtures/snapshot/typescript.js:54303–54319  ·  view source on GitHub ↗
(symbolTable, suppressNewPrivateContext, propertyAsAlias)

Source from the content-addressed store, hash-verified

54301 return ts.factory.updateModifiers(node, flags);
54302 }
54303 function visitSymbolTable(symbolTable, suppressNewPrivateContext, propertyAsAlias) {
54304 if (!suppressNewPrivateContext) {
54305 deferredPrivatesStack.push(new ts.Map());
54306 }
54307 symbolTable.forEach(function (symbol) {
54308 serializeSymbol(symbol, /*isPrivate*/ false, !!propertyAsAlias);
54309 });
54310 if (!suppressNewPrivateContext) {
54311 // deferredPrivates will be filled up by visiting the symbol table
54312 // And will continue to iterate as elements are added while visited `deferredPrivates`
54313 // (As that's how a map iterator is defined to work)
54314 deferredPrivatesStack[deferredPrivatesStack.length - 1].forEach(function (symbol) {
54315 serializeSymbol(symbol, /*isPrivate*/ true, !!propertyAsAlias);
54316 });
54317 deferredPrivatesStack.pop();
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

Calls 4

serializeSymbolFunction · 0.85
popMethod · 0.80
forEachMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…