I have case where the obj.type can have a set of values, and I check the values in if statments and return if it matches.
type obj = {type: 'typeA' | 'typeB'}
if(obj.type === 'typeA') return obj
if(obj.type === 'typeB') return obj
// At this point typescript know that obj.type is never
// so I want to write a code here that will have type error
// if the obj.type is not never, so I won't forget adding checks
// for all values (if I add more later).