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

Function importedFile

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

Source from the content-addressed store, hash-verified

2952 const js = /\.(?:[cm]?[jt]sx?)$/.test(file);
2953 const language: Language = /\.tsx$/.test(file) ? 'tsx' : /\.[cm]?ts$/.test(file) ? 'typescript' : file.endsWith('.jsx') ? 'jsx' : 'javascript';
2954 const importedFile = (local: string): string | null => {
2955 if (!js) return null;
2956 const binding = ctx.getImportMappings(file, language).find((m) => m.localName === local);
2957 return binding ? resolveImportPath(binding.source, file, language, ctx) : null;
2958 };
2959 let decls: Node[] = [];
2960 if (owner === null) {
2961 decls = declaredIn(file);

Callers 1

constantEventNameFunction · 0.85

Calls 2

resolveImportPathFunction · 0.90
getImportMappingsMethod · 0.80

Tested by

no test coverage detected