Class: ConfigBoundService<T>
Defined in: packages/nestjs/src/config-bound.service.ts:16
Injectable service that provides type-safe access to ConfigBound configuration. Wraps a TypedConfigBound instance and exposes all configuration operations for use in NestJS controllers and services.
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends ConfigSchema | ConfigSchema |
Constructors
Constructor
new ConfigBoundService<T>(configBound): ConfigBoundService<T>;Defined in: packages/nestjs/src/config-bound.service.ts:17
Parameters
| Parameter | Type |
|---|---|
configBound | TypedConfigBound<T> |
Returns
ConfigBoundService<T>
Accessors
binds
Get Signature
get binds(): Bind[];Defined in: packages/nestjs/src/config-bound.service.ts:31
Returns
Bind[]
name
Get Signature
get name(): string;Defined in: packages/nestjs/src/config-bound.service.ts:27
Returns
string
sections
Get Signature
get sections(): Section[];Defined in: packages/nestjs/src/config-bound.service.ts:35
Returns
Section[]
Methods
addBind()
addBind(bind): void;Defined in: packages/nestjs/src/config-bound.service.ts:39
Parameters
| Parameter | Type |
|---|---|
bind | Bind |
Returns
void
addSection()
addSection(section): void;Defined in: packages/nestjs/src/config-bound.service.ts:43
Parameters
| Parameter | Type |
|---|---|
section | Section |
Returns
void
get()
get<K, E>(sectionName, elementName): Promise<
| InferConfigType<T>[K][E]
| undefined>;Defined in: packages/nestjs/src/config-bound.service.ts:51
Type Parameters
| Type Parameter |
|---|
K extends string | number | symbol |
E extends string | number | symbol |
Parameters
| Parameter | Type |
|---|---|
sectionName | K |
elementName | E |
Returns
Promise< | InferConfigType<T>[K][E] | undefined>
getOrThrow()
getOrThrow<K, E>(sectionName, elementName): Promise<InferConfigType<T>[K][E]>;Defined in: packages/nestjs/src/config-bound.service.ts:58
Type Parameters
| Type Parameter |
|---|
K extends string | number | symbol |
E extends string | number | symbol |
Parameters
| Parameter | Type |
|---|---|
sectionName | K |
elementName | E |
Returns
Promise<InferConfigType<T>[K][E]>
getSections()
getSections(): Section[];Defined in: packages/nestjs/src/config-bound.service.ts:47
Returns
Section[]
getTypedConfigBound()
getTypedConfigBound(): TypedConfigBound<T>;Defined in: packages/nestjs/src/config-bound.service.ts:23
Returns
getValidationErrors()
getValidationErrors(): Promise<object[]>;Defined in: packages/nestjs/src/config-bound.service.ts:69
Returns
Promise<object[]>
validate()
validate(): Promise<void>;Defined in: packages/nestjs/src/config-bound.service.ts:65
Returns
Promise<void>