I have a better-auth instance with a custom session plugin. My code it was working well on the previous version v1.2.27. I had some errors with a 422 error so I upgraded the version.
After the upgrade I started to get an issue with the createAuth method. I needed that method to let the backend and frontend have the types of the context. How I can address this issue?
As far as I know a fix it could be to use the original better-auth type:
export function createAuth( config: AuthServerConfig,): ReturnType<typeof betterAuth> {
export function createAuth( config: AuthServerConfig,): ReturnType<typeof betterAuth> {
But with this type I'm not going to get the types of the custom session