Closed
Description
TypeScript Version: 3.7.2
Search Terms: Top
Code
const v = await (1);
Expected behavior:
No error thrown. (If renaming this file to .js
extension, it would be accepted by runtimes that enables top-level await e.g. Deno, indicating this is accepted by engines like V8)
Actual behavior:
error TS2304: Cannot find name 'await'.
► file:///Users/kun/Projects/Deno/test/tla.ts:5:11
5 const v = await (1);
~~~~~
Playground Link: Not available
Related Issues: Not found
Metadata
Metadata
Assignees
Labels
No labels