From ae26a9c7a22bf3311648a93a3171f087490c6e4d Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 30 Sep 2019 12:38:23 -0400 Subject: Support top-level-await in TypeScript (#3024) --- js/compiler.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'js/compiler.ts') diff --git a/js/compiler.ts b/js/compiler.ts index 1e1fe3dd3..56804ef9f 100644 --- a/js/compiler.ts +++ b/js/compiler.ts @@ -539,6 +539,9 @@ window.compilerMain = function compilerMain(): void { diagnostics = ts.getPreEmitDiagnostics(program).filter( ({ code }): boolean => { + // TS1308: 'await' expression is only allowed within an async + // function. + if (code === 1308) return false; // TS2691: An import path cannot end with a '.ts' extension. Consider // importing 'bad-module' instead. if (code === 2691) return false; -- cgit v1.2.3