mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Rename GenericPromiseTypeAnnotation to PromiseTypeAnnotation
Summary: We have first class support for Promises in our codegen. So, it's more appropriate to just call this PromiseTypeAnnotation, as opposed to GenericPromiseTypeAnnotation. Changelog: [Internal] Reviewed By: hramos Differential Revision: D23645209 fbshipit-source-id: bfc0b909750e221e18be33acf197f342a2918aa9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
92a6722bf2
commit
4927de6011
+2
-2
@@ -130,7 +130,7 @@ function translateFunctionReturnTypeToJavaType(
|
||||
throw new Error(createErrorMessage(returnTypeAnnotation.name));
|
||||
}
|
||||
case 'VoidTypeAnnotation':
|
||||
case 'GenericPromiseTypeAnnotation':
|
||||
case 'PromiseTypeAnnotation':
|
||||
return 'void';
|
||||
case 'StringTypeAnnotation':
|
||||
return wrapIntoNullableIfNeeded('String');
|
||||
@@ -279,7 +279,7 @@ module.exports = {
|
||||
);
|
||||
const returningPromise =
|
||||
method.typeAnnotation.returnTypeAnnotation.type ===
|
||||
'GenericPromiseTypeAnnotation';
|
||||
'PromiseTypeAnnotation';
|
||||
const isSyncMethod =
|
||||
method.typeAnnotation.returnTypeAnnotation.type !==
|
||||
'VoidTypeAnnotation' && !returningPromise;
|
||||
|
||||
Reference in New Issue
Block a user