Type API does not satisfy the constraint GenericAPI
I'm facing this error while running convex dev
Those functions mentioned in the error message was working as intended until I added more actions and mutations. My suspicion is the
:any
typing but not sure why this is the case. I need to use :any
as I'm working with large response objects from an external API call.7 Replies
Happy to share repo privately 🙂
Is this after upgrading to Convex 0.13.0? If so, it might need a
npx convex codegen
(or npx convex dev
to be restarted using the 0.13.0 version). We switched from positional arguments, so ...args
looks suspicious. What does the hostaway:storeRawReservations
function signature look like?I think i fixed the issue by removing the generated dist
not sure why it was generated for the following file
convex > helper_folder > file.ts
It naively adds types for all the files, but tries to only infer convex functions that have the convex function signature. What was the function’s signature out of curiosity? Would be interesting to figure out what went wrong in case it affects others. hmu on DM if you’re open to sharing privately
This is the function in question

note: the error only occurred after I added a few other functions with similar
any
params and was working fine before
I had encountered something similar a while ago where the error arises after some threshold number of untyped params/functionsInteresting. Sounds like the Typescript checker is getting overwhelmed. If you find any good workarounds (other than avoiding
any
, which sounds like it helped), lmk. Others here have deeper TypeScript expertise, maybe they'll have ideas too.