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

Function targetOf

src/resolution/import-resolver.ts:2782–2782  ·  view source on GitHub ↗
(n: Node)

Source from the content-addressed store, hash-verified

2780 const set = kmpSourceSet(ref.filePath);
2781 const target = set === null ? null : kmpBuildTarget(set);
2782 const targetOf = (n: Node): string => kmpBuildTarget(kmpSourceSet(n.filePath) ?? '');
2783 if (target?.startsWith('common') || (target === null && ref.language !== 'java')) return pickClosestJvmCandidate(declarations, ref.filePath);
2784 const own = actuals.filter((n) => targetOf(n) === target);
2785 if (own.length > 0) return pickClosestJvmCandidate(own, ref.filePath);

Callers 1

pickJvmDeclarationFunction · 0.70

Calls 2

kmpBuildTargetFunction · 0.85
kmpSourceSetFunction · 0.85

Tested by

no test coverage detected