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 1
1
/*@internal */
2
2
namespace ts {
3
- const sysFormatDiagnosticsHost : FormatDiagnosticsHost = sys ? {
3
+ const sysFormatDiagnosticsHost : FormatDiagnosticsHost | undefined = sys ? {
4
4
getCurrentDirectory : ( ) => sys . getCurrentDirectory ( ) ,
5
5
getNewLine : ( ) => sys . newLine ,
6
6
getCanonicalFileName : createGetCanonicalFileName ( sys . useCaseSensitiveFileNames )
7
- } : undefined ! ; // TODO: GH#18217
7
+ } : undefined ;
8
8
9
9
/**
10
10
* Create a function that reports error by writing to the system and handles the formating of the diagnostic
11
11
*/
12
12
export function createDiagnosticReporter ( system : System , pretty ?: boolean ) : DiagnosticReporter {
13
- const host : FormatDiagnosticsHost = system === sys ? sysFormatDiagnosticsHost : {
13
+ const host : FormatDiagnosticsHost = system === sys && sysFormatDiagnosticsHost ? sysFormatDiagnosticsHost : {
14
14
getCurrentDirectory : ( ) => system . getCurrentDirectory ( ) ,
15
15
getNewLine : ( ) => system . newLine ,
16
16
getCanonicalFileName : createGetCanonicalFileName ( system . useCaseSensitiveFileNames ) ,
You can’t perform that action at this time.
0 commit comments