refactor: replace with data source (#4447)

This commit is contained in:
Alex Yang
2023-09-21 12:31:17 -05:00
committed by GitHub
parent 98f6b3e685
commit d09f6fb7cc
8 changed files with 33 additions and 31 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
import {
createLazyProvider,
type DatasourceDocAdapter,
type DocDataSource,
writeOperation,
} from '@affine/y-provider';
import { assertExists } from '@blocksuite/global/utils';
@@ -26,10 +26,10 @@ export function setMergeCount(count: number) {
}
export const createIndexedDBDatasource = ({
dbName,
dbName = DEFAULT_DB_NAME,
mergeCount,
}: {
dbName: string;
dbName?: string;
mergeCount?: number;
}) => {
let dbPromise: Promise<IDBPDatabase<BlockSuiteBinaryDB>> | null = null;
@@ -99,7 +99,7 @@ export const createIndexedDBDatasource = ({
}
}
},
} satisfies DatasourceDocAdapter;
} satisfies DocDataSource;
return {
...adapter,