Skip to content

Commit 09768bb

Browse files
committed
Remove unused better-sqlite3 types
1 parent 3b411f9 commit 09768bb

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

packages/node/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
},
4646
"devDependencies": {
4747
"@types/async-lock": "^1.4.0",
48-
"@types/better-sqlite3": "^7.6.12",
4948
"typescript": "^5.5.3",
5049
"vitest": "^3.0.5"
5150
},

packages/node/src/db/SqliteWorker.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ class BlockingAsyncDatabase implements AsyncDatabase {
2424
}
2525

2626
installUpdateHooks() {
27-
(this.db as any).updateHook((_op: string, _dbName: string, tableName: string, _rowid: bigint) => {
27+
this.db.updateHook((_op: string, _dbName: string, tableName: string, _rowid: bigint) => {
2828
this.uncommittedUpdatedTables.add(tableName);
2929
});
3030

31-
(this.db as any).commitHook(() => {
31+
this.db.commitHook(() => {
3232
for (const tableName of this.uncommittedUpdatedTables) {
3333
this.committedUpdatedTables.add(tableName);
3434
}
3535
this.uncommittedUpdatedTables.clear();
3636
return true;
3737
});
3838

39-
(this.db as any).rollbackHook(() => {
39+
this.db.rollbackHook(() => {
4040
this.uncommittedUpdatedTables.clear();
4141
});
4242
}
@@ -110,7 +110,7 @@ const loadExtension = (db: Database) => {
110110
}
111111

112112
const resolved = url.fileURLToPath(new URL(`../${extensionPath}`, import.meta.url));
113-
(db as any).loadExtension(resolved, 'sqlite3_powersync_init');
113+
db.loadExtension(resolved, 'sqlite3_powersync_init');
114114
};
115115

116116
Comlink.expose(new BetterSqliteWorker(), parentPort! as Comlink.Endpoint);

0 commit comments

Comments
 (0)