4 [![Build Status](https://travis-ci.org/microsoft/TypeScript.svg?branch=master)](https://travis-ci.org/microsoft/TypeScript)
\r
5 [![Devops Build Status](https://dev.azure.com/typescript/TypeScript/_apis/build/status/Typescript/node10)](https://dev.azure.com/typescript/TypeScript/_build?definitionId=7)
\r
6 [![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript)
\r
7 [![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript)
\r
9 [TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescript).
\r
11 Find others who are using TypeScript at [our community page](https://www.typescriptlang.org/community/).
\r
15 For the latest stable version:
\r
18 npm install -g typescript
\r
21 For our nightly builds:
\r
24 npm install -g typescript@next
\r
29 There are many ways to [contribute](https://github.com/microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
\r
30 * [Submit bugs](https://github.com/microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
\r
31 * Review the [source code changes](https://github.com/microsoft/TypeScript/pulls).
\r
32 * Engage with other TypeScript users and developers on [StackOverflow](https://stackoverflow.com/questions/tagged/typescript).
\r
33 * Help each other in the [TypeScript Community Discord](https://discord.gg/typescript).
\r
34 * Join the [#typescript](https://twitter.com/search?q=%23TypeScript) discussion on Twitter.
\r
35 * [Contribute bug fixes](https://github.com/microsoft/TypeScript/blob/master/CONTRIBUTING.md).
\r
36 * Read the archived language specification ([docx](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification%20-%20ARCHIVED.docx?raw=true),
\r
37 [pdf](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification%20-%20ARCHIVED.pdf?raw=true), [md](https://github.com/microsoft/TypeScript/blob/master/doc/spec-archived.md)).
\r
39 This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see
\r
40 the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com)
\r
41 with any additional questions or comments.
\r
45 * [TypeScript in 5 minutes](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html)
\r
46 * [Programming handbook](https://www.typescriptlang.org/docs/handbook/basic-types.html)
\r
47 * [Homepage](https://www.typescriptlang.org/)
\r
51 In order to build the TypeScript compiler, ensure that you have [Git](https://git-scm.com/downloads) and [Node.js](https://nodejs.org/) installed.
\r
53 Clone a copy of the repo:
\r
56 git clone https://github.com/microsoft/TypeScript.git
\r
59 Change to the TypeScript directory:
\r
65 Install [Gulp](https://gulpjs.com/) tools and dev dependencies:
\r
72 Use one of the following to build and test:
\r
75 gulp local # Build the compiler into built/local.
\r
76 gulp clean # Delete the built compiler.
\r
77 gulp LKG # Replace the last known good with the built one.
\r
78 # Bootstrapping step to be executed when the built compiler reaches a stable state.
\r
79 gulp tests # Build the test infrastructure using the built compiler.
\r
80 gulp runtests # Run tests using the built compiler and test infrastructure.
\r
81 # You can override the specific suite runner used or specify a test for this command.
\r
82 # Use --tests=<testPath> for a specific test and/or --runner=<runnerName> for a specific suite.
\r
83 # Valid runners include conformance, compiler, fourslash, project, user, and docker
\r
84 # The user and docker runners are extended test suite runners - the user runner
\r
85 # works on disk in the tests/cases/user directory, while the docker runner works in containers.
\r
86 # You'll need to have the docker executable in your system path for the docker runner to work.
\r
87 gulp runtests-parallel # Like runtests, but split across multiple threads. Uses a number of threads equal to the system
\r
88 # core count by default. Use --workers=<number> to adjust this.
\r
89 gulp baseline-accept # This replaces the baseline test results with the results obtained from gulp runtests.
\r
90 gulp lint # Runs eslint on the TypeScript source.
\r
91 gulp help # List the above commands.
\r
98 node built/local/tsc.js hello.ts
\r
104 For details on our planned features and future direction please refer to our [roadmap](https://github.com/microsoft/TypeScript/wiki/Roadmap).
\r