I'm just trying out typescript to see what's all the fuss is about, but I'm having some problems with type checking.
I'm intentionally passing wrong props to functional component to see if an error is thrown, but its not and cant seem to find the reasson.
Button component
interface Props { label: string;}const Button: React.FC<Props> = ({ label }) => { return (<TouchableOpacity style={tailwind("rounded-full border-2 rounded-lg py-2 px-4 bg-blue-100 border-blue-600" )}><Text style={tailwind("text-xl")}>{label}</Text></TouchableOpacity> );};
Button used
<View style={tailwind("w-full h-full flex justify-start")}><View style={tailwind("w-full")}><Button text={true} /></View></View>
tsconfig.json
"compilerOptions": {"allowSyntheticDefaultImports": true,"jsx": "react-native","lib": ["dom", "esnext"],"moduleResolution": "node","noEmit": true,"skipLibCheck": true,"resolveJsonModule": true,"strict": true }}