Skip to content

Class: StaticBind

Defined in: packages/config-bound/src/bind/binds/static.ts:19

A Bind that provides values from an in-memory object literal.

Supports both nested objects and flat dot-path keys. For example, app.port resolves from either:

  • { app: { port: 3000 } }
  • { 'app.port': 3000 }

Extends

Constructors

Constructor

ts
new StaticBind(values?): StaticBind;

Defined in: packages/config-bound/src/bind/binds/static.ts:22

Parameters

ParameterType
valuesStaticBindValues

Returns

StaticBind

Overrides

Bind.constructor

Properties

PropertyModifierTypeInherited fromDefined in
namereadonlyBindNameBind.namepackages/config-bound/src/bind/bind.ts:15

Methods

get()

ts
get<T>(sectionName, elementName): Promise<T | undefined>;

Defined in: packages/config-bound/src/bind/bind.ts:34

Gets the value from the bind for a specific element

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
sectionNamestringThe name of the Section
elementNamestringThe name of the Element

Returns

Promise<T | undefined>

The value of the element

Inherited from

Bind.get


retrieve()

ts
retrieve<T>(elementPath): Promise<T | undefined>;

Defined in: packages/config-bound/src/bind/binds/static.ts:27

Retrieves the value of the Bind.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
elementPathstringThe name of the Element

Returns

Promise<T | undefined>

The value of the element

Overrides

Bind.retrieve