hermes
hermes copied to clipboard
Parser: improve error message when await is used in non-async functions or instead of async
From https://x.com/jamonholmgren/status/1741906729477226534?s=20
- Better error message when the programmer accidentally wrote
await () =>instead ofasync() => - Better error message for
awaitwhen the programmer forgot to declare the surrounding function as async. These two errors compound in a funny way.