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:
Joshua Gross
2019-08-14 15:33:41 -07:00
committed by Facebook Github Bot
parent bf78d7969a
commit a02176e2ec
20 changed files with 457 additions and 2 deletions
@@ -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':