| 2832 | // module, which only its file shows; read each file once. |
| 2833 | const sources = new Map<string, string | undefined>(); |
| 2834 | const sourceOf = (filePath: string): string | undefined => { |
| 2835 | if (!sources.has(filePath)) { |
| 2836 | try { sources.set(filePath, fs.readFileSync(path.join(projectPath, filePath), 'utf-8')); } catch { sources.set(filePath, undefined); } |
| 2837 | } |
| 2838 | return sources.get(filePath); |
| 2839 | }; |
| 2840 | const collected = groups.map((group) => { |
| 2841 | const focus = group[0]!; |
| 2842 | const hierarchy = buildTypeHierarchy(cg, focus, { overrides: false }); |