I am trying to convert React Native project to TypeScript-based project.So far, I converted .jsx
files to .tsx
files, and when I run yarn tsc
, it throws tons of error.However, my npx react-native start
&& npx react-native run-android
still just runs without any complaining. (I tried cleaning cache)
I intentionally defined one of the variables to incorrect type and code still just runs fine. What I am doing wrong? Why does my project still work?
My tsconfig.json
looks like this
{"compilerOptions": {"allowJs": true,"allowSyntheticDefaultImports": true,"esModuleInterop": true,"isolatedModules": true,"jsx": "react","lib": ["es6"],"moduleResolution": "node","noEmit": true,"noEmitOnError": true,"noImplicitAny": false,"strict": true,"target": "esnext" },"exclude": ["node_modules","babel.config.js","metro.config.js","jest.config.js" ]}