@react-native-replicache/replicache-generic-sqlite
Version:
> Plug-in React Native compatibility bindings for [Replicache](https://replicache.dev/).
18 lines • 1.05 kB
TypeScript
import type { KVStore } from "replicache";
import { ReplicacheGenericSQLiteDatabaseManager } from "./replicache-generic-sqlite-database-manager";
import { ReplicacheGenericSQLiteReadImpl } from "./replicache-generic-sqlite-read-impl";
export declare class ReplicacheGenericStore implements KVStore {
private readonly name;
private readonly _dbm;
private _closed;
constructor(name: string, _dbm: ReplicacheGenericSQLiteDatabaseManager);
read(): Promise<ReplicacheGenericSQLiteReadImpl>;
withRead<R>(fn: (read: Awaited<ReturnType<KVStore["read"]>>) => R | Promise<R>): Promise<R>;
write(): Promise<Awaited<ReturnType<KVStore["write"]>>>;
withWrite<R>(fn: (write: Awaited<ReturnType<KVStore["write"]>>) => R | Promise<R>): Promise<R>;
close(): Promise<void>;
get closed(): boolean;
private _getDb;
}
export declare function getCreateReplicacheSQLiteKVStore(db: ReplicacheGenericSQLiteDatabaseManager): (name: string) => ReplicacheGenericStore;
//# sourceMappingURL=replicache-generic-sqlite-store.d.ts.map