Deno.formatDiagnostics
UNSTABLE: new API, yet to be vetted.
Format an array of diagnostic items and return them as a single string in a user friendly format. If there are no diagnostics then it will return an empty string.
const { diagnostics } = await Deno.emit("file_with_compile_issues.ts");
console.table(diagnostics); // Prints raw diagnostic data
console.log(Deno.formatDiagnostics(diagnostics)); // User friendly output of diagnostics
console.log(Deno.formatDiagnostics([])); // An empty string
§
formatDiagnostics(diagnostics: Diagnostic[]): string
[src]§Parameters
§
diagnostics: Diagnostic[]
[src]An array of diagnostic items to format