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

fix: TSTypeAnnotation printer when parent is a TSFunction type #1404

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

henryqdineen
Copy link
Contributor

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!

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