Split out class definition type inference to module