Returning value from runQuery: type 'any' because it does not have a type annotation ...
I'm a bit stuck, I'm trying to invoke an internalQuery from an action, but for some reason the types are just not getting created or something. Any clue what I may do doing wrong?

12 Replies

I'm also getting it on the top level function
Honestly I was just scratching my head about something similar and just restarting the TS server fixed it. I think if the TS server detects a circular dependency even temporarily, it'll keep failing until restarted. So maybe for a second the auto-complete was for the action it's in
have you tried that yet?
I've restarted it a few times
let me try again
I've also been getting a ton of these tonight

The playbook for debuggins type failures seems to be to start with checking api.d.ts to see if there are errors there (or if your editor has unsaved changes. mine does this when I rename a file with VSCode and it auto-edits various files to "help")

ok wow
so the issue with when I add customer_email to this sessions.create call in Stripe
I'm guessing they also have a type called User or something

this fixed the issue
If you're returning user from
checkout
then you might try adding an explicit return type on that handler, or on the getUserByIdInternal
to break the type cycle
The type of api depends on return of checkout which depends on the return from runQuery which depends on type from api
so typing checkout
should hopefully break the cycleahh ok, that fixed it