Tightening types for View and VirtualizedList
Reviewed By: yungsters Differential Revision: D7215391 fbshipit-source-id: fa144c0dc3fd897864403b589e943ea88e78a999
This commit is contained in:
parent
c9d756285a
commit
5035af80ec
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue