-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
To enable more complex dependency injection schemes, we need to start supporting dependency scopes.
Constraints:
-
We should support the following scopes
- Transient
- Singleton
- Request
-
The scope declaration API should look like this
container.bind<IMyComponent>(MY_COMPONENT, myComponent, { scope: 'transient' }-
Default scope should be
transient -
All scopes should be exported from the package as a read only collection
import { scope } from 'tinioc'
container.bind<IMyComponent>(MY_COMPONENT, myComponent, { scope: scope.TRANSIENT }Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request