Intent to prototype: Promise.try

306 views
Skip to first unread message

Daniel Minor

unread,
Sep 6, 2024, 8:51:09 AM9/6/24
to dev-pl...@mozilla.org
Summary: `Promise.try(f)` is a shorthand for using `new Promise(resolve => resolve(f()))`. It's currently at Stage 3 of the TC39 proposal process.
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1905241
Specification: https://tc39.es/proposal-promise-try/
Standards Body: TC39
Platform coverage: All
Preference: javascript.options.experimental.promise_try
Other browsers: Shipped in Chrome 128 (https://developer.chrome.com/release-notes/128#promisetry), in WebKit behind a flag (https://github.com/WebKit/WebKit/pull/24802).
test262: Tests landed in https://github.com/tc39/test262/pull/4069.

Please let me know if there are any questions or concerns.
Reply all
Reply to author
Forward
0 new messages