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(
296296 return emitString ( nullable ) ;
297297 }
298298 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+ ) ;
311310 }
312311 case 'UnionTypeAnnotation': {
313312 if ( cxxOnly ) {
Original file line number Diff line number Diff line change @@ -99,8 +99,26 @@ function emitStringish(nullable: boolean): Nullable<StringTypeAnnotation> {
9999
100100function emitFunction (
101101 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 ,
103110) : 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+ ) ;
104122 return wrapNullable ( nullable , translateFunctionTypeAnnotationValue ) ;
105123}
106124
Original file line number Diff line number Diff line change @@ -302,19 +302,17 @@ function translateTypeAnnotation(
302302 return emitString ( nullable ) ;
303303 }
304304 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+ ) ;
318316 }
319317 case 'TSUnionType': {
320318 if ( cxxOnly ) {
You can’t perform that action at this time.
0 commit comments