-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Parser create getTypeAnnotationName(typeAnnotation) #37580
Parser create getTypeAnnotationName(typeAnnotation) #37580
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks good to me, but CI is red. Could you try rebase on top of main and see whether the CI passes?
03b99dc
to
4792837
Compare
Base commit: 0191d16 |
d76c730
to
b240a29
Compare
@cipolleschi I updated this PR with changes suggested here. |
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@@ -43,7 +43,8 @@ function getPropertyType( | |||
typeAnnotation: $FlowFixMe, | |||
parser: Parser, | |||
): NamedShape<EventTypeAnnotation> { | |||
const type = parser.extractTypeFromTypeAnnotation(typeAnnotation); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 🚫 packages/react-native-codegen/src/parsers/flow/components/events.js line 46 – Delete
⏎
(prettier/prettier)
@@ -102,7 +103,9 @@ function extractArrayElementType( | |||
name: string, | |||
parser: Parser, | |||
): EventTypeAnnotation { | |||
const type = parser.extractTypeFromTypeAnnotation(typeAnnotation); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 🚫 packages/react-native-codegen/src/parsers/flow/components/events.js line 106 – Replace
⏎··const·type·=·extractTypeFromTypeAnnotation(typeAnnotation,·parser);⏎
with··const·type·=·extractTypeFromTypeAnnotation(typeAnnotation,·parser);
(prettier/prettier)
@@ -167,6 +170,16 @@ function prettify(jsonObject: $FlowFixMe): string { | |||
return JSON.stringify(jsonObject, null, 2); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 🚫 packages/react-native-codegen/src/parsers/flow/components/events.js line 171 – Delete
⏎
(prettier/prettier)
@cloudpresser I'm sorry to ask for this, I have been tried to land this change for a while, but meanwhile the state of the repo has changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is red, unfortunately. :(
/rebase |
@cipolleschi merged this pull request in e22d1a1. |
Summary:
This is part of #34872
Changelog:
[INTERNAL] [ADDED] - getTypeAnnotationName(typeAnnotation) in parser
Test Plan:
yarn jest packages/react-native-codegen
> new tests written, as well as coverage from existing tests