Creates the DiPlugin.
The plugin registers an IContainer under CAPABILITIES.DI_CONTAINER at PLUGIN_PRIORITY.NORMAL. Other plugins can then access it via ctx.container (lazily resolved by the kernel) or ctx.services.get<IContainer>(CAPABILITIES.DI_CONTAINER).
IContainer
CAPABILITIES.DI_CONTAINER
PLUGIN_PRIORITY.NORMAL
ctx.container
ctx.services.get<IContainer>(CAPABILITIES.DI_CONTAINER)
Optional
Plugin configuration
The plugin instance
import { DiPlugin } from '@setu-ts/di-plugin';app.register(DiPlugin({ defaultScope: 'singleton' })); Copy
import { DiPlugin } from '@setu-ts/di-plugin';app.register(DiPlugin({ defaultScope: 'singleton' }));
During bootstrap for invalid dependency graphs; on close for disposal failures
0.1.0
Creates the DiPlugin.
The plugin registers an
IContainerunderCAPABILITIES.DI_CONTAINERatPLUGIN_PRIORITY.NORMAL. Other plugins can then access it viactx.container(lazily resolved by the kernel) orctx.services.get<IContainer>(CAPABILITIES.DI_CONTAINER).