Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

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

Description

@tgiardina

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions