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

Method getConfigAsValueOrPromise

packages/context/src/context.ts:284–295  ·  view source on GitHub ↗

* Get the value or promise of configuration for a given binding by key * * @param key - Binding key * @param propertyPath - Property path for the option. For example, `x.y` * requests for ` .x.y`. If not set, the ` ` object will be * returned. * @param resolutionOptio

(
    key: BindingAddress,
    propertyPath?: string,
    resolutionOptions?: ResolutionOptions,
  )

Source from the content-addressed store, hash-verified

282 * no corresponding value is found. Otherwise, an error will be thrown.
283 */
284 getConfigAsValueOrPromise<ConfigValueType>(
285 key: BindingAddress,
286 propertyPath?: string,
287 resolutionOptions?: ResolutionOptions,
288 ): ValueOrPromise<ConfigValueType | undefined> {
289 this.setupConfigurationResolverIfNeeded();
290 return this.configResolver.getConfigAsValueOrPromise(
291 key,
292 propertyPath,
293 resolutionOptions,
294 );
295 }
296
297 /**
298 * Set up the configuration resolver if needed

Callers 2

getConfigMethod · 0.95
getConfigSyncMethod · 0.95

Tested by

no test coverage detected