///
import EventEmitter from 'events';
declare type ModelOpts = {
name: string;
path: string;
props_uniq?: string[];
};
export declare type ModelItem> = D & {
id: string;
} & Record;
export declare class Model> {
path: string;
props_uniq?: string[];
is_writing: boolean;
e: EventEmitter;
constructor(opts: ModelOpts);
private _gen_item_paths;
private _read_item;
private _save_item;
private _is_link;
private _link_exist;
private _save_link;
find: () => Promise[]>;
find_by_id: (id: string) => Promise>;
create: (data: Partial>) => Promise>;
update_by_id: (id: string, data: Partial>) => Promise>;
delete_by_id: (id: string) => Promise;
}
declare class Store {
path: string;
models: Record>;
constructor(s_path: string);
mount: () => Promise;
umount: () => Promise;
model_create: >(name: string, opts?: Partial | undefined) => Model;
}
export default Store;