mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add dynamic type for javascript arguments passed over bridge with unkown type
Reviewed By: astreet Differential Revision: D4380882 fbshipit-source-id: f1b9fb9cf727d003dcc2264626e75fc300a47dee
This commit is contained in:
committed by
Facebook Github Bot
parent
3b5f04b002
commit
e3c8d80b3c
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* Type representing a piece of data with unkown runtime type. Useful for allowing javascript to
|
||||
* pass one of multiple types down to the native layer.
|
||||
*/
|
||||
public interface Dynamic {
|
||||
boolean asBoolean();
|
||||
double asDouble();
|
||||
int asInt();
|
||||
String asString();
|
||||
ReadableArray asArray();
|
||||
ReadableMap asMap();
|
||||
ReadableType getType();
|
||||
}
|
||||
Reference in New Issue
Block a user