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
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
name | readonly | BindName | Bind.name | packages/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
| Parameter | Type | Description |
|---|---|---|
sectionName | string | The name of the Section |
elementName | string | The name of the Element |
Returns
Promise<T | undefined>
The value of the element
Inherited from
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
| Parameter | Type | Description |
|---|---|---|
elementPath | string | The name of the Element |
Returns
Promise<T | undefined>
The value of the element
Overrides
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
| Parameter | Type | Description |
|---|---|---|
values | StaticBindValues | Key/value pairs to serve as configuration values. |
Returns
Promise<StaticBind>
A fully initialised StaticBind instance.