mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-10 17:33:36 +08:00
Summary: If the return type of a TurboModule method is `Promise`, the infra should create a `com.facebook.react.bridge.Promise` object and pass it as the final argument of the TurboModule Java method call. The Java TurboModule method can then do some work asynchronously and either resolve or reject the promise at some point in time. **Note:** I stacked a diff for error handling on top of this one. Reviewed By: mdvacca Differential Revision: D13653156 fbshipit-source-id: 4c30c3223ad8f47c6ba7f1236527aaced01c8ae8