mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Upgrade to Flow v0.88.0
Summary: allow-large-files https://our.intern.facebook.com/intern/wiki/Flow/Flow_Release_Process/#update-xplat-js Reviewed By: samwgoldman Differential Revision: D13418170 fbshipit-source-id: 91ab0d2788c1061b8c81a39f8a017eedea48abe2
This commit is contained in:
committed by
Facebook Github Bot
parent
448a665286
commit
aaa4a38fbc
@@ -142,8 +142,14 @@ function setInContext(inst, path: Array<string | number>, value: any) {
|
||||
|
||||
function setIn(obj: Object, path: Array<string | number>, value: any) {
|
||||
const last = path.pop();
|
||||
/* $FlowFixMe(>=0.88.0 site=react_native_fb) This comment suppresses an error
|
||||
* found when Flow v0.88 was deployed. To see the error, delete this comment
|
||||
* and run Flow. */
|
||||
const parent = path.reduce((obj_, attr) => (obj_ ? obj_[attr] : null), obj);
|
||||
if (parent) {
|
||||
/* $FlowFixMe(>=0.88.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.88 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
parent[last] = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,13 +221,7 @@ const NetInfo = {
|
||||
|
||||
removeEventListener(eventName: ChangeEventName, handler: Function): void {
|
||||
const listener = _isConnectedSubscriptions.get(handler);
|
||||
NetInfo.removeEventListener(
|
||||
eventName,
|
||||
/* $FlowFixMe(>=0.36.0 site=react_native_fb,react_native_oss) Flow error
|
||||
* detected during the deploy of Flow v0.36.0. To see the error, remove
|
||||
* this comment and run Flow */
|
||||
listener,
|
||||
);
|
||||
NetInfo.removeEventListener(eventName, listener);
|
||||
_isConnectedSubscriptions.delete(handler);
|
||||
},
|
||||
|
||||
|
||||
@@ -33,18 +33,12 @@ const UIManagerStatTracker = {
|
||||
const createViewOrig = UIManager.createView;
|
||||
UIManager.createView = function(tag, className, rootTag, props) {
|
||||
incStat('createView', 1);
|
||||
/* $FlowFixMe(>=0.86.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.86 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
incStat('setProp', Object.keys(props || []).length);
|
||||
createViewOrig(tag, className, rootTag, props);
|
||||
};
|
||||
const updateViewOrig = UIManager.updateView;
|
||||
UIManager.updateView = function(tag, className, props) {
|
||||
incStat('updateView', 1);
|
||||
/* $FlowFixMe(>=0.86.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.86 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
incStat('setProp', Object.keys(props || []).length);
|
||||
updateViewOrig(tag, className, props);
|
||||
};
|
||||
@@ -58,13 +52,7 @@ const UIManagerStatTracker = {
|
||||
remove,
|
||||
) {
|
||||
incStat('manageChildren', 1);
|
||||
/* $FlowFixMe(>=0.86.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.86 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
incStat('move', Object.keys(moveFrom || []).length);
|
||||
/* $FlowFixMe(>=0.86.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.86 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
incStat('remove', Object.keys(remove || []).length);
|
||||
manageChildrenOrig(tag, moveFrom, moveTo, addTags, addIndices, remove);
|
||||
};
|
||||
|
||||
@@ -170,6 +170,9 @@ function _validateTransform(key, value, transformation) {
|
||||
switch (key) {
|
||||
case 'matrix':
|
||||
invariant(
|
||||
/* $FlowFixMe(>=0.88.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.88 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
value.length === 9 || value.length === 16,
|
||||
'Matrix transform must have a length of 9 (2d) or 16 (3d). ' +
|
||||
'Provided matrix has a length of %s: %s',
|
||||
@@ -182,6 +185,9 @@ function _validateTransform(key, value, transformation) {
|
||||
break;
|
||||
case 'translate':
|
||||
invariant(
|
||||
/* $FlowFixMe(>=0.88.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.88 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
value.length === 2 || value.length === 3,
|
||||
'Transform with key translate must be an array of length 2 or 3, found %s: %s',
|
||||
/* $FlowFixMe(>=0.84.0 site=react_native_fb) This comment suppresses an
|
||||
|
||||
Reference in New Issue
Block a user