File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1071,8 +1071,8 @@ namespace ts {
1071
1071
Debug . assert ( ! ! sourceFile . bindDiagnostics ) ;
1072
1072
// For JavaScript files, we don't want to report semantic errors unless explicitly requested.
1073
1073
const includeBindAndCheckDiagnostics = ! isSourceFileJavaScript ( sourceFile ) || isCheckJsEnabledForFile ( sourceFile , options ) ;
1074
- const bindDiagnostics = includeBindAndCheckDiagnostics ? sourceFile . bindDiagnostics : [ ] ;
1075
- const checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker . getDiagnostics ( sourceFile , cancellationToken ) : [ ] ;
1074
+ const bindDiagnostics = includeBindAndCheckDiagnostics ? sourceFile . bindDiagnostics : emptyArray ;
1075
+ const checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker . getDiagnostics ( sourceFile , cancellationToken ) : emptyArray ;
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