You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great tool, wondering whether we can use this tool to convert the entire project with multiple folders each containing javascript files to typescript? Will it retain the context across files?
Jin
The text was updated successfully, but these errors were encountered:
There currently isn't a feature to convert whole folders in a repository to TypeScript (but it can! Contributions are welcome). One approach could be to convert file by file, but since the tool is using GPT 3.5, the conversion isn't perfect. There are ways you can mitigate this:
If your JS files have unit tests already, ensure that the TS versions pass those unit tests
If you don't have unit tests, you can use the tool to generate unit tests and ensure they're consistent across your project
I would suggest glancing over the JS version and TS versions side by side and ensuring no variable names have been changed or anything else that other files use as dependencies. Most of the time, the conversion goes perfectly and there isn't anything to worry about. While I think it's quite unlikely, since this is tool is using an LLM, there is always that risk factor.
Hope this helps and let me know if you have any more questions!
Alex
Hi @alexanderjdean
Great tool, wondering whether we can use this tool to convert the entire project with multiple folders each containing javascript files to typescript? Will it retain the context across files?
Jin
The text was updated successfully, but these errors were encountered: