| 2980 | // module, which only its file shows; read each file once. |
| 2981 | const sources = new Map<string, string | undefined>(); |
| 2982 | const sourceOf = (filePath: string): string | undefined => { |
| 2983 | if (!sources.has(filePath)) { |
| 2984 | try { sources.set(filePath, fs.readFileSync(path.join(projectPath, filePath), 'utf-8')); } catch { sources.set(filePath, undefined); } |
| 2985 | } |
| 2986 | return sources.get(filePath); |
| 2987 | }; |
| 2988 | const collected = groups.map((group) => { |
| 2989 | const focus = group[0]!; |
| 2990 | const hierarchy = buildTypeHierarchy(cg, focus, { overrides: false }); |