I still dont understand: Can this be a general purpose replacement for javascript or not? Because if it is then every language, even Dart and typescript, should switch to producing webassembly. Right?
No, WebAssembly is not currently a general-purpose replacement for JavaScript. Maybe in the future it will be, but right now WebAssembly doesn’t have any APIs to access the DOM. This makes it only good for quickly doing calculations with numbers or data that can be easily represented as numbers, such as implementing a physics engine for a browser game.
Even if WebAssembly had some API to access the DOM I have a feeling it would always be sort of the same thing as GWT - you can do stuff that touches the UI in it but probably isn't the best thing.