File tree Expand file tree Collapse file tree 2 files changed +17
-33
lines changed
packages/react-native-codegen/src/parsers Expand file tree Collapse file tree 2 files changed +17
-33
lines changed Original file line number Diff line number Diff line change @@ -172,22 +172,15 @@ function translateTypeAnnotation(
172172 parser ,
173173 ) ;
174174
175- const properties = annotatedElement . right . properties . map ( prop => {
176- return {
177- name : prop . key . name ,
178- optional : true ,
179- typeAnnotation : translateTypeAnnotation (
180- hasteModuleName ,
181- prop . value ,
182- types ,
183- aliasMap ,
184- enumMap ,
185- tryParse ,
186- cxxOnly ,
187- parser ,
188- ) ,
189- } ;
190- } ) ;
175+ const properties = parser . computePartialProperties (
176+ annotatedElement . right . properties ,
177+ hasteModuleName ,
178+ types ,
179+ aliasMap ,
180+ enumMap ,
181+ tryParse ,
182+ cxxOnly ,
183+ ) ;
191184
192185 return emitObject ( nullable , properties ) ;
193186 }
Original file line number Diff line number Diff line change @@ -253,23 +253,14 @@ function translateTypeAnnotation(
253253 parser ,
254254 ) ;
255255
256- const properties = annotatedElement . typeAnnotation . members . map (
257- member => {
258- return {
259- name : member . key . name ,
260- optional : true ,
261- typeAnnotation : translateTypeAnnotation (
262- hasteModuleName ,
263- member . typeAnnotation . typeAnnotation ,
264- types ,
265- aliasMap ,
266- enumMap ,
267- tryParse ,
268- cxxOnly ,
269- parser ,
270- ) ,
271- } ;
272- } ,
256+ const properties = parser . computePartialProperties (
257+ annotatedElement . typeAnnotation . members ,
258+ hasteModuleName ,
259+ types ,
260+ aliasMap ,
261+ enumMap ,
262+ tryParse ,
263+ cxxOnly ,
273264 ) ;
274265
275266 return emitObject ( nullable , properties ) ;
You can’t perform that action at this time.
0 commit comments