Incorrect return type findFrist

Hi!

I just upgraded to 26.0 and I'm refactoring queries to findFirst where needed. But the return type is not correctly inferred!
The return type is just
const user: {
  [x: string]: never;
} | undefined

see https://imgur.com/a/BlYG4Mj

users schema:
export const users = mysqlTable(
    'auth_user', {
        id: serial('id').primaryKey().notNull(),
        email: varchar('email', { length: 191 }).notNull(),
        emailVerified: timestamp('emailVerified'),
        verificationCode: varchar('verificationCode', { length: 255 }),
    },
    (user) => ({
        emailIndex: uniqueIndex('users__email__idx').on(user.email),
        verificationCodeIndex: uniqueIndex('users__verificationCode__idx').on(user.verificationCode),
    }),
)


I'm using mysql with the planetscale adapter
Was this page helpful?