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 коммит произвёл Facebook Github Bot
Родитель c9d756285a
Коммит 5035af80ec
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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;
}