The benefits of TypeScript

The following infographic provides a bird's eye view of the different features that
distinguish ECMAScript 6 from ECMAScript 5, and then differentiates TypeScript from the two.

As a superset of ECMAScript 6, one of the main advantages of embracing TypeScript in your next project is the low entry barrier. If you know ECMAScript 6, you are pretty much all set, since all the additional features in TypeScript are optional. You can pick and introduce in your practice the features that help you to achieve your goal. All in all, there is a long list of strong arguments for advocating for TypeScript in your next project and all of them obviously apply to Angular as well. Here is a short rundown of arguments, just to name a few:

  • Annotating our code with types ensures a consistent integration of our different code units and improves code readability and comprehension.
  • The TypeScript's built-in type-checker will analyze your code at runtime and help you prevent errors even before executing your code.
  • The use of types ensures consistency across your applications. In combination with the previous two, the overall code errors footprint gets minimized in the long run.
  • TypeScript extends classes with longtime demanded features such as class fields, private members, enums, and so on.
  • The use of decorators opens the door to extend our classes and implementations in unparalleled ways.
  • Creating interfaces and type definition files (which we will not cover in this book) ensures a smooth and seamless integration of our libraries in other systems and codebases.
  • TypeScript support across the different IDEs on store is terrific, and we can benefit from code highlighting, real-time type checking, and automatic compilation at no cost.
  • The TypeScript syntax will definitely please developers coming from other backgrounds such as Java, C#, C++, and so on.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset