Page Contents
Home > @loopback/context > asClassOrProvider
asClassOrProvider() function
A factory function to create a template function to bind the target class as a class or Provider
.
Signature:
export declare function asClassOrProvider<T>(target: Constructor<T | Provider<T>> | DynamicValueProviderClass<T>): BindingTemplate<T>;
Parameters
Parameter | Type | Description |
---|---|---|
target | Constructor<T | Provider<T>> | DynamicValueProviderClass<T> | Target class, which can be an implementation of Provider or DynamicValueProviderClass |
Returns: