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](/doc/en/lb4/apidocs.core.serviceorproviderclass.html)<S> | Service class or provider |
| options | [ServiceOptions](/doc/en/lb4/apidocs.core.serviceoptions.html) | _(Optional)_ Service options |
Returns:
Binding<S>