Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inversify-express-utils: BaseHttpController's method generic return types #484

Open
tgiardina opened this issue Aug 6, 2020 · 0 comments

Comments

@tgiardina
Copy link

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.

@tgiardina tgiardina changed the title inversify-express-utils: BaseHttpController's method generic eturn types inversify-express-utils: BaseHttpController's method generic return types Aug 11, 2020
@PodaruDragos PodaruDragos transferred this issue from inversify/InversifyJS Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant