MCPcopy Index your code
hub / github.com/loopbackio/loopback-next / bind

Method bind

packages/context/src/context.ts:218–224  ·  view source on GitHub ↗

* Create a binding with the given key in the context. If a locked binding * already exists with the same key, an error will be thrown. * * @param key - Binding key

(
    key: BindingAddress<ValueType>,
  )

Source from the content-addressed store, hash-verified

216 * @param key - Binding key
217 */
218 bind<ValueType = BoundValue>(
219 key: BindingAddress<ValueType>,
220 ): Binding<ValueType> {
221 const binding = new Binding<ValueType>(key.toString());
222 this.add(binding);
223 return binding;
224 }
225
226 /**
227 * Add a binding to the context. If a locked binding already exists with the

Callers 15

mainFunction · 0.95
mainFunction · 0.95
findOrCreateBindingMethod · 0.95
givenContextFunction · 0.95
givenContextFunction · 0.95
givenRequestContextFunction · 0.95
setupContextBindingsFunction · 0.95
getCallbackMethod · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95

Calls 2

addMethod · 0.95
toStringMethod · 0.45

Tested by 4

givenContextFunction · 0.76
givenContextFunction · 0.76
givenRequestContextFunction · 0.76