DEV Community

Discussion on: Rethinking Dependency Injection in TypeScript

Collapse
 
mindplay profile image
Rasmus Schultz

By the way, here is an earlier version of my latest container attempt, which does work:

gist.github.com/mindplay-dk/f695e6...

However, this approach requires you to manually combine the right types with the right providers - so, while this does achieve the intended validation (if you comment-out the ...systemServices() from the container creation call) there is nothing to guarantee you're actually combining the right things... This is much easier to understand though, and it works, so it might give you some idea of the direction I'm trying to head with that experiment. 🙂