Page Contents

Home > @loopback/context > hasInjections

hasInjections() function

Check if the given class has @inject or other decorations that map to @inject.

Signature:

export declare function hasInjections(cls: Constructor<unknown>): boolean;

Parameters

Parameter Type Description
cls [Constructor](/doc/en/lb4/apidocs.context.constructor.html)<unknown> Class with possible `@inject` decorations

Returns:

boolean