API types are "excessively deep" when Convex Auth is installed.
Commenting out the injected
auth_*
and auth.js
imports in api.d.ts
resolves this issue. Is this a known bug in Convex Auth? Is there a resolution?5 Replies
This is in Webstorm with Typescript 5.5.3
This usually means you have circular inference somewhere in your convex code, typically an action, where the return value of the action includes a value returned by another convex function (called by the action) and both the action and the other function do not have explicitly typed return values.
Actions | Convex Developer Hub
Actions can call third party services to do things such as processing a payment
Like I mentioned, I've isolated this to the Convex Auth definitions in the api types. This is not my code.
If i remove
auth: typeof auth;
from api.d.ts the ts error goes away.
unless I'm misunderstanding how this loops back into some code I've written
FWIW I'm using an almost identical implementation of this example for my auth provider: https://github.com/get-convex/convex-auth-example/blob/main/convex/otp/TwilioVerify.ts
It turns out having a convex/auth/*
folder conflicts with the new Convex Auth api type generationAh thanks for figuring this out, interesting