Page Contents

Home > @loopback/context > BindingKey

BindingKey class

Signature:

export declare class BindingKey<ValueType> 

Properties

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

Methods

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 <p>Generate a universally unique binding key.</p><p>Please note the format of they generated key is not specified, you must not rely on any specific formatting (e.g. UUID style).</p>
parseKeyWithPath(keyWithPath) static Parse a string containing both the binding key and the path to the deeply nested property to retrieve.
toString()    
validate(key) static Validate the binding key format. Please note that # is reserved. Returns a string representation of the binding key.