mirror of
https://github.com/denoland/deno.git
synced 2025-07-22 20:55:08 +00:00
feat: top-level-for-await (#3212)
This commit is contained in:
parent
51dd91a3cc
commit
aec5a646c9
18 changed files with 257 additions and 263 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue