Begin abstracting global container into injector

This commit is contained in:
2021-06-17 19:34:32 -05:00
parent f00233d49a
commit 9796a7277e
6 changed files with 67 additions and 9 deletions

View File

@@ -10,7 +10,7 @@ import {
DEPENDENCY_KEYS_SERVICE_TYPE_KEY,
PropertyDependency,
} from '../types'
import {Container} from '../Container'
import {ContainerBlueprint} from '../ContainerBlueprint'
/**
* Get a collection of dependency requirements for the given target object.
@@ -145,9 +145,9 @@ export const Singleton = (name?: string): ClassDecorator => {
Injectable()(target)
if ( name ) {
Container.getContainer().registerNamed(name, target)
ContainerBlueprint.getContainerBlueprint().registerNamed(name, target)
} else {
Container.getContainer().register(target)
ContainerBlueprint.getContainerBlueprint().register(target)
}
}
}