Skip to content

Commit

Permalink
Remove PropTypes from InspectorOverlay (facebook#21345)
Browse files Browse the repository at this point in the history
Summary:
Related to facebook#21342
Pull Request resolved: facebook#21345

Differential Revision: D10081976

Pulled By: TheSavior

fbshipit-source-id: d6a905704fc5c2f10a6a8552f04e9c3feaeb147b
  • Loading branch information
kdastan authored and facebook-github-bot committed Sep 27, 2018
1 parent fbe5080 commit 8ce9f76
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions Libraries/Inspector/InspectorOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 8ce9f76

Please sign in to comment.