Interface DependencyOptions

Hierarchy

Properties

lifecycle?: LifecyclePolicy

Determines how a service is created and maintained in the container. A service with a lifecycle of singleton will be created once and is reused across resolutions. A service with a lifecycle of transient will be created each time it is resolved.

Default

LifecyclePolicy.singleton
priority?: number

Optional priority that determines the preferred implementation when multiple implementations are available; a higher number is preferred over a lower number. Services are registered with a priority of 0 by default.

Note: Negative numbers are allowed and supported

provides?: ServiceType | ServiceType[]

List of components that is provided by this class