Add scoped factory and create matching ref. If ref is given it is reused
A scoped factory is only used once per scope.
Add singleton factory and create matching ref. If ref is given it is reused
A singleton factory is only used once and the result cached until it is cleared.
Add transient factory and create matching ref. If ref is given it is reused
A transient factory is used for every access and the result is never cached.
Remove all or specific ref from container but leaves factory intact. Only relevant for singleton or scoped services
Create a fully independent clone of the current container
Retrieves the data from the container referenced by the given RefSymbol. If there is no data available it returns undefined but never throws an exception.
Retrieves the data from the container referenced by the given RefSymbol. If there is no data available it throws an exception defined by the container.
Merge two or more containers. Conflicting factories, service lifetimes and singletons are overwritten by priority, see args.
Rest
...args: T[]container, ordered descending by priority
Removes all or specific ref from container which includes the factory.
Creates separate scope from the current container. Data except scope is shared between copy and original object.
Renews scope of current container.
Add scoped data and create matching ref. If ref is given it is reused
The data is only available in the current scope.
Add singleon data and create matching ref. If ref is given it is reused
The data is available everywhere.
Container interface for full functionality.