Name: ts-helpers
Owner: ngParty
Description: Typescript helpers for compiling typescript while specifying `--noEmitHelpers` within your `tsconfig.json`
Created: 2016-04-17 15:29:29.0
Updated: 2017-12-28 22:28:13.0
Pushed: 2017-01-16 09:21:09.0
Homepage: null
Size: 11
Language: TypeScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Typescript helpers (TS <= 2.0) for compiling typescript while specifying --noEmitHelpers
within your tsconfig.json
.
Cross platform ( Node/Browser/WebWorker )
Instead you can provide --importHelpers
together with --noEmitHelpers
which will import emit helpers from Typescript “tslib”
More info: https://github.com/Microsoft/TypeScript/pull/9097
If you are using one of following ES2015/ES.next features with Typescript:
class Foo extends Moo{}
async/await
experimentalDecorators
emitDecoratorMetadata
Typescript will generate helper code in every one file. This can be a problem when dealing with code coverage or payload size of you library/app
To mitigate this problem Typescript starting from version 1.8 allow us to specify noEmitHelpers: true
which wont generate these helpers.
And that's where this little utility comes into play, it defines those helpers just once for whole app.
npm install --save-dev ts-helpers
then load it from your app root file:
ain.ts
rt 'ts-helpers';
and set tsconfig noEmitHelpers
like following example:
ompilerOptions": {
"module": "commonjs",
"target": "es5",
"noImplicitAny": false,
"sourceMap": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"moduleResolution": "node",
"pretty": true,
"noEmitHelpers": true
xclude": [
"node_modules"
That's it! enjoy ;)