Permalink
Browse files

Tightening types for View and VirtualizedList

Reviewed By: yungsters

Differential Revision: D7215391

fbshipit-source-id: fa144c0dc3fd897864403b589e943ea88e78a999
  • Loading branch information...
TheSavior authored and facebook-github-bot committed Mar 9, 2018
1 parent c9d7562 commit 5035af80ecddb44e2a8444780f25f336b760bf32
Showing with 3 additions and 3 deletions.
  1. +1 −1 Libraries/Components/View/View.js
  2. +2 −2 Libraries/Lists/VirtualizedList.js
@@ -104,4 +104,4 @@ if (__DEV__) {
}
// No one should depend on the DEV-mode createClass View wrapper.
module.exports = ((ViewToExport: any): typeof RCTView);
module.exports = ((ViewToExport: any): typeof View);
@@ -1175,11 +1175,11 @@ class VirtualizedList extends React.PureComponent<Props, State> {
);
}
_selectLength(metrics: {height: number, width: number}): number {
_selectLength(metrics: $ReadOnly<{height: number, width: number}>): number {
return !this.props.horizontal ? metrics.height : metrics.width;
}
_selectOffset(metrics: {x: number, y: number}): number {
_selectOffset(metrics: $ReadOnly<{x: number, y: number}>): number {
return !this.props.horizontal ? metrics.y : metrics.x;
}

0 comments on commit 5035af8

Please sign in to comment.