fix(consumer-prices): fix tsc errors — highlights cast + QueryResultRow constraint (#1937)

This commit is contained in:
Elie Habib
2026-03-20 19:03:46 +04:00
committed by GitHub
parent 8e8db1b40f
commit 3ae1327d73
2 changed files with 2 additions and 2 deletions

View File

@@ -43,7 +43,7 @@ export class ExaProvider implements AcquisitionProvider {
url: r.url,
title: r.title ?? '',
text: r.text,
highlights: r.highlights,
highlights: (r as Record<string, unknown>).highlights as string[] | undefined,
score: r.score,
publishedDate: r.publishedDate,
}));

View File

@@ -24,7 +24,7 @@ export function getPool(): pg.Pool {
return _pool;
}
export async function query<T = Record<string, unknown>>(
export async function query<T extends pg.QueryResultRow = Record<string, unknown>>(
sql: string,
params?: unknown[],
): Promise<pg.QueryResult<T>> {