- package install (in my case
"typescript: "^3.2.2"
)
-yarn add typescript
- npm command register (if you installed typescript not global)
-"script": { tsc": tsc" }
- configure ts
- (command)tsc --init
- tsconfig.json
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"outDir": "./ts",
"removeComments": true,
"strict": true,
"noImplicitAny": true,
"esModuleInterop": true
}
6. tslint.json
{
"extends": ["tslint:latest", "tslint-react"],
"rules": {
// override tslint-react rules here
// "jsx-wrap-multiline": false
}
}
5. further step for React-Native
- yarn add @babel/polyfill metro-react-native-babel-preset
- .babelrc -> preset -> metro-react-native-babel-preset