@@ -11,7 +11,7 @@ namespace ts.server {
11
11
export const maxProgramSizeForNonTsFiles = 20 * 1024 * 1024 ;
12
12
13
13
export type ProjectServiceEvent =
14
- { eventName : "context" , data : { project : Project , fileName : NormalizedPath } } | { eventName : "configFileDiag" , data : { triggerFile ? : string , configFileName : string , diagnostics : Diagnostic [ ] } } ;
14
+ { eventName : "context" , data : { project : Project , fileName : NormalizedPath } } | { eventName : "configFileDiag" , data : { triggerFile : string , configFileName : string , diagnostics : Diagnostic [ ] } } ;
15
15
16
16
export interface ProjectServiceEventHandler {
17
17
( event : ProjectServiceEvent ) : void ;
@@ -392,12 +392,12 @@ namespace ts.server {
392
392
this . throttledOperations . schedule (
393
393
project . configFileName ,
394
394
/*delay*/ 250 ,
395
- ( ) => this . handleChangeInSourceFileForConfiguredProject ( project ) ) ;
395
+ ( ) => this . handleChangeInSourceFileForConfiguredProject ( project , fileName ) ) ;
396
396
}
397
397
398
- private handleChangeInSourceFileForConfiguredProject ( project : ConfiguredProject ) {
398
+ private handleChangeInSourceFileForConfiguredProject ( project : ConfiguredProject , triggerFile : string ) {
399
399
const { projectOptions, configFileErrors } = this . convertConfigFileContentToProjectOptions ( project . configFileName ) ;
400
- this . reportConfigFileDiagnostics ( project . getProjectName ( ) , configFileErrors ) ;
400
+ this . reportConfigFileDiagnostics ( project . getProjectName ( ) , configFileErrors , triggerFile ) ;
401
401
402
402
const newRootFiles = projectOptions . files . map ( ( f => this . getCanonicalFileName ( f ) ) ) ;
403
403
const currentRootFiles = project . getRootFiles ( ) . map ( ( f => this . getCanonicalFileName ( f ) ) ) ;
@@ -434,7 +434,7 @@ namespace ts.server {
434
434
}
435
435
436
436
const { configFileErrors } = this . convertConfigFileContentToProjectOptions ( fileName ) ;
437
- this . reportConfigFileDiagnostics ( fileName , configFileErrors ) ;
437
+ this . reportConfigFileDiagnostics ( fileName , configFileErrors , fileName ) ;
438
438
439
439
this . logger . info ( `Detected newly added tsconfig file: ${ fileName } ` ) ;
440
440
this . reloadProjects ( ) ;
@@ -757,7 +757,7 @@ namespace ts.server {
757
757
return project ;
758
758
}
759
759
760
- private reportConfigFileDiagnostics ( configFileName : string , diagnostics : Diagnostic [ ] , triggerFile ? : string ) {
760
+ private reportConfigFileDiagnostics ( configFileName : string , diagnostics : Diagnostic [ ] , triggerFile : string ) {
761
761
if ( ! this . eventHandler ) {
762
762
return ;
763
763
}
0 commit comments