-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What problem would this feature solve?
Allowing developers to declaratively set the lifetime of services (singleton, transient, scoped) improves ergonomics, aligns with top DI libraries, and makes service lifecycles explicit and easy to manage.
Proposed solution or design
Introduce decorators such as @Singleton, @Transient, and @Scoped, or provider options like { lifetime: 'singleton' | 'transient' | 'scoped' }. Store lifetime metadata at registration and resolve accordingly.
Additional context
See the NexusDI Roadmap: Lifetime Decorators for more details and proposed API.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Backlog