(files: Record<string, string>)
| 232 | }); |
| 233 | |
| 234 | function write(files: Record<string, string>): void { |
| 235 | for (const [rel, content] of Object.entries(files)) { |
| 236 | fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true }); |
| 237 | fs.writeFileSync(path.join(root, rel), content); |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | /** `<kind> <file>` for every `imports` edge out of `file`, plus how many land on one of its own import statements. */ |
| 242 | function importsOf(file: string): { targets: string[]; ownStatements: number } { |
no test coverage detected