Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tmikov opened this issue Jan 2, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@tmikov
Copy link
Contributor

tmikov commented Jan 2, 2024

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 tmikov added the enhancement New feature or request label Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant