1 | [![Issue Stats](http://issuestats.com/github/Microsoft/TypeScript-Runtime/badge/pr)](http://issuestats.com/github/microsoft/typescript-runtime)
|
2 | [![Issue Stats](http://issuestats.com/github/Microsoft/TypeScript-Runtime/badge/issue)](http://issuestats.com/github/microsoft/typescript-runtime)
|
3 |
|
4 | # Runtime
|
5 |
|
6 | This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
|
7 |
|
8 | # Installing
|
9 |
|
10 | For the latest stable version:
|
11 |
|
12 | ```
|
13 | npm install tslib
|
14 | ```
|
15 |
|
16 | # Usage
|
17 |
|
18 | Set the `noEmitHelpers` compiler option on the command line or in your tsconfig.json:
|
19 | ```
|
20 | tsc --noEmitHelpers
|
21 | ```
|
22 |
|
23 | Import tslib in your TypeScript sources:
|
24 | ```ts
|
25 | import * as tslib from "tslib";
|
26 |
|
27 | const __extends = tslib.__extends;
|
28 | const __awaiter = tslib.__awaiter;
|
29 |
|
30 | ...
|
31 | ```
|
32 |
|
33 | Or use it globally on the web via `<script src="tslib.js"></script>`:
|
34 |
|
35 | ```ts
|
36 | // <reference path="tslib.global.d.ts" />
|
37 | var __extends = __tslib.__extends;
|
38 | var __awaiter = __tslib.__awaiter;
|
39 |
|
40 | ...
|
41 | ```
|
42 |
|
43 | ## Contribute
|
44 |
|
45 | There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
|
46 | * [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
|
47 | * Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
|
48 | * Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
|
49 | * Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
|
50 | * [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
|
51 | * Read the language specification ([docx](http://go.microsoft.com/fwlink/?LinkId=267121), [pdf](http://go.microsoft.com/fwlink/?LinkId=267238)).
|
52 |
|
53 |
|
54 | ## Documentation
|
55 |
|
56 | * [Quick tutorial](http://www.typescriptlang.org/Tutorial)
|
57 | * [Programming handbook](http://www.typescriptlang.org/Handbook)
|
58 | * [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)
|
59 | * [Homepage](http://www.typescriptlang.org/) |
\ | No newline at end of file |