-
Notifications
You must be signed in to change notification settings - Fork 0
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
Flow to TypeScript, TypeScript to Flow #1
Comments
@goodmind Not sure if I understand your question 🙂On a high level the transformation between Flow and TypeScript (and the other way around) will work like this:
|
@ollelauribostrom yeah, but there is some syntax that can't be converted without losing type information. Or inferred types that doesn't exist in AST |
It probably could intermediate AST with greatest common factor for both type system. So more complex entities always disassembly to simpler set of entities and assemble back to higher order in the end of transform if this possible |
@goodmind Sorry for the late reply. You're right, figuring out a way to deal with such cases are definitely on the roadmap for an MVP, do you have any thoughts on how to handle this? @MaxGraey suggestion sounds like a good approach. It might also be an option to let the user manually edit any edge case syntax before continuing with the transformation (sort of like: Currently, work is happening in the main repo to implement a prototype that is able to transform some really simple programs 🙂 |
btw it may be makes sense using something like jscodeshift for that instead pure recast package |
How would this work if they are really different type systems?
The text was updated successfully, but these errors were encountered: