Skip to main content
Note: this page is a beta page, don't rely on the URL and file issues on microsoft/TypeScript-Website

TypeScript 3.7 is now available, 3.8 has a release candidate to try.

TypeScript is JavaScript For Any Scale.

TypeScript extends JavaScript by adding types.

TypeScript speeds up your development experience by catching errors and providing fixes before you even run your code.

Any browser, any OS, anywhere JavaScript runs. Entirely Open Source.

index.ts
function addPrices(items: number[]) { let sum = 0 for (const item of items) { sum += item } return sum } addPrices(3, 4, 6)
index.ts
function addPrices(items: number[]) { let sum = 0 for (const item of items) { sum += item } return sum } addPrices(3, 4, 6)

What is TypeScript?

JavaScript and More

TypeScript is an open-source language which builds on JavaScript, one of the world’s most used tools, by adding static type definitions.

Types provide a way to describe the shape of an object, providing better documentation, and allowing TypeScript to validate that your code is working correctly.

Types are optional in TypeScript, and type inference allows you to get a lot of power without writing additional code.

A Result You Can Trust

All valid JavaScript code is also TypeScript code. You might get type-checking errors, but that won't stop you from running the resulting JavaScript. While you can go for stricter behavior, that means you're still in control.

TypeScript code is transformed into JavaScript code via the TypeScript compiler or Babel. This JavaScript is clean, simple code which runs anywhere JavaScript runs: In a browser, on Node.JS or in your apps.

Evolving with Standards

The TypeScript team contributes to the TC39 committees which help guide the evolution of the JavaScript language.

When new features have reached stage 3, then they are ready for inclusion in TypeScript.

For example the TypeScript team championed proposals like Optional Chaining, Nullish coalescing Operator, Throw Expressions and RegExp Match Indices.

Types On Every Desk

Most of the worlds JavaScript’s is un-typed, and inference can only go so far. To address this, the TypeScript team helps maintain

Definitely Typed - a community project to provide types and inline documentation to existing JavaScript.

This project allows the community to maintain type definitions for JavaScript libraries without putting extra pressure on their maintainers.

Consistently Good Tooling

By handling a lot of the editor integration inside TypeScript, you can get a consistent experience working in many editors.

This lets you easily jump between editors like Visual Studio, Visual Studio Code, Nova, Atom, Sublime Text, Emacs, Vim, WebStorm and Eclipse.

A Result You Can Trust

All valid JavaScript code is also TypeScript code. You might get type-checking errors, but that won't stop you from running the resulting JavaScript. While you can go for stricter behavior, that means you're still in control.

TypeScript code is transformed into JavaScript code via the TypeScript compiler or <babel>Babel</babel>. This JavaScript is clean, simple code which runs anywhere JavaScript runs: In a browser, on Node.JS or in your apps.

What is TypeScript?

Install TypeScript

You can install TypeScript via npm

npm install -g typescript

Then run the compiler via tsc

npm install -g typescript

Quarterly Releases

Our next release is 3.8, which planned for Feb 18

3.7 Released
Nov 5

3.8 Beta
Jan 8

3.8 RC
Feb 4

hi

hi