Page Contents

Home > @loopback/core > createServiceBinding

createServiceBinding() function

Create a service binding from a class or provider

Signature:

export declare function createServiceBinding<S>(cls: ServiceOrProviderClass<S>, options?: ServiceOptions): Binding<S>;

Parameters

Parameter Type Description
cls ServiceOrProviderClass<S> Service class or provider
options ServiceOptions (Optional) Service options

Returns:

Binding<S>