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

Method declaresShape

src/mcp/tools.ts:4795–4797  ·  view source on GitHub ↗
(n: Node)

Source from the content-addressed store, hash-verified

4793 const fileNodes = cg.getNodesInFile(fp);
4794 const interfaces = fileNodes.filter((n) => n.kind === 'interface');
4795 const declaresShape = (n: Node) =>
4796 (n.kind === 'property' || n.kind === 'method') &&
4797 interfaces.some((i) => n.startLine >= i.startLine && n.endLine <= i.endLine);
4798 for (const n of fileNodes) if (!declaresShape(n)) names.add(n.name.toLowerCase());
4799 } catch { /* unreadable file entry — treat as uncorroborated */ }
4800 fileNameSets.set(fp, names);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected