Skip to content
Buy me a coffee

ServiceLifetime

const ServiceLifetime: object

Defined in: src/types.ts:4

How long a resolved instance lives.

readonly Scoped: "SCOPED" = 'SCOPED'

One instance per scope.

readonly Singleton: "SINGLETON" = 'SINGLETON'

One instance for the whole root provider, shared by every scope.

readonly Transient: "TRANSIENT" = 'TRANSIENT'

A new instance on every resolution.