TypeScript: Pros and Cons

TypeScript is a popular language these days and a hugely successful project as evidenced in latest SO Developer Survey. Another feather in the cap for Anders Hejlsberg for whom I have great respect.

I myself make my team use it for large-scale projects, however, every once in a while I wonder if its worth it. It creates hassle.

  • With raw JS, the code you write is the code that is run. No extra build step, no extra debug configuration in VS Code. Sometimes its hard to get VS Code debugger working with TypeScript. Not necessarily TypeScript’s fault but an issue is an issue.
  • Sometimes I have found it really gets in the way. More time is spent keeping TS happy than writing code. To strike a balance, the guideline I give to the team is to make sure the arguments and return value of every function is typed. Beyond that, they don’t need to use TS.

What do you think about TypeScript? Do you like it or not? Let me know in your comments.

This entry was posted in Computers, programming, Software and tagged . Bookmark the permalink.

Leave a Reply