Doent infer type in Callback syntax for query

Im querying the users table like this
db.query.user.findFirst({ where: (user, { eq }) => { return eq(user.email, whereArgs?.email); }, })

in the where callback param user is typed as never ??
ive setup drizzle like this
import * as schema from '@/db/schema'; const db = drizzle(pool, { schema });

any idea why this is the case??
Was this page helpful?