import fs from "node:fs"; import type { SpawnOptionsWithoutStdio } from "node:child_process"; export declare function getFileSize(filePath: string): Promise; export declare let isString: (value: unknown) => value is string; export declare function createReadStream(filePath: string, start: number, numBytes: number, totalBytes: number): [fs.ReadStream, number]; export declare function readBytesFromFile(filePath: string, start: number, numBytes: number, totalBytes: number): Promise; export declare function streamToBuffer(stream: fs.ReadStream): Promise>; export declare function readFileAsBase64(filePath: string): Promise; export declare function md5(data: any): string; export declare const btoa: (str: string) => string; export declare const uuid: () => string; /** * 生成dm_cover_img_str * @param str 比如:ANGLE (Google, Vulkan 1.3.0 (SwiftShader Device (Subzero) (0x0000C0XX)), SwiftShader driver)Google Inc. (Google) */ export declare function fakeDmCoverImgStr(str: string): string; export declare function fakeBuvid3(): string; export declare function sum(arr: number[]): number; export declare function spawnChild(command: string, args?: readonly string[], options?: SpawnOptionsWithoutStdio): Promise; /** * 重试函数 * @param fn 要重试的函数 * @param times 重试次数 * @param delay 重试间隔时间 */ export declare function retry(fn: () => Promise, times?: number, delay?: number): Promise; interface SubtitleJsonItem { from: number; to: number; location?: number; content: string; } interface SubtitleJsonData { font_size?: number; font_color?: string; background_alpha?: number; background_color?: string; stroke?: string; body: SubtitleJsonItem[]; } export declare function subtitleJsonToSrt(data: SubtitleJsonData | { body: SubtitleJsonItem[]; }, options?: { offset?: number; }): string; export {};