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

Method valueOrProxy

packages/context/src/binding.ts:819–829  ·  view source on GitHub ↗
(
    resolutionCtx: ResolutionContext,
    value: ValueOrPromise<V>,
  )

Source from the content-addressed store, hash-verified

817 }
818
819 private static valueOrProxy<V>(
820 resolutionCtx: ResolutionContext,
821 value: ValueOrPromise<V>,
822 ) {
823 if (!resolutionCtx.options.asProxyWithInterceptors) return value;
824 return createInterceptionProxyFromInstance(
825 value,
826 resolutionCtx.context,
827 resolutionCtx.options.session,
828 );
829 }
830
831 /**
832 * Bind the key to a value computed by a Provider.

Callers 5

getValueOrProxyMethod · 0.80
toMethod · 0.80
toDynamicValueMethod · 0.80
toProviderMethod · 0.80
toClassMethod · 0.80

Tested by

no test coverage detected