I am looking for basic type checking to prevent me from doing stupid things and catching bugs at "compiletime" instead of runtime.
Typescript interfaces with their structural typing do the job just fine.
I think people are underestimating the power of ecosystem. I use JS daily. Deno allows me to use it on the server as well without doing crazy things.
You have been able to do something similar in Java for a very long time with Mozilla Rhino (and now GraalJs) but without the same level of comfort and convenience.
You still can use them [0].
> proper pattern matching
[1] is pretty good.
[0] https://itnext.io/practical-introduction-to-algebraic-dataty...
> A TypeScript-like language for WebAssembly.
> AssemblyScript targets WebAssembly's feature set specifically, giving developers low-level control over their code.
> Being a variant of TypeScript makes it easy to compile to WebAssembly without learning a new language.
> Integrates with the existing Web ecosystem - no heavy toolchains to set up. Simply npm install it!
And in any case I don't think anyone is really saying "Use Deno because it has static type annotations". It's "Use Deno because it has static type annotations and is fast and easy to deploy and has a huge ecosystem and doesn't require a project setup file to use third party libraries and ..."
There are so many better options if you want a good type system (Elm, PureScript, Rescript, GHCjs, Scala.js, and many more). TypeScript is unsound, and necessarily by it's design, it has to take on weird issues to maintain compatibility with JavaScript (null/undefined, can run effect anywhere, a lot of codebases are filled with any types). Heck, TypeScript doesn't even come with ADTs and proper pattern matching.