(files: Record<string, string>)
| 21 | let cg: CodeGraph | null = null; |
| 22 | |
| 23 | async function index(files: Record<string, string>): Promise<void> { |
| 24 | tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-import-scope-')); |
| 25 | for (const [rel, content] of Object.entries(files)) { |
| 26 | const abs = path.join(tempDir, rel); |
| 27 | fs.mkdirSync(path.dirname(abs), { recursive: true }); |
| 28 | fs.writeFileSync(abs, content); |
| 29 | } |
| 30 | cg = await CodeGraph.init(tempDir, { index: true }); |
| 31 | } |
| 32 | |
| 33 | /** The calls made by the function or method with this qualified name, as `kind qualifiedName (file:line)`. */ |
| 34 | function callsFrom(qualifiedName: string): string[] { |
no test coverage detected