Skip to content

Commit

Permalink
Fix Flow complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
ptmt committed Jun 8, 2017
1 parent 15176a0 commit c9fb76a
Show file tree
Hide file tree
Showing 22 changed files with 144 additions and 485 deletions.
1 change: 1 addition & 0 deletions .flowconfig
@@ -1,6 +1,7 @@
[ignore]
; We fork some components by platform
.*/*[.]android.js
.*/*[.]ios.js

; Ignore templates for 'react-native init'
.*/local-cli/templates/.*
Expand Down
127 changes: 0 additions & 127 deletions Examples/UIExplorer/js/SliderIOSExample.js

This file was deleted.

2 changes: 1 addition & 1 deletion Examples/UIExplorer/js/TouchableExample.js
Expand Up @@ -32,7 +32,7 @@ var {
Text,
TouchableHighlight,
TouchableOpacity,
Platform,
TouchableNativeFeedback,
View,
} = ReactNative;

Expand Down
12 changes: 6 additions & 6 deletions Examples/UIExplorer/js/UIExplorerApp.macos.js
Expand Up @@ -16,20 +16,20 @@
*/
'use strict';

var React = require('React');
var ReactNative = require('react-native');
var UIExplorerList = require('./UIExplorerList.macos');
import React from 'React';
import ReactNative from 'react-native';
import { UIExplorerList } from './UIExplorerList.macos';

var {
const {
AppRegistry,
SnapshotViewIOS,
// SnapshotViewIOS,
StyleSheet,
View,
Text,
Dimensions,
} = ReactNative;

var defaultLayout = Dimensions.get('window');
const defaultLayout = Dimensions.get('window');

class UIExplorerApp extends React.Component {
state: any;
Expand Down
2 changes: 1 addition & 1 deletion Examples/UIExplorer/js/UIExplorerExampleList.js
Expand Up @@ -36,7 +36,7 @@ const View = require('View');

import type {
UIExplorerExample,
} from './UIExplorerList.ios';
} from './UIExplorerList.macos';
import type {
PassProps,
} from './UIExplorerStatePersister';
Expand Down
8 changes: 4 additions & 4 deletions Examples/UIExplorer/js/UIExplorerList.macos.js
Expand Up @@ -63,7 +63,7 @@ type Props = {
openExample: Function,
};

class UIExplorerList extends React.Component {
export class UIExplorerList extends React.Component {
props: Props;
state: any;

Expand Down Expand Up @@ -95,7 +95,7 @@ class UIExplorerList extends React.Component {

// Register suitable examples for snapshot tests
static registerComponents() {
COMPONENTS.concat(APIS).forEach(Example => {
Components.concat(APIS).forEach((Example: any) => {
if (Example.displayName) {
var Snapshotter = React.createClass({
render: function() {
Expand All @@ -113,10 +113,10 @@ class UIExplorerList extends React.Component {
}
}

export type UIExplorerExample = any;

var styles = StyleSheet.create({
searchTextInput: {
height: 20,
},
});

module.exports = UIExplorerList;
63 changes: 0 additions & 63 deletions Examples/UIExplorer/js/VibrationIOSExample.js

This file was deleted.

4 changes: 4 additions & 0 deletions Examples/UIExplorer/js/ViewExample.js
Expand Up @@ -51,6 +51,8 @@ class ViewBorderStyleExample extends React.Component {
showBorder: true
};

t: number;

render() {
return (
<TouchableWithoutFeedback onPress={this._handlePress}>
Expand Down Expand Up @@ -135,6 +137,8 @@ class BackgroundUpdatesExample extends React.Component {
backgroundColorIndex: 0
};

t: number;

componentWillMount() {
const changeColor = () => {
this.t = setTimeout(() => {
Expand Down

0 comments on commit c9fb76a

Please sign in to comment.