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 Oct 29, 2022
1 parent fd87e46 commit 39f1a69
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 62 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
23 changes: 3 additions & 20 deletions website/versioned_docs/version-0.69/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,24 +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"],
"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
24 changes: 3 additions & 21 deletions website/versioned_docs/version-0.70/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 39f1a69

Please sign in to comment.