MCPcopy Create free account
hub / github.com/nodejs/node / traverseWithoutCrossingFunction

Function traverseWithoutCrossingFunction

test/fixtures/snapshot/typescript.js:135904–135909  ·  view source on GitHub ↗
(node, cb)

Source from the content-addressed store, hash-verified

135902 }
135903 // Do not cross function/class/interface/module/type boundaries.
135904 function traverseWithoutCrossingFunction(node, cb) {
135905 cb(node);
135906 if (!ts.isFunctionLike(node) && !ts.isClassLike(node) && !ts.isInterfaceDeclaration(node) && !ts.isModuleDeclaration(node) && !ts.isTypeAliasDeclaration(node) && !ts.isTypeNode(node)) {
135907 ts.forEachChild(node, function (child) { return traverseWithoutCrossingFunction(child, cb); });
135908 }
135909 }
135910 function getIfElseOccurrences(ifStatement, sourceFile) {
135911 var keywords = getIfElseKeywords(ifStatement, sourceFile);
135912 var result = [];

Callers 2

getYieldOccurrencesFunction · 0.85

Calls 2

forEachChildMethod · 0.80
cbFunction · 0.50

Tested by

no test coverage detected