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

Function getTargets

__tests__/kotlin-lambda-receiver.test.ts:81–85  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

79});
80
81const getTargets = (file: string) => {
82 const ids = cg.getNodesInFile(file).map((n) => n.id);
83 return [...new Set(cg.getOutgoingEdgesFrom(ids).filter((e) => e.kind === 'calls')
84 .map((e) => cg.getNode(e.target)!).filter((t) => t.name === 'get').map((t) => t.qualifiedName))];
85};
86
87describe('Kotlin lambda receivers', () => {
88 it('a lambda passed through a typealiased function type runs on its receiver', () => {

Callers 1

Calls 4

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

Tested by

no test coverage detected