mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Cleanup buildMethodSchema and introduce nullable methods
Summary: ## Changes - Started doing cleanup under `/parsers/flow/modules/methods.js` - Rename `NativeModuleMethodTypeShape` -> `NativeModulePropertyShape` - Moved optional property from `FunctionTypeAnnotation` to the `NativeModulePropertyShape` - Introduced a nullable property inside what was once `FunctionTypeAnnotation`. Changelog: [Internal] Reviewed By: PeteTheHeat Differential Revision: D23146050 fbshipit-source-id: 2fe97bb9c0736242682133e4923131a54bbea54b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
747f493feb
commit
f9ea52574e
+2
-2
@@ -13,7 +13,7 @@
|
||||
import type {
|
||||
FunctionTypeAnnotationParam,
|
||||
FunctionTypeAnnotationReturn,
|
||||
NativeModuleMethodTypeShape,
|
||||
NativeModulePropertyShape,
|
||||
ObjectTypeAliasTypeShape,
|
||||
SchemaType,
|
||||
} from '../../CodegenSchema';
|
||||
@@ -156,7 +156,7 @@ function translateFunctionReturnTypeToJavaType(
|
||||
|
||||
// Build special-cased runtime check for getConstants().
|
||||
function buildGetConstantsMethod(
|
||||
method: NativeModuleMethodTypeShape,
|
||||
method: NativeModulePropertyShape,
|
||||
imports: Set<string>,
|
||||
): string {
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user