If you really, really want to write rock solid frontend code, then you use Elm. Elm is a language that compiles to javascript and probably is the most frustrating language there is for javascript developers. Strongly typed and pure functional means no variables - only a redux like common state, no functions with side-effects - so you can't just execute rest service calls without taking special care and run time type checking. Elm is a tough medicine, but it works. Your code becomes testable and reliant. And it makes TypeScript looks like a toy language.