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

Function importedFile

src/resolution/callback-synthesizer.ts:3017–3021  ·  view source on GitHub ↗
(local: string)

Source from the content-addressed store, hash-verified

3015 const js = /\.(?:[cm]?[jt]sx?)$/.test(file);
3016 const language: Language = /\.tsx$/.test(file) ? 'tsx' : /\.[cm]?ts$/.test(file) ? 'typescript' : file.endsWith('.jsx') ? 'jsx' : 'javascript';
3017 const importedFile = (local: string): string | null => {
3018 if (!js) return null;
3019 const binding = ctx.getImportMappings(file, language).find((m) => m.localName === local);
3020 return binding ? resolveImportPath(binding.source, file, language, ctx) : null;
3021 };
3022 let decls: Node[] = [];
3023 if (owner === null) {
3024 decls = declaredIn(file);

Callers 1

constantEventNameFunction · 0.85

Calls 2

resolveImportPathFunction · 0.90
getImportMappingsMethod · 0.80

Tested by

no test coverage detected