MCPcopy
hub / github.com/loopbackio/loopback-next / bind

Method bind

packages/context/src/binding.ts:1024–1026  ·  view source on GitHub ↗

* A static method to create a binding so that we can do * `Binding.bind('foo').to('bar');` as `new Binding('foo').to('bar')` is not * easy to read. * @param key - Binding key

(key: BindingAddress<V>)

Source from the content-addressed store, hash-verified

1022 * @param key - Binding key
1023 */
1024 static bind<V = unknown>(key: BindingAddress<V>): Binding<V> {
1025 return new Binding(key);
1026 }
1027
1028 /**
1029 * Create a configuration binding for the given key

Callers 15

constructorMethod · 0.45
onInitMethod · 0.45
onStartMethod · 0.45
onStopMethod · 0.45
setMetadataMethod · 0.45
createServiceBindingFunction · 0.45
service.unit.tsFile · 0.45
component.unit.tsFile · 0.45
lifecycle.unit.tsFile · 0.45

Calls

no outgoing calls

Tested by 15

givenLifeCycleRegistryFunction · 0.36
constructorMethod · 0.36
givenCtxFunction · 0.36
givenProvidersFunction · 0.36
givenProvidersFunction · 0.36
givenProvidersFunction · 0.36
givenProvidersFunction · 0.36
setupBindingsFunction · 0.36
givenContextFunction · 0.36
givenBindingsFunction · 0.36
givenControllerFunction · 0.36