Skip to content

Commit

Permalink
explicit type args in react-native-github
Browse files Browse the repository at this point in the history
Reviewed By: vjeux

Differential Revision: D3342856

fbshipit-source-id: ba5a4d5529fc9d1d1efe98cc175d718c5f044a5b
  • Loading branch information
Basil Hosmer authored and Facebook Github Bot 9 committed May 25, 2016
1 parent caa2bae commit ac5636d
Show file tree
Hide file tree
Showing 67 changed files with 149 additions and 153 deletions.
2 changes: 1 addition & 1 deletion Examples/UIExplorer/AccessibilityIOSExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ exports.description = 'Interface to show iOS\' accessibility samples';
exports.examples = [
{
title: 'Accessibility elements',
render(): ReactElement { return <AccessibilityIOSExample />; }
render(): ReactElement<any> { return <AccessibilityIOSExample />; }
},
];
10 changes: 5 additions & 5 deletions Examples/UIExplorer/ActionSheetIOSExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,27 +198,27 @@ exports.description = 'Interface to show iOS\' action sheets';
exports.examples = [
{
title: 'Show Action Sheet',
render(): ReactElement { return <ActionSheetExample />; }
render(): ReactElement<any> { return <ActionSheetExample />; }
},
{
title: 'Show Action Sheet with tinted buttons',
render(): ReactElement { return <ActionSheetTintExample />; }
render(): ReactElement<any> { return <ActionSheetTintExample />; }
},
{
title: 'Show Share Action Sheet',
render(): ReactElement {
render(): ReactElement<any> {
return <ShareActionSheetExample url="https://code.facebook.com" />;
}
},
{
title: 'Share Local Image',
render(): ReactElement {
render(): ReactElement<any> {
return <ShareActionSheetExample url="bunny.png" />;
}
},
{
title: 'Share Screenshot',
render(): ReactElement {
render(): ReactElement<any> {
return <ShareScreenshotExample />;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Examples/UIExplorer/ActivityIndicatorIOSExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ exports.examples = [
},
{
title: 'Start/stop',
render: function(): ReactElement {
render: function(): ReactElement<any> {
return <ToggleAnimatingActivityIndicator />;
}
},
Expand Down
2 changes: 1 addition & 1 deletion Examples/UIExplorer/AdSupportIOSExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ exports.description = 'Example of using the ad support API.';
exports.examples = [
{
title: 'Ad Support IOS',
render: function(): ReactElement {
render: function(): ReactElement<any> {
return <AdSupportIOSExample />;
},
}
Expand Down
2 changes: 1 addition & 1 deletion Examples/UIExplorer/AlertIOSExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ exports.examples = [{
},
{
title: 'Prompt Options',
render(): ReactElement {
render(): ReactElement<any> {
return <PromptOptions />;
}
},
Expand Down
4 changes: 2 additions & 2 deletions Examples/UIExplorer/AnimatedGratuitousApp/AnExApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Circle extends React.Component {
});
}

render(): ReactElement {
render(): ReactElement<any> {
if (this.state.panResponder) {
var handlers = this.state.panResponder.panHandlers;
var dragStyle = { // Used to position while dragging
Expand Down Expand Up @@ -183,7 +183,7 @@ class AnExApp extends React.Component {
this._onMove = this._onMove.bind(this);
}

render(): ReactElement {
render(): ReactElement<any> {
var circles = this.state.keys.map((key, idx) => {
if (key === this.state.activeKey) {
return <Circle key={key + 'd'} dummy={true} />;
Expand Down
2 changes: 1 addition & 1 deletion Examples/UIExplorer/AnimatedGratuitousApp/AnExBobble.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class AnExBobble extends React.Component {
});
}

render(): ReactElement {
render(): ReactElement<any> {
return (
<View style={styles.bobbleContainer}>
{this.state.bobbles.map((_, i) => {
Expand Down
2 changes: 1 addition & 1 deletion Examples/UIExplorer/AnimatedGratuitousApp/AnExSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class AnExSet extends React.Component {
openColor: randColor(),
};
}
render(): ReactElement {
render(): ReactElement<any> {
var backgroundColor = this.props.openVal ?
this.props.openVal.interpolate({
inputRange: [0, 1],
Expand Down
2 changes: 1 addition & 1 deletion Examples/UIExplorer/AnimatedGratuitousApp/AnExTilt.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class AnExTilt extends React.Component {
this._startBurnsZoom();
}

render(): ReactElement {
render(): ReactElement<any> {
return (
<Animated.View
{...this.state.tiltPanResponder.panHandlers}
Expand Down
4 changes: 2 additions & 2 deletions Examples/UIExplorer/AppStateExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ exports.examples = [
{
title: 'Subscribed AppState:',
description: 'This changes according to the current state, so you can only ever see it rendered as "active"',
render(): ReactElement { return <AppStateSubscription showCurrentOnly={true} />; }
render(): ReactElement<any> { return <AppStateSubscription showCurrentOnly={true} />; }
},
{
title: 'Previous states:',
render(): ReactElement { return <AppStateSubscription showCurrentOnly={false} />; }
render(): ReactElement<any> { return <AppStateSubscription showCurrentOnly={false} />; }
},
];
6 changes: 3 additions & 3 deletions Examples/UIExplorer/AppStateIOSExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ exports.examples = [
{
title: 'Subscribed AppStateIOS:',
description: 'This changes according to the current state, so you can only ever see it rendered as "active"',
render(): ReactElement { return <AppStateSubscription showCurrentOnly={true} />; }
render(): ReactElement<any> { return <AppStateSubscription showCurrentOnly={true} />; }
},
{
title: 'Previous states:',
render(): ReactElement { return <AppStateSubscription showCurrentOnly={false} />; }
render(): ReactElement<any> { return <AppStateSubscription showCurrentOnly={false} />; }
},
{
title: 'Memory Warnings',
description: 'In the simulator, hit Shift+Command+M to simulate a memory warning.',
render(): ReactElement { return <AppStateSubscription showMemoryWarnings={true} />; }
render(): ReactElement<any> { return <AppStateSubscription showMemoryWarnings={true} />; }
},
];
2 changes: 1 addition & 1 deletion Examples/UIExplorer/AsyncStorageExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ exports.description = 'Asynchronous local disk storage.';
exports.examples = [
{
title: 'Basics - getItem, setItem, removeItem',
render(): ReactElement { return <BasicStorageExample />; }
render(): ReactElement<any> { return <BasicStorageExample />; }
},
];
2 changes: 1 addition & 1 deletion Examples/UIExplorer/CameraRollExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,6 @@ exports.description = 'Example component that uses CameraRoll to list user\'s ph
exports.examples = [
{
title: 'Photos',
render(): ReactElement { return <CameraRollExample />; }
render(): ReactElement<any> { return <CameraRollExample />; }
}
];
2 changes: 1 addition & 1 deletion Examples/UIExplorer/DatePickerIOSExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ exports.description = 'Select dates and times using the native UIDatePicker.';
exports.examples = [
{
title: '<DatePickerIOS>',
render: function(): ReactElement {
render: function(): ReactElement<any> {
return <DatePickerExample />;
},
}];
Expand Down
2 changes: 1 addition & 1 deletion Examples/UIExplorer/GeolocationExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ exports.description = 'Examples of using the Geolocation API.';
exports.examples = [
{
title: 'navigator.geolocation',
render: function(): ReactElement {
render: function(): ReactElement<any> {
return <GeolocationExample />;
},
}
Expand Down
4 changes: 2 additions & 2 deletions Examples/UIExplorer/LayoutAnimationExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ exports.title = 'Layout Animation';
exports.description = 'Layout animation';
exports.examples = [{
title: 'Add and remove views',
render(): ReactElement {
render(): ReactElement<any> {
return <AddRemoveExample />;
},
}, {
title: 'Cross fade views',
render(): ReactElement {
render(): ReactElement<any> {
return <CrossFadeExample />;
},
}];
2 changes: 1 addition & 1 deletion Examples/UIExplorer/LayoutEventsExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ exports.description = 'Examples that show how Layout events can be used to ' +
exports.examples = [
{
title: 'LayoutEventExample',
render: function(): ReactElement {
render: function(): ReactElement<any> {
return <LayoutEventExample />;
},
}];
2 changes: 1 addition & 1 deletion Examples/UIExplorer/ListViewPagingExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ var ListViewPagingExample = React.createClass({
};
},

renderRow: function(rowData: string, sectionID: string, rowID: string): ReactElement {
renderRow: function(rowData: string, sectionID: string, rowID: string): ReactElement<any> {
return (<Thumb text={rowData}/>);
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ class ExampleMainView extends React.Component {
);
}

_renderScene(): ReactElement {
_renderScene(): ReactElement<any> {
const {navigationState} = this.props;
const childState = navigationState.routes[navigationState.index];
return (
Expand Down
8 changes: 4 additions & 4 deletions Examples/UIExplorer/NetInfoExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,22 +162,22 @@ exports.examples = [
{
title: 'NetInfo.isConnected',
description: 'Asynchronously load and observe connectivity',
render(): ReactElement { return <IsConnected />; }
render(): ReactElement<any> { return <IsConnected />; }
},
{
title: 'NetInfo.update',
description: 'Asynchronously load and observe connectionInfo',
render(): ReactElement { return <ConnectionInfoCurrent />; }
render(): ReactElement<any> { return <ConnectionInfoCurrent />; }
},
{
title: 'NetInfo.updateHistory',
description: 'Observed updates to connectionInfo',
render(): ReactElement { return <ConnectionInfoSubscription />; }
render(): ReactElement<any> { return <ConnectionInfoSubscription />; }
},
{
platform: 'android',
title: 'NetInfo.isConnectionExpensive (Android)',
description: 'Asynchronously check isConnectionExpensive',
render(): ReactElement { return <IsConnectionExpensive />; }
render(): ReactElement<any> { return <IsConnectionExpensive />; }
},
];
4 changes: 2 additions & 2 deletions Examples/UIExplorer/PickerIOSExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ exports.description = 'Render lists of selectable options with UIPickerView.';
exports.examples = [
{
title: '<PickerIOS>',
render: function(): ReactElement {
render: function(): ReactElement<any> {
return <PickerExample />;
},
},
{
title: '<PickerIOS> with custom styling',
render: function(): ReactElement {
render: function(): ReactElement<any> {
return <PickerStyleExample />;
},
}];
6 changes: 3 additions & 3 deletions Examples/UIExplorer/PushNotificationIOSExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ exports.description = 'Apple PushNotification and badge value';
exports.examples = [
{
title: 'Badge Number',
render(): ReactElement {
render(): ReactElement<any> {
PushNotificationIOS.requestPermissions();

return (
Expand All @@ -181,13 +181,13 @@ exports.examples = [
},
{
title: 'Push Notifications',
render(): ReactElement {
render(): ReactElement<any> {
return <NotificationExample />;
}
},
{
title: 'Notifications Permissions',
render(): ReactElement {
render(): ReactElement<any> {
return <NotificationPermissionExample />;
}
}];
4 changes: 2 additions & 2 deletions Examples/UIExplorer/RCTRootViewIOSExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ exports.description = 'Examples that show useful methods when embedding React Na
exports.examples = [
{
title: 'Updating app properties in runtime',
render(): ReactElement {
render(): ReactElement<any> {
return (
<AppPropertiesUpdateExample/>
);
},
},
{
title: 'RCTRootView\'s size flexibility',
render(): ReactElement {
render(): ReactElement<any> {
return (
<RootViewSizeFlexibilityExample/>
);
Expand Down
12 changes: 6 additions & 6 deletions Examples/UIExplorer/SegmentedControlIOSExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,26 +145,26 @@ exports.description = 'Native segmented control';
exports.examples = [
{
title: 'Segmented controls can have values',
render(): ReactElement { return <BasicSegmentedControlExample />; }
render(): ReactElement<any> { return <BasicSegmentedControlExample />; }
},
{
title: 'Segmented controls can have a pre-selected value',
render(): ReactElement { return <PreSelectedSegmentedControlExample />; }
render(): ReactElement<any> { return <PreSelectedSegmentedControlExample />; }
},
{
title: 'Segmented controls can be momentary',
render(): ReactElement { return <MomentarySegmentedControlExample />; }
render(): ReactElement<any> { return <MomentarySegmentedControlExample />; }
},
{
title: 'Segmented controls can be disabled',
render(): ReactElement { return <DisabledSegmentedControlExample />; }
render(): ReactElement<any> { return <DisabledSegmentedControlExample />; }
},
{
title: 'Custom colors can be provided',
render(): ReactElement { return <ColorSegmentedControlExample />; }
render(): ReactElement<any> { return <ColorSegmentedControlExample />; }
},
{
title: 'Change events can be detected',
render(): ReactElement { return <EventSegmentedControlExample />; }
render(): ReactElement<any> { return <EventSegmentedControlExample />; }
}
];
Loading

0 comments on commit ac5636d

Please sign in to comment.