FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[parser] Expose somehing like `program.extra.async` to easily know if a module uses top-level await · Issue #16471 · babel/babel · GitHub

/ babel Public

[parser] Expose somehing like program.extra.async to easily know if a module uses top-level await #16471

Description

💻

  • Would you like to work on this feature?

What problem are you trying to solve?

I'm working on a project that uses @babel/parser to do some analysis, and I need to know if a module uses top-level await.

It's not trivial to detect, because you need to check also, for example, in computed keys inside of methods (doing something like what @babel/helper-environment-visitor does, but that requires a full @babel/traverse).

Describe the solution you'd like

Given that we already need to track this info (to know if await is allowed or an error), we might as well expose it.

Describe alternatives you've considered

/

Documentation, Adoption, Migration Strategy

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    i: needs triageoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: parser

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL