Idea: Infer types / parameters from runtime (V8 debugger/inspector protocol) #19641
Labels
Community Tooling
This might be better handled by tooling from the community instead of built into TypeScript
Suggestion
An idea for TypeScript
Given the new "infer parameters from usage" functionality, it would seem doable to do something similar like "infer parameters from runtime/debugger", especially in environments like VSCode, which tightly integrate a debugger.
In runtime you get most of the information to generate pretty good types, at least for a start, so... why not? This would be a massive help in migrating JavaScript to TypeScript.
Also, V8 has just recently introduced
takeTypeProfile
to the inspector protocol, that could be used to leverage just that. There's an example usage here: https://github.com/fhinkel/type-profile.The text was updated successfully, but these errors were encountered: