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

Function forEachDescendantOfKind

test/fixtures/snapshot/typescript.js:138905–138912  ·  view source on GitHub ↗
(node, kind, action)

Source from the content-addressed store, hash-verified

138903 }
138904 Core.getReferenceEntriesForShorthandPropertyAssignment = getReferenceEntriesForShorthandPropertyAssignment;
138905 function forEachDescendantOfKind(node, kind, action) {
138906 ts.forEachChild(node, function (child) {
138907 if (child.kind === kind) {
138908 action(child);
138909 }
138910 forEachDescendantOfKind(child, kind, action);
138911 });
138912 }
138913 /** Get `C` given `N` if `N` is in the position `class C extends N` or `class C extends foo.N` where `N` is an identifier. */
138914 function tryGetClassByExtendingIdentifier(node) {
138915 return ts.tryGetClassExtendingExpressionWithTypeArguments(ts.climbPastPropertyAccess(node).parent);

Callers 2

Calls 2

actionFunction · 0.85
forEachChildMethod · 0.80

Tested by

no test coverage detected