export type UnitType = 'B' | 'Ki' | 'Mi' | 'Gi' | 'Ti' | 'Pi'; export type MemoryStruct = { value: number; unit: UnitType; }; export declare function parseMemoryVal(size?: string | number): MemoryStruct; /** * 转换内存值大小至指定的单位 * @param size 内存值 * @param targetUnit 需要转换至的目标单位 * @param opts * @param opts.maxUnit 当 targetUnit 未指定时, 能被转换至的最大单位 */ export declare function formatMemory(size?: string | number, targetUnit?: UnitType, opts?: { maxUnit?: UnitType; }): MemoryStruct;