From 6de0d98dee7832f08e984fd8f3630ad6133323c9 Mon Sep 17 00:00:00 2001 From: AJ Avezzano Date: Wed, 1 Apr 2026 11:28:38 -0400 Subject: [PATCH] fix: add QueryResultRow constraint to db query generic pg's Pool.query requires T extends QueryResultRow. Added the constraint and imported the type. Co-Authored-By: Claude Sonnet 4.6 --- lib/db/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/db/client.ts b/lib/db/client.ts index 2127bba..dd5693d 100644 --- a/lib/db/client.ts +++ b/lib/db/client.ts @@ -1,4 +1,4 @@ -import { Pool, PoolClient, QueryResult } from "pg"; +import { Pool, PoolClient, QueryResult, QueryResultRow } from "pg"; // ─── Connection pool ────────────────────────────────────────────────────────── @@ -26,7 +26,7 @@ function getPool(): Pool { // ─── Query helpers ──────────────────────────────────────────────────────────── -export async function query>( +export async function query>( text: string, params?: unknown[] ): Promise> {