Skip to content

Class: StaticBind

Defined in: packages/core/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

Properties

PropertyModifierTypeInherited fromDefined in
namereadonlyBindNameBind.namepackages/core/src/bind/bind.ts:19

Methods

get()

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

Defined in: packages/core/src/bind/bind.ts:38

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/core/src/bind/binds/static.ts:37

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


create()

ts
static create(values?): Promise<StaticBind>;

Defined in: packages/core/src/bind/binds/static.ts:28

Creates a StaticBind from an in-memory values object.

Parameters

ParameterTypeDescription
valuesStaticBindValuesKey/value pairs to serve as configuration values.

Returns

Promise<StaticBind>

A fully initialised StaticBind instance.