Don't use arrow functions with Flow types to fix website generation

Summary:
Our custom jsdocs parser doesn't support the syntax yet.

public

Reviewed By: bestander

Differential Revision: D2739861

fb-gh-sync-id: eefc3c54b98e06597ca7d93396aa4fe3a92d4a58
This commit is contained in:
Martin Konicek 2015-12-09 14:51:43 -08:00 committed by facebook-github-bot-7
parent f9f123ba96
commit 139f9945df
2 changed files with 7 additions and 3 deletions

View File

@ -176,7 +176,7 @@ exports.examples = [
{
platform: 'android',
title: 'NetInfo.isConnectionExpensive (Android)',
description: 'Asycnronously check isConnectionExpensive',
description: 'Asynchronously check isConnectionExpensive',
render(): ReactElement { return <IsConnectionExpensive />; }
},
];

View File

@ -58,11 +58,15 @@ const _subscriptions = new Map();
let _isConnected;
if (Platform.OS === 'ios') {
_isConnected = (reachability: ReachabilityStateIOS): bool => {
_isConnected = function(
reachability: ReachabilityStateIOS,
): bool {
return reachability !== 'none' && reachability !== 'unknown';
};
} else if (Platform.OS === 'android') {
_isConnected = (connectionType: ConnectivityStateAndroid) : bool => {
_isConnected = function(
connectionType: ConnectivityStateAndroid,
): bool {
return connectionType !== 'NONE' && connectionType !== 'UNKNOWN';
};
}