* Load tsconfig.json if it exists * @param {string} tsConfigPath - Path to tsconfig.json * @returns {object|null} - Parsed tsconfig or null
(tsConfigPath)
| 8 | * @returns {object|null} - Parsed tsconfig or null |
| 9 | */ |
| 10 | function loadTsConfig(tsConfigPath) { |
| 11 | if (!fs.existsSync(tsConfigPath)) { |
| 12 | return null |
| 13 | } |
| 14 | |
| 15 | try { |
| 16 | const tsConfigContent = fs.readFileSync(tsConfigPath, 'utf8') |
| 17 | return JSON.parse(tsConfigContent) |
| 18 | } catch (err) { |
| 19 | return null |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * Resolve TypeScript path alias to actual file path |
no outgoing calls
no test coverage detected