@webfaas/webfaas-core
Version:
WebFaaS Framework - Core
34 lines (33 loc) • 761 B
TypeScript
import { Log } from "../Log/Log";
/**
* Configuration. Automatic search file config and load
*/
export declare class Config {
private originalConfigObj;
private configByKey;
private log;
/**
*
* @param fileOrObject file string or object
*/
constructor(log?: Log);
/**
* parse value. ex: environment variables
*/
private parseValue;
/**
* process object config
*/
private processConfig;
/**
* Read config from file or object
* @param fileOrObject file string or object
*/
read(fileOrObject: any): void;
/**
* Return value from key
* @param key key value
* @param defaultValue default value
*/
get(key: string, defaultValue?: any): any;
}