| 162 | * Simplified node type index file resolution. |
| 163 | */ |
| 164 | const getFileFromModulePath = (project: tsm.Project, modulePath: string) => { |
| 165 | let file = project.getSourceFile(`${modulePath}.ts`); |
| 166 | if (!file) { |
| 167 | file = project.getSourceFile(`${modulePath}.tsx`); |
| 168 | } |
| 169 | if (!file) { |
| 170 | file = project.getSourceFile(`${modulePath}/index.ts`); |
| 171 | } |
| 172 | if (!file) { |
| 173 | file = project.getSourceFile(`${modulePath}/index.tsx`); |
| 174 | } |
| 175 | return file; |
| 176 | }; |
| 177 | |
| 178 | const _forget = new Set<tsm.ImportTypeNode>(); |
| 179 | |