Skip to content

Commit

Permalink
[Flow] Fix or suppress errors in react-native for Flow v0.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gabelevi committed Jun 22, 2015
1 parent fccea2f commit 972b546
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .flowconfig
Expand Up @@ -40,8 +40,9 @@ suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe

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

[version]
0.12.0
2 changes: 2 additions & 0 deletions Examples/Movies/SearchScreen.js
Expand Up @@ -77,12 +77,14 @@ var SearchScreen = React.createClass({
var apiKey = API_KEYS[this.state.queryNumber % API_KEYS.length];
if (query) {
return (
// $FlowFixMe(>=0.13.0) - pageNumber may be null or undefined
API_URL + 'movies.json?apikey=' + apiKey + '&q=' +
encodeURIComponent(query) + '&page_limit=20&page=' + pageNumber
);
} else {
// With no query, load latest movies
return (
// $FlowFixMe(>=0.13.0) - pageNumber may be null or undefined
API_URL + 'lists/movies/in_theaters.json?apikey=' + apiKey +
'&page_limit=20&page=' + pageNumber
);
Expand Down
1 change: 1 addition & 0 deletions Examples/UIExplorer/DatePickerIOSExample.js
Expand Up @@ -125,6 +125,7 @@ var Heading = React.createClass({
}
});

exports.displayName = (undefined: ?string);
exports.title = '<DatePickerIOS>';
exports.description = 'Select dates and times using the native UIDatePicker.';
exports.examples = [
Expand Down
1 change: 1 addition & 0 deletions Examples/UIExplorer/ImageExample.js
Expand Up @@ -25,6 +25,7 @@ var {

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

exports.displayName = (undefined: ?string);
exports.framework = 'React';
exports.title = '<Image>';
exports.description = 'Base component for displaying different types of images.';
Expand Down
1 change: 1 addition & 0 deletions Examples/UIExplorer/MapViewExample.js
Expand Up @@ -236,6 +236,7 @@ var styles = StyleSheet.create({
},
});

exports.displayName = (undefined: ?string);
exports.title = '<MapView>';
exports.description = 'Base component to display maps';
exports.examples = [
Expand Down
1 change: 1 addition & 0 deletions Examples/UIExplorer/PickerIOSExample.js
Expand Up @@ -112,6 +112,7 @@ var PickerExample = React.createClass({
},
});

exports.displayName = (undefined: ?string);
exports.title = '<PickerIOS>';
exports.description = 'Render lists of selectable options with UIPickerView.';
exports.examples = [
Expand Down
1 change: 1 addition & 0 deletions Examples/UIExplorer/ProgressViewIOSExample.js
Expand Up @@ -60,6 +60,7 @@ var ProgressViewExample = React.createClass({
},
});

exports.displayName = (undefined: ?string);
exports.framework = 'React';
exports.title = 'ProgressViewIOS';
exports.description = 'ProgressViewIOS';
Expand Down
1 change: 1 addition & 0 deletions Examples/UIExplorer/ScrollViewExample.js
Expand Up @@ -23,6 +23,7 @@ var {
Image
} = React;

exports.displayName = (undefined: ?string);
exports.title = '<ScrollView>';
exports.description = 'Component that enables scrolling through child components';
exports.examples = [
Expand Down
1 change: 1 addition & 0 deletions Examples/UIExplorer/TextInputExample.js
Expand Up @@ -133,6 +133,7 @@ var styles = StyleSheet.create({
},
});

exports.displayName = (undefined: ?string);
exports.title = '<TextInput>';
exports.description = 'Single and multi-line text inputs.';
exports.examples = [
Expand Down
1 change: 1 addition & 0 deletions Examples/UIExplorer/TouchableExample.js
Expand Up @@ -26,6 +26,7 @@ var {
View,
} = React;

exports.displayName = (undefined: ?string);
exports.title = '<Touchable*> and onPress';
exports.examples = [
{
Expand Down
1 change: 1 addition & 0 deletions Examples/UIExplorer/WebViewExample.js
Expand Up @@ -220,6 +220,7 @@ var styles = StyleSheet.create({
},
});

exports.displayName = (undefined: ?string);
exports.title = '<WebView>';
exports.description = 'Base component to display web content';
exports.examples = [
Expand Down
2 changes: 1 addition & 1 deletion Libraries/AppRegistry/AppRegistry.js
Expand Up @@ -68,7 +68,7 @@ var AppRegistry = {
console.log(
'Running application "' + appKey + '" with appParams: ' +
JSON.stringify(appParameters) + '. ' +
'__DEV__ === ' + __DEV__ +
'__DEV__ === ' + String(__DEV__) +
', development-level warning are ' + (__DEV__ ? 'ON' : 'OFF') +
', performance optimizations are ' + (__DEV__ ? 'OFF' : 'ON')
);
Expand Down

0 comments on commit 972b546

Please sign in to comment.