TypeScript is a superset of JavaScript, which means any JS dev already knows most of TypeScript. They're effectively just learning the type system and best practices on implementing it.
The syntax of Elm is extremely different, which would effectively require developers to learn an entirely new language. It's also a completely different proposition. It's a whole framework, which means complete buy-in on a project. I know there are some interop packages, but you would normally use it instead of React/Vue/Angular etc. This means it's only suitable for new projects.
It's a very nice framework (imo) but it's not a true comparison.
However, when I choose what tech to go deep in with my limited free time, I want to see more than zero mentions of it in the "who is hiring" threads. I don't feel like Elm's traction has gained any in the two years since I first dabbled in it. If I was in a position to pick the tech stack for my work, I'd give Elm serious consideration though.
Before trying Elm I'd never used a purely functional language. It's definitely a different way of thinking and I'm glad I took the time to wrap my head around it.
- Skill transfer. If I learn react, I can use my JavaScript skill to understand how everything works under the hood. If I learn Typescript with React, knowing react, I can focus on learning new language feature while not learning at the same time how to build the application. With Elm, I have to learn the language and the framework, all at once, basically learning from scratch.
- compatibilities with libraries. Here I definitely might be wrong, not knowing Elm enough, but okay, say you don't need a framework because it's included. What about utility library. Like i don't know, analytics or fancy animations?
- Job Market. I'm not going to learn a language that I cannot use anywhere, and if I'm a company, I'm not going to choose a language for which is going to be hard to hire people.
Now Elm sounds real cool and I want to like it. But it doesn't seem very wise to spend time doing that vs learning something like Apollo+Graphql, or Typescript, or Vue, which have much more obvious benefits to my career.
I wonder how other languages,like Scala, managed to get traction in the enterprise whereas Elm has not even though it can solve real issues that we face with Javascript development.
I don't know for Scala, but in general Marketing and money thrown at hackathon and meetups can get things moving in that regard. However I believe Elm doesn't do much of that.
A new hire often has to learn a number of new/different technologies. The language is one of the easiest of those.
https://reasonml.github.io/docs/en/what-and-why
I also feel the same way about F#, if you have any reason to care about C# or the .NET stack. It also can compile down to JS (and targets react)
Apart from that, Elm is a great language! I've been dabbling around with it in the past and I especially liked its great DX and that it's purely functional. Comparing it to ReasonML would be very interesting, too :)