UNPKG

@loopback/docs

Version:
35 lines (22 loc) 944 B
--- lang: en title: 'API docs: core.createservicebinding' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.core.createservicebinding.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/core](./core.md) &gt; [createServiceBinding](./core.createservicebinding.md) ## createServiceBinding() function Create a service binding from a class or provider <b>Signature:</b> ```typescript export declare function createServiceBinding<S>(cls: Constructor<S> | Constructor<Provider<S>>, options?: ServiceOptions): Binding<S>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | cls | <code>Constructor&lt;S&gt; &#124; Constructor&lt;Provider&lt;S&gt;&gt;</code> | Service class or provider | | options | <code>ServiceOptions</code> | Service options | <b>Returns:</b> `Binding<S>`