MCPcopy
hub / github.com/loopbackio/loopback-next / isBindableClass

Function isBindableClass

packages/boot/src/booters/service.booter.ts:82–99  ·  view source on GitHub ↗
(cls: Constructor<unknown>)

Source from the content-addressed store, hash-verified

80}
81
82function isBindableClass(cls: Constructor<unknown>) {
83 if (MetadataInspector.getClassMetadata(BINDING_METADATA_KEY, cls)) {
84 return true;
85 }
86 if (hasInjections(cls)) {
87 return true;
88 }
89 if (isServiceProvider(cls)) {
90 debug('Provider class found: %s', cls.name);
91 return true;
92 }
93 if (isDynamicValueProviderClass(cls)) {
94 debug('Dynamic value provider class found: %s', cls.name);
95 return true;
96 }
97 debug('Skip class not decorated with @injectable: %s', cls.name);
98 return false;
99}

Callers 1

loadMethod · 0.85

Calls 4

hasInjectionsFunction · 0.85
isServiceProviderFunction · 0.85
getClassMetadataMethod · 0.80

Tested by

no test coverage detected