Skip to content

Conversation

@henryqdineen
Copy link
Collaborator

This is very similar to #815 but with a test that properly recreates the issue. I ran into the same issue today and needed to use patch-package to fix recast in my project.

It appears that TSTypeAnnotation printer code does not run when you print() a AST with TSTypeAnnotation nodes unless you replace/modify a TSTypeAnnotation and change the typeAnnotation property to be a node of a different type. In my test I switch the typeAnnotation from a TSTypeReference to a TSQualifiedName.

Thanks!

@henryqdineen
Copy link
Collaborator Author

Hey @benjamn! It's been a while. Sorry for the ping. Is there any change you are accepting new maintainers? We use ast-types and recast pretty heavily and are finding ourselves needing to patch it for fixes like this. Ideally we would want to contribute back to open source.

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