import FileService, { FileServiceOptions } from './file.js'; export interface Response { success: boolean; data?: T; message: string; } export declare enum ErrorType { Repeat = 0, SystemError = 1, HasChild = 2 } export default abstract class BaseService = {}> { static innerSystemChange: boolean; protected errorMap: { 0: string; 1: string; 2: string; }; protected data: T; protected fileService: FileService; constructor(relativeFilePath: string, options?: FileServiceOptions); refresh(): void; get(): Response; /** * 删除文件 */ removeFile(): void; /** * 处理返回值 * @param res 返回值 * @returns Response */ protected response(res?: Partial): Response; /** * 保存数据到本地文件 */ protected save(): void; abstract add(...args: any[]): Response | undefined; abstract delete(...args: any[]): Response | undefined; abstract update(...args: any[]): void; }