From aa2f251b4159aa94d9e84889a001e157af0cd612 Mon Sep 17 00:00:00 2001 From: jthetzel Date: Thu, 28 Sep 2017 09:22:49 -0230 Subject: [PATCH] Fix typescript errors Remove rootDir from example/tsconfig.json Inclusion was causing TS6059 'rootDir' is expected to contain all source files error. Suggestion to remove from: https://github.com/wmonk/create-react-app-typescript/pull/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: https://github.com/AngularClass/angular-starter/issues/931#issuecomment-244001423 Removing carets from devDependencies Presume this is preferred, as master branch does not use carets. --- example/package.json | 4 ++-- example/tsconfig.json | 3 +-- package.json | 10 +++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/example/package.json b/example/package.json index 6e86ce342..968fdb4d1 100644 --- a/example/package.json +++ b/example/package.json @@ -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", diff --git a/example/tsconfig.json b/example/tsconfig.json index 4e01d0a88..2d4532027 100644 --- a/example/tsconfig.json +++ b/example/tsconfig.json @@ -13,7 +13,6 @@ "noUnusedLocals": true, "outDir": "./dist", "removeComments": true, - "rootDir": "./src", "sourceMap": true, "strictNullChecks": true, "suppressImplicitAnyIndexErrors": true, @@ -23,4 +22,4 @@ "node_modules", "static" ] -} \ No newline at end of file +} diff --git a/package.json b/package.json index 36aa6321e..4f220fa53 100644 --- a/package.json +++ b/package.json @@ -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",