Skip to content

Commit

Permalink
Fix typescript errors
Browse files Browse the repository at this point in the history
Remove rootDir from example/tsconfig.json

Inclusion was causing TS6059 'rootDir' is expected
to contain all source files error. Suggestion to remove from:
wmonk/create-react-app-typescript#74

Change tsconfig.json compiler target to es7
With target set to es6, was receiving error:
ERROR in /home/jthetzel/src/react-mapbox-gl/src/layer.ts
(206,22): error TS2339: Property 'includes' does not exist on type 'number[]'.
Suggestion to try es7:
PatrickJS/PatrickJS-starter#931 (comment)

Removing carets from devDependencies
Presume this is preferred, as master branch does not
use carets.
  • Loading branch information
jthetzel committed Oct 4, 2017
1 parent 598e437 commit 6d3486e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"dependencies": {
"immutable": "3.8.1",
"react": "15.6.1",
"react-dom": "15.6.1",
"react": "16.0.0",
"react-dom": "16.0.0",
"react-live": "1.7.1",
"react-router": "3.0.5",
"styled-components": "2.1.2",
Expand Down
3 changes: 1 addition & 2 deletions example/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"noUnusedLocals": true,
"outDir": "./dist",
"removeComments": true,
"rootDir": "./src",
"sourceMap": true,
"strictNullChecks": true,
"suppressImplicitAnyIndexErrors": true,
Expand All @@ -23,4 +22,4 @@
"node_modules",
"static"
]
}
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@
"@types/react-test-renderer": "^15.5.4",
"@types/recompose": "0.24.1",
"@types/supercluster": "^2.3.0",
"enzyme": "^3.0.0",
"enzyme": "3.0.0",
"enzyme-adapter-react-16": "^1.0.0",
"jest": "^21.2.0",
"jest": "21.2.0",
"mapbox-gl": "0.39.1",
"prettier": "1.7.0",
"prop-types": "15.5.10",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-test-renderer": "^16.0.0",
"react": "16.0.0",
"react-dom": "16.0.0",
"react-test-renderer": "16.0.0",
"recompose": "0.25.0",
"ts-jest": "21.0.1",
"tslint": "5.7.0",
Expand Down

0 comments on commit 6d3486e

Please sign in to comment.