Web Dev Cody
Web Dev Cody14mo ago

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?
No description
12 Replies
Web Dev Cody
Web Dev CodyOP14mo ago
No description
Web Dev Cody
Web Dev CodyOP14mo ago
I'm also getting it on the top level function
ian
ian14mo ago
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?
Web Dev Cody
Web Dev CodyOP14mo ago
I've restarted it a few times let me try again
Web Dev Cody
Web Dev CodyOP14mo ago
I've also been getting a ton of these tonight
No description
ian
ian14mo ago
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")
Web Dev Cody
Web Dev CodyOP14mo ago
No description
Web Dev Cody
Web Dev CodyOP14mo ago
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
Web Dev Cody
Web Dev CodyOP14mo ago
No description
Web Dev Cody
Web Dev CodyOP14mo ago
this fixed the issue
ian
ian14mo ago
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 cycle
Web Dev Cody
Web Dev CodyOP14mo ago
ahh ok, that fixed it

Did you find this page helpful?