Add Int32EnumTypeAnnotation to codegen schema

Summary:
Adds schema to allow for Int32Enums in the codegen.

All of the non-schema updates here are flow fixes, the code there is implemented in the next diffs

Reviewed By: JoshuaGross

Differential Revision: D17158026

fbshipit-source-id: b5a6871225771c3c97a43a901d5f8e51c44f35c8
This commit is contained in:
Rick Hanlon
2019-09-06 05:33:07 -07:00
committed by Facebook Github Bot
parent 90a8e3012c
commit e906c6f78f
7 changed files with 101 additions and 30 deletions
@@ -88,6 +88,9 @@ function getJavaValueForProp(prop: PropTypeShape, imports): string {
case 'StringEnumTypeAnnotation':
addNullable(imports);
return '@Nullable String value';
case 'Int32EnumTypeAnnotation':
addNullable(imports);
return '@Nullable Integer value';
default:
(typeAnnotation: empty);
throw new Error('Received invalid typeAnnotation');