mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
RN: Rename {NativePrimitive => ReservedProp}TypeAnnotation in Codegen
Summary: Straightforward rename to clarify the purpose of this type. The current naming made more sense before the codegen also produced code for NativeModules. Changelog: [Internal] Reviewed By: TheSavior Differential Revision: D21160793 fbshipit-source-id: 6787ef298e32ff1b4d506afd831af96764f5af6f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ab9b212de8
commit
1b2bcb180c
+2
-2
@@ -72,7 +72,7 @@ function getJavaValueForProp(prop: PropTypeShape, imports): string {
|
||||
} else {
|
||||
return 'float value';
|
||||
}
|
||||
case 'NativePrimitiveTypeAnnotation':
|
||||
case 'ReservedPropTypeAnnotation':
|
||||
switch (typeAnnotation.name) {
|
||||
case 'ColorPrimitive':
|
||||
addNullable(imports);
|
||||
@@ -88,7 +88,7 @@ function getJavaValueForProp(prop: PropTypeShape, imports): string {
|
||||
return '@Nullable ReadableMap value';
|
||||
default:
|
||||
(typeAnnotation.name: empty);
|
||||
throw new Error('Received unknown NativePrimitiveTypeAnnotation');
|
||||
throw new Error('Received unknown ReservedPropTypeAnnotation');
|
||||
}
|
||||
case 'ArrayTypeAnnotation': {
|
||||
addNullable(imports);
|
||||
|
||||
Reference in New Issue
Block a user