mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
style: add ban-ts-comment rule (#2738)
This commit is contained in:
@@ -182,12 +182,19 @@ const createSQLiteProvider = (
|
||||
const connect = () => {
|
||||
logger.info('connecting sqlite provider', blockSuiteWorkspace.id);
|
||||
blockSuiteWorkspace.doc.on('update', handleUpdate);
|
||||
// @ts-expect-error
|
||||
unsubscribe = events.db.onExternalUpdate(({ update, workspaceId }) => {
|
||||
if (workspaceId === blockSuiteWorkspace.id) {
|
||||
Y.applyUpdate(blockSuiteWorkspace.doc, update, sqliteOrigin);
|
||||
unsubscribe = events.db.onExternalUpdate(
|
||||
({
|
||||
update,
|
||||
workspaceId,
|
||||
}: {
|
||||
workspaceId: string;
|
||||
update: Uint8Array;
|
||||
}) => {
|
||||
if (workspaceId === blockSuiteWorkspace.id) {
|
||||
Y.applyUpdate(blockSuiteWorkspace.doc, update, sqliteOrigin);
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
connected = true;
|
||||
logger.info('connecting sqlite done', blockSuiteWorkspace.id);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user