MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / visit

Function visit

__tests__/language-extractor-hooks.test.ts:62–73  ·  view source on GitHub ↗
(node: ts.Node)

Source from the content-addressed store, hash-verified

60 const read = new Set<string>();
61 for (const file of coreFiles()) {
62 const visit = (node: ts.Node): void => {
63 if (ts.isPropertyAccessExpression(node) && isExtractorReceiver(node.expression)) {
64 read.add(node.name.text);
65 } else if (ts.isVariableDeclaration(node) && ts.isObjectBindingPattern(node.name) &&
66 node.initializer && isExtractorReceiver(node.initializer)) {
67 for (const element of node.name.elements) {
68 const key = element.propertyName ?? element.name;
69 if (ts.isIdentifier(key)) read.add(key.text);
70 }
71 }
72 ts.forEachChild(node, visit);
73 };
74 visit(parse(file));
75 }
76 return read;

Callers 1

membersReadFunction · 0.70

Calls 2

isExtractorReceiverFunction · 0.85
addMethod · 0.45

Tested by

no test coverage detected