@snow-tzu/type-config
Version:
Core configuration management system with Spring Boot-like features
23 lines • 831 B
TypeScript
import { ConfigManager } from './config-manager';
import { Container } from './container';
import { ConfigSource } from './sources';
type Constructor<T = any> = new (...args: any[]) => T;
export declare class ConfigurationBuilder {
private options;
private configClasses;
withProfile(profile: string): this;
withConfigDir(dir: string): this;
withEnvPrefix(prefix: string): this;
withEncryption(key: string): this;
withValidation(enabled?: boolean): this;
addSource(source: ConfigSource): this;
registerConfig(ConfigClass: Constructor): this;
registerConfigs(configClasses: Constructor[]): this;
build(): Promise<{
configManager: ConfigManager;
container: Container;
}>;
buildConfigOnly(): Promise<ConfigManager>;
}
export {};
//# sourceMappingURL=builder.d.ts.map