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