Creating declaration files results in too long type

Hi,

I'm currently using Hono RPC and want to export my Router as a type for the frontend.
The problem I'm facing is that when I'm compiling the declaration files to relieve tsserver of inferring them, it crashes with this error message.
src/lib/auth.ts:18:14 - error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.

18 export const auth = betterAuth({
                ~~~~

[11:24:50 PM] Found 1 error. Watching for file changes.

I'm currently using the admin, organization, magicLink, passKey and twoFactor Plugins and a prisma adapter with postgres

Is this known, can I fix this somehow?
Thanks in advance!
Was this page helpful?