(filePath: string)
| 133 | } |
| 134 | |
| 135 | function languageForFile(filePath: string): Language { |
| 136 | if (filePath.endsWith('.tsx')) return 'tsx'; |
| 137 | if (filePath.endsWith('.jsx')) return 'jsx'; |
| 138 | if (/\.(?:ts|mts|cts)$/.test(filePath)) return 'typescript'; |
| 139 | return 'javascript'; |
| 140 | } |
| 141 | |
| 142 | // ============================================================================= |
| 143 | // Reading the routes |