You can leave parts in JS while you upgrade/add new features in TS
Clearly this tool is undeniable proof that static typing exists merely to satisfy human ego and neuroticism and has nothing to do with logical integrity... Since this tool itself supposedly proves that this integrity can be derived automatically from dynamically typed code. This tool is a paradox, a blatant logical contradiction.
If this tool does work as advertised, then it proves the uselessness of static typing and thus, by extension, this tools proves its own uselessness.
EDIT I removed a potentially offensive remark from my comment. This makes zero sense to me is my point.
This project is meant to make developers more efficient and support them in migrating projects to TypeScript. The entire point of TypeScript is to make developers more efficient, too, through clear structuring, types and assistance through its toolchain.
Static typing does not protect you from integrity issues. However, it allows you to extend existing code with confidence.
I'm not sure if you work in a team, but your general attitude isn't exactly conducive to a constructive, open and efficient working environment.
TypeScript hurt me.
>> However, it allows you to extend existing code with confidence
This argument is often used and cannot be disproved but the words "with confidence" betray the case for its objectivity.
Confidence is a subjective emotion; I can tell you that I feel confident about extending my JavaScript code without TypeScript and you can't argue with that. So this is a subjective argument and my extensive subjective experience of both languages disagrees with the premise.
The most innocent explanation that I can come up with is that TypeScript caters to developers who are not good at coding and thus lack confidence in their coding ability. For me, TypeScript has 0 effect on my confidence and the transpilation step makes things more complicated and makes me less productive overall. Testing is the only thing which increases my confidence in the code; nothing else has any effect on my confidence levels... Not even the language (and I used many over the years). This leads me to think that the confidence which TS gives developers is an illusion, I remember a time when I was younger and used to harbor such illusions about static typing so I'm just drawing projections about other people from my own experience. And yes, your first observation about me is absolutely correct, my skills as a developer have been thoroughly battle-tested and this has hurt me. To me, the existence of this tool is like reliving a past trauma.
>> I'm not sure if you work in a team, but your general attitude isn't exactly conducive to a constructive, open and efficient working environment.
My team is very productive (I'm CTO). We're productive because we're pragmatic. We don't use TypeScript because we're pragmatic. I don't have to resort to this attitude because my team members were carefully selected for having high level critical thinking and so they wouldn't make such big mistakes as creating this tool.
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.
There's a similar project I'm aware of that uses runtime behavior to help create type annotations but for python: https://github.com/instagram/MonkeyType
https://medium.com/airbnb-engineering/ts-migrate-a-tool-for-...