import { Alot } from 'alot/alot'; import { Constructor } from '../utils/types'; export interface IArrayStoreOptions { path: string; watchFs?: boolean; onFsChanged?: () => any; key: (x: Partial) => string | number; map?(x: TStorage): T; serialize?(x: T): TStorage; Type?: Constructor; format?: boolean; transport?: 'file' | 'localStorage'; } export declare class JsonArrayStore { options: IArrayStoreOptions; private array; private hash; private fs; constructor(options: IArrayStoreOptions); query(): Promise>; getAll(opts?: { cloned?: boolean; }): Promise; getDict(): Promise<{ [key: string]: T; }>; getSingle(key: string | number): Promise; saveAll(arr: T[]): Promise; upsert(x: Partial): Promise; remove(key: string | number): Promise; removeMany(keys: (string | number)[]): Promise; upsertMany(arr: Partial[]): Promise; getLock(): import("atma-utils/class/Dfr").class_Dfr; delete(): Promise; private onStoreChanged; private restore; private flush; /** without flush */ private upsertSync; private removeSync; }