feat: add strict mode (only inject classes annotated with `@Service` decorator)
See original GitHub issueI would like to have a strict mode for typedi where unless a class was registered with the @Service decorator, it does not try and build an instance of that class. This makes it easier to identify errors (they will be thrown as ServiceNotFound error) rather than getting random undefined errors later codepath at runtime. Thoughts?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Dependency Injection using Decorators | by Chidume Nnamdi
A dependency is a piece of code (either a library, class, object or any other data type) required by another piece of code...
Read more >Angular Typescript dependency injection explicit annotation ...
I am using angular 1.5 with typescript and i want to create an interceptor to insert token in the custom header and also...
Read more >Weld 4.0.3.Final - CDI Reference Implementation - JBoss.org
You can't inject an EJB using its remote interface unless you define a resource, which we'll meet in Java EE component environment resources...
Read more >Wiring in Spring: @Autowired, @Resource and @Inject
In this Spring Framework tutorial, we'll demonstrate how to use annotations related to dependency injection, namely the @Resource, @Inject, ...
Read more >Best Practices for Dependency Injection with Spring
We can annotate this field, and Spring will inject an instance of the service. Property Injection. Field Controller. @Controller.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

That would be great, I’m having troubles with something similar. But it seams that this package is not maintained anymore 😞
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.