/** * 解析环境变量文件内容 */ declare function parse(src: string | Buffer): { [name: string]: string; }; /** * 配置选项接口 */ export interface DotenvConfigOptions { /** * 环境变量文件路径,默认为 '.env' */ path?: string; /** * 文件编码,默认为 'utf8' */ encoding?: 'utf8' | 'utf16le' | 'latin1'; /** * 是否调试模式,默认为 false */ debug?: boolean; /** * 是否覆盖现有环境变量,默认为 false */ override?: boolean; } /** * 配置结果接口 */ export interface DotenvConfigOutput { error?: Error; parsed?: { [name: string]: string; }; } /** * 配置环境变量 */ export declare function config(options?: DotenvConfigOptions): DotenvConfigOutput; /** * 直接解析字符串 */ export { parse }; /** * 默认导出配置函数 */ declare const _default: { config: typeof config; parse: typeof parse; }; export default _default;