@@ -389,9 +389,9 @@ namespace ts.server {
389389 } ) ;
390390 }
391391
392- private getDiagnosticsWorker ( args : protocol . FileRequestArgs , selector : ( project : Project , file : string ) => Diagnostic [ ] , includeLinePosition : boolean ) {
392+ private getDiagnosticsWorker ( args : protocol . FileRequestArgs , isSemantic : boolean , selector : ( project : Project , file : string ) => Diagnostic [ ] , includeLinePosition : boolean ) {
393393 const { project, file } = this . getFileAndProject ( args ) ;
394- if ( shouldSkipSematicCheck ( project ) ) {
394+ if ( isSemantic && shouldSkipSematicCheck ( project ) ) {
395395 return [ ] ;
396396 }
397397 const scriptInfo = project . getScriptInfoForNormalizedPath ( file ) ;
@@ -492,11 +492,11 @@ namespace ts.server {
492492 }
493493
494494 private getSyntacticDiagnosticsSync ( args : protocol . SyntacticDiagnosticsSyncRequestArgs ) : protocol . Diagnostic [ ] | protocol . DiagnosticWithLinePosition [ ] {
495- return this . getDiagnosticsWorker ( args , ( project , file ) => project . getLanguageService ( ) . getSyntacticDiagnostics ( file ) , args . includeLinePosition ) ;
495+ return this . getDiagnosticsWorker ( args , /*isSemantic*/ false , ( project , file ) => project . getLanguageService ( ) . getSyntacticDiagnostics ( file ) , args . includeLinePosition ) ;
496496 }
497497
498498 private getSemanticDiagnosticsSync ( args : protocol . SemanticDiagnosticsSyncRequestArgs ) : protocol . Diagnostic [ ] | protocol . DiagnosticWithLinePosition [ ] {
499- return this . getDiagnosticsWorker ( args , ( project , file ) => project . getLanguageService ( ) . getSemanticDiagnostics ( file ) , args . includeLinePosition ) ;
499+ return this . getDiagnosticsWorker ( args , /*isSemantic*/ true , ( project , file ) => project . getLanguageService ( ) . getSemanticDiagnostics ( file ) , args . includeLinePosition ) ;
500500 }
501501
502502 private getDocumentHighlights ( args : protocol . DocumentHighlightsRequestArgs , simplifiedResult : boolean ) : protocol . DocumentHighlightsItem [ ] | DocumentHighlights [ ] {
0 commit comments