3 ms·
Would this be a good tool to attempt simple transpiling of typescript code to python? For my use-cases, not much changes between the two - 1. Replace opening a
by dreamer7 5y ago
Would this be a good tool to attempt simple transpiling of typescript code to python?
For my use-cases, not much changes between the two -
1. Replace opening and closing braces with colon.
2. Remove semi colons
3. Replace function with def
4. Remove type definitions
5. Replace array manipulation functions with python equivalents.
6. Remove tokens like const, let and var
- treesciencebot 5y agoIt would probably be better if you can just write a typescript parser, and then you can transpile type script AST directly to Python AST and use ast.unparse() without any additional libraries.