resolveRegistryEntry<T>(): T
Resolves one entry of a registration option that accepts either an instance
or a RegistryFactory.
A non-function entry is returned unchanged — the instance arm is
byte-identical to the pre-factory behaviour. A function entry is called
once with services, and its return value is the result. A throw from the
factory is wrapped in an Error whose message names label and whose
cause is the original, so a factory that resolves a capability the
application forgot to register fails start() naming the option and the
entry rather than escaping with a bare registry message.
The discrimination is typeof entry === 'function': no instance of any
registration contract is callable, and a class — the one shape that is a
function and not a factory — is not assignable to RegistryFactory<T>, so
passing one is a compile error rather than a runtime TypeError.
entry: T | RegistryFactory<T>
An instance or a factory producing one
services: IServiceRegistry
The registry handed to a factory
The resolved instance