Tightening types for View and VirtualizedList

Reviewed By: yungsters

Differential Revision: D7215391

fbshipit-source-id: fa144c0dc3fd897864403b589e943ea88e78a999
This commit is contained in:
Eli White 2018-03-09 14:55:04 -08:00 committed by Facebook Github Bot
parent c9d756285a
commit 5035af80ec
2 changed files with 3 additions and 3 deletions

View File

@ -104,4 +104,4 @@ if (__DEV__) {
} }
// No one should depend on the DEV-mode createClass View wrapper. // No one should depend on the DEV-mode createClass View wrapper.
module.exports = ((ViewToExport: any): typeof RCTView); module.exports = ((ViewToExport: any): typeof View);

View File

@ -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; 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; return !this.props.horizontal ? metrics.y : metrics.x;
} }