Skip to content

Commit

Permalink
@allow-large-files clean up xplat/js for flow 0.70.0
Browse files Browse the repository at this point in the history
Reviewed By: fishythefish

Differential Revision: D7643236

fbshipit-source-id: 1d9a95f1e249ce3fdc552a4ca92a6c63b267dae4
  • Loading branch information
avikchaudhuri authored and facebook-github-bot committed Apr 17, 2018
1 parent 6de4ff3 commit d2a1461
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[version]
^0.69.0
^0.70.0
3 changes: 3 additions & 0 deletions Libraries/Animated/src/nodes/AnimatedInterpolation.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ class AnimatedInterpolation extends AnimatedWithChildren {
__transformDataType(range: Array<any>) {
// Change the string array type to number array
// So we can reuse the same logic in iOS and Android platform
/* $FlowFixMe(>=0.70.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.70 was deployed. To see the error delete this
* comment and run Flow. */
return range.map(function(value) {
if (typeof value !== 'string') {
return value;
Expand Down
9 changes: 9 additions & 0 deletions Libraries/Components/Switch/Switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,18 @@ const Switch = createReactClass({
props.onStartShouldSetResponder = () => true;
props.onResponderTerminationRequest = () => false;
if (Platform.OS === 'android') {
/* $FlowFixMe(>=0.70.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.70 was deployed. To see the error delete
* this comment and run Flow. */
props.enabled = !this.props.disabled;
/* $FlowFixMe(>=0.70.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.70 was deployed. To see the error delete
* this comment and run Flow. */
props.on = this.props.value;
props.style = this.props.style;
/* $FlowFixMe(>=0.70.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.70 was deployed. To see the error delete
* this comment and run Flow. */
props.trackTintColor = this.props.value ? this.props.onTintColor : this.props.tintColor;
} else if (Platform.OS === 'ios') {
props.style = [styles.rctSwitchIOS, this.props.style];
Expand Down
3 changes: 3 additions & 0 deletions Libraries/Lists/VirtualizedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
stickyHeaderIndices,
};
if (inversionStyle) {
/* $FlowFixMe(>=0.70.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.70 was deployed. To see the error delete
* this comment and run Flow. */
scrollProps.style = [inversionStyle, this.props.style];
}

Expand Down
3 changes: 3 additions & 0 deletions RNTester/js/PointerEventsExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,4 +251,7 @@ exports.framework = 'React';
exports.title = 'Pointer Events';
exports.description = 'Demonstrates the use of the pointerEvents prop of a ' +
'View to control how touches should be handled.';
/* $FlowFixMe(>=0.70.0 site=react_native_fb) This comment suppresses an error
* found when Flow v0.70 was deployed. To see the error delete this comment
* and run Flow. */
exports.examples = exampleClasses.map(infoToExample);
10 changes: 8 additions & 2 deletions RNTester/js/ScrollViewExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,14 @@ exports.examples = [

return (
<View>
{renderScrollView('LTR layout', {direction: 'ltr'})}
{renderScrollView('RTL layout', {direction: 'rtl'})}
{/* $FlowFixMe(>=0.70.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.70 was deployed. To see
* the error delete this comment and run Flow. */
renderScrollView('LTR layout', {direction: 'ltr'})}
{/* $FlowFixMe(>=0.70.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.70 was deployed. To see
* the error delete this comment and run Flow. */
renderScrollView('RTL layout', {direction: 'rtl'})}
</View>
);
},
Expand Down
2 changes: 1 addition & 1 deletion local-cli/templates/HelloWorld/_flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[version]
^0.69.0
^0.70.0
3 changes: 3 additions & 0 deletions local-cli/util/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ function getProjectPath() {

const resolveSymlinksForRoots = roots =>
roots.reduce(
/* $FlowFixMe(>=0.70.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.70 was deployed. To see the error delete this
* comment and run Flow. */
(arr, rootPath) => arr.concat(findSymlinkedModules(rootPath, roots)),
[...roots],
);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
"eslint-plugin-jest": "21.8.0",
"eslint-plugin-prettier": "2.6.0",
"eslint-plugin-react": "7.6.1",
"flow-bin": "^0.69.0",
"flow-bin": "^0.70.0",
"jest": "23.0.0-alpha.4",
"jest-junit": "3.6.0",
"prettier": "1.9.1",
Expand Down

0 comments on commit d2a1461

Please sign in to comment.