Closed
Description
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.