Page Contents

Home > @loopback/context > resolveInjectedProperties

resolveInjectedProperties() function

Given a class with properties decorated with @inject, return the map of properties resolved using the values bound in ctx.

The function returns an argument array when all dependencies were resolved synchronously, or a Promise otherwise.

Signature:

export declare function resolveInjectedProperties(constructor: Function, ctx: Context, session?: ResolutionSession): ValueOrPromise<MapObject<BoundValue>>;

Parameters

Parameter Type Description

constructor

Function

The class for which properties should be resolved.

ctx

Context

The context containing values for @inject resolution

session

ResolutionSession

(Optional) Optional session for binding and dependency resolution

Returns:

ValueOrPromise<MapObject<BoundValue>>