Closed jorri11 closed 1 year ago
Can you clarify your question please?
The promise you passed in is returned back from toast.promise(...)
, see source below.
You can try it out in this REPL
Thanks for the demo @li6in9muyou!
To clarify further, once a promise is fulfilled, awaiting it a second time should have no effect: https://blog.scottlogic.com/2021/01/07/await-twice.html.
So if you do await toast.promise(p, ...)
, it's roughly the same as doing await p
, except Svelte French Toast adds some side effects.
Is there a way to know the result of toast.promise()?