Page Contents

Home > @loopback/context > BindingCreationPolicy

BindingCreationPolicy enum

Policy to control if a binding should be created for the context

Signature:

export declare enum BindingCreationPolicy 

Enumeration Members

Member Value Description
ALWAYS_CREATE "Always" Always create a binding with the key for the context
CREATE_IF_NOT_BOUND "IfNotBound" Create a binding if the key is not bound in the context. Otherwise, return the existing binding.
NEVER_CREATE "Never" Never create a binding for the context. If the key is not bound in the context, throw an error.