Skip to content

Commit

Permalink
Fix #7: Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mhegazy authored Nov 21, 2016
1 parent 21e6933 commit aee09f0
Showing 1 changed file with 9 additions and 20 deletions.
29 changes: 9 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,18 @@ npm install tslib

# Usage

Set the `noEmitHelpers` compiler option on the command line or in your tsconfig.json:
Set the `importHelpers` compiler option on the command line:
```
tsc --noEmitHelpers
tsc --importHelpers file.ts
```

Import tslib in your TypeScript sources:
```ts
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>`:

```ts
// <reference path="tslib.global.d.ts" />
var __extends = __tslib.__extends;
var __awaiter = __tslib.__awaiter;

...
or in your tsconfig.json:
```json
{
"compilerOptions": {
"importHelpers": true
}
}
```

## Contribute
Expand Down

0 comments on commit aee09f0

Please sign in to comment.