react-native|react-native tsconfig

{ "compilerOptions": { "target": "es6", "allowJs": true, "jsx": "react", "outDir": "./dist", "sourceMap": true, "noImplicitAny": false, "module": "commonjs", "watch": true, "types": [ "react","react-native" ], "skipLibCheck": true, "moduleResolution":"node" }, "include": [ "typings/**/*.d.ts", "src/**/*.ts", "src/**/*.tsx" ], "exclude": [ "node_modules" ], }

【react-native|react-native tsconfig】需要下载@type模块
  • "@types/react": "^16.3.16",
  • "@types/react-native": "^0.55.17",
  • react-native-typescript-transformer

    推荐阅读