* 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)
| 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`, |
nothing calls this directly
no test coverage detected