FBI_kingmohbil
how can I specify the return type of the response of API response
The thing is I want to have control over the API responses to define for example this type
and I want to enforce that on every single route, just so I don't forget to write those and to stay semantic as possible in the responses so then in the development time, I would need less time writing unit-tests and the typescript compiler will let me know if I violated this, which I'm not saying I shouldn't write unit tests defiantly I should but this will make my development easier to manages especially If I'm working with a team that isn't that solid to grasp these points
9 replies