Collection of factories registered with this container.
Collection of singleton instances produced by this container.
Collection of static-class overrides registered with this container.
Collection of callbacks waiting for a dependency key to be resolved.
Given a different container, copy the factories and instances from this container over to it.
Get a collection of dependency keys required by the given target, if it is registered with this container.
Get the static class overriding the base class.
Returns true if a static override exists for the given base class.
Create an instance of the given target. The target can either be a DependencyKey registered with this container (in which case, the singleton value will be returned), or an instantiable class.
If the instantiable class has the Injectable decorator, its injectable parameters will be automatically injected into the instance.
Get the registered instance of the static override of a given class.
Get a Promise that resolves the first time the given dependency key is resolved by the application. If it has already been resolved, the Promise will resolve immediately.
Given a factory and manually-provided parameters, resolve the dependencies for the factory and produce its value.
Purge all factories and instances of the given key from this container.
Register a basic instantiable class as a standard Factory with this container.
Register a given factory with the container.
Register a basic instantiable class as a standard Factory with this container, identified by a string name rather than static class.
unique name to identify the factory in the container
Register the given function as a factory within the container.
unique name to identify the factory in the container
factory to produce a value
Register a value as a singleton in the container. It will not be instantiated, but can be injected by its unique name.
unique name to identify the singleton in the container
Register a static class to the container along with its already-instantiated instance that will be used to resolve the class.
Register a static class as an override of some base class.
Remove all stored instances of the given key from this container.
Resolve the dependency key. If a singleton value for that key already exists in this container, return that value. Otherwise, use the factory an given parameters to produce and return the value.
Execute a closure on this container, disabling parent-resolution. Effectively, the closure will have access to this container as if it were NOT a scoped container, and only contained its factories.
Create a new scoped container based on a parent container instance.
Get the global instance of this container.
Given a Container instance, apply the ContainerBlueprint to it.
extollo (v. latin) - to lift up, to elevate
Extollo is a free & libre application framework in TypeScript.
A container that uses some parent container as a base, but can have other factories distinct from that parent.
If an instance is not found in this container, it will be resolved from the parent container.
However, if an instance IS found in this container, it will ALWAYS be resolved from this container, rather than the parent.
This can be used to create scope-specific containers that can still resolve the global dependencies, while keeping scope-specific dependencies separate.
The Request class from @extollo/lib is a ScopedContainer. It can resolve all dependencies that exist in the global Container, but it can also have request-specific services (like the Session) injected into it.