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

Function builtSourceOf

src/resolution/import-resolver.ts:1645–1651  ·  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

1643
1644/** `target`, build output the index lacks, as the indexed source it is built from (see builtSourcesOf); null when there is none. */
1645function builtSourceOf(target: string, packageDir: string, language: Language, context: ResolutionContext): string | null {
1646 for (const source of builtSourcesOf(target, packageDir)) {
1647 const hit = indexedTarget(source, language, context);
1648 if (hit) return hit;
1649 }
1650 return null;
1651}
1652
1653/**
1654 * `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