Open elicwhite opened 3 days ago
Summary: This PR fixes the code for generating EventEmitter C++ code in case nested objects in arrays are used.
export interface NativeProps extends ViewProps { onEvent: DirectEventHandler< Readonly<{ payloadArray: Readonly< { obj: Readonly<{ str: string }> }[] > }> >; } export default codegenNativeComponent<NativeProps>('SomeComponent');
In this case the generated EventEmitters.cpp code would contain:
EventEmitters.cpp
obj.setProperty(runtime, "str", payloadArrayValue,obj.str);
while
obj.setProperty(runtime, "str", payloadArrayValue.obj.str);
is expected.
[GENERAL] [FIXED] - Codegen: Support nested objects in arrays
Test Plan: Tested with the reproduction case above to verify correct output.
Reviewed By: christophpurrer
Differential Revision: D65884936
Pulled By: elicwhite
This pull request was exported from Phabricator. Differential Revision: D65884936
Summary: This PR fixes the code for generating EventEmitter C++ code in case nested objects in arrays are used.
In this case the generated
EventEmitters.cpp
code would contain:while
is expected.
Changelog:
[GENERAL] [FIXED] - Codegen: Support nested objects in arrays
Test Plan: Tested with the reproduction case above to verify correct output.
Reviewed By: christophpurrer
Differential Revision: D65884936
Pulled By: elicwhite