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

Function refsFrom

__tests__/member-function-ref-owner.test.ts:48–51  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

46});
47
48const refsFrom = (file: string) => {
49 const ids = cg.getNodesInFile(file).map((n) => n.id);
50 return cg.getOutgoingEdgesFrom(ids).filter((e) => e.kind === 'references').map((e) => cg.getNode(e.target)!.qualifiedName);
51};
52
53describe('member values through an untyped receiver', () => {
54 it('are not a method whose owner the receiver is not named after', () => {

Calls 4

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

Tested by

no test coverage detected