build: perform TypeCheck for all packages (#2573)

Co-authored-by: himself65 <himself65@outlook.com>
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
This commit is contained in:
LongYinan
2023-05-31 20:49:56 +08:00
committed by Himself65
parent 7e8169c4b8
commit fb9d200dd3
81 changed files with 434 additions and 241 deletions
@@ -44,9 +44,9 @@ export abstract class BaseSQLiteAdapter {
}
// todo: what if SQLite DB wrapper later is not sync?
connect() {
connect(): Database | undefined {
if (this.db) {
return;
return this.db;
}
logger.log(`[SQLiteAdapter][${this.role}] open db`, this.path);
const db = (this.db = sqlite(this.path));
@@ -1,3 +1,4 @@
import type { Database } from 'better-sqlite3';
import { Subject } from 'rxjs';
import * as Y from 'yjs';
@@ -33,7 +34,7 @@ export class WorkspaceSQLiteDB extends BaseSQLiteAdapter {
return this.yDoc.getMap('space:meta').get('name') as string;
};
async init() {
async init(): Promise<Database | undefined> {
const db = super.connect();
if (!this.firstConnected) {