MCPcopy Create free account
hub / github.com/angular/angular / explore

Function explore

packages/language-service/src/utils/ts_utils.ts:48–53  ·  view source on GitHub ↗
(currNode: ts.Node)

Source from the content-addressed store, hash-verified

46export function findAllMatchingNodes<T extends ts.Node>(root: ts.Node, opts: FindOptions<T>): T[] {
47 const matches: T[] = [];
48 const explore = (currNode: ts.Node) => {
49 if (opts.filter(currNode)) {
50 matches.push(currNode);
51 }
52 currNode.forEachChild((descendent) => explore(descendent));
53 };
54 explore(root);
55 return matches;
56}

Callers 2

findAllMatchingNodesFunction · 0.85
findFirstMatchingNodeFunction · 0.85

Calls 2

filterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected