typescript is better than javascript tho
The problem is the tooling in the JS ecosystem and how it works with TypeScript. TypeScript would be fine on its own, but like C#, everything got too complicated around 2020.
They also wrote the compiler in fucking JavaScript initially. So you needed a 5 GHz processor to compile anything other than a trivial Angular codebase in any reasonable amount of time. It isn't much better if you aren't using a large framework.
If you want to do vanilla JS or use bits and pieces of React. It is a PITA unless you use Vite to scaffold your project and then you have problems with HMR and the like (which I won't get into here).
Then you have all sorts of problems with Babel / tsx / ts-node when trying to run test runners/frameworks like Jest.
Babel is a Rube Goldberg machine where, instead of the compiler taking the code and spitting out, say, ES5-style code, it has to translate it through some bunch of plugins.
Avoiding Babel means using ts-node or "tsx", which has nothing to do with React, confusingly. That has its own bunch of foibles which also wastes huge amounts of time.
Before AI came out, it took me two whole days to fix this, and I was good at it (at least compared to my peers). Countless man hours have been wasted on these fucking translation layers. So often people wouldn't touch it, and you would be running insecure versions of pretty much everything because if you did an upgrade, the whole thing might blow up in your face.
This is all because the compiler nerds got involved and decided that instead of just having a target environment (browser, Node.js, Deno or whatever), you have various levels of support and different features that only help with IOC/DI wankery, weird module standards and other shit that nobody uses outside of Silicon Valley and Nashville. To make matters worse, instead of just including polyfills now as a script file in
head there is some polyfill project that you have to use now instead of just including the script manually. So the old grug ways of doing things often aren't easy.
This is all done to appease people like compiler nerds and people that don't understand how to write JS without like 1000 libs in the background.
I hate this all because I actually bothered learning JS back in the day by actually reading some books on it, and I understand how the VM / interpreters work under the hood and can write some really fast JS code. So to me this is all overhead that isn't necessary and makes it a miserable experience to try to get anything done.
If you compare this with just ES6 improvements that work fine in every major browser and actually learn JavaScript, none of this gumpf is needed.
TypeScript feels like another Microsoft psy-op trick that they played on the industry. Countless devs have been brainwashed by this, instead of just reading the Rhino book or something like that.
My limited experience with Rust and trying to get large projects to compile
is exactly the same as TypeScript. You often have a bunch of Rube Goldberg machine stuff, like task runners (just), a package manager, and LLVM somewhere to even start compiling. Basically everyone assumes you are using Arch or Ubuntu, and if it isn't one of those, the attitude is "Well, we don't care."