Skip to content

Commit

Permalink
Tightening types for View and VirtualizedList
Browse files Browse the repository at this point in the history
Reviewed By: yungsters

Differential Revision: D7215391

fbshipit-source-id: fa144c0dc3fd897864403b589e943ea88e78a999
  • Loading branch information
elicwhite authored and facebook-github-bot committed Mar 9, 2018
1 parent c9d7562 commit 5035af8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Libraries/Components/View/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
4 changes: 2 additions & 2 deletions Libraries/Lists/VirtualizedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 5035af8

Please sign in to comment.