| 2927 | // module, which only its file shows; read each file once. |
| 2928 | const sources = new Map<string, string | undefined>(); |
| 2929 | const sourceOf = (filePath: string): string | undefined => { |
| 2930 | if (!sources.has(filePath)) { |
| 2931 | try { sources.set(filePath, fs.readFileSync(path.join(projectPath, filePath), 'utf-8')); } catch { sources.set(filePath, undefined); } |
| 2932 | } |
| 2933 | return sources.get(filePath); |
| 2934 | }; |
| 2935 | const collected = groups.map((group) => { |
| 2936 | const focus = group[0]!; |
| 2937 | const hierarchy = buildTypeHierarchy(cg, focus, { overrides: false }); |