* 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>,
)
| 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 |