annotations forbetterAuth and createAuthClient
It was clean but I thi
nk I fuc-ked up typescript by updating it?
both betterAuth and createAuthClient throw annotations errors.
The inferred type of 'betterAuthClient' cannot be named without a reference to '@/node_modules/better-auth/dist/shared/better-auth.BAfIsot3'. This is likely not portable. A type annotation is necessary.ts(2742)
The inferred type of 'auth' cannot be named without a reference to '@/node_modules/better-auth/dist/shared/better-auth.BAfIsot3'. This is likely not portable. A type annotation is necessary.ts(2742)

Solution:Jump to solution
Just dealing with this myself, you can:
1. if your project is not a library, set
declaration
and declarationMap
to false in your tsconfig
2. if it is a library, you're probably exporting a function that needs it's return type annotated. Good thread with some solutions here: https://github.com/pnpm/pnpm/issues/6089...GitHub
The inferred type of '...' cannot be named without a reference to '...
I have an issue in my monorepo using pnpm and typescript, which started to occur after my migration from yarn to pnpm. Here is the gist of how to reproduce the issue Package @my-app/lib-b package h...
2 Replies
Solution
Just dealing with this myself, you can:
1. if your project is not a library, set
declaration
and declarationMap
to false in your tsconfig
2. if it is a library, you're probably exporting a function that needs it's return type annotated. Good thread with some solutions here: https://github.com/pnpm/pnpm/issues/6089GitHub
The inferred type of '...' cannot be named without a reference to '...
I have an issue in my monorepo using pnpm and typescript, which started to occur after my migration from yarn to pnpm. Here is the gist of how to reproduce the issue Package @my-app/lib-b package h...
It worked! Thank you.