PSA: PromiseUtils.defer() has been replaced by Promise.withResolvers()

356 views
Skip to first unread message

Mark Banner

unread,
Jan 5, 2024, 4:58:46 AMJan 5
to firefox-dev list, dev-pl...@mozilla.org

Promise.withResolvers() is a new JavaScript feature that has just shipped in Firefox 121.

It has exactly the same interface as our PromiseUtils.defer(), and so I have just landed patches on autoland to replace PromiseUtils.defer() with Promise.withResolvers().

With the landing, PromiseUtils.defer() no longer exist. Please use Promise.withResolvers() in future.

Mark.

Reply all
Reply to author
Forward
0 new messages