Bryan Martin
Mar 3, 2021

--

I'm not a big fan of Typescript. I'm don't oppose it either. However, I honestly do not think that the type checking feature Typescript really saves time or avoids that many bugs. To me, the most beneficial feature of Typescript is simply that you create types. One of the failings of JavaScript is that so many objects are defined as anonymous types. The developer, understandably, add properties to their anonymous types without considering what object is supposed represent. When using a named type, it becomes clearer that you may be adding a property to an object that doesn't make sense conceptually. This may force you to reconsider: either rename the type to something appropriate that includes that property or place the property somewhere else. Either way, you have the opportunity to preserve the conceptual integrity of your code, making it more readable and more maintainable.

--

--

Responses (1)