mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-08-15 18:45:06 +00:00
Update flow to 0.109
Add $FlowFixMe to vendor code that produces flow errors
This commit is contained in:
+1
-2
@@ -1,11 +1,10 @@
|
||||
[version]
|
||||
^0.98.0
|
||||
^0.109.0
|
||||
|
||||
[ignore]
|
||||
<PROJECT_ROOT>/.*/__tests__/.*
|
||||
<PROJECT_ROOT>/packages/.*/dist/.*
|
||||
<PROJECT_ROOT>/packages/examples/.*
|
||||
<PROJECT_ROOT>/packages/react-native-web/src/vendor/.*
|
||||
<PROJECT_ROOT>/packages/website/.*
|
||||
.*/node_modules/babel-plugin-transform-react-remove-prop-types/*
|
||||
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@
|
||||
"eslint-config-prettier": "^6.4.0",
|
||||
"eslint-plugin-promise": "^4.2.1",
|
||||
"eslint-plugin-react": "^7.16.0",
|
||||
"flow-bin": "0.98.0",
|
||||
"flow-bin": "^0.109.0",
|
||||
"glob": "^7.1.2",
|
||||
"husky": "^3.0.8",
|
||||
"inline-style-prefixer": "^5.0.3",
|
||||
|
||||
@@ -683,8 +683,10 @@ const TouchableMixin = {
|
||||
this.state.touchable.positionOnActivate &&
|
||||
Position.release(this.state.touchable.positionOnActivate);
|
||||
this.state.touchable.dimensionsOnActivate &&
|
||||
// $FlowFixMe
|
||||
BoundingDimensions.release(this.state.touchable.dimensionsOnActivate);
|
||||
this.state.touchable.positionOnActivate = Position.getPooled(globalX, globalY);
|
||||
// $FlowFixMe
|
||||
this.state.touchable.dimensionsOnActivate = BoundingDimensions.getPooled(w, h);
|
||||
},
|
||||
|
||||
|
||||
+1
-1
@@ -698,4 +698,4 @@ const AnimatedImplementation = {
|
||||
__PropsOnlyForTests: AnimatedProps,
|
||||
};
|
||||
|
||||
export default AnimatedImplementation
|
||||
export default AnimatedImplementation;
|
||||
|
||||
+1
@@ -348,6 +348,7 @@ class AnimatedInterpolation extends AnimatedWithChildren {
|
||||
}
|
||||
|
||||
__transformDataType(range: Array<any>) {
|
||||
// $FlowFixMe
|
||||
return range.map(NativeAnimatedHelper.transformDataType);
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -27,6 +27,7 @@ let _uniqueId = 1;
|
||||
class AnimatedValueXY extends AnimatedWithChildren {
|
||||
x: AnimatedValue;
|
||||
y: AnimatedValue;
|
||||
// $FlowFixMe
|
||||
_listeners: {[key: string]: {x: string, y: string}};
|
||||
|
||||
constructor(
|
||||
@@ -134,6 +135,7 @@ class AnimatedValueXY extends AnimatedWithChildren {
|
||||
*
|
||||
* See http://facebook.github.io/react-native/docs/animatedvaluexy.html#addlistener
|
||||
*/
|
||||
// $FlowFixMe
|
||||
addListener(callback: ValueXYListenerCallback): string {
|
||||
const id = String(_uniqueId++);
|
||||
const jointCallback = ({value: number}) => {
|
||||
|
||||
@@ -491,6 +491,7 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
|
||||
_listRef: ?React.ElementRef<typeof VirtualizedList>;
|
||||
_virtualizedListPairs: Array<ViewabilityConfigCallbackPair> = [];
|
||||
|
||||
// $FlowFixMe
|
||||
_captureRef = ref => {
|
||||
this._listRef = ref;
|
||||
};
|
||||
|
||||
@@ -316,7 +316,9 @@ class SectionList<SectionT: SectionBase<any>> extends React.PureComponent<
|
||||
}
|
||||
|
||||
_wrapperListRef: ?React.ElementRef<typeof VirtualizedSectionList>;
|
||||
// $FlowFixMe
|
||||
_captureRef = ref => {
|
||||
// $FlowFixMe
|
||||
this._wrapperListRef = ref;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -232,8 +232,11 @@ class ViewabilityHelper {
|
||||
}
|
||||
|
||||
_onUpdateSync(
|
||||
// $FlowFixMe
|
||||
viewableIndicesToCheck,
|
||||
// $FlowFixMe
|
||||
onViewableItemsChanged,
|
||||
// $FlowFixMe
|
||||
createViewToken,
|
||||
) {
|
||||
// Filter out indices that have gone out of view since this call was scheduled.
|
||||
|
||||
@@ -1037,6 +1037,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
||||
_updateCellsToRenderBatcher: Batchinator;
|
||||
_viewabilityTuples: Array<ViewabilityHelperCallbackTuple> = [];
|
||||
|
||||
// $FlowFixMe
|
||||
_captureScrollRef = ref => {
|
||||
this._scrollRef = ref;
|
||||
};
|
||||
@@ -1049,6 +1050,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
||||
);
|
||||
}
|
||||
|
||||
// $FlowFixMe
|
||||
_defaultRenderScrollComponent = props => {
|
||||
const onRefresh = props.onRefresh;
|
||||
if (this._isNestedWithSameOrientation()) {
|
||||
@@ -1084,6 +1086,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
||||
}
|
||||
};
|
||||
|
||||
// $FlowFixMe
|
||||
_onCellLayout(e, cellKey, index) {
|
||||
const layout = e.nativeEvent.layout;
|
||||
const next = {
|
||||
@@ -1190,14 +1193,17 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
||||
this._maybeCallOnEndReached();
|
||||
};
|
||||
|
||||
// $FlowFixMe
|
||||
_onLayoutEmpty = e => {
|
||||
this.props.onLayout && this.props.onLayout(e);
|
||||
};
|
||||
|
||||
// $FlowFixMe
|
||||
_onLayoutFooter = e => {
|
||||
this._footerLength = this._selectLength(e.nativeEvent.layout);
|
||||
};
|
||||
|
||||
// $FlowFixMe
|
||||
_onLayoutHeader = e => {
|
||||
this._headerLength = this._selectLength(e.nativeEvent.layout);
|
||||
};
|
||||
@@ -1460,6 +1466,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
// $FlowFixMe
|
||||
_onScrollBeginDrag = (e): void => {
|
||||
this._nestedChildLists.forEach(childList => {
|
||||
childList.ref && childList.ref._onScrollBeginDrag(e);
|
||||
@@ -1471,6 +1478,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
||||
this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e);
|
||||
};
|
||||
|
||||
// $FlowFixMe
|
||||
_onScrollEndDrag = (e): void => {
|
||||
const {velocity} = e.nativeEvent;
|
||||
if (velocity) {
|
||||
@@ -1480,6 +1488,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
||||
this.props.onScrollEndDrag && this.props.onScrollEndDrag(e);
|
||||
};
|
||||
|
||||
// $FlowFixMe
|
||||
_onMomentumScrollEnd = (e): void => {
|
||||
this._scrollMetrics.velocity = 0;
|
||||
this._computeBlankness();
|
||||
|
||||
+1
@@ -379,6 +379,7 @@ class VirtualizedSectionList<
|
||||
|
||||
_cellRefs = {};
|
||||
_listRef: VirtualizedList;
|
||||
// $FlowFixMe
|
||||
_captureRef = ref => {
|
||||
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
|
||||
* suppresses an error when upgrading Flow's support for React. To see the
|
||||
|
||||
@@ -6028,10 +6028,10 @@ flatten@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
|
||||
|
||||
flow-bin@0.98.0:
|
||||
version "0.98.0"
|
||||
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.98.0.tgz#3361a03682326a83a5f0a864749f4f7f0d826bce"
|
||||
integrity sha512-vuiYjBVt82eYF+dEk9Zqa8hTSDvbhl/czxzFRLZm9/XHbJnYNMTwFoNFYAQT9IQ6ACNBIbwSTIfxroieuKja7g==
|
||||
flow-bin@^0.109.0:
|
||||
version "0.109.0"
|
||||
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.109.0.tgz#dcdcb7402dd85b58200392d8716ccf14e5a8c24c"
|
||||
integrity sha512-tpcMTpAGIRivYhFV3KJq+zHI2HzcXo8MoGe9pXS4G/UZuey2Faq/e8/gdph2WF0erRlML5hmwfwiq7v9c25c7w==
|
||||
|
||||
flush-write-stream@^1.0.0:
|
||||
version "1.0.3"
|
||||
|
||||
Reference in New Issue
Block a user