✅ Is it possible to convert a generic interface to a generic interface?

I'm trying to prevent the creation of multiple giant switches in a controller by passing the instantiation of the interfaces to a factory. Person is the parent class(model) and all the other ones are sub-classes that have no problem to convert to the parent class in another factory. Is this error appearing because it is impossible to convert interfaces?
image.png
Was this page helpful?