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

Allow to provide the handler instance #637

Open
snordquist opened this issue Sep 13, 2023 · 0 comments
Open

Allow to provide the handler instance #637

snordquist opened this issue Sep 13, 2023 · 0 comments

Comments

@snordquist
Copy link

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();

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