I wouldn't mind JS as much if its type system wasn't an utter disaster.
Basically everything in that WAT talk should be an error. If your code is throwing type errors, then either it's shitty code or you're trusting non-validated input, in which case you should be able to catch the type error and return an error back to whoever sent you the data.
https://www.destroyallsoftware.com/talks/wat