createContainer · Core API
function createContainer(providers?): Container;Creates a root container with optional initial providers.
Root containers own singleton instances for providers registered in them.
Parameters
Section titled “Parameters”| Parameter | Type | Default value | Description |
|---|---|---|---|
|
|
readonly |
|
Providers registered before the first resolution. |
Returns
Section titled “Returns”A new root container.
Throws
Section titled “Throws”DuplicateProviderError When the initial providers contain the same
token more than once.