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

Function forEachEnclosingClass

test/fixtures/snapshot/typescript.js:86196–86206  ·  view source on GitHub ↗
(node, callback)

Source from the content-addressed store, hash-verified

86194 return node.parent.kind === 228 /* SyntaxKind.ExpressionWithTypeArguments */;
86195 }
86196 function forEachEnclosingClass(node, callback) {
86197 var result;
86198 while (true) {
86199 node = ts.getContainingClass(node);
86200 if (!node)
86201 break;
86202 if (result = callback(node))
86203 break;
86204 }
86205 return result;
86206 }
86207 function isNodeUsedDuringClassInitialization(node) {
86208 return !!ts.findAncestor(node, function (element) {
86209 if (ts.isConstructorDeclaration(element) && ts.nodeIsPresent(element.body) || ts.isPropertyDeclaration(element)) {

Callers 2

isNodeWithinClassFunction · 0.85

Calls 1

callbackFunction · 0.70

Tested by

no test coverage detected