Why Typescript ?

 

Why Typescript

 

Typescript is open source programming language developed and maintained by Microsoft. It is super-set of JavaScript and adds optional static typing to the language. Typescript is designed for development of large applications, which compiles to JavaScript. Can be executed on any browser.

 

Typescript supports OOPs features such as classes, interfaces, inheritance, generics etc.

 

Need of Typescript

There were many challenges faced by Microsoft while handling large scale enterprise applications. So, solution was to develop a language which is rich in features and can be transpiled to JavaScript. As our browsers only understand JavaScript. It can be compiled to JavaScript. That is why Typescript is called as Superset of JavaScript.

 

JS is client-side scripting language. We can do DOM manipulation, client-side validation, event handling etc.

 

But as the complexity of the code increases, it becomes difficult to maintain, because of the limitation of the JS. But JS is the only client-side scripting language and browsers only understand JS.

 

JavaScript Limitation

JavaScript is dynamically typed. It means deciding the data type of variable at runtime.

JavaScript doesn’t support OOPs fundamentals.

 

Comments

Popular posts from this blog

How to implement GoogleAdMob in Xamarin forms ?

Nilkanth dham swaminarayan temple, Poicha Gujarat visit

How to solve "Running script disabled/Execution policy" error in Angular CLI ?