@@ -383,9 +383,9 @@ namespace ts.server {
383383 } ) ;
384384 }
385385
386- private getDiagnosticsWorker ( args : protocol . FileRequestArgs , selector : ( project : Project , file : string ) => Diagnostic [ ] , includeLinePosition : boolean ) {
386+ private getDiagnosticsWorker ( args : protocol . FileRequestArgs , isSemantic : boolean , selector : ( project : Project , file : string ) => Diagnostic [ ] , includeLinePosition : boolean ) {
387387 const { project, file } = this . getFileAndProject ( args ) ;
388- if ( shouldSkipSematicCheck ( project ) ) {
388+ if ( isSemantic && shouldSkipSematicCheck ( project ) ) {
389389 return [ ] ;
390390 }
391391 const scriptInfo = project . getScriptInfoForNormalizedPath ( file ) ;
@@ -466,11 +466,11 @@ namespace ts.server {
466466 }
467467
468468 private getSyntacticDiagnosticsSync ( args : protocol . SyntacticDiagnosticsSyncRequestArgs ) : protocol . Diagnostic [ ] | protocol . DiagnosticWithLinePosition [ ] {
469- return this . getDiagnosticsWorker ( args , ( project , file ) => project . getLanguageService ( ) . getSyntacticDiagnostics ( file ) , args . includeLinePosition ) ;
469+ return this . getDiagnosticsWorker ( args , /*isSemantic*/ false , ( project , file ) => project . getLanguageService ( ) . getSyntacticDiagnostics ( file ) , args . includeLinePosition ) ;
470470 }
471471
472472 private getSemanticDiagnosticsSync ( args : protocol . SemanticDiagnosticsSyncRequestArgs ) : protocol . Diagnostic [ ] | protocol . DiagnosticWithLinePosition [ ] {
473- return this . getDiagnosticsWorker ( args , ( project , file ) => project . getLanguageService ( ) . getSemanticDiagnostics ( file ) , args . includeLinePosition ) ;
473+ return this . getDiagnosticsWorker ( args , /*isSemantic*/ true , ( project , file ) => project . getLanguageService ( ) . getSemanticDiagnostics ( file ) , args . includeLinePosition ) ;
474474 }
475475
476476 private getDocumentHighlights ( args : protocol . DocumentHighlightsRequestArgs , simplifiedResult : boolean ) : protocol . DocumentHighlightsItem [ ] | DocumentHighlights [ ] {
0 commit comments