import jsonStringifyPrettyCompact from 'json-stringify-pretty-compact'; /** * 更安全的 JS 基础方法封装 */ export declare const safeJsonParse: (str: string, defaultValue?: any, reviver?: any) => any; export declare const safeJsonStringify: (obj: any, replacer?: any, space?: any) => string; export declare const safeDecodeURIComponent: (url?: string) => string; export declare const prettyCompactJsonStringify: typeof jsonStringifyPrettyCompact; export declare const judgeObjectKeyExist: (item: object, key: string) => boolean | undefined; /** * 根据指定列表内容渲染递增数字标签名(如:新元素1,新元素2...) * label: 标签名,如:新元素 * list: 用于判断的数据列表 * listLabelKey: 用于判断的数据列表中对应的标签名字段 * initNumber: 初始判断值 */ export declare const generateIncreasingLabel: ({ label, list, listLabelKey, initNumber, }: { label: string; list: object[]; listLabelKey: string; initNumber: number; }) => string; /** * 获取最近时间区段 */ export declare const getRecentRangeTime: ({ type, num, }: { type: 'day' | 'hour' | 'minute' | 'second'; num: number; }) => number[]; /** * 转换日期到时间戳 */ export declare const convertDateToTimestamp: (value: string) => number; export declare const sizeToBytes: (size: string) => number | null; export declare const readableBytes: ({ fromNum, fromUnit, fractionDigits, }: { fromNum: number; fractionDigits?: number | undefined; fromUnit?: "B" | "KB" | "MB" | "GB" | "TB" | "PB" | "EB" | "ZB" | "YB" | undefined; }) => any; export declare const convertPercentToDecimal: (percent: string) => number; /** * 执行轮询 */ export declare const runInterval: ({ callback, interval, }: { callback: any; interval: number; }) => { start: () => Promise; stop: () => void; }; export declare const readableNumber: ({ fromNum: inputFromNum, fractionDigits, }: { fromNum: number; fractionDigits?: number | undefined; }) => { result: string; unit: string; number: number; };