You Might Not Need TypeScript (or Static Types)
Eric Elliott

There is no question that type annotation adds some overhead to the coding process. The real question is whether the gain is worth the potential extra effort. From my own experience it is absolutely worth the effort for medium to large projects. Indeed, for anything somewhat complex, I find spelling out the typing info to be an essential tool in guiding the code process to the point that it actually speeds up the entire process rather than slows it down. Many have said good programmers think about data structure more than coding itself. JavaScript as a language lacks support for expressing “interface” for such data structures. To convince oneself, try documenting a complex json data structure using JavaScript and it will hopefully be obvious. TypeScript is perfect for this. The optional nature of the type annotation enables a great trade off. Another great use case for TypeScript is defining the interface for API in general, or server API in particular (RESTful or not). To me these are the deciding factors, others are just details…

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.