Remove PropTypes from InspectorOverlay (#21345)

Summary:
Related to #21342
Pull Request resolved: https://github.com/facebook/react-native/pull/21345

Differential Revision: D10081976

Pulled By: TheSavior

fbshipit-source-id: d6a905704fc5c2f10a6a8552f04e9c3feaeb147b
This commit is contained in:
kdastan 2018-09-26 23:56:39 -07:00 committed by Facebook Github Bot
parent 8487e8fc45
commit 9f8fc8f1eb

View File

@ -12,33 +12,29 @@
const Dimensions = require('Dimensions');
const ElementBox = require('ElementBox');
const PropTypes = require('prop-types');
const React = require('React');
const StyleSheet = require('StyleSheet');
const UIManager = require('UIManager');
const View = require('View');
import type {ViewStyleProp} from 'StyleSheet';
type EventLike = {
nativeEvent: Object,
};
class InspectorOverlay extends React.Component<{
inspected?: {
frame?: Object,
style?: any,
},
inspectedViewTag?: number,
onTouchViewTag: (tag: number, frame: Object, pointerY: number) => void,
}> {
static propTypes = {
inspected: PropTypes.shape({
frame: PropTypes.object,
style: PropTypes.any,
}),
inspectedViewTag: PropTypes.number,
onTouchViewTag: PropTypes.func.isRequired,
};
type Inspected = $ReadOnly<{|
frame?: Object,
style?: ViewStyleProp,
|}>;
type Props = $ReadOnly<{|
inspected?: Inspected,
inspectedViewTag?: ?number,
onTouchViewTag: (tag: number, frame: Object, pointerY: number) => mixed,
|}>;
class InspectorOverlay extends React.Component<Props> {
findViewForTouchEvent = (e: EventLike) => {
const {locationX, locationY} = e.nativeEvent.touches[0];
UIManager.findSubviewIn(