Left JS to code TS, here are 10 cool things about Typescript

I am a Javascript fanboy. With a change in work assignment, I started with Typescript, and it’s great. There were quite some aha moments, and I am hooked. I would still keep up with Javascript but code in Typescript irrespective of the framework.

What is Typescript?

Typescript is a superset of Javascript. It means, it has the goodness of Javascript along with a few more features.

Tell about Aha moments

  1. Typescript is easy to learn when you learn from the context of the framework/library. In my case, I was able to learn the basic typescript needed to work with React.

  2. Typescript is gentle. It gets mad only when it’s not able to infer the data type of the variable

  3. Typescript is easy to read compared to JS. No more guess games and loading with hacks.

  4. Tooling is mostly done by the CLIs and tweaking it is easy

  5. Easy for teams and external stakeholders working with the same code or consuming the library. Thanks to type definitions associated with props.

  6. We can focus on business logic. Let the TS take care of preventing typecasting and other nasty issues.

  7. Typescript is not a cry baby complaining about type mismatches. It’s smart and mostly figures out a lot of things.

  8. Functions are easy to understand and consume. We know the number of arguments and their data types clearly

  9. The syntax of Typescript is not evil, it’s making IDE smarter. Typescript increases productivity.

  10. We can use JS inside TS easily and get our work done. TS gets compiled to JS so the browsers do not get upset with TS.

Share this post