Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add indent for event emitter header generation of codegen #24445

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -108,7 +108,7 @@ function generateStruct(
structNameParts,
)} ${property.name};`;
})
.join('\n');
.join('\n' + ' ');

properties.forEach((property: ObjectPropertyType) => {
const name = property.name;
Expand Down Expand Up @@ -165,7 +165,7 @@ function generateEvent(componentName: string, event: EventTypeShape): string {
function generateEvents(componentName: string, component): string {
return component.events
.map(event => generateEvent(componentName, event))
.join('\n\n');
.join('\n\n' + ' ');
}

module.exports = {
Expand Down
Expand Up @@ -118,8 +118,8 @@ struct EventsNestedObjectNativeComponentOnChangeLocationSourceStruct {

struct EventsNestedObjectNativeComponentOnChangeLocationStruct {
EventsNestedObjectNativeComponentOnChangeLocationSourceStruct source;
int x;
int y;
int x;
int y;
};

struct EventsNestedObjectNativeComponentOnChangeStruct {
Expand Down Expand Up @@ -157,9 +157,9 @@ namespace react {

struct EventsNativeComponentOnChangeStruct {
bool value;
std::string source;
int progress;
Float scale;
std::string source;
int progress;
Float scale;
};

struct EventsNativeComponentOnEventDirectStruct {
Expand All @@ -172,7 +172,7 @@ class EventsNativeComponentEventEmitter : public ViewEventEmitter {

void onChange(EventsNativeComponentOnChangeStruct value) const;

void onEventDirect(EventsNativeComponentOnEventDirectStruct value) const;
void onEventDirect(EventsNativeComponentOnEventDirectStruct value) const;
};

} // namespace react
Expand Down