Page Contents

Home > @loopback/context > asProvider

asProvider() function

A factory function to create a template function to bind the target class as a Provider.

Signature:

export declare function asProvider<T>(target: Constructor<Provider<T>>): BindingTemplate<T>;

Parameters

Parameter Type Description
target Constructor<Provider<T>> Target provider class

Returns:

BindingTemplate<T>