summaryrefslogtreecommitdiff
path: root/cli/js/compiler.ts
diff options
context:
space:
mode:
authorKlaus Hvam <flachendk@gmail.com>2020-01-17 23:45:18 +0100
committerRy Dahl <ry@tinyclouds.org>2020-01-17 17:45:18 -0500
commit35eb79610f4b451af1d4a9c286fd63875d28bca5 (patch)
treef8cd5e2d16be4fe621d6045130ba2ef5a63373b4 /cli/js/compiler.ts
parentaedf8721cf7f696326bbdcb23ea6a464c55f081c (diff)
Fix compile and bundle api types (#3703)
Diffstat (limited to 'cli/js/compiler.ts')
-rw-r--r--cli/js/compiler.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/js/compiler.ts b/cli/js/compiler.ts
index 76a0f7262..c0f9c0a1e 100644
--- a/cli/js/compiler.ts
+++ b/cli/js/compiler.ts
@@ -240,9 +240,10 @@ self.compilerMain = function compilerMain(): void {
emitResult.emitSkipped === false,
"Unexpected skip of the emit."
);
- const { items } = fromTypeScriptDiagnostic(diagnostics);
const result = [
- items && items.length ? items : undefined,
+ diagnostics.length
+ ? fromTypeScriptDiagnostic(diagnostics)
+ : undefined,
bundle ? state.emitBundle : state.emitMap
];
postMessage(result);