-
Notifications
You must be signed in to change notification settings - Fork 198
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
[Proposal] we should provide a function to build a fork with defs extracted from @babel/types #823
Comments
@jedwards1211 I think this is a great idea, and thanks for sharing concrete code! I may be able to get this copy/pasted/tested soon, but I would also be happy to take a PR if you have the time. |
@benjamn okay great! I think I should check first with the Babel maintainers if the way I'm inspecting the |
Just FYI, https://github.com/codemodsquad/astx/blob/main/src/babel/babelAstTypes.ts should be considered the most up-to-date implementation of this approach, not the code example in OP |
I've been thinking, sometimes Babel nodes and fields are missing from the defs in
ast-types
, it's naturally going to lag behind node types and fields that they add. Why not build the defs from the information in@babel/types
? Here's what I have so far. Seems to work well!The text was updated successfully, but these errors were encountered: