1 |
|
2 | # TypeScript
|
3 |
|
4 | [![Join the chat at https://gitter.im/Microsoft/TypeScript](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Microsoft/TypeScript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
5 | [![Build Status](https://travis-ci.org/microsoft/TypeScript.svg?branch=master)](https://travis-ci.org/Microsoft/TypeScript)
|
6 | [![VSTS Build Status](https://dev.azure.com/typescript/TypeScript/_apis/build/status/Typescript/node10)](https://dev.azure.com/typescript/TypeScript/_build/latest?definitionId=4&view=logs)
|
7 | [![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript)
|
8 | [![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript)
|
9 |
|
10 |
|
11 |
|
12 | [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).
|
13 |
|
14 | ## Installing
|
15 |
|
16 | For the latest stable version:
|
17 |
|
18 | ```bash
|
19 | npm install -g typescript
|
20 | ```
|
21 |
|
22 | For our nightly builds:
|
23 |
|
24 | ```bash
|
25 | npm install -g typescript@next
|
26 | ```
|
27 |
|
28 | ## Contribute
|
29 |
|
30 | There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
|
31 | * [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
|
32 | * Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
|
33 | * Engage with other TypeScript users and developers on [StackOverflow](https://stackoverflow.com/questions/tagged/typescript).
|
34 | * Join the [#typescript](https://twitter.com/search?q=%23TypeScript) discussion on Twitter.
|
35 | * [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
|
36 | * Read the language specification ([docx](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true),
|
37 | [pdf](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.pdf?raw=true), [md](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)).
|
38 |
|
39 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see
|
40 | the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com)
|
41 | with any additional questions or comments.
|
42 |
|
43 | ## Documentation
|
44 |
|
45 | * [Quick tutorial](https://www.typescriptlang.org/docs/tutorial.html)
|
46 | * [Programming handbook](https://www.typescriptlang.org/docs/handbook/basic-types.html)
|
47 | * [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)
|
48 | * [Homepage](https://www.typescriptlang.org/)
|
49 |
|
50 | ## Building
|
51 |
|
52 | In order to build the TypeScript compiler, ensure that you have [Git](https://git-scm.com/downloads) and [Node.js](https://nodejs.org/) installed.
|
53 |
|
54 | Clone a copy of the repo:
|
55 |
|
56 | ```bash
|
57 | git clone https://github.com/Microsoft/TypeScript.git
|
58 | ```
|
59 |
|
60 | Change to the TypeScript directory:
|
61 |
|
62 | ```bash
|
63 | cd TypeScript
|
64 | ```
|
65 |
|
66 | Install [Gulp](https://gulpjs.com/) tools and dev dependencies:
|
67 |
|
68 | ```bash
|
69 | npm install -g gulp
|
70 | npm install
|
71 | ```
|
72 |
|
73 | Use one of the following to build and test:
|
74 |
|
75 | ```
|
76 | gulp local # Build the compiler into built/local
|
77 | gulp clean # Delete the built compiler
|
78 | gulp LKG # Replace the last known good with the built one.
|
79 | # Bootstrapping step to be executed when the built compiler reaches a stable state.
|
80 | gulp tests # Build the test infrastructure using the built compiler.
|
81 | gulp runtests # Run tests using the built compiler and test infrastructure.
|
82 | # You can override the host or specify a test for this command.
|
83 | # Use --host=<hostName> or --tests=<testPath>.
|
84 | gulp baseline-accept # This replaces the baseline test results with the results obtained from gulp runtests.
|
85 | gulp lint # Runs tslint on the TypeScript source.
|
86 | gulp help # List the above commands.
|
87 | ```
|
88 |
|
89 |
|
90 | ## Usage
|
91 |
|
92 | ```bash
|
93 | node built/local/tsc.js hello.ts
|
94 | ```
|
95 |
|
96 |
|
97 | ## Roadmap
|
98 |
|
99 | For details on our planned features and future direction please refer to our [roadmap](https://github.com/Microsoft/TypeScript/wiki/Roadmap).
|