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

Function isProviderClass

packages/context/src/binding-inspector.ts:66–72  ·  view source on GitHub ↗
(
  cls: unknown,
)

Source from the content-addressed store, hash-verified

64 * @typeParam T - Value type
65 */
66export function isProviderClass<T>(
67 cls: unknown,
68): cls is Constructor<Provider<T>> {
69 return (
70 typeof cls === 'function' && typeof cls.prototype?.value === 'function'
71 );
72}
73
74/**
75 * A factory function to create a template function to bind the target class

Callers 7

createServiceBindingFunction · 0.90
providerFunction · 0.90
registerInterceptorFunction · 0.90
asClassOrProviderFunction · 0.85
assertNotProviderClassesFunction · 0.85
assertProviderClassesFunction · 0.85
registerMiddlewareFunction · 0.85

Calls

no outgoing calls

Tested by 2

assertNotProviderClassesFunction · 0.68
assertProviderClassesFunction · 0.68