hermes icon indicating copy to clipboard operation
hermes copied to clipboard

Parser: improve error message when await is used in non-async functions or instead of async

Open tmikov opened this issue 1 year ago • 0 comments

From https://x.com/jamonholmgren/status/1741906729477226534?s=20

  • Better error message when the programmer accidentally wrote await () => instead of async() =>
  • Better error message for await when the programmer forgot to declare the surrounding function as async. These two errors compound in a funny way.

tmikov avatar Jan 02 '24 01:01 tmikov