Function: Provider()
Function: Provider()
function Provider<T>(options): ClassDecorator;
Provider decorator to mark a class as a ServiceProvider and automatically bind its services to the container.
This decorator is useful for marking classes as service providers within the Stone.js framework, allowing them to manage and provide their services to the service container.
Type Parameters
T
T
extends ClassType
= ClassType
Parameters
options
ProviderOptions
= {}
The configuration options for the provider.
Returns
ClassDecorator
A decorator function to set metadata on the target class.
Example
@Provider({ singleton: true })
class MyServiceProvider {
// Service provider logic here.
}