summaryrefslogtreecommitdiff
path: root/cli/js/compiler.ts
diff options
context:
space:
mode:
authorAndy Hayden <andyhayden1@gmail.com>2019-10-27 06:04:42 -0700
committerRy Dahl <ry@tinyclouds.org>2019-10-27 09:04:42 -0400
commitaec5a646c9218a0a0da62cbcd1f28bc23c242540 (patch)
treee052f0263eb2abc4915dc3710ec44ee34e9ad621 /cli/js/compiler.ts
parent51dd91a3ccfd9554bcf69b539f2f748da81c5b12 (diff)
feat: top-level-for-await (#3212)
Diffstat (limited to 'cli/js/compiler.ts')
-rw-r--r--cli/js/compiler.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/js/compiler.ts b/cli/js/compiler.ts
index 57e5e3a47..e4953cee2 100644
--- a/cli/js/compiler.ts
+++ b/cli/js/compiler.ts
@@ -616,6 +616,9 @@ window.compilerMain = function compilerMain(): void {
diagnostics = ts.getPreEmitDiagnostics(program).filter(
({ code }): boolean => {
+ // TS1103: 'for-await-of' statement is only allowed within an async
+ // function or async generator.
+ if (code === 1103) return false;
// TS1308: 'await' expression is only allowed within an async
// function.
if (code === 1308) return false;