Skip to content

Allow to provide the handler instance #637

Description

@snordquist

Currently, I try to use next-api-decorators in combination with tsyringe for dependency injection.

In order to get this to work I had to allow the container instance to instantiate the handler class.

(e.g. container.resolve(cls) instead of new cls())

It would be nice if next-api-decorators would allow me to provide the instance

const instance = new cls();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions