← Back to release summary

Promise.withResolvers

Category
JavaScript
Type
Chromium catches up
Status
In developer trial (Behind a flag) (Chrome 119)
Intent stage
Dev trials

Summary

Promise.withResolvers is a static method that returns a new Promise along with its resolver functions, i.e. `const { promise, resolve, reject } = Promise.withResolvers()`. This is a standard version of a common helper function found in many JS libraries. Historically, some may know it as `defer` or `deferred`.

Standards & signals

View on chromestatus.com