mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add support for Double prop type
Summary: Support a prop-type `Double`, in addition to `Float`, for flow typing and codegen of components. Reviewed By: TheSavior Differential Revision: D16812812 fbshipit-source-id: b5588b3218636283a4e9c5d17212dd0b92986eb9
This commit is contained in:
committed by
Facebook Github Bot
parent
bf78d7969a
commit
a02176e2ec
+4
@@ -46,6 +46,8 @@ function getJavaValueForProp(prop: PropTypeShape, imports): string {
|
||||
return '@Nullable String value';
|
||||
case 'Int32TypeAnnotation':
|
||||
return 'int value';
|
||||
case 'DoubleTypeAnnotation':
|
||||
return 'double value';
|
||||
case 'FloatTypeAnnotation':
|
||||
return 'float value';
|
||||
case 'NativePrimitiveTypeAnnotation':
|
||||
@@ -98,6 +100,8 @@ function getCommandArgJavaType(param) {
|
||||
switch (param.typeAnnotation.type) {
|
||||
case 'BooleanTypeAnnotation':
|
||||
return 'boolean';
|
||||
case 'DoubleTypeAnnotation':
|
||||
return 'double';
|
||||
case 'FloatTypeAnnotation':
|
||||
return 'float';
|
||||
case 'Int32TypeAnnotation':
|
||||
|
||||
Reference in New Issue
Block a user