OptionalDependency · Core API
type OptionalDependency<T> = object;A token wrapped as an optional dependency.
Optional dependencies resolve to undefined when no provider is registered
in the container chain.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
|
|
Properties
Section titled “Properties”readonly token: Token<T>;Wrapped token whose provider may be absent.
optional
Section titled “optional”readonly optional: true;Marker used by the resolver to distinguish optional dependencies.