From bcb5f546d54d50dd99a7a5970211e62a1dd0808c Mon Sep 17 00:00:00 2001 From: David <4661784+retyui@users.noreply.github.com> Date: Sat, 24 Sep 2022 11:41:12 +0200 Subject: [PATCH] Recommend to use `es2019` & `@tsconfig/react-native` config --- docs/typescript.md | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/docs/typescript.md b/docs/typescript.md index e3e52e66439..b882d9a69ed 100644 --- a/docs/typescript.md +++ b/docs/typescript.md @@ -78,14 +78,14 @@ ignite new MyTSProject ```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 ``` ```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 ``` @@ -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" } ```