Skip to content

Commit

Permalink
Recommend to use es2019 & @tsconfig/react-native config
Browse files Browse the repository at this point in the history
  • Loading branch information
retyui committed Sep 24, 2022
1 parent c9448b0 commit bcb5f54
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions docs/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ ignite new MyTSProject
<TabItem value="npm">

```shell
npm install -D typescript @types/jest @types/react @types/react-native @types/react-test-renderer
npm install -D typescript @types/jest @types/react @types/react-native @types/react-test-renderer @tsconfig/react-native
```

</TabItem>
<TabItem value="yarn">

```shell
yarn add -D typescript @types/jest @types/react @types/react-native @types/react-test-renderer
yarn add -D typescript @types/jest @types/react @types/react-native @types/react-test-renderer @tsconfig/react-native
```

</TabItem>
Expand All @@ -95,25 +95,7 @@ yarn add -D typescript @types/jest @types/react @types/react-native @types/react

```json
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"isolatedModules": true,
"jsx": "react-native",
"lib": ["es2017"],
"types": ["react-native", "jest"],
"moduleResolution": "node",
"noEmit": true,
"strict": true,
"target": "esnext"
},
"exclude": [
"node_modules",
"babel.config.js",
"metro.config.js",
"jest.config.js"
]
"extends": "@tsconfig/react-native/tsconfig.json"
}
```

Expand Down

0 comments on commit bcb5f54

Please sign in to comment.