Closed
Description
π Search Terms
"top-level await", "for-await", "preserve", "ts1432"
π Version & Regression Information
- This changed between versions 5.3 and 5.4 (for
module: preserve
)
β― Playground Link
π» Code
for await (const x of []) {} // Error
await Promise.resolve(); // OK
export {};
π Actual behavior
The code errors with ts1432
under module: preserve
(regardless of target
)
π Expected behavior
The code compiles without error under module: preserve
and target: ESNext
Additional information about the issue
No response