Here are some pros and cons I’ve noticed with Typescript:
- Typing (obviously)
- Intuitive inheritance and classes (for the most part)
- Comes with moduling support for AMD and Commonjs
- Somewhat follows ECMA6 syntax
- Typing can create verbose/cluttered code
.d.tsfiles, which I’ll discuss later
JQuery for example, you need a definition file i.e.
jquery.d.ts in addition to the external library’s file. This definition file is like a header file
in C. It declares the interface of the library that you can use in Typescript. Having a definition file makes sense
because this is Typescript but it adds another layer of difficulty in getting to work quickly I think.