Mrs. Sari’s kitchen only speaks in callbacks: Promise.withResolvers hands her resolve and reject to call from outside. If both are called, which one counts?…
The key idea
resolve and reject can go anywhere
Try it in this playground
Settle the promise from outside The kitchen's callback calls resolve, and Mr. Tono's await carries on.
Call reject after resolve The second call is ignored: a promise settles only once.
Forget one callback Nothing calls reject: the await waits forever.
Set a safety net A setTimeout calls reject, and the await is sure to end.