File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1069,10 +1069,10 @@ namespace ts {
10691069 const typeChecker = getDiagnosticsProducingTypeChecker ( ) ;
10701070
10711071 Debug . assert ( ! ! sourceFile . bindDiagnostics ) ;
1072- const bindDiagnostics = sourceFile . bindDiagnostics ;
10731072 // For JavaScript files, we don't want to report semantic errors unless explicitly requested.
1074- const includeCheckDiagnostics = ! isSourceFileJavaScript ( sourceFile ) || isCheckJsEnabledForFile ( sourceFile , options ) ;
1075- const checkDiagnostics = includeCheckDiagnostics ? typeChecker . getDiagnostics ( sourceFile , cancellationToken ) : [ ] ;
1073+ const includeBindAndCheckDiagnostics = ! isSourceFileJavaScript ( sourceFile ) || isCheckJsEnabledForFile ( sourceFile , options ) ;
1074+ const bindDiagnostics = includeBindAndCheckDiagnostics ? sourceFile . bindDiagnostics : [ ] ;
1075+ const checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker . getDiagnostics ( sourceFile , cancellationToken ) : [ ] ;
10761076 const fileProcessingDiagnosticsInFile = fileProcessingDiagnostics . getDiagnostics ( sourceFile . fileName ) ;
10771077 const programDiagnosticsInFile = programDiagnostics . getDiagnostics ( sourceFile . fileName ) ;
10781078
You can’t perform that action at this time.
0 commit comments