-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScript