But I was told that TypeScript was awesome, and the whole industry is moving toward it, so that's what we chose for this project.
Next time I won't choose TypeScript. I'll either stick with vanilla JS and know that I don't have a type system to catch my mistakes, or I'll try one of: Elm, PureScript, Flow, ReScript, ReasonML, Dart, etc.
There are so many choices, and I'm sure the ecosystems for these other choices is absolutely abysmal compared to TypeScript, but I rather reinvent a few wheels than use wheels that look round at first, but aren't.
If TS is an alternative to JS Scala is also. Hard to thing of an argument that doesn't go the same about both languages.
The only real issue is market reach at this point in time.
- Userbase. Hiring Scala developer is insanely harder than hiring JS developers in most of the world
- Worse ecosystem. This ranges from anything like finding libraries to finding help online.
- Generated bundles and performance are very subpar to most compile-to-js languages.
Point three doesn't sound realistic as you can process compiler output further with the usual JS optimizing tools if you wish. So I would like to see some evidence for the stated claim.
I agree that it has its limits, and that there are better type systems, but compared to JavaScript it’s a night and day experience.
The amount of help and clarity it brings on large codebases has no equivalent in JS world, and even tho I love Scala or Elm they are simply not realistic alternatives to JS for most of the industry.