/** 自定义配置项的值类型,支持字符串、数字、布尔值 */ export type CustomConfigValue = /** 字符串 */ string /** 数字 */ | number /** 布尔值 */ | boolean /** 链接(特殊字符串) */ | string; /** getCustomConfig 失败回调参数 */ export interface GetCustomConfigError { /** 错误信息 */ errorMsg: string; /** 错误码 */ errorCode: string; /** 错误扩展 */ innerError?: { /** 错误扩展码 */ errorCode: string; /** 错误扩展信息 */ errorMsg: string; }; } /** getCustomConfig 的参数 */ export interface GetCustomConfigParams { /** 接口调用成功的回调函数,参数为各配置项的键值对 */ success?: (config: Record) => void; /** 接口调用失败的回调函数 */ fail?: (err: GetCustomConfigError) => void; /** 接口调用结束的回调函数(调用成功、失败都会执行) */ complete?: (res: Record | GetCustomConfigError) => void; }