Skip to content

Commit 4a63243

Browse files
committed
fix: document double-cast in purgeFilesFromGraph
Add comment explaining why as unknown as BetterSqlite3Database is needed: better-sqlite3 types don't declare open/name properties that the project interface requires.
1 parent b08ce30 commit 4a63243

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/domain/graph/builder/helpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ export function purgeFilesFromGraph(
203203
files: string[],
204204
options: Record<string, unknown> = {},
205205
): void {
206+
// Double-cast needed: better-sqlite3 types don't declare `open`/`name` properties
206207
purgeFilesData(db as unknown as BetterSqlite3Database, files, options);
207208
}
208209

0 commit comments

Comments
 (0)