Page Contents

Home > @loopback/context > Context > add

Context.add() method

Add a binding to the context. If a locked binding already exists with the same key, an error will be thrown.

Signature:

add(binding: Binding<unknown>): this;

Parameters

Parameter Type Description

binding

Binding<unknown>

The configured binding to be added

Returns:

this