Created
September 8, 2018 18:10
-
-
Save letsar/a28d5f621a36e27f2ad964dabb68e5f4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Service {} | |
class ServiceA extends Service {} | |
class ServiceB extends Service { | |
ServiceB(ServiceA serviceA); | |
} | |
... | |
// Registers a complex factory by resolving the dependency | |
// when the type is resolved. | |
container.registerFactory((c) => ServiceB(c.resolve<ServiceA>())); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment