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<unknown> Class with possible @inject decorations

Returns:

boolean