Advantage and Disadvantage of TypeScript over JavaScript.

anil gurung
1 min readFeb 22, 2021

In this blog post, I will be going through some of the advantages and disadvantages of using TypeScript over JavaScript. In my previous blog, I gave a brief introduction on TypeScript and mentioned some of its features.

In simple word, TypeScript is an open-source programming language developed by Microsoft that compiles to JavaScript. Since its release in 2012, the language has remained in active development and continues to gain in popularity every year.

Some of the advantages of using TypeScript over JavaScript are as follows;

  • TypeScript always highlights errors at compilation time during the time of development, whereas JavaScript points out errors at the runtime.
  • TypeScript supports strongly typed or static typing, whereas this is not the case in JavaScript.
  • TypeScript runs on any browser or JavaScript engine.
  • TypeScript has a namespace concept by defining a module.

Some of the disadvantages of using TypeScript over JavaScript are ;

  • TypeScript takes a long time to compile the code.
  • TypeScript does not support abstract classes.
  • If we run the TypeScript application in the browser, a compilation step is required to transform TypeScript into JavaScript.