Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/deno/cli/js/lib.deno.unstable.d.ts>Deno.formatDiagnostics

A modern runtime for JavaScript and TypeScript.
Go to Latest
function Deno.formatDiagnostics
import { Deno } from "https://deno.land/x/deno@v1.0.0/cli/js/lib.deno.unstable.d.ts";
const { formatDiagnostics } = Deno;

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.

  const [diagnostics, result] = Deno.compile("file_with_compile_issues.ts");
  console.table(diagnostics);  // Prints raw diagnostic data
  console.log(Deno.formatDiagnostics(diagnostics));  // User friendly output of diagnostics

Parameters

An array of diagnostic items to format

Returns

string