MCPcopy Index your code
hub / github.com/angular/angular / formatDiagnostics

Function formatDiagnostics

packages/compiler-cli/src/perform_compile.ts:32–45  ·  view source on GitHub ↗
(
  diags: ReadonlyArray<ts.Diagnostic>,
  host: ts.FormatDiagnosticsHost = defaultFormatHost,
)

Source from the content-addressed store, hash-verified

30};
31
32export 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. */
48export type ConfigurationHost = Pick<

Callers 1

printDiagnosticsFunction · 0.90

Calls 3

replaceTsWithNgInErrorsFunction · 0.90
mapMethod · 0.80
joinMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…