mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Rename ReservedFunctionValueTypeAnnotation to ReservedTypeAnnotation
Summary: Reserved type annotations can appear in three different contexts: commands, props, and NativeModules. For now, commands and NativeModules share the same reserved type annotations. In the future, we may want to merge these reserved type annotations with the props reserved type annotations. **Motivation:** The meaning of FunctionValue in FunctionValueTypeAnnotation isn't clear - in fact, it's downright confusing. Therefore, this diff renames this Flow type to ReservedTypeAnnotation, which I believe sufficiently captures the intent of the type annotation. Changelog: [Internal] Reviewed By: yungsters Differential Revision: D24701322 fbshipit-source-id: bde0273b4a89c9e7175c60ed3468ed870b320044
This commit is contained in:
committed by
Facebook GitHub Bot
parent
856bc2978c
commit
1231db0d7f
+3
-3
@@ -118,7 +118,7 @@ function translateFunctionParamToJavaType(
|
||||
}
|
||||
|
||||
switch (realTypeAnnotation.type) {
|
||||
case 'ReservedFunctionValueTypeAnnotation':
|
||||
case 'ReservedTypeAnnotation':
|
||||
switch (realTypeAnnotation.name) {
|
||||
case 'RootTag':
|
||||
return !isRequired ? 'Double' : 'double';
|
||||
@@ -188,7 +188,7 @@ function translateFunctionReturnTypeToJavaType(
|
||||
}
|
||||
|
||||
switch (realTypeAnnotation.type) {
|
||||
case 'ReservedFunctionValueTypeAnnotation':
|
||||
case 'ReservedTypeAnnotation':
|
||||
switch (realTypeAnnotation.name) {
|
||||
case 'RootTag':
|
||||
return nullable ? 'Double' : 'double';
|
||||
@@ -245,7 +245,7 @@ function getFalsyReturnStatementFromReturnType(
|
||||
}
|
||||
|
||||
switch (realTypeAnnotation.type) {
|
||||
case 'ReservedFunctionValueTypeAnnotation':
|
||||
case 'ReservedTypeAnnotation':
|
||||
switch (realTypeAnnotation.name) {
|
||||
case 'RootTag':
|
||||
return 'return 0.0;';
|
||||
|
||||
Reference in New Issue
Block a user