#sb
1 messages · Page 1 of 1 (latest)
Yes that will work in ts functions as well. That error is a generic one about the context in which you are making this call
So Stripe doesn't have a doc on this but this StackOverflow describes the issue pretty clearly I think https://stackoverflow.com/questions/47709969/await-expression-is-only-allowed-within-an-async-function
Whoops that wasn't the one I was thinking of but it is succinct. Let me know if that clear things up
Ah I see, I knew I could just make the caller async but I was just confused by the fact that the Stripe docs never seemed to include async in any caller
Ah gotcha, that may just be for the purpose of keeping our code snippets succinct but I can see how it can give the wrong impression. You are right that in actual code you will be making this in async contexts
Cool thank you, I've never used typescript so was just checking if there was some TS magic going on that didn't apply to JS
Thank you very much