@imjxsx/localdb
Version:
A lightweight MongoDB-style BSON database for Node.js
21 lines • 640 B
TypeScript
import { Collection } from "./collection.js";
import { IDocument, IDBStats } from "../types/index.js";
export declare class DB {
/** @private */
private filepath;
/** @private */
private store;
/** @private */
private timeout;
catch?: (err: Error) => void;
constructor(filepath: string);
load(): Promise<void>;
save(): Promise<void>;
collection<T extends IDocument = IDocument>(name: string): Collection<T>;
collections(): string[];
drop(): Promise<void>;
stats(): Promise<IDBStats | null>;
get name(): string;
autosave(delay: number): void;
}
//# sourceMappingURL=db.d.ts.map