File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1069,10 +1069,10 @@ namespace ts {
1069
1069
const typeChecker = getDiagnosticsProducingTypeChecker ( ) ;
1070
1070
1071
1071
Debug . assert ( ! ! sourceFile . bindDiagnostics ) ;
1072
- const bindDiagnostics = sourceFile . bindDiagnostics ;
1073
1072
// 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 ) : [ ] ;
1076
1076
const fileProcessingDiagnosticsInFile = fileProcessingDiagnostics . getDiagnostics ( sourceFile . fileName ) ;
1077
1077
const programDiagnosticsInFile = programDiagnostics . getDiagnostics ( sourceFile . fileName ) ;
1078
1078
You can’t perform that action at this time.
0 commit comments