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

Method _setValueGetter

packages/context/src/binding.ts:719–726  ·  view source on GitHub ↗

* Set the `_getValue` function * @param getValue - getValue function

(getValue: ValueFactory<T>)

Source from the content-addressed store, hash-verified

717 * @param getValue - getValue function
718 */
719 private _setValueGetter(getValue: ValueFactory<T>) {
720 // Clear the cache
721 this._clearCache();
722 this._getValue = resolutionCtx => {
723 return getValue(resolutionCtx);
724 };
725 this.emitChangedEvent('value');
726 }
727
728 /**
729 * Bind the key to a constant value. The value must be already available

Callers 5

toMethod · 0.95
toDynamicValueMethod · 0.95
toProviderMethod · 0.95
toClassMethod · 0.95
toAliasMethod · 0.95

Calls 2

_clearCacheMethod · 0.95
emitChangedEventMethod · 0.95

Tested by

no test coverage detected