rocicorp / replicache

Realtime Sync for Any Backend Stack
https://doc.replicache.dev
1.02k stars 37 forks source link

Something that may type check a bit better, and also can more easily expose additional internal apis. #958

Closed arv closed 2 years ago

arv commented 2 years ago

Something that may type check a bit better, and also can more easily expose additional internal apis.

interface ReplicacheInternalOptions {
  receiveInternalAPI?: (internalAPI: ReplicacheInternalAPI) => void;
}

interface ReplicacheInternalAPI {
  persist(): Promise<void>;
}

_Originally posted by @grgbkr in https://github.com/rocicorp/replicache/pull/950#discussion_r852241658_