Page Contents

Home > @loopback/context > BindingKey

BindingKey class


export declare class BindingKey<ValueType> 


Property Modifiers Type Description
CONFIG_NAMESPACE static string Name space for configuration binding keys
key   string  
PROPERTY_SEPARATOR static (not declared)  
propertyPath?   string | undefined (Optional)


Method Modifiers Description
buildKeyForConfig(key) static Build a binding key for the configuration of the given binding. The format is <key>:$config
create(key, propertyPath) static Create a new key for a binding bound to a value of type ValueType.
deepProperty(propertyPath)   Get a binding address for retrieving a deep property of the object bound to the current binding key.
generate(namespace) static Generate a universally unique binding key.Please note the format of they generated key is not specified, you must not rely on any specific formatting (e.g. UUID style).
parseKeyWithPath(keyWithPath) static Parse a string containing both the binding key and the path to the deeply nested property to retrieve.
validate(key) static Validate the binding key format. Please note that # is reserved. Returns a string representation of the binding key.