Promise.withResolvers()
Widely availableThe Promise.withResolvers()
static method is an alternative to the Promise()
constructor that returns both the promise and resolution functions. You can use this to access resolve
and reject
outside the scope of the executor function.
Safari Browser
iOS
17.4