(files: Record<string, string>)
| 31 | } |
| 32 | |
| 33 | async function indexProject(files: Record<string, string>): Promise<{ cg: CodeGraph; root: string }> { |
| 34 | const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-const-alias-')); |
| 35 | roots.push(root); |
| 36 | write(root, files); |
| 37 | const cg = await CodeGraph.init(root, { index: true }); |
| 38 | graphs.push(cg); |
| 39 | return { cg, root }; |
| 40 | } |
| 41 | |
| 42 | /** What the alias named `name` in `file` links on to: `<file>:<qualified name>`, sorted. */ |
| 43 | function aliasTargets(cg: CodeGraph, file: string, name: string): string[] { |
no test coverage detected