File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1071,8 +1071,8 @@ namespace ts {
10711071 Debug . assert ( ! ! sourceFile . bindDiagnostics ) ;
10721072 // For JavaScript files, we don't want to report semantic errors unless explicitly requested.
10731073 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 ;
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