type ValueStringType = 'string' | 'number' | 'boolean' | 'boolean|string' | 'number|string' | 'any'; type ValueType = T extends 'string' ? string : T extends 'number' ? number : T extends 'boolean' ? boolean : T extends 'boolean|string' ? boolean | string : T extends 'number|string' ? number | string : any; /** * Static class to access environment variables and configuration files. * * This class can also be used as a service. * * @export * @class Config */ export declare class Config { /** * Read the configuration value associated with the given key. Optionaly check its type. * * @static * @template T * @param {string} key - The configuration key. * @param {T} [type] - The expected type of the returned value. * @param {ValueType} [defaultValue] - A default value if none is found. * @returns {ValueType|undefined} The configuration value * @memberof Config */ static get(key: string, type: T, defaultValue: ValueType): ValueType; static get(key: string, type?: T): ValueType | undefined; /** * Read the configuration value associated with the given key. Optionaly check its type. * * Throw an ConfigNotFoundError if no value is found. * * @static * @template T * @param {string} key - The configuration key. * @param {T} [type] - The expected type of the returned value. * @param {string} [msg] - The message of the ConfigNotFoundError if no value is found. * @returns {ValueType} The configuration value. * @memberof Config */ static getOrThrow(key: string, type?: T, msg?: string): ValueType; /** * Clear the cache of the loaded files. * * @static * @memberof Config */ static clearCache(): void; static set(key: string, value: string | number | boolean): void; static remove(key: string): void; private static yaml; private static config; private static testConfig; private static readJSON; private static readYAML; private static readJS; private static readConfigValue; private static mergeDeep; private static getYAMLInstance; } export {};