|
|
|
|
|
by nojvek
2137 days ago
|
|
If I understand correctly, they convert the js file to .ts file, ask tsc for error diagnostics and automatically apply transformations to resolve those errors when they can. Yep that’s how I’d do it too. I wrote a simpler version when doing a tsc upgrade to resolve a whole bunch of errors. It parses the tsc errors and does simple string replaces. Has anyone played with the tool to report how good it is? I remember v8 did an experiment back in the day where it would run code and profile the input parameters and output of functions and automatically generate typescript types. |
|