How to conform normal tableVC to HitsController protocol?

So I guess making the hit cells in the search results instantiate a VC wasn’t a good question in regards to responses. I have a different approach that I’m not sure how to approach. I want the same tableVC holding my data to be the same tableVC that shows the hits as well. I was reading the documentation and it said something about subclassing so I added the HitsController protocol to my tableVC like so:

class TeacherTableViewController: UITableViewController, UITextFieldDelegate, MenuControllerDelegate, HitsController  {

typealias DataSource = <#type#>

I am quite confused on what to put for the typealias line and what to do after that. Basically, I just want my TeacherTableViewController to be the hitsTableViewController instead of having 2 separate tableViewControllers.

Hi @dantesauder ,

There is no problem, to use the same ViewController for multiple purposes as the InstantSearch provides the necessary protocol.

To satisfy HitsController protocol conformance, you have to declare hitsSource variable of type HitsInteractor<MyHit>? where MyHit is the type of your hit conforming to Codable protocol.
As a result, typealias DataSource will be automatically derived and you don’t have to provide it explicitly.