Open
Description
@serialize({})
export class SocialEntity extends Serializable{
@SerializeProperty({ map: 'entity_type' })
public entityType:string;
@SerializeProperty({
map: 'entity',
type:entityType == 'user'?UserProfile:entityType=='team'?TeamProfile:PageProfile
})
public entity:UserProfile | TeamProfile | PageProfile;
}
Something like this?