DylanJu
1 min readJan 17, 2019

--

  1. package install (in my case "typescript: "^3.2.2")
    - yarn add typescript
  2. npm command register (if you installed typescript not global)
    - "script": { tsc": tsc" }
  3. configure ts
    - (command) tsc --init
  4. 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

--

--

DylanJu
DylanJu

Written by DylanJu

당근페이 Frontend-developer

No responses yet