Type Alias: Dependency<S, A>
Dependency<
S,A> = keyofS| keyofA|OptionalDependency|CollectDependency| (() =>any)
Defined in: src/types.ts:83
What a registration can depend on:
- a service key: the factory receives that service
optional(key): the service, orundefinedwhen it is not registeredcollect(tag): every service registered under the tag, in registration order- a function: called on each resolution, the factory receives its result
A is a registry's own additions, on top of the services S it was given (see ServiceRegistry).
(() => any rather than () => unknown keeps typos in keys reported on the key itself.)
Type Parameters
S
S
A
A = { }