From d231b646173c22c0e3208fd9ef852e52f31d4bf0 Mon Sep 17 00:00:00 2001 From: Luke Boyett Date: Tue, 14 Apr 2026 08:34:20 -0400 Subject: [PATCH] fix(db): declare transaction() on local Database interface The narrow cross-runtime Database interface in src/db.ts defines the subset of better-sqlite3 / bun:sqlite methods used throughout QMD. Commit fee576b ("fix: migrate legacy lowercase paths on reindex") introduced a db.transaction(...) call in src/store.ts but did not extend the interface, breaking `tsc -p tsconfig.build.json`: src/store.ts(2142,22): error TS2339: Property 'transaction' does not exist on type 'Database'. Both underlying engines expose transaction(fn), so this just makes the type reflect reality. --- src/db.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/db.ts b/src/db.ts index 5fe7ab47..9b6e426a 100644 --- a/src/db.ts +++ b/src/db.ts @@ -69,6 +69,7 @@ export interface Database { exec(sql: string): void; prepare(sql: string): Statement; loadExtension(path: string): void; + transaction any>(fn: T): T; close(): void; }