Skip to content

What is Typescript

Course: Typescript - chapter 2

TypeScript is a programming language developed and maintained by Microsoft.

It is a strict syntactical superset of JavaScript and adds optional static typing to the language.

Typescript code never runs in your browser. Your browser can only understand javascript.

  1. Javascript is the runtime language (the thing that actually runs in your browser/nodejs runtime)
  2. Typescript is something that compiles down to javascript
  3. When typescript is compiled down to javascript, you get type checking (similar to C++). If there is an error, the conversion to Javascript fails.

tsc is the official typescript compiler that you can use to convert Typescript code into Javascript

There are many other famous compilers/transpilers for converting Typescript to Javascript. Some famous ones are -

  1. esbuild
  2. swc