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: add overrideDefs function #937

Closed

Conversation

jedwards1211
Copy link
Contributor

@jedwards1211 jedwards1211 commented May 7, 2023

Solving benjamn/recast#1283 would be difficult because
it imports ast-types everywhere, and I would have to replace those references
with passing an ast-types fork as new function parameters all over the place.

This is the pragmatic solution, it would allow me to just replace all of the
ast-types exports with my own fork built from @babel/types (see
#823). So anywhere that imports
them would get my definitions that are up-to-date with babel.

Building defs from @babel/types or other parsers' metadata is the only
sustainable option for the community to have a reliable codemod system built on recast.

@jedwards1211
Copy link
Contributor Author

Ugh this won't work the best either...I would have to make sure I override the defs before I import recast

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.

1 participant