( diags: ReadonlyArray<ts.Diagnostic>, host: ts.FormatDiagnosticsHost = defaultFormatHost, )
| 30 | }; |
| 31 | |
| 32 | export function formatDiagnostics( |
| 33 | diags: ReadonlyArray<ts.Diagnostic>, |
| 34 | host: ts.FormatDiagnosticsHost = defaultFormatHost, |
| 35 | ): string { |
| 36 | if (diags && diags.length) { |
| 37 | return diags |
| 38 | .map((diagnostic) => |
| 39 | replaceTsWithNgInErrors(ts.formatDiagnosticsWithColorAndContext([diagnostic], host)), |
| 40 | ) |
| 41 | .join(''); |
| 42 | } else { |
| 43 | return ''; |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | /** Used to read configuration files. */ |
| 48 | export type ConfigurationHost = Pick< |
no test coverage detected
searching dependent graphs…