-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
Milestone
Description
TypeScript Version: 3.8.3
Search Terms: top level await, try catch
Code
try {
await (async () => {})(); // TS2304 cannot find name 'await'
} catch {
//
}
Expected behavior:
The file is considered valid.
Actual behavior:
The file has an error at await
of "TS2304 cannot find name 'await'".
Playground Link: https://www.typescriptlang.org/play?#code/C4JwngBA3gUAkAQwO4IJbAgCgQZzAOwGMsBKCAXgD5oBfEzEgbhhokIWEIAtp4B6PixhA
hayd
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone