Cherrypick Promise.try and Promise.withResolvers to the Hermes V1 branch (250829098.0.0-stable)#2020
Merged
lavenzg merged 1 commit intoMay 14, 2026
Conversation
…nch (250829098.0.0-stable)
Contributor
|
Thanks for making the PR! |
meta-codesync Bot
pushed a commit
that referenced
this pull request
May 15, 2026
Summary: The PR is merged into stable, we need to port to current staging so that it will be still usable in next stable release. Our own Promise improvements are only included in static_h branch and will be available in next staging release. Reviewed By: tmikov Differential Revision: D105240151 fbshipit-source-id: ab1c080c8c58ead964c44dd63d1059ca2c481184
Contributor
Author
|
It's working, React Native 0.86.x: |
meta-codesync Bot
pushed a commit
to react/react-native
that referenced
this pull request
Jun 16, 2026
….withResolvers` (#57215) Summary: New methods `Promise.try` and `Promise.withResolvers` were added to the Hermes V1 branch, see: facebook/hermes#2020 I tested them on the latest RN 0.86.0, and they are working: ```tsx console.log({ 'ReactNativeVersion.getVersionString()':ReactNativeVersion.getVersionString(), 'Promise.try': Promise.try, 'Promise.withResolvers': Promise.withResolvers, }); //{ // "Promise.try": [Function anonymous], // "Promise.withResolvers": [Function anonymous], // "ReactNativeVersion.getVersionString()": "0.86.0" // } ``` - `es2024.promise` - includes `Promise.withResolvers` - `esnext.promise` - includes `Promise.try` ## Changelog: [GENERAL] [ADDED] - Add `Promise.try` + `Promise.withResolvers` typescript types Pull Request resolved: #57215 Test Plan: ``` edit `node_modules/react-native/typescript-config/tsconfig.json` add `es2024.promise` `esnext.promise` try to use new methods in ts files // no error expected ``` Reviewed By: robhogan Differential Revision: D108745447 Pulled By: fabriziocucci fbshipit-source-id: dfebe404ab45bc4cb9071692d2f13c42b2816e51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Based on this conversations: #2018 (comment)
Test Plan