Closed nolazybits closed 6 years ago
Doesn't having an already instantiated object bound to a type defeat the purpose? Just not sure on the use case.
If you want to do it, you can try something like this: (Not tested)
Container.bind(SomeType).provider({
get: () => { return existingObject; }
});
Use case is when object creation is outside of my reach yet I want to be able to use it part of the DI. Regards
Just wondering if this is possible. Couldn't find an example anywhere.. Thanks