UNPKG

2.13 kBMarkdownView Raw
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
6This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
7
8# Installing
9
10For the latest stable version:
11
12```
13npm install tslib
14```
15
16# Usage
17
18Set the `noEmitHelpers` compiler option on the command line or in your tsconfig.json:
19```
20tsc --noEmitHelpers
21```
22
23Import tslib in your TypeScript sources:
24```ts
25import * as tslib from "tslib";
26
27const __extends = tslib.__extends;
28const __awaiter = tslib.__awaiter;
29
30...
31```
32
33Or use it globally on the web via `<script src="tslib.js"></script>`:
34
35```ts
36// <reference path="tslib.global.d.ts" />
37var __extends = __tslib.__extends;
38var __awaiter = __tslib.__awaiter;
39
40...
41```
42
43## Contribute
44
45There 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