mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-09 21:25:45 +08:00
feat(nbstore): add nbstore worker (#9185)
This commit is contained in:
@@ -17,7 +17,13 @@ export interface DocSyncDocState {
|
||||
errorMessage: string | null;
|
||||
}
|
||||
|
||||
export class DocSync {
|
||||
export interface DocSync {
|
||||
readonly state$: Observable<DocSyncState>;
|
||||
docState$(docId: string): Observable<DocSyncDocState>;
|
||||
addPriority(id: string, priority: number): () => void;
|
||||
}
|
||||
|
||||
export class DocSyncImpl implements DocSync {
|
||||
private readonly peers: DocSyncPeer[] = this.remotes.map(
|
||||
remote => new DocSyncPeer(this.local, this.sync, remote)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user