#returning value from an action causes type inference to fail

3 messages · Page 1 of 1 (latest)

rotund sinew
#

I'm not sure how to explain this, but I was going through this article and trying out the stripe checkout integration (but modified to fit my use-case): https://stack.convex.dev/stripe-with-convex

However, once I try to return a value from the pay action, the types start to fail within my function. I've attached screenshots to try and explain what I mean.

I've actually seen this before, and thought it was just how actions were supposed to work. This doesn't appear to be the case, though, so I'm curious if there's something weird about my setup or if anyone has ran into this situation before.

Worse yet, saving this file and allowing convex to check the typescript results in 9 other cascading typescript errors across 4 files. It's very strange.

Any tips for diagnosing this or updating my configuration? I'm on the latest version of the convex library.

Thanks for any insights.

If you’re building a full-stack app, chances are you’ll want some of your users to pay you for the service you provide. How to use Stripe with Convex ...

steel robinBOT
#

Thanks for posting in #1088161997662724167.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.

  • Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
  • Use search.convex.dev to search Docs, Stack, and Discord all at once.
  • Additionally, you can post your questions in the Convex Community's #1228095053885476985 channel to receive a response from AI.
  • Avoid tagging staff unless specifically instructed.

Thank you!

lilac dirge