TypeScript offers classes, modules, and interfaces to help you build robust components.
These features are available at development time for high-confidence application development, but are compiled into simple JavaScript.
TypeScript types let you define interfaces between software components and to gain insight into the behavior of existing JavaScript libraries.
TypeScript starts from the syntax and semantics that millions of JavaScript developers know today.
With TypeScript, you can use existing JavaScript code, incorporate popular JavaScript libraries, and be called from other JavaScript code.
TypeScript compiles to clean, simple JavaScript code which runs on any browser, in Node.js, or in any other ES3-compatible environment.
class Point { x: number; y: number; constructor(x: number, y: number) { this.x = x; this.y = y; } getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); } } var p = new Point(3,4); var dist = p.getDst(); alert("Hypotenuse is: " + dist);
Types enable TypeScript developers to use highly-productive development tools and practices: static checking, symbol-based navigation, statement completion, and code refactoring.
These types are optional, and type inference allows a few type annotations to make a big difference to the static verification of your code.
The command-line TypeScript compiler can be installed as a Node.js package.
Visual Studio includes TypeScript in the box, starting with Visual Studio 2013 Update 2. You can also edit TypeScript in WebStorm, Eclipse, and other editors. You can also try the latest versions:
TypeScript is being developed on GitHub. The TypeScript compiler is implemented in TypeScript, and can be used in any JavaScript host.
Get the source codeRead the specification in doc or pdf
Play with the bits and file bugs.
Join the #typescript Twitter discussion and follow the GitHub project.
Tutorial - Best way to get up to speed on TypeScript.
Stack Overflow - Great place to get help with using TypeScript.
Blog - Keep up to date on the latest news.
DefinitelyTyped - Repository of library typings.
