MCPcopy Create free account
hub / github.com/loopbackio/loopback-next / config

Function config

packages/context/src/inject-config.ts:64–78  ·  view source on GitHub ↗
(
  propertyPath?: string | ConfigInjectionMetadata,
  metadata?: ConfigInjectionMetadata,
)

Source from the content-addressed store, hash-verified

62 * @param metadata - Optional metadata to help the injection
63 */
64export function config(
65 propertyPath?: string | ConfigInjectionMetadata,
66 metadata?: ConfigInjectionMetadata,
67) {
68 propertyPath = propertyPath ?? '';
69 if (typeof propertyPath === 'object') {
70 metadata = propertyPath;
71 propertyPath = '';
72 }
73 metadata = Object.assign(
74 {propertyPath, decorator: '@config', optional: true},
75 metadata,
76 );
77 return inject('', metadata, resolveFromConfig);
78}
79
80export namespace config {
81 /**

Callers 15

constructorMethod · 0.90
constructorMethod · 0.85
constructorMethod · 0.85
valueMethod · 0.85
constructorMethod · 0.85
constructorMethod · 0.85
TestClassClass · 0.85
constructorMethod · 0.85
constructorMethod · 0.85
constructorMethod · 0.85
constructorMethod · 0.85
constructorMethod · 0.85

Calls 1

injectFunction · 0.90

Tested by 7

valueMethod · 0.68
constructorMethod · 0.68
constructorMethod · 0.68
constructorMethod · 0.68
constructorMethod · 0.68
constructorMethod · 0.68
constructorMethod · 0.68