You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using await at the top level of an ES module flow flags that as an invalid use of await. I tried naming the file x.js as well as x.jsm and x.mjs and included an export statement to indicate that it's a ES module, without success. I searched the flow documentation for anything relating to module, es module and await, but didn't find anything relevant.
Flow version: v0.220.0
Expected behavior
Pass the type check.
According to MDN await is legal at the top level of a module.
Actual behavior
Error: Unexpected identifier, expected the token ;
DanielBaulig
changed the title
"Unxepcted identifier, expected the token ;" when using await inside of ES Module
"Unxepcted identifier, expected the token ;" when using await inside of ES module
Oct 29, 2023
That's sad to hear. Is there a timeline for when we can expect support for top-level await to land in Flow? I'm starting a new project and might consider trying out TS, since I believe it does support top-level await. I'd prefer to stick with Flow if I can though.
When using await at the top level of an ES module flow flags that as an invalid use of await. I tried naming the file x.js as well as x.jsm and x.mjs and included an export statement to indicate that it's a ES module, without success. I searched the flow documentation for anything relating to
module
,es module
andawait
, but didn't find anything relevant.Flow version: v0.220.0
Expected behavior
Pass the type check.
According to MDN await is legal at the top level of a module.
Actual behavior
Error: Unexpected identifier, expected the token
;
The text was updated successfully, but these errors were encountered: