install "@types/node": "^7.0.12",
modify webpack.config.dev.js
{
test: /\.(ts|tsx)$/,
loader: 'tslint',
include: paths.appSrc,
}
// Process JS with Babel.
{
test: /\.(ts|tsx)$/,
include: paths.appSrc,
loader: 'ts'
},
modify appIndexJs in paths.js
appIndexJs: resolveApp('src/index.tsx'),
ts-loader
- Migrate slowly, don't import the Root of your app ASAP
- Migrate files that don't have alot of dependencies (your view components first)
Uncaught (in promise) TypeError: Cannot read property 'createElement' of undefined
Check the render method of * (this is due to a component not being imported correctly)
Solution
import * as React from 'react';
Invalid object blabla
import * as PropTypes from 'prop-types';