Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6214

React Native still runs with incorrectly defined types (TypeScript)

$
0
0

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"  ]}

Viewing all articles
Browse latest Browse all 6214

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>