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.
This commit is contained in:
Luke Boyett 2026-04-14 08:34:20 -04:00
parent cfd640ed34
commit d231b64617

View File

@ -69,6 +69,7 @@ export interface Database {
exec(sql: string): void;
prepare(sql: string): Statement;
loadExtension(path: string): void;
transaction<T extends (...args: any[]) => any>(fn: T): T;
close(): void;
}