Trouble inferring types on client side (1.3.4)

@Better Auth Hey, I was trying to infer some types on client side:
type AuthContextValue = {
member: typeof authClient.$Infer.Member | null;
user: typeof authClient.$Infer.Session.user | null;
session: typeof authClient.$Infer.Session.session | null;
activeOrganization: typeof authClient.$Infer.ActiveOrganization | null;
}


export const authClient = createAuthClient({
baseURL: env.VITE_BASE_URL,
plugins: [
adminClient(),
organizationClient({
allowUserToCreateOrganization: true,
cancelPendingInvitationsOnReInvite: true,
invitationLimit: 1,
organizationDeletion: {
disabled: true,
},
teams: {
enabled: false,
},
}),
phoneNumberClient(),
emailOTPClient(),
inferAdditionalFields({
user: {
role: {
type: "string",
},
phoneNumber: {
type: "string",
required: true,
input: true,
unique: true,
},
referralCode: {
type: "string",
required: true,
input: true,
},
},
}),
],
})


This is my auth-client.ts

I have an error here activeOrganization: typeof authClient.$Infer.ActiveOrganization | null; and also here member: typeof authClient.$Infer.Member | null;

Property 'Member' does not exist on type '{ Session: { user: { id: string; email: string; emailVerified: boolean; name: string; createdAt: Date; updatedAt: Date; image?: string | null | undefined; }; session: { id: string; userId: string; ... 5 more ...; userAgent?: string | ... 1 more ... | undefined; }; }; }'.ts(2339).
Property 'ActiveOrganization' does not exist on type '{ Session: { user: { id: string; email: string; emailVerified: boolean; name: string; createdAt: Date; updatedAt: Date; image?: string | null | undefined; }; session: { id: string; userId: string; ... 5 more ...; userAgent?: string | ... 1 more ... | undefined; }; }; }'.ts(2339)
Was this page helpful?