Currently in swift we can check instance's class type by using 'is' operator. for example:
....
guard anyInstance is MYClass else {
return
}
....
In my case, I need to compare same instance with multiple class type, for example:
...
if anyInstance is MyClassOne ||
anyInstance is MyClassTwo || anyInstance is MyClassThree {
return
}
...
Is there a better way in swift to write this kind for conditions? something like
....
if anyInstance is (MyClassOne, MyClassTwo, MyClassThree) {
return
}
...