MCPcopy Index your code
hub / github.com/TypeScriptToLua/TypeScriptToLua / prepareDiagnosticForFormatting

Function prepareDiagnosticForFormatting

src/cli/report.ts:3–4  ·  view source on GitHub ↗
(diagnostic: ts.Diagnostic)

Source from the content-addressed store, hash-verified

1import * as ts from "typescript";
2
3export const prepareDiagnosticForFormatting = (diagnostic: ts.Diagnostic) =>
4 diagnostic.source === "typescript-to-lua" ? { ...diagnostic, code: "TL" as any } : diagnostic;
5
6export function createDiagnosticReporter(pretty: boolean, system = ts.sys): ts.DiagnosticReporter {
7 const reporter = ts.createDiagnosticReporter(system, pretty);

Callers 1

createDiagnosticReporterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected