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

Why does TypeScript not throw a compile error for an undefined type

$
0
0

Here's a simple repro to describe the problem:

  1. I created a vanilla RN project using npx react-native init MyApp --template react-native-template-typescript
  2. In App.tsx, I added let foo: IThoughtTheWholePointOfATypeSafeLanguageWasNotToAllowShitLikeThis = "...seriously, wtf, why does this compile without an error!?";
  3. I run the app using yarn iOS

The app runs fine and there are no errors in the bundler.

Question: How do I make it throw a compile error?


Viewing all articles
Browse latest Browse all 6211

Trending Articles



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