export * from "./EventBus"; export declare class BA extends Array { readonly onChanged: cbk; constructor(onChanged?: cbk); toArr(p?: T[]): T[]; push(): number; /** 添加的值具有唯一性,如果传入的值是object.则会对比id; 如果现有数据中存在,则会覆盖现有数据的各项属性.如果不存在此数据则会正常添加 */ push(...itemss: T[][]): number; /** 添加的值具有唯一性,如果传入的值是object.则会对比id; 如果现有数据中存在,则会覆盖现有数据的各项属性.如果不存在此数据则会正常添加 */ push(...items: T[]): number; splice(start: number, deleteCount?: number): T[]; splice(start: number, deleteCount: number, ...items: T[]): T[]; shift(): T | undefined; pop(): T | undefined; unshift(...items: T[]): number; slice(start?: number, end?: number): T[]; findById(id?: string): undefined | T; findById(id: string[]): T[]; /** 重写filter,增加一个this指向的参数,方便predicate内部取得this值进行对比 */ filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; } /** 具有本地缓存功能的Array,并且重写push方法,只会加入唯一的值. */ export declare class BaseArr extends BA { private readonly _cfg; private readonly _cache; constructor(options: BaseArrOptios); /** 可传入id的值进行查找本地缓存数据,如果缓存没有,会触发向服务器发起请求;如果real值为非0,则跳过本地缓存 */ getById(id: string, real?: boolean): Promise; /** 可传入id的值(数组) 进行查找本地缓存数据,如果缓存没有,会触发向服务器发起请求;如果real值为非0,则跳过本地缓存 */ getById(ids: string[], real?: boolean): Promise; getById(): Promise; /** 从本地缓存中查找符合id值的数据 */ findIndexById(id?: string): number; /** 发送请求 新增数据 */ create(entity: T): Promise; /** 发送请求 修改数据 */ update(entity: UpdateParam): Promise; /** 发送请求 查询数据 */ read(): Promise; read(param: string): Promise; read(param: string[]): Promise; read(param: { id: string; [k: string]: any; }): Promise; read(param: { id: string[]; [k: string]: any; }): Promise; read(param: QueryPage): Promise>; read(param: Rp): Promise; read(param: Partial): Promise; /** 发送请求 根据id删除数据 */ deleteById(id: string): Promise; /** 发送请求 根据条件删除数据 */ delete(param: FQ): Promise; /** 发送请求 获取所有pid为参数值的数据 */ getParents(pid: string | string[]): Promise; /** 暂停 读取/删除 的请求发送 */ pause(): void; /** 开始正常请求 所有请求完毕后,将返回 */ exec(): Promise; } export declare class BaseArrSimple extends BaseArr { constructor(type: Type, format: (p?: FormatParam) => any); }