-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Remove PropTypes from InspectorOverlay #21345
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
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.
eslint
found some issues. You may run yarn prettier
or npm run prettier
to fix these.
style?: any, | ||
type Props = $ReadOnly<{| | ||
inspected?: ?{ | ||
frame?: ?Object, |
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.
Cannot get StyleSheet.Styles
because property Styles
is missing in object literal [1].
Generated by 🚫 dangerJS |
@empyrical is it ok, if I leave frame as Object and style as any? |
You should type import type {ViewStyleProp} from 'StyleSheet'; You should be able to leave the type of |
@empyrical got it, thanks! |
LGTM 👍 |
Thanks for contributing! I can't import this because you don't have a valid CLA on file. You can follow the instructions from the facebook bot in this comment to complete the CLA |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
style?: any, | ||
type Props = $ReadOnly<{| | ||
inspected?: ?{ | ||
frame?: ?Object, |
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.
Let's make these nullable either. The goal of nullable props is so that a component can take optional props and pass them to another component which takes the optional prop.
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.
Should I make Props nullable?
type Props = ?$ReadOnly<{| ...
do not quite understand
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.
I'm looking for:
inspected?: {
frame?: Object
style?: ViewStyleProp
}
Although inspected should also use $ReadOnly<{||}>
. So:
inspected?: $ReadOnly<{|
frame?: Object
style?: ViewStyleProp
|}>
I created new Type, then used it as type of inspected
|
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.
TheSavior is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@kdastan merged commit 9f8fc8f into Once this commit is added to a release, you will see the corresponding version tag below the description at 9f8fc8f. If the commit has a single |
Thanks for contributing! |
Summary: Related to facebook#21342 Pull Request resolved: facebook#21345 Differential Revision: D10081976 Pulled By: TheSavior fbshipit-source-id: d6a905704fc5c2f10a6a8552f04e9c3feaeb147b
Related to #21342