In layman's terms, TypeScript is adding types to your JavaScript code. But if it is really that simple, what do we mean when we say we want to 'learn' typescript? Well, it's basically the nuances of all the different kinds of features and abilities you get as a consequence of adding types to your JS code. And believe me, there are a lot of use cases when it comes to adding types to your JS code.
While there can be varied answers for this, I believe practically one of the most significant advantages of using TS is that it pushes a lot of runtime errors (of JS) to compile time, which basically means it allows us to fix bugs to much extent even before we are actually executing the code.
- Variables
- Functions
- Objects
- Type Aliases & Interfaces
- More topics to be added...