pg-typed `and` & `or` TypeScript error if `WhereCondition`s have different shapes
spiffytech opened this issue · 0 comments
spiffytech commented
When using and
and or
, I get a TypeScript error if I supply different columns to the different WhereCondition
s.
const link = await tables.links(db).findOne(
or(
{ user_id: user.user_id, original_url: query.originalUrl },
{ user_id: user.user_id, url: query.url },
),
);
Object literal may only specify known properties, and 'url' does not exist in type
'WhereCondition<{ user_id: string & { readonly __brand?: "users_user_id" | undefined; }; original_url: string; }>'.ts(2353)