For example I have such function:
type A = {
propA1: string
propA2: string
}
type B = {
propB1: string
propB2: string
}
const f = (arg: A | B) => { }
then It can be used like this:
f({propA1: 'val', propA2: 'val', propB1: 'val'})
But I need an error in this case. I would like possibility passed argument with type only A, or only B, without mixing.