(program: ts.Program)
| 233 | } |
| 234 | |
| 235 | export function getProjectRoot(program: ts.Program): string { |
| 236 | // Try to get the directory the tsconfig is in |
| 237 | const tsConfigPath = program.getCompilerOptions().configFilePath; |
| 238 | // If no tsconfig is known, use common source directory |
| 239 | return tsConfigPath ? path.dirname(tsConfigPath) : program.getCommonSourceDirectory(); |
| 240 | } |
no test coverage detected