Skip to content

Commit 5426bf9

Browse files
committed
fix(typescript): use correct ts version and fix promise types
Angular's compiler CLI requires typescript@^1.9.0-dev. The built-in Promise typings for that version of TS have an incorrect definition of Promise.resolve, so the config files have been updated to use @types/es6-promise which correctly defines Promise.resolve typings.
1 parent c83bd46 commit 5426bf9

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"devDependencies": {
4545
"@angular/compiler-cli": "^0.5.0",
4646
"@angular/platform-server": "^2.0.0-rc.5",
47+
"@types/es6-promise": "0.0.31",
4748
"conventional-changelog-cli": "^1.2.0",
4849
"es6-module-loader": "^0.17.10",
4950
"es6-shim": "^0.35.0",
@@ -69,7 +70,7 @@
6970
"traceur": "0.0.96",
7071
"tsd": "^0.6.5",
7172
"typedoc": "github:jeffbcross/typedoc",
72-
"typescript": "next",
73+
"typescript": "^1.9.0-dev.20160627-1.0",
7374
"typings": "^1.3.2",
7475
"zone.js": "^0.6.21"
7576
},

tsconfig.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
"declaration": true,
1313
"removeComments": true,
1414
"lib": [
15-
"es2015",
15+
"es5",
16+
"es2015.collection",
17+
"es2015.core",
18+
"es2015.iterable",
1619
"dom"
1720
],
1821
"skipLibCheck": true
@@ -30,7 +33,8 @@
3033
"src/auth/auth.spec.ts",
3134
"src/auth/auth_backend.spec.ts",
3235
"typings/index.d.ts",
33-
"node_modules/zone.js/dist/zone.js.d.ts"
36+
"node_modules/zone.js/dist/zone.js.d.ts",
37+
"node_modules/@types/es6-promise/index.d.ts"
3438
],
3539
"angularCompilerOptions": {
3640
"skipTemplateCodegen": true

tsconfig.publish.es5.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
"declaration": true,
1313
"removeComments": true,
1414
"lib": [
15-
"es2015",
15+
"es5",
16+
"es2015.collection",
17+
"es2015.core",
18+
"es2015.iterable",
1619
"dom"
1720
]
1821
},

tsconfig.publish.es6.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@
1212
"declaration": true,
1313
"removeComments": true,
1414
"lib": [
15-
"es2015",
15+
"es5",
16+
"es2015.collection",
17+
"es2015.core",
18+
"es2015.iterable",
1619
"dom"
1720
],
21+
"skipLibCheck": true,
1822
"moduleResolution": "node"
1923
},
2024
"files": [

0 commit comments

Comments
 (0)