const enum ColumnValues { one = 1, two = 2, three = 3,}interface Props { style?: StyleProp<ViewStyle>; title?: string; titleContainerStyle?: StyleProp<ViewStyle>; titleStyle?: StyleProp<TextStyle>; textInputStyle?: StyleProp<TextStyle>; column?: ColumnValues.one | ColumnValues.two | ColumnValues.three;}const DynPut: FC<Props> = Props => {...return(...)
I have imported this DynPut into another component and passed the value 10 to the Column Prop but typescript is not throwing any errors. How to make typescript throw an error when any values greater than 3 is passed to the Column Prop
<DynPut title="Add Items" style={{backgroundColor: 'yellow'}} titleStyle={{backgroundColor: 'green'}} titleContainerStyle={{backgroundColor: 'green'}} textInputStyle={{borderWidth: 5}} column={10} />