MCPcopy Index your code
hub / github.com/loopbackio/loopback-next / hasInjections

Function hasInjections

packages/context/src/inject.ts:787–797  ·  view source on GitHub ↗
(cls: Constructor<unknown>)

Source from the content-addressed store, hash-verified

785 * @param cls - Class with possible `@inject` decorations
786 */
787export function hasInjections(cls: Constructor<unknown>): boolean {
788 return (
789 MetadataInspector.getClassMetadata(INJECT_PARAMETERS_KEY, cls) != null ||
790 Reflector.getMetadata(INJECT_PARAMETERS_KEY.toString(), cls.prototype) !=
791 null ||
792 MetadataInspector.getAllPropertyMetadata(
793 INJECT_PROPERTIES_KEY,
794 cls.prototype,
795 ) != null
796 );
797}

Callers 1

isBindableClassFunction · 0.85

Calls 4

getClassMetadataMethod · 0.80
getMetadataMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected