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
| Parameter | Type |
|---|---|
values | StaticBindValues |
Returns
StaticBind
Overrides
Properties
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
name | readonly | BindName | Bind.name | packages/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
| 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/config-bound/src/bind/binds/static.ts:27
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