How can I make the React Native CLI fail on a TypeScript error?
const getCatOfTheDay = (cat: string) => `Cat of the day: ${cat}`; getCatOfTheDay(123);
This should throw a TypeScript error
Argument of type 'number' is not assignable to parameter of type 'string'.ts(2345)
but instead my npm start
does just continue working and doesn't throw any error.
My tsconfig.json
{"compilerOptions": {"allowSyntheticDefaultImports": true,"forceConsistentCasingInFileNames": true,"jsx": "react-native","module": "commonjs","noEmit": true,"noEmitOnError": true,"strict": true,"target": "ES2020" }}
Using react-native 0.62