mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
fix(consumer-prices): fix tsc errors — highlights cast + QueryResultRow constraint (#1937)
This commit is contained in:
@@ -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,
|
||||
}));
|
||||
|
||||
@@ -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>> {
|
||||
|
||||
Reference in New Issue
Block a user