May 16, 2021
Sorry ts haters, I’m firmly on the “ts makes JavaScript bearable” side of the fence. When I read someone elses code and see functions with parameters named like “payload”, which is some object or array containing god knows what, it makes me sad. A simple interface definition tells both other developers and your IDE what is going on. Ts provides much needed clarity. That said, there are features like generics that reduce readability a lot of the time. Typing should reduce cognitive load, not increase it.