inversify-express-example
inversify-express-example copied to clipboard
inversify-express-utils: BaseHttpController's method generic return types
This is a feature request for inversify-express-utils. I would like this.created and related methods to return an object that takes a generic.
Expected Behavior
I expect this.created to return an interface with a generic (e.g., IHttpResponse<T>).
Current Behavior
this.created returns OkNegotiatedContentResult, which does not take a generic.
Context
I have a controller that extend BaseHttpController and have written a post method. In this method I return the result of this.created(...). I was hoping the return type would include a generic (e.g., IHttpResponse<T>) so that I could use type checking to validate whatever argument I passed to this.created.