Page Contents

Home > @loopback/core > createServiceBinding

createServiceBinding() function

Create a service binding from a class or provider

Signature:

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

Parameters

Parameter Type Description
cls Constructor<S> | Constructor<Provider<S>> Service class or provider
options ServiceOptions Service options

Returns:

Binding<S>