File tree Expand file tree Collapse file tree 3 files changed +41
-26
lines changed
packages/react-native-codegen/src/parsers Expand file tree Collapse file tree 3 files changed +41
-26
lines changed Original file line number Diff line number Diff line change @@ -296,18 +296,17 @@ function translateTypeAnnotation(
296
296
return emitString ( nullable ) ;
297
297
}
298
298
case 'FunctionTypeAnnotation': {
299
- const translateFunctionTypeAnnotationValue : NativeModuleFunctionTypeAnnotation =
300
- translateFunctionTypeAnnotation (
301
- hasteModuleName ,
302
- typeAnnotation ,
303
- types ,
304
- aliasMap ,
305
- tryParse ,
306
- cxxOnly ,
307
- translateTypeAnnotation ,
308
- language ,
309
- ) ;
310
- return emitFunction ( nullable , translateFunctionTypeAnnotationValue ) ;
299
+ return emitFunction (
300
+ nullable ,
301
+ hasteModuleName ,
302
+ typeAnnotation ,
303
+ types ,
304
+ aliasMap ,
305
+ tryParse ,
306
+ cxxOnly ,
307
+ translateTypeAnnotation ,
308
+ language ,
309
+ ) ;
311
310
}
312
311
case 'UnionTypeAnnotation': {
313
312
if ( cxxOnly ) {
Original file line number Diff line number Diff line change @@ -99,8 +99,26 @@ function emitStringish(nullable: boolean): Nullable<StringTypeAnnotation> {
99
99
100
100
function emitFunction (
101
101
nullable : boolean ,
102
- translateFunctionTypeAnnotationValue : NativeModuleFunctionTypeAnnotation ,
102
+ hasteModuleName : string ,
103
+ typeAnnotation : $FlowFixMe ,
104
+ types : TypeDeclarationMap ,
105
+ aliasMap : { ...NativeModuleAliasMap } ,
106
+ tryParse : ParserErrorCapturer ,
107
+ cxxOnly : boolean ,
108
+ translateTypeAnnotation : $FlowFixMe ,
109
+ language : ParserType ,
103
110
) : Nullable < NativeModuleFunctionTypeAnnotation > {
111
+ const translateFunctionTypeAnnotationValue : NativeModuleFunctionTypeAnnotation =
112
+ translateFunctionTypeAnnotation (
113
+ hasteModuleName ,
114
+ typeAnnotation ,
115
+ types ,
116
+ aliasMap ,
117
+ tryParse ,
118
+ cxxOnly ,
119
+ translateTypeAnnotation ,
120
+ language ,
121
+ ) ;
104
122
return wrapNullable ( nullable , translateFunctionTypeAnnotationValue ) ;
105
123
}
106
124
Original file line number Diff line number Diff line change @@ -302,19 +302,17 @@ function translateTypeAnnotation(
302
302
return emitString ( nullable ) ;
303
303
}
304
304
case 'TSFunctionType': {
305
- const translateFunctionTypeAnnotationValue : NativeModuleFunctionTypeAnnotation =
306
- translateFunctionTypeAnnotation (
307
- hasteModuleName ,
308
- typeAnnotation ,
309
- types ,
310
- aliasMap ,
311
- tryParse ,
312
- cxxOnly ,
313
- translateTypeAnnotation ,
314
- language ,
315
- ) ;
316
-
317
- return emitFunction ( nullable , translateFunctionTypeAnnotationValue ) ;
305
+ return emitFunction (
306
+ nullable ,
307
+ hasteModuleName ,
308
+ typeAnnotation ,
309
+ types ,
310
+ aliasMap ,
311
+ tryParse ,
312
+ cxxOnly ,
313
+ translateTypeAnnotation ,
314
+ language ,
315
+ ) ;
318
316
}
319
317
case 'TSUnionType': {
320
318
if ( cxxOnly ) {
You can’t perform that action at this time.
0 commit comments