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

Method declaresShape

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

Source from the content-addressed store, hash-verified

4849 const fileNodes = cg.getNodesInFile(fp);
4850 const interfaces = fileNodes.filter((n) => n.kind === 'interface');
4851 const declaresShape = (n: Node) =>
4852 (n.kind === 'property' || n.kind === 'method') &&
4853 interfaces.some((i) => n.startLine >= i.startLine && n.endLine <= i.endLine);
4854 for (const n of fileNodes) if (!declaresShape(n)) names.add(n.name.toLowerCase());
4855 } catch { /* unreadable file entry — treat as uncorroborated */ }
4856 fileNameSets.set(fp, names);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected