(root: string, files: Record<string, string>)
| 31 | }); |
| 32 | |
| 33 | function write(root: string, files: Record<string, string>): void { |
| 34 | for (const [rel, content] of Object.entries(files)) { |
| 35 | const file = path.join(root, rel); |
| 36 | fs.mkdirSync(path.dirname(file), { recursive: true }); |
| 37 | fs.writeFileSync(file, content); |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | async function index(files: Record<string, string>): Promise<{ graph: CodeGraph; root: string }> { |
| 42 | const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-ts-declared-callbacks-')); |
no test coverage detected