Typed Javascript for me personally has been a godsend for maintenance and avoiding stupid bugs.
To me it seems like an intentional complication of something which can otherwise be simple. Which is unfortunately somewhat common in this industry of software engineering.
It seems there might even be an interest for engineers to keep things complicated-- to gatekeep the industry, to make themselves seem more skilled/necessary so as to keep a job for longer.
(more time in a project => more money by the hour. More LoC looks like more work was done... even if the same can be accomplished with 60-70% of the code (i.e. without the type system)).
I’ve worked with NodeJS for over 10 years now and have ported many codebases from JS to TS and have never found one that didn’t contain a bug that the TS compiler found immediately, even my own carefully crafted solo projects.
Plus every type definition and annotation is basically a free self-maintaining unit test!
Precisely why I refuse to use JS for any piece of work >500loc.
as someone who has experience with ExpressJS I agree massively. Typescript you end up fighting the tooling most of the time, rather than getting work done.
To avoid all this complexity, server side render pages in html - scalable to infinity. then sprinkle js using script tags n tools like Mithril, Vue, Knockout etc on pages needed.
You miss any potential build step slogs.
Plus, there's the fact that TypeScript is developed, owned, and maintained by Microsoft.
Look into their 3 E's campaign: https://en.wikipedia.org/wiki/Embrace,_extend,_and_extinguis...
and we see it in action-- Here's an example.
Terraform CDK [1] -- It offers TypeScript as a language, but not NodeJS. Huh. That's puzzling. I wonder if Microsoft funds the project and requested it to prioritize TypeScript over NodeJS.
Additionally, in March 2020, Microsoft purchased npm.
I am saddened to see Microsoft moving into a position of control & domination in the Javascript/NodeJS ecosystem.