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(target: Constructor<Provider<unknown>>): BindingTemplate;

Parameters

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

Returns:

BindingTemplate