We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TSTL<code>
1 parent f0e82ce commit f78e0d0Copy full SHA for f78e0d0
src/tstl.ts
@@ -6,7 +6,14 @@ import * as CommandLineParser from "./CommandLineParser";
6
import * as cliDiagnostics from "./diagnostics";
7
8
function createDiagnosticReporter(pretty: boolean): ts.DiagnosticReporter {
9
- return (ts as any).createDiagnosticReporter(ts.sys, pretty);
+ const reporter: ts.DiagnosticReporter = (ts as any).createDiagnosticReporter(ts.sys, pretty);
10
+ return diagnostic => {
11
+ if (diagnostic.source === "typescript-to-lua") {
12
+ diagnostic = { ...diagnostic, code: ("TL" + diagnostic.code) as any };
13
+ }
14
+
15
+ reporter(diagnostic);
16
+ };
17
}
18
19
function createWatchStatusReporter(options?: ts.CompilerOptions): ts.WatchStatusReporter {
0 commit comments