Hacker News new | ask | show | jobs
by jchanimal 1044 days ago
Does anyone know if I have a TypeScript project, is there an automated process to turn it into this format this article describes? Eject for TS, I guess.
3 comments

You can probably do this with the typescript compiler API https://github.com/microsoft/TypeScript/wiki/Using-the-Compi...
Kinda seems like the dreamiest build target.
Typescript is a superset of Js/tsdocs so you’ll probably get a long way but at some point the types will be dumbed down.
GPT-4 would probably do a good job at that if the code is not sensitive
Is there some way to load an entire large project into gpt4? Or do you mean to have it translate one file at a time without context?