You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When doing dependency injection in the constructor using an injection token, one has to know the target type of the injection token and repeat this type in the constructor, e.g.
I have written this utility type in my project code. However I believe it'd beneficial to have it in graphql-modules. Such a type is not currently writeable as a generic Typescript type because Typescript doesn't natively support Higher-Kinded types (parametrized generic types).
Additional context
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When doing dependency injection in the constructor using an injection token, one has to know the target type of the injection token and repeat this type in the constructor, e.g.
Describe the solution you'd like
I'd like graphql-module to provide me with a utility type to extract the target type of the injection token.
Using this simple utility type:
one can rewrite the previous example like so:
Describe alternatives you've considered
I have written this utility type in my project code. However I believe it'd beneficial to have it in graphql-modules. Such a type is not currently writeable as a generic Typescript type because Typescript doesn't natively support Higher-Kinded types (parametrized generic types).
Additional context
The text was updated successfully, but these errors were encountered: