Not able to get session type while using auth.api.getSession({headers: headers()})
I have an turborepo setup with below packages, i am trying to migrate from "next-auth" to "better-auth". I have all auth related code in seperate internal package "packages/auth".
I facing very strange issue on which i am stuck from last 2 days. My problem is related to getting types for session, I am using
I have tried everything, even when i am using this in auth.ts file itself it is not giving types. I have tried to use differnt tsconfig.
Please help me.
My packages:
usage:
type of session object:
type of
my tsconfig:
I facing very strange issue on which i am stuck from last 2 days. My problem is related to getting types for session, I am using
auth.api.getSession to get session on serverside.I have tried everything, even when i am using this in auth.ts file itself it is not giving types. I have tried to use differnt tsconfig.
Please help me.
My packages:
usage:
export const session = await auth.api.getSession({ header: headers() });type of session object:
type of
auth.api.getSession on hovering .getSession:my tsconfig: