mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-13 22:29:45 +08:00
Add support for async bridged methods to android
Differential Revision: D2595414 fb-gh-sync-id: 3b44ce1737bdd1e0861a285a45976631a57ab3b5
This commit is contained in:
committed by
facebook-github-bot-4
parent
b73bf16349
commit
b86a6e3b44
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
package com.facebook.react.bridge;
|
||||
|
||||
/**
|
||||
* Interface that represents a JavaScript Promise which can be passed to the native module as a
|
||||
* method parameter.
|
||||
*
|
||||
* Methods annotated with {@link ReactMethod} that use {@link Promise} as type of the last parameter
|
||||
* will be marked as "remoteAsync" and will return a promise when invoked from JavaScript.
|
||||
*/
|
||||
public interface Promise {
|
||||
void resolve(Object value);
|
||||
void reject(String reason);
|
||||
}
|
||||
Reference in New Issue
Block a user