When a callback-based API needs to settle a promise, Promise.withResolvers() returns a new promise together with its resolve and reject functions. Resolution is one-shot: once resolved, later calls to either function silently fail. section 8.1.1
Expose settlement functions
const { promise, resolve, reject } = Promise.withResolvers(); // Pass resolve as a callback to connect a callback-based API to the promise. section 8.1.1
