Container defaults and optional external resolver
Optionalparent: DiContainer
Internal parent when constructing a scope
InternallocalInstances of scope-local registrations, allocated on first local resolve.
Readonly InternalrootInternal owner of singleton instances.
InternalslotsInternal slot storage, allocated on first scoped resolution.
Creates an independent scope with inherited compiled providers.
A child with fresh scoped slots
Runs all owned cleanups in reverse creation order, once. Each asynchronous disposal has a fixed 5000 ms deadline; timeouts are recorded with the provider's name and later disposals still run. A timed-out disposal's later outcome is ignored. Synchronous disposals remain untimed and synchronous.
A promise only when cleanup is asynchronous
Obtains the request-owned scope and schedules its disposal once.
Request context with deferred cleanup
The cached scope for this context
Reports explicit or external availability without constructing anything.
Token to inspect
Whether resolution has a provider
Internal
Internal opaque-factory diagnostics used at bootstrap.
Unchecked factory tokens
Registers a provider while open; a scope may add only new leaf tokens. Singleton registrations on a scope are stored as scoped, so their instances and disposals belong to that scope rather than the root.
Identity or string token
Construction recipe
Optionaloptions: ProviderOptions<T>
Lifetime and optional cleanup
Nothing
Resolves a token through its compiled graph.
Token carrying the expected value type
The resolved instance
Internal
Internal ownership hook used only by compiled constructors.
Disposal of a just-created instance
Provider identity used to name a disposal timeout
Nothing
A lazily compiled container, open until its owner calls close().
Example
Since
0.1.0