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

Function targetsFrom

__tests__/sfc-private-declarations.test.ts:80–83  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

78});
79
80const targetsFrom = (file: string) => {
81 const ids = cg.getNodesInFile(file).map((n) => n.id);
82 return cg.getOutgoingEdgesFrom(ids).filter((e) => e.kind !== 'contains').map((e) => cg.getNode(e.target)!).map((t) => `${t.filePath}:${t.name}`);
83};
84
85describe('single-file component declarations', () => {
86 it('are private to the component', () => {

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesInFileMethod · 0.65
getOutgoingEdgesFromMethod · 0.45

Tested by

no test coverage detected