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

Clean up of #12 #15

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open

Clean up of #12 #15

wants to merge 46 commits into from

Conversation

BBB
Copy link

@BBB BBB commented Feb 28, 2019

Cleaned up some of the comments from @bcherny on @benjie's #12

  • There's some issues still with the types that I'm hoping to solve by adding the @types/babel__traverse package.
  • There's also one test error: TypeError: Property body of DeclareClass expected node to be of a type ["ObjectTypeAnnotation"] but instead got "TSTypeLiteral"

Any ideas?

@bcherny
Copy link
Owner

bcherny commented Mar 2, 2019

My guess is DeclareClass is a Flow type (which expects only Flow types as children), while TSTypeLiteral is a TS type. This might be a limitation of the walker approach in this PR, as opposed to a recursive descent approach to transforming the tree from Flow -> TS.

@benjie
Copy link
Contributor

benjie commented Mar 2, 2019

I had to work around the types quite a lot to make it work correctly; hence the ts-ignores/etc everywhere. I think some of it was down to mismatched versions, was planning to upgrade all the dependencies and try again but still have yet to find time.

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.

3 participants