Skip to content

Commit 27b255f

Browse files
committed
Don't display TSTL diagnostic codes on playground
1 parent a3f6675 commit 27b255f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pages/play/ts.worker.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ export class CustomTypeScriptWorker extends TypeScriptWorker {
2525
public async getSemanticDiagnostics(fileName: string) {
2626
const diagnostics = await super.getSemanticDiagnostics(fileName);
2727
const { diagnostics: transpileDiagnostics } = this.transpileLua(fileName);
28-
return [...diagnostics, ...TypeScriptWorker.clearFiles(transpileDiagnostics)];
28+
return [
29+
...diagnostics,
30+
...TypeScriptWorker.clearFiles(transpileDiagnostics.map(diag => ({ ...diag, code: diag.source as any }))),
31+
];
2932
}
3033

3134
private transpileLua(fileName: string) {

0 commit comments

Comments
 (0)