No, I said there's nothing that exists right now that's theoretically better. Typescript isn't. It'd be great if TS's type inference were smart enough that it basically takes no additional dev input vs JS, but until then, it's expensive to use. It's also bolted on awkwardly, but that's changing soon. Could also imagine JS getting some nice Py features like list comp.
Also, generally when people complain that JS won the web, it's not because they prefer TS, it's cause they wanted to use something else and can't.
Never used Elm, but... no variables, kinda like Erlang, which I've used. That has its appeal, but you're not going to find a consensus that this is better for web.
I see this a lot, and I want to find the right words for it: I don't want the types automatically determined for what I write, because I write mistakes.
I want to write the type, and for that to reveal the mistake.
If you explicitly mark types at lower levels, or just use typed libs, it's not very easy to pass the wrong type somewhere and have it still accidentally work. The most automatic type inference I can think of today is in Rust, which is all about safety, or maybe C++ templates count too.
I actually write a fair bit of Rust, and there I'll still explicitly add types. Not always (in particular where I have an IDE that'll show me the inferred type & it's trivial), but in particular if any more complicated inference is happening I'll constrain it.
TS has type inference on function return types while Rust forces you to type the whole function signature (for a good reason, TS's return type inference is a footgun).
Other than that, I haven't noticed their inference capabilities being any different.
So I don't get your point.
Can you give a single example where Rust has more automatic type inference compared with TS? (honest question, maybe I'm missing something)
Also, generally when people complain that JS won the web, it's not because they prefer TS, it's cause they wanted to use something else and can't.
Never used Elm, but... no variables, kinda like Erlang, which I've used. That has its appeal, but you're not going to find a consensus that this is better for web.