зеркало из https://github.com/microsoft/tslib.git
3fe1d0e73e | ||
---|---|---|
.gitattributes | ||
.gitignore | ||
.npmignore | ||
CopyrightNotice.txt | ||
LICENSE.txt | ||
README.md | ||
package.json | ||
tslib.d.ts | ||
tslib.es6.d.ts | ||
tslib.es6.js | ||
tslib.global.d.ts | ||
tslib.js |
README.md
Runtime
This is a runtime library for TypeScript that contains all of the TypeScript helper functions.
Installing
For the latest stable version:
npm install tslib
Usage
Set the noEmitHelpers
compiler option on the command line or in your tsconfig.json:
tsc --noEmitHelpers
Import tslib in your TypeScript sources:
import * as tslib from "tslib";
const __extends = tslib.__extends;
const __awaiter = tslib.__awaiter;
...
Or use it globally on the web via <script src="tslib.js"></script>
:
// <reference path="tslib.global.d.ts" />
var __extends = __tslib.__extends;
var __awaiter = __tslib.__awaiter;
...
Contribute
There are many ways to contribute to TypeScript.
- Submit bugs and help us verify fixes as they are checked in.
- Review the source code changes.
- Engage with other TypeScript users and developers on StackOverflow.
- Join the #typescript discussion on Twitter.
- Contribute bug fixes.
- Read the language specification (docx, pdf).