@@ -1825,7 +1825,8 @@ namespace ts {
18251825 const options = extend ( existingOptions , parsedConfig . options || { } ) ;
18261826 options . configFilePath = configFileName && normalizeSlashes ( configFileName ) ;
18271827 setConfigFileInOptions ( options , sourceFile ) ;
1828- const { fileNames, wildcardDirectories, spec, projectReferences } = getFileNames ( ) ;
1828+ let projectReferences : ProjectReference [ ] | undefined ;
1829+ const { fileNames, wildcardDirectories, spec } = getFileNames ( ) ;
18291830 return {
18301831 options,
18311832 fileNames,
@@ -1891,21 +1892,19 @@ namespace ts {
18911892
18921893 if ( hasProperty ( raw , "references" ) && ! isNullOrUndefined ( raw . references ) ) {
18931894 if ( isArray ( raw . references ) ) {
1894- const references : ProjectReference [ ] = [ ] ;
18951895 for ( const ref of raw . references ) {
18961896 if ( typeof ref . path !== "string" ) {
18971897 createCompilerDiagnosticOnlyIfJson ( Diagnostics . Compiler_option_0_requires_a_value_of_type_1 , "reference.path" , "string" ) ;
18981898 }
18991899 else {
1900- references . push ( {
1900+ ( projectReferences || ( projectReferences = [ ] ) ) . push ( {
19011901 path : getNormalizedAbsolutePath ( ref . path , basePath ) ,
19021902 originalPath : ref . path ,
19031903 prepend : ref . prepend ,
19041904 circular : ref . circular
19051905 } ) ;
19061906 }
19071907 }
1908- result . projectReferences = references ;
19091908 }
19101909 else {
19111910 createCompilerDiagnosticOnlyIfJson ( Diagnostics . Compiler_option_0_requires_a_value_of_type_1 , "references" , "Array" ) ;
@@ -2398,7 +2397,7 @@ namespace ts {
23982397 // new entries in these paths.
23992398 const wildcardDirectories = getWildcardDirectories ( validatedIncludeSpecs , validatedExcludeSpecs , basePath , host . useCaseSensitiveFileNames ) ;
24002399
2401- const spec : ConfigFileSpecs = { filesSpecs, referencesSpecs : undefined , includeSpecs, excludeSpecs, validatedIncludeSpecs, validatedExcludeSpecs, wildcardDirectories } ;
2400+ const spec : ConfigFileSpecs = { filesSpecs, includeSpecs, excludeSpecs, validatedIncludeSpecs, validatedExcludeSpecs, wildcardDirectories } ;
24022401 return getFileNamesFromConfigSpecs ( spec , basePath , options , host , extraFileExtensions ) ;
24032402 }
24042403
@@ -2469,16 +2468,9 @@ namespace ts {
24692468
24702469 const literalFiles = arrayFrom ( literalFileMap . values ( ) ) ;
24712470 const wildcardFiles = arrayFrom ( wildcardFileMap . values ( ) ) ;
2472- const projectReferences = spec . referencesSpecs && spec . referencesSpecs . map ( ( r ) : ProjectReference => {
2473- return {
2474- ...r ,
2475- path : getNormalizedAbsolutePath ( r . path , basePath )
2476- } ;
2477- } ) ;
24782471
24792472 return {
24802473 fileNames : literalFiles . concat ( wildcardFiles ) ,
2481- projectReferences,
24822474 wildcardDirectories,
24832475 spec
24842476 } ;
0 commit comments