From aec5a646c9218a0a0da62cbcd1f28bc23c242540 Mon Sep 17 00:00:00 2001 From: Andy Hayden Date: Sun, 27 Oct 2019 06:04:42 -0700 Subject: feat: top-level-for-await (#3212) --- cli/js/compiler.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cli/js/compiler.ts') 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; -- cgit v1.2.3