-
Notifications
You must be signed in to change notification settings - Fork 25k
[FlowCleanup] InspectorPanel -> Delete PropTypes #21392
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
Changes from 1 commit
d818626
59c68f3
758c13a
d234739
15406ff
a8dd2fd
db5d2f3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,7 +21,24 @@ const Text = require('Text'); | |
| const TouchableHighlight = require('TouchableHighlight'); | ||
| const View = require('View'); | ||
|
|
||
| class InspectorPanel extends React.Component<$FlowFixMeProps> { | ||
| import type {ViewProps} from 'ViewPropTypes'; | ||
| // Will add this once I get params for the functions | ||
| // import type {SyntheticEvent} from 'CoreEventTypes'; | ||
|
|
||
| type Props = $ReadOnly<{| | ||
| ...ViewProps, | ||
|
||
| devtoolsIsOpen?: ?boolean, | ||
| inspecting?: ?boolean, | ||
|
||
| setInspecting?: ?Function, | ||
|
||
| perfing?: ?boolean, | ||
| setPerfing?: ?Function, | ||
|
||
| touchTargeting?: ?boolean, | ||
| setTouchTargeting?: ?Function, | ||
|
||
| networking?: ?boolean, | ||
| setNetworking?: ?Function, | ||
|
||
| |}>; | ||
|
|
||
| class InspectorPanel extends React.Component<Props> { | ||
| renderWaiting() { | ||
| if (this.props.inspecting) { | ||
| return ( | ||
|
|
@@ -84,19 +101,17 @@ class InspectorPanel extends React.Component<$FlowFixMeProps> { | |
| } | ||
|
|
||
| InspectorPanel.propTypes = { | ||
| devtoolsIsOpen: PropTypes.bool, | ||
| inspecting: PropTypes.bool, | ||
| setInspecting: PropTypes.func, | ||
| inspected: PropTypes.object, | ||
| perfing: PropTypes.bool, | ||
| setPerfing: PropTypes.func, | ||
| touchTargeting: PropTypes.bool, | ||
| setTouchTargeting: PropTypes.func, | ||
| networking: PropTypes.bool, | ||
| setNetworking: PropTypes.func, | ||
| }; | ||
|
|
||
| class Button extends React.Component<$FlowFixMeProps> { | ||
| type ButtonProps = $ReadOnly<{| | ||
|
||
| ...ViewProps, | ||
|
||
| onClick?: ?Function, | ||
|
||
| pressed?: ?boolean, | ||
| title?: ?string, | ||
| |}>; | ||
|
|
||
| class Button extends React.Component<ButtonProps> { | ||
|
||
| render() { | ||
| return ( | ||
| <TouchableHighlight | ||
|
|
||
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 afraid I don't follow these comments. Should they be here?
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.
In my instructions, I suggested that people could stub out functions types with
?Functionand ask for help getting the function signatures in their pull request if they needed help, and looks like you did just that here 👍