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

How to query for the presence of a Type in a file? #1448

Closed
bombillazo opened this issue Aug 30, 2023 · 1 comment
Closed

How to query for the presence of a Type in a file? #1448

bombillazo opened this issue Aug 30, 2023 · 1 comment

Comments

@bombillazo
Copy link

I am trying to create a script that finds all usage of a placeholder type Json to replace it with a premade types and import them from another file.

Is there any way one can query a source file, find all instances of the type and iterate over the result to make the updates necessary?

@bombillazo
Copy link
Author

Solved by using the proper AST functions and finding the appropriate nodes to edit.

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

No branches or pull requests

1 participant