/// <reference types="koa-bodyparser" />
import Application from "koa";
/**
 * 挂载到app的context上，你可以通过 ctx.config使用
 * 配置实例也独立于app应用，这样才可在全局使用配置
 * 否则每次都要拿到app或者ctx才能访问配置
 *
 * @export
 * @class Config
 */
export declare class Config {
    /**
     * 存储所有配置信息
     *
     * @private
     * @type {Object}
     * @memberof Config
     */
    private store;
    initApp(app: Application): void;
    /**
     * getItem
     */
    getItem(key: string, defaultVal?: any): any;
    /**
     * hasItem
     */
    hasItem(key: string): boolean;
    /**
     * setItem
     */
    setItem(key: string, val: any): void;
    /**
     * import导入是异步导入
     * require导入是同步导入
     * getConfigFromFile 选择同步导入配置文件
     */
    getConfigFromFile(filepath: string): void;
    /**
     * getConfigFromObj
     */
    getConfigFromObj(obj: any): void;
}
/**
 * 全局的config实例
 */
export declare const config: Config;
