import { EventEmitter } from 'events'; import type { IConfig, IConfigLoaderOptions } from './types'; import { ConfigLoadEvents } from './types'; /** * 事件定义 */ export declare interface ConfigLoader { on: ((event: ConfigLoadEvents, listener: (...args: any[]) => void) => this); } /** * 配置装载器 */ export declare class ConfigLoader extends EventEmitter { private readonly _options; private readonly _conf; private _configFiles; private _loadedConfFileSet; /** * @constructor */ constructor(Config: Constructor, options: IConfigLoaderOptions); /** * 执行配置加载初始化 */ initialize(): this; /** * 重置 nconf 存储 */ resetConfig(): void; /** * 加载配置内容 */ loadConfig(): void; /** * 加载配置文件引用包含配置 */ loadIncludeFiles(): void; /** * 监听配置文件变更 */ watchConfigChange(): void; /** * 获取配置内容 */ getConfig(): T; /** * 按指定格式加载配置文件 * @param path - 配置文件路径 * @param key - 配置文件标识 * @param format - 配置解析方法 * @returns - 是否已加载配置文件 * @private */ private _loadConfFileWithFormat; /** * 加载配置文件内容 * @param path - 配置文件路径 * @param key - 配置文件标识 * @private */ private _loadConfFile; } //# sourceMappingURL=config_loader.d.ts.map