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

Function visitSymbol

test/fixtures/snapshot/typescript.js:47921–47950  ·  view source on GitHub ↗
(symbol)

Source from the content-addressed store, hash-verified

47919 }
47920 }
47921 function visitSymbol(symbol) {
47922 if (!symbol) {
47923 return false;
47924 }
47925 var symbolId = ts.getSymbolId(symbol);
47926 if (visitedSymbols[symbolId]) {
47927 return false;
47928 }
47929 visitedSymbols[symbolId] = symbol;
47930 if (!accept(symbol)) {
47931 return true;
47932 }
47933 var t = getTypeOfSymbol(symbol);
47934 visitType(t); // Should handle members on classes and such
47935 if (symbol.exports) {
47936 symbol.exports.forEach(visitSymbol);
47937 }
47938 ts.forEach(symbol.declarations, function (d) {
47939 // Type queries are too far resolved when we just visit the symbol's type
47940 // (their type resolved directly to the member deeply referenced)
47941 // So to get the intervening symbols, we need to check if there's a type
47942 // query node on any of the symbol's declarations and get symbols there
47943 if (d.type && d.type.kind === 181 /* SyntaxKind.TypeQuery */) {
47944 var query = d.type;
47945 var entity = getResolvedSymbol(getFirstIdentifier(query.exprName));
47946 visitSymbol(entity);
47947 }
47948 });
47949 return false;
47950 }
47951 }
47952 }
47953 ts.createGetSymbolWalker = createGetSymbolWalker;

Callers 4

getSymbolWalkerFunction · 0.85
visitTypeFunction · 0.85
visitSignatureFunction · 0.85
visitObjectTypeFunction · 0.85

Calls 5

getTypeOfSymbolFunction · 0.85
visitTypeFunction · 0.85
getResolvedSymbolFunction · 0.85
getFirstIdentifierFunction · 0.85
forEachMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…