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

feat: Allow top-level await in dev #924

Merged
merged 2 commits into from
Apr 25, 2022
Merged

Conversation

rschristian
Copy link
Member

Supports TLA in dev. Users would otherwise be me with the following:

500 <source> - Cannot use keyword 'await' outside an async function (<source>)

I should add that TLA works just fine in prod build; parser doesn't throw an error and allows it to pass just fine. This is only an issue in dev.

This of course won't work in all environments, but I think it's probably fair to at least enable the syntax to get past the parser? If a user needs to support an older browser or is running a version of Node that doesn't support it, I think it's fair to leave that up to them to correct.

@changeset-bot
Copy link

changeset-bot bot commented Apr 23, 2022

🦋 Changeset detected

Latest commit: b849238

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wmr Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@developit developit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely.

@developit developit merged commit 1d30445 into main Apr 25, 2022
@developit developit deleted the feat/allow-top-level-await branch April 25, 2022 14:20
This was referenced Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants