Classes

c
CircularDetector

Detects circular dependencies during container resolution.

c
ContainerBuilder

Fluent builder for IContainer instances.

c
ProviderRegistry(parent?: ProviderRegistry)

Token-keyed store of provider entries with optional parent inheritance.

c
ScopeManager(
singletons?: Map<string, unknown>,
scoped?: Map<string, unknown>
)

Manages singleton and scoped instance caches for a container.

Functions

Interfaces

I
ContainerConfig

Configuration for constructing a DiContainer.

I
DiPluginOptions

Options for DiPlugin.

  • autoRegister: boolean

    When true, resolving a token not registered in the container automatically falls back to the kernel's ServiceRegistry. The first successful fallback is cached as a singleton so subsequent resolves are fast. Explicit DI registrations always take precedence. Defaults to false.

  • defaultScope: ServiceScope

    Default lifecycle scope for providers registered without an explicit scope. Defaults to 'singleton'.

I
ExternalResolver

External resolver used for auto-registration fallback. A subset of IServiceRegistry — when a token is not in the DI container and autoRegister is enabled, the container delegates here.

Usage

import * as Optional_dependency_injection_container_plugin___Provides__DiPlugin__which_registers_an___linkcode_IContainer__under__CAPABILITIES_DI_CONTAINER___The_container_supports_singleton__scoped__and_transient_lifecycles__constructor_injection__factory_and_value_providers__circular_dependency_detection__hierarchical_scopes__and_optional_auto_registration_fallback_to_the_kernel_s_ServiceRegistry___Every_export_here_is_public_API_and_documented_in_PUBLIC_API_md__AI_GUIDELINES__10__ from "di-plugin/src/index.ts";