TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
TypeScript HTML PowerShell Batchfile Groovy Shell
Switch branches/tags
Latest commit eef7d8b Aug 17, 2017 @andy-ms andy-ms committed on GitHub Treat explicit imports from `node_modules` as external library imports (
#16364)

* Treat explicit imports from `node_modules` as external library imports

* Update baselines
Permalink
Failed to load latest commit information.
.vscode Extract Method (squash) Aug 4, 2017
bin Moved LKG folder to lib Jul 27, 2015
doc Update the logo to the one which our website uses. Mar 17, 2017
lib Update LKG (#17538) Jul 31, 2017
scripts Add lint rule to check that `Debug.assert` calls do not eagerly inter… Aug 8, 2017
src Treat explicit imports from `node_modules` as external library imports ( Aug 17, 2017
tests Treat explicit imports from `node_modules` as external library imports ( Aug 17, 2017
.editorconfig Use CRLF, not LF. Mar 2, 2015
.gitattributes Never normalize end-of-lines on clone/commit. May 31, 2015
.gitignore Add package lock to gitignore (#16770) Jul 5, 2017
.mailmap Update authors for TS 2.4 Jun 8, 2017
.npmignore Add more files to .npmignore Dec 15, 2016
.travis.yml just update issue template Jun 13, 2017
AUTHORS.md Update authors for TS 2.4 Jun 8, 2017
CONTRIBUTING.md Remove baseline-accept warning from CONTRIBUTING Oct 17, 2016
CopyrightNotice.txt Add snapshot of compiler sources Jul 13, 2014
Gulpfile.ts Fix runtests-browser in gulp, including RWC, remove into-stream (#17540) Aug 1, 2017
Jakefile.js Merge branch 'master' into extract-method-2 Aug 11, 2017
LICENSE.txt Add snapshot of compiler sources Jul 13, 2014
README.md Updated links to use https and avoid redirects Jun 23, 2017
ThirdPartyNoticeText.txt [Transforms] Merge master 07/11 into transform (#9697) Jul 18, 2016
issue_template.md Issue template: Recommend to run `tsc` directly (#17246) Jul 17, 2017
jenkins.sh Update build scripts for npm5 May 30, 2017
netci.groovy merge Dec 14, 2016
package.json Merge pull request #17838 from Microsoft/rev2.6.0 Aug 17, 2017
pull_request_template.md No bold "Fixes" Feb 19, 2016
tslint.json Add lint rule to check that `Debug.assert` calls do not eagerly inter… Aug 8, 2017

README.md

Build Status npm version Downloads

TypeScript

Join the chat at https://gitter.im/Microsoft/TypeScript

TypeScript is a language for application-scale JavaScript. TypeScript adds optional types, classes, and modules to JavaScript. TypeScript supports 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, and stay up to date via our blog and Twitter account.

Installing

For the latest stable version:

npm install -g typescript

For our nightly builds:

npm install -g typescript@next

Contribute

There are many ways to contribute to TypeScript.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Building

In order to build the TypeScript compiler, ensure that you have Git and Node.js installed.

Clone a copy of the repo:

git clone https://github.com/Microsoft/TypeScript.git

Change to the TypeScript directory:

cd TypeScript

Install Gulp tools and dev dependencies:

npm install -g gulp
npm install

Use one of the following to build and test:

gulp local            # Build the compiler into built/local 
gulp clean            # Delete the built compiler 
gulp LKG              # Replace the last known good with the built one.
                      # Bootstrapping step to be executed when the built compiler reaches a stable state.
gulp tests            # Build the test infrastructure using the built compiler. 
gulp runtests         # Run tests using the built compiler and test infrastructure. 
                      # You can override the host or specify a test for this command. 
                      # Use host=<hostName> or tests=<testPath>. 
gulp runtests-browser # Runs the tests using the built run.js file. Syntax is gulp runtests. Optional
                        parameters 'host=', 'tests=[regex], reporter=[list|spec|json|<more>]'.
gulp baseline-accept  # This replaces the baseline test results with the results obtained from gulp runtests.
gulp lint             # Runs tslint on the TypeScript source.
gulp help             # List the above commands. 

Usage

node built/local/tsc.js hello.ts

Roadmap

For details on our planned features and future direction please refer to our roadmap.