Page Contents

Home > @loopback/context > Setter

Setter type

The function injected by @inject.setter(bindingKey). It sets the underlying binding to a constant value using binding.to(value).

Signature:

export type Setter<T> = (value: T) => void;

Example

setterFn('my-value');