UNPKG

mle-tools-configuration

Version:

A configuration management tool for TypeScript/JavaScript applications

34 lines (33 loc) 1.11 kB
import { ConfigurationFactory } from './ConfigurationFactory'; export declare class Configuration<T> { protected defaultValues: { key: string; value: any; }[]; protected allDomains: { domain: string; keys: string[]; }[]; protected allValues: any; constructor(defaultValues: { key: string; value: any; }[], allDomains: { domain: string; keys: string[]; }[], configThatOverride?: string | T); protected static Walk(container: any, parent: any, keys: string[], path: { name: string; type: string; }[]): void; getConf(domain?: string): T; getSubConf(key: string): T; getJSON(domain?: string): string; getSubJSON(key: string): string; contains(configurationAsString: string | any): boolean; merge(configurationAsString: string | any): void; set(keyToUpsert: string, value: any): void; add(alreadyExistingKey: string, toAdd: any): void; update(configurationFactory: ConfigurationFactory): void; protected build(configThatOverride?: T | string): void; }