Update templates to support TypeScript 'strict' mode

This commit is contained in:
Stephan Troyer
2017-07-13 00:08:42 +02:00
committed by Steve Sanderson
parent 8b37dc8561
commit b8c006a3e9
27 changed files with 77 additions and 58 deletions

View File

@@ -10,7 +10,7 @@ let routes = RoutesModule.routes;
function renderApp() {
// This code starts up the React app when it runs in a browser. It sets up the routing
// configuration and injects the app into a DOM element.
const baseUrl = document.getElementsByTagName('base')[0].getAttribute('href');
const baseUrl = document.getElementsByTagName('base')[0].getAttribute('href')!;
ReactDOM.render(
<AppContainer>
<BrowserRouter children={ routes } basename={ baseUrl } />

View File

@@ -20,12 +20,24 @@
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-15.5.1.tgz",
"dev": true
},
"@types/react-hot-loader": {
"version": "3.0.3",
"from": "@types/react-hot-loader@3.0.3",
"resolved": "https://registry.npmjs.org/@types/react-hot-loader/-/react-hot-loader-3.0.3.tgz",
"dev": true
},
"@types/react-router": {
"version": "4.0.12",
"from": "@types/react-router@4.0.12",
"resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-4.0.12.tgz",
"dev": true
},
"@types/react-router-dom": {
"version": "4.0.5",
"from": "@types/react-router-dom@4.0.5",
"resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-4.0.5.tgz",
"dev": true
},
"@types/webpack-env": {
"version": "1.13.0",
"from": "@types/webpack-env@1.13.0",

View File

@@ -6,7 +6,9 @@
"@types/history": "4.6.0",
"@types/react": "15.0.35",
"@types/react-dom": "15.5.1",
"@types/react-hot-loader": "3.0.3",
"@types/react-router": "4.0.12",
"@types/react-router-dom": "4.0.5",
"@types/webpack-env": "1.13.0",
"aspnet-webpack": "^2.0.1",
"aspnet-webpack-react": "^3.0.0",