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

Method configure

packages/context/src/binding.ts:1042–1046  ·  view source on GitHub ↗

* Create a configuration binding for the given key * * @example * ```ts * const configBinding = Binding.configure('servers.RestServer.server1') * .to({port: 3000}); * ``` * * @typeParam V Generic type for the configuration value (not the binding to * be configured) *

(key: BindingAddress)

Source from the content-addressed store, hash-verified

1040 * @param key - Key for the binding to be configured
1041 */
1042 static configure<V = unknown>(key: BindingAddress): Binding<V> {
1043 return new Binding(BindingKey.buildKeyForConfig<V>(key)).tag({
1044 [ContextTags.CONFIGURATION_FOR]: key.toString(),
1045 });
1046 }
1047
1048 /**
1049 * The "changed" event is emitted by methods such as `tag`, `inScope`, `to`,

Callers

nothing calls this directly

Calls 3

tagMethod · 0.80
buildKeyForConfigMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected