Thanks for creating this library! I've tried multiple IoC containers and this is the first that is actually type-safe at compile time. 👍
I ran into a problem integrating this into my codebase: empty classes were able to satisfy type checking for provideClass(), even if the class didn't fulfill an interface.
I added a test to type-inject, testResources/tokens-of-interfaces.ts, which showed no issue with type-inject (included in this PR; it may be redundant with other tests?).
It appears strictFunctionTypes must be set to true for empty classes to be properly checked (typed-inject uses "strict": true). A note is added to the README.md to for this requirement.
Thanks for creating this library! I've tried multiple IoC containers and this is the first that is actually type-safe at compile time. 👍
I ran into a problem integrating this into my codebase: empty classes were able to satisfy type checking for
provideClass()
, even if the class didn't fulfill an interface.I added a test to type-inject,
testResources/tokens-of-interfaces.ts
, which showed no issue with type-inject (included in this PR; it may be redundant with other tests?).It appears
strictFunctionTypes
must be set totrue
for empty classes to be properly checked (typed-inject uses"strict": true
). A note is added to theREADME.md
to for this requirement.