I do the same workflow, where I generate types during build. I often generate them directly from the datasource (e.g. directly from the API). Then I get compile-time errors if the API changes.