mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-09 17:13:46 +08:00
Static type check for int params + migrate colorInt to just int.
Differential Revision: D2475618 committer: Service User <svcscm@fb.com>
This commit is contained in:
committed by
facebook-github-bot-9
parent
944fa4d635
commit
6c3fb77f30
@@ -32,6 +32,8 @@ public class ReadableNativeArray extends NativeArray implements ReadableArray {
|
||||
@Override
|
||||
public native double getDouble(int index);
|
||||
@Override
|
||||
public native int getInt(int index);
|
||||
@Override
|
||||
public native String getString(int index);
|
||||
@Override
|
||||
public native ReadableNativeArray getArray(int index);
|
||||
@@ -39,15 +41,4 @@ public class ReadableNativeArray extends NativeArray implements ReadableArray {
|
||||
public native ReadableNativeMap getMap(int index);
|
||||
@Override
|
||||
public native ReadableType getType(int index);
|
||||
|
||||
@Override
|
||||
public int getInt(int index) {
|
||||
return (int) getDouble(index);
|
||||
}
|
||||
|
||||
// Check CatalystStylesDiffMap#getColorInt() to see why this is needed
|
||||
@Override
|
||||
public int getColorInt(int index) {
|
||||
return (int) (long) getDouble(index);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user