Fixed an issue with top-level for-await loops not being allowed with --module preserve (#59042)

This commit is contained in:
Mateusz Burzyński
2024-06-26 21:40:07 +02:00
committed by GitHub
parent 15f67e0b48
commit c8f2405456
7 changed files with 94 additions and 0 deletions

View File

@@ -51097,6 +51097,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
// fallthrough
case ModuleKind.ES2022:
case ModuleKind.ESNext:
case ModuleKind.Preserve:
case ModuleKind.System:
if (languageVersion >= ScriptTarget.ES2017) {
break;