Why in 2025 can we not ship a statically typed high performance language for browsers?
Which is why WebAssembly is the right answer.
What does it matter to the user whether they get a runtime or a "compile time" error in their invisible devtools console? To them, the page simply doesn't work.
Static languages make sense when compilation happens at dev-time, where the actual devs can respond to the diagnostics. So it's far better to develop in a statically typed language, compile it ahead of time and ship that to the user. Which is exactly what people do now with wasm.
Which one?
Also there's TS if you really want it