Typescript Basics

Typescript is not entirely a language is a superset of JavaScript. Is have many features that are not supported by the current version of JavaScript supported mostbrowser outside.

  1. Strong-typing – like before use you need to declare the variable type like most programminglanguages like C#, Java.
  2. Object-Oriented features like classes, generic,public-private protected arrow function like that
  3. We can catch error at compile time not run time.
  4. Get access to best tools like intellicense for the code editor
  5. Any valid JavaScript code is valid typescriptcode.
  6. When you compiled your program it will transpileit into Javascript code.
  7. When you build application Typescript compilerkicks in and transpile the application typescript code to javascript.

To install typescript on machine you can use below command.

npm install -g typescript

Latest version of typescript is typescript@3.4.2

tsc –version

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *