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

Parameters

Parameter Type Description
target Constructor<unknown> Target class, which can be an implementation of Provider

Returns:

BindingTemplate