Easy Tutorial
❮ Ts Map Ts Interface ❯

TypeScript Tutorial

TypeScript is a superset of JavaScript that supports the ECMAScript 6 standard (ES6 Tutorial).

TypeScript is a free and open-source programming language developed by Microsoft.

The design goal of TypeScript is to develop large applications. It can be compiled into pure JavaScript, and the compiled JavaScript can run on any browser.


Language Features

TypeScript is an extension of JavaScript that adds features to the language. The added features include:

The following features are backported from ECMA 2015:


Differences Between JavaScript and TypeScript

TypeScript is a superset of JavaScript, extending its syntax. Existing JavaScript code can work with TypeScript without any modifications. TypeScript provides compile-time static type checking through type annotations.

TypeScript can process existing JavaScript code and compile only the TypeScript code within it.


First TypeScript Example

The following example demonstrates using TypeScript to output Hello World!:

Example

const hello: string = "Hello World!";
console.log(hello);
❮ Ts Map Ts Interface ❯