File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -356,10 +356,19 @@ namespace ts {
356
356
}
357
357
358
358
function createConfigFileCache ( host : CompilerHost ) {
359
- const cache = createFileMap < ParsedCommandLine > ( ) ;
359
+ const cache = createFileMap < ParsedCommandLine | "error" > ( ) ;
360
360
const configParseHost = parseConfigHostFromCompilerHost ( host ) ;
361
361
362
+ function isParsedCommandLine ( value : ParsedCommandLine | "error" ) : value is ParsedCommandLine {
363
+ return ! ( value as "error" ) . length ;
364
+ }
365
+
362
366
function parseConfigFile ( configFilePath : ResolvedConfigFileName ) {
367
+ const value = cache . getValueOrUndefined ( configFilePath ) ;
368
+ if ( value ) {
369
+ return isParsedCommandLine ( value ) ? value : undefined ;
370
+ }
371
+
363
372
const sourceFile = host . getSourceFile ( configFilePath , ScriptTarget . JSON ) as JsonSourceFile ;
364
373
if ( sourceFile === undefined ) {
365
374
return undefined ;
You can’t perform that action at this time.
0 commit comments