Maps capability tokens to service instances.
The registry is the framework's primary service resolution mechanism; the
optional DI container is a convenience layer on top of it. The application
registry is sealed after runBootstrap(); request-scoped services are
registered on the request context instead.
register<T extends object>(): void
Registers a service instance under a capability token.
registerFactory<T extends object>(): void
Registers a lazy factory: the service is instantiated on first
get and cached for subsequent lookups.
get<T extends object>(token: CapabilityToken): T
Resolves a service by capability token.
On a multi-provider token this returns the FIRST registered provider; use
IServiceRegistry.getAll to reach all of them.
getAll<T extends object>(token: CapabilityToken): readonly T[]
Resolves every provider registered for a multi-provider token.
has(token: CapabilityToken): boolean
Reports whether a capability is available.
unregister(token: CapabilityToken): boolean
Removes a registration. On a multi-provider token this removes EVERY provider registered under it, not just the first.