singleton
Decorator that ensures the provider returns the same instance (singleton) for every call within the container's lifecycle.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
provider |
_Provider[T]
|
The provider function to wrap. |
required |
Returns:
| Type | Description |
|---|---|
_Provider[T]
|
_Provider[T]: A provider that always returns the same instance. |