Extend type user
I added an additionalFields but when I import type { User } from "better-auth";
I get only the default form
user: {
changeEmail: {
enabled: true,
sendChangeEmailVerification: async ({ newEmail, url }) => {
///
},
},
additionalFields: {
truc_de_con: {
type: "string",
nullable: true,
},
},(alias) type User = {
id: string;
name: string;
email: string;
emailVerified: boolean;
createdAt: Date;
updatedAt: Date;
image?: string | null | undefined;
}export type User = typeof auth.$Infer.Session["user"];