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

Feature request: option to pass our own ast-types fork to recast #1283

Open
jedwards1211 opened this issue May 7, 2023 · 0 comments · May be fixed by #1285
Open

Feature request: option to pass our own ast-types fork to recast #1283

jedwards1211 opened this issue May 7, 2023 · 0 comments · May be fixed by #1285

Comments

@jedwards1211
Copy link
Contributor

jedwards1211 commented May 7, 2023

This is something I might try to make a PR for soon...

For astx I have started building my own custom fork of ast-types from metadata in @babel/types so that it never lags behind what babel is able to parse.

However I'm running into #1230 because even if I build my own ast-types fork, I can't make recast use it.

The only long-term solution to issues like #1230 is to be able to do something like

const ast = recast.parse(code, {
  parser: myConfiguredBabelParser,
  types: myConfiguredAstTypes,
})
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 a pull request may close this issue.

1 participant