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

Function builtSourceOf

src/resolution/import-resolver.ts:1584–1590  ·  view source on GitHub ↗

`target`, build output the index lacks, as the indexed source it is built from (see builtSourcesOf); null when there is none.

(target: string, packageDir: string, language: Language, context: ResolutionContext)

Source from the content-addressed store, hash-verified

1582
1583/** `target`, build output the index lacks, as the indexed source it is built from (see builtSourcesOf); null when there is none. */
1584function builtSourceOf(target: string, packageDir: string, language: Language, context: ResolutionContext): string | null {
1585 for (const source of builtSourcesOf(target, packageDir)) {
1586 const hit = indexedTarget(source, language, context);
1587 if (hit) return hit;
1588 }
1589 return null;
1590}
1591
1592/**
1593 * `target` as a file the index holds: as written, with the language's

Callers 2

resolveAliasedImportFunction · 0.85
declaredWorkspaceEntryFunction · 0.85

Calls 2

builtSourcesOfFunction · 0.85
indexedTargetFunction · 0.85

Tested by

no test coverage detected