Everyone these days forces typescript. There are so many fans and articles in it. The Angular team makes its structure in TS. But my experience migrating ES6 to TS was very disappointing.
I tried porting our relatively new code base (written in ES6) to Typescript last month and ran into subtle pitfalls!
To be clear, we are talking about a node.js application with mocha unit tests and configured ESLint (using babel for forwarding).
First of all, to enable type checking, I set the parameter noImplicitAny, received hundreds of errors and fixed them. But after that I got input errors due to Typescript did not understand some of the predefined node.js modules, for example stream(the problem is actually more due to the lack of typing for a large number of modules).
After that, I installed typings- the recommended replacement for the tsdlibrary management tool d.ts, but nodedefining the text when resolving the problem streamadded a lot of errors, because it duplicates some predefined types.
In addition, I found out that Typescript does not actually compile many ES6 features in ES5, such as generators. This forced me to make a complex build process (TS → (typescript) ES6 → (babel) ES5), which means that I have to spend my original source maps.
It all took a long time to set up.
So, I'm confused. I really like the idea of typescript, but the implementation seems so rude to me. I hope I'm wrong.
Perhaps someone who used Typescript in a real project, rather than HelloWorld, could explain to me what I'm doing wrong?