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

React Native typescript Unexpected token in catch clause

$
0
0

I have a fully configured react native typescript project and everything is working as expected, but I have a strange issue:

I all of my catch blocks, since I have strict mode enabled, I have typescript errors like this one enter image description here

So the first obvious thing to do was to add any type to the error object

enter image description here

Ok, error gone. But at this point the problem in in RN bundler:

enter image description here

I am pretty sure that it's caused by some sort of wrong typescript configuration, but I really don't have any idea of what to check, any help?


Viewing all articles
Browse latest Browse all 6287

Trending Articles



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