From c57e90d4def43e061b22da5d9b24e0bc908973d2 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 18 Jun 2020 10:35:33 +0200 Subject: [PATCH] Update ignoreDiagnostics for new top-level await support --- packages/cli/src/tsrepl.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/tsrepl.ts b/packages/cli/src/tsrepl.ts index e0e4e3b6..ad23f173 100644 --- a/packages/cli/src/tsrepl.ts +++ b/packages/cli/src/tsrepl.ts @@ -30,7 +30,8 @@ export class TsRepl { this.typeScriptService = register({ project: tsconfigPath, ignoreDiagnostics: [ - "1308", // TS1308: 'await' expression is only allowed within an async function. + "1375", // TS1375: 'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module. + "1378", // TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher. ], }); this.debuggingEnabled = debuggingEnabled;