Runtime library for TypeScript helpers.
Перейти к файлу
Ron Buckton 3fe1d0e73e Ensures __tslib is always installed globally, if possible. 2016-05-25 14:38:32 -07:00
.gitattributes Added initial version of tslib.js 2015-04-22 13:47:06 -07:00
.gitignore General cleanup. 2016-05-18 13:25:21 -07:00
.npmignore Added initial version of tslib.js 2015-04-22 13:47:06 -07:00
CopyrightNotice.txt Added initial version of tslib.js 2015-04-22 13:47:06 -07:00
LICENSE.txt Added initial version of tslib.js 2015-04-22 13:47:06 -07:00
README.md General cleanup. 2016-05-18 13:25:21 -07:00
package.json General cleanup. 2016-05-18 13:25:21 -07:00
tslib.d.ts General cleanup. 2016-05-18 13:25:21 -07:00
tslib.es6.d.ts General cleanup. 2016-05-18 13:25:21 -07:00
tslib.es6.js General cleanup. 2016-05-18 13:25:21 -07:00
tslib.global.d.ts General cleanup. 2016-05-18 13:25:21 -07:00
tslib.js Ensures __tslib is always installed globally, if possible. 2016-05-25 14:38:32 -07:00

README.md

Issue Stats Issue Stats

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.

Documentation