Skip to content

Commit 972b546

Browse files
committed
[Flow] Fix or suppress errors in react-native for Flow v0.13.0
1 parent fccea2f commit 972b546

12 files changed

Lines changed: 15 additions & 3 deletions

.flowconfig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ suppress_type=$FlowIssue
4040
suppress_type=$FlowFixMe
4141
suppress_type=$FixMe
4242

43-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe
44-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue #[0-9]+
43+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-2]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
44+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-2]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+
45+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
4546

4647
[version]
4748
0.12.0

Examples/Movies/SearchScreen.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,14 @@ var SearchScreen = React.createClass({
7777
var apiKey = API_KEYS[this.state.queryNumber % API_KEYS.length];
7878
if (query) {
7979
return (
80+
// $FlowFixMe(>=0.13.0) - pageNumber may be null or undefined
8081
API_URL + 'movies.json?apikey=' + apiKey + '&q=' +
8182
encodeURIComponent(query) + '&page_limit=20&page=' + pageNumber
8283
);
8384
} else {
8485
// With no query, load latest movies
8586
return (
87+
// $FlowFixMe(>=0.13.0) - pageNumber may be null or undefined
8688
API_URL + 'lists/movies/in_theaters.json?apikey=' + apiKey +
8789
'&page_limit=20&page=' + pageNumber
8890
);

Examples/UIExplorer/DatePickerIOSExample.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ var Heading = React.createClass({
125125
}
126126
});
127127

128+
exports.displayName = (undefined: ?string);
128129
exports.title = '<DatePickerIOS>';
129130
exports.description = 'Select dates and times using the native UIDatePicker.';
130131
exports.examples = [

Examples/UIExplorer/ImageExample.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ var {
2525

2626
var ImageCapInsetsExample = require('./ImageCapInsetsExample');
2727

28+
exports.displayName = (undefined: ?string);
2829
exports.framework = 'React';
2930
exports.title = '<Image>';
3031
exports.description = 'Base component for displaying different types of images.';

Examples/UIExplorer/MapViewExample.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ var styles = StyleSheet.create({
236236
},
237237
});
238238

239+
exports.displayName = (undefined: ?string);
239240
exports.title = '<MapView>';
240241
exports.description = 'Base component to display maps';
241242
exports.examples = [

Examples/UIExplorer/PickerIOSExample.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ var PickerExample = React.createClass({
112112
},
113113
});
114114

115+
exports.displayName = (undefined: ?string);
115116
exports.title = '<PickerIOS>';
116117
exports.description = 'Render lists of selectable options with UIPickerView.';
117118
exports.examples = [

Examples/UIExplorer/ProgressViewIOSExample.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ var ProgressViewExample = React.createClass({
6060
},
6161
});
6262

63+
exports.displayName = (undefined: ?string);
6364
exports.framework = 'React';
6465
exports.title = 'ProgressViewIOS';
6566
exports.description = 'ProgressViewIOS';

Examples/UIExplorer/ScrollViewExample.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ var {
2323
Image
2424
} = React;
2525

26+
exports.displayName = (undefined: ?string);
2627
exports.title = '<ScrollView>';
2728
exports.description = 'Component that enables scrolling through child components';
2829
exports.examples = [

Examples/UIExplorer/TextInputExample.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ var styles = StyleSheet.create({
133133
},
134134
});
135135

136+
exports.displayName = (undefined: ?string);
136137
exports.title = '<TextInput>';
137138
exports.description = 'Single and multi-line text inputs.';
138139
exports.examples = [

Examples/UIExplorer/TouchableExample.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ var {
2626
View,
2727
} = React;
2828

29+
exports.displayName = (undefined: ?string);
2930
exports.title = '<Touchable*> and onPress';
3031
exports.examples = [
3132
{

0 commit comments

Comments
 (0)