Methods
Static
forRoot
- forRoot(options): DynamicModule
-
Returns DynamicModule
Static
forRootAsync
- forRootAsync(options): Promise<DynamicModule>
-
Returns Promise<DynamicModule>
Static
Private
formatValidationError
- formatValidationError(errors): {
constraints: undefined | {
[type: string]: string;
};
property: string;
value: any;
}[]
-
Parameters
-
errors: ValidationError[]
Returns {
constraints: undefined | {
[type: string]: string;
};
property: string;
value: any;
}[]
Static
getConfigErrorMessage
- getConfigErrorMessage(errors): string
-
Parameters
-
errors: ValidationError[]
Returns string
Static
Private
getDynamicModule
- getDynamicModule(options, rawConfig): {
exports: Provider[];
global: boolean;
module: typeof TypedConfigModule;
providers: Provider[];
}
-
Parameters
-
-
rawConfig: Record<string, any>
Returns {
exports: Provider[];
global: boolean;
module: typeof TypedConfigModule;
providers: Provider[];
}
-
exports: Provider[]
-
global: boolean
-
-
providers: Provider[]
Static
Private
getProviders
- getProviders(config, Config): Provider[]
-
Parameters
-
config: any
-
Config: ClassConstructor<any>
Returns Provider[]
Static
Private
getRawConfig
- getRawConfig(load): {}
-
Returns {}
Static
Private
getRawConfigAsync
- getRawConfigAsync(load): Promise<{}>
-
Returns Promise<{}>
Static
Private
validateWithClassValidator
- validateWithClassValidator(rawConfig, Config, options?): any
-
Parameters
-
rawConfig: any
-
Config: ClassConstructor<any>
-
Optional
options: Partial<ValidatorOptions>
Returns any
Transforms validation error object returned by class-validator to more readable error messages.