( configFile: string, extendsValue: string, host: ConfigurationHost, fs: FileSystem, )
| 207 | } |
| 208 | |
| 209 | function getExtendedConfigPathWorker( |
| 210 | configFile: string, |
| 211 | extendsValue: string, |
| 212 | host: ConfigurationHost, |
| 213 | fs: FileSystem, |
| 214 | ): AbsoluteFsPath | null { |
| 215 | if (extendsValue.startsWith('.') || fs.isRooted(extendsValue)) { |
| 216 | const extendedConfigPath = host.resolve(host.dirname(configFile), extendsValue); |
| 217 | if (host.exists(extendedConfigPath)) { |
| 218 | return extendedConfigPath; |
| 219 | } |
| 220 | } else { |
| 221 | const parseConfigHost = createParseConfigHost(host, fs); |
| 222 | |
| 223 | // Path isn't a rooted or relative path, resolve like a module. |
| 224 | const {resolvedModule} = ts.nodeModuleNameResolver( |
| 225 | extendsValue, |
| 226 | configFile, |
| 227 | {moduleResolution: ts.ModuleResolutionKind.NodeNext, resolveJsonModule: true}, |
| 228 | parseConfigHost, |
| 229 | ); |
| 230 | if (resolvedModule) { |
| 231 | return absoluteFrom(resolvedModule.resolvedFileName); |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | return null; |
| 236 | } |
| 237 | |
| 238 | export interface PerformCompilationResult { |
| 239 | diagnostics: ReadonlyArray<ts.Diagnostic>; |
no test coverage detected
searching dependent graphs…