re: TypeScript is a waste of time. Change my mind. VIEW POST

FULL DISCUSSION
 

Have you ever worked with a piece of JS code and thought any of these?:

  • "I wonder what fields are in this object"
  • "I wonder what exports are available in this module"
  • "I wonder if I can pass an object instead of a string here"

I certainly have, and all 3 of these things (not to mention several more) slow me down and annoy me as a JavaScript developer. Oftentimes I would have to dig through 3 (sometimes 5+) files to see where an actual value comes from, and sometimes even it comes from an external service that has little or no documentation about its return types.

In TypeScript - unless you are dealing with anys - the problems go away and your IDE or terminal can give you answers to these questions in real-time. Huge productivity boost.

That is why I will never again work on a codebase that doesn't leverage static typing.

 

This.

I have the experience that people that behave like OP in thinking "this is a waste of time tool I prefer raw", usually is people that think their code is a piece of art and there's no imperfection on it, which translates later in a disaster code base.

code of conduct - report abuse