Skip to content

Commit 87c0ff6

Browse files
committed
Enable importHelpers TypeScript compiler option
This prevents helper functions such as __awaiter, __decorate, etc. from being emitted into each and every file that needs them (resulting in multiple copies of the same helper functions all over the code base), and imports them from the new `tslib` module instead. More details at microsoft/TypeScript#3364 (comment)
1 parent 96b082d commit 87c0ff6

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

app/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"react-addons-shallow-compare": "^15.3.2",
4545
"react-dom": "^15.3.2",
4646
"react-free-style": "2.2.0",
47-
"react-virtualized": "7.2.0"
47+
"react-virtualized": "7.2.0",
48+
"tslib": "^1.0.0"
4849
}
4950
}

app/src/common/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"compilerOptions": {
33
"module": "commonjs",
44
"target": "es6",
5+
"importHelpers": true,
56
"noImplicitAny": true,
67
"sourceMap": false,
78
"declaration": true,

app/src/main/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"compilerOptions": {
33
"module": "commonjs",
44
"target": "es6",
5+
"importHelpers": true,
56
"noImplicitAny": true,
67
"sourceMap": false,
78
"declaration": true,

app/src/renderer/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"module": "commonjs",
44
"target": "es6",
55
"jsx": "react",
6+
"importHelpers": true,
67
"noImplicitAny": true,
78
"sourceMap": false,
89
"declaration": true,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"shelljs": "^0.6.0",
6060
"ts-node": "^0.7.3",
6161
"tslint": "^3.15.0-dev.0",
62-
"typescript": "^2.1.0-dev.20160831",
62+
"typescript": "^2.1.0-dev.20160929",
6363
"typings": "^0.8.1",
6464
"vulcanize": "^1.14.8",
6565
"yargs": "^4.7.0"

0 commit comments

Comments
 (0)