/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format */ export declare enum NetInfoStateType { unknown = "unknown", none = "none", cellular = "cellular", wifi = "wifi", bluetooth = "bluetooth", ethernet = "ethernet", wimax = "wimax", vpn = "vpn", other = "other" } export declare type NetInfoMethodType = 'HEAD' | 'GET'; export declare enum NetInfoCellularGeneration { '2g' = "2g", '3g' = "3g", '4g' = "4g", '5g' = "5g" } export interface NetInfoConnectedDetails { isConnectionExpensive: boolean; } interface NetInfoConnectedState = Record> { type: T; isConnected: true; isInternetReachable: boolean | null; details: D & NetInfoConnectedDetails; isWifiEnabled?: boolean; } interface NetInfoDisconnectedState { type: T; isConnected: false; isInternetReachable: false; details: null; } export interface NetInfoUnknownState { type: NetInfoStateType.unknown; isConnected: boolean | null; isInternetReachable: null; details: null; } export declare type NetInfoNoConnectionState = NetInfoDisconnectedState; export declare type NetInfoDisconnectedStates = NetInfoUnknownState | NetInfoNoConnectionState; export declare type NetInfoCellularState = NetInfoConnectedState; export declare type NetInfoWifiState = NetInfoConnectedState; export declare type NetInfoBluetoothState = NetInfoConnectedState; export declare type NetInfoEthernetState = NetInfoConnectedState; export declare type NetInfoWimaxState = NetInfoConnectedState; export declare type NetInfoVpnState = NetInfoConnectedState; export declare type NetInfoOtherState = NetInfoConnectedState; export declare type NetInfoConnectedStates = NetInfoCellularState | NetInfoWifiState | NetInfoBluetoothState | NetInfoEthernetState | NetInfoWimaxState | NetInfoVpnState | NetInfoOtherState; export declare type NetInfoState = NetInfoDisconnectedStates | NetInfoConnectedStates; export declare type NetInfoChangeHandler = (state: NetInfoState) => void; export declare type NetInfoSubscription = () => void; export interface NetInfoConfiguration { reachabilityUrl: string; reachabilityMethod?: NetInfoMethodType; reachabilityTest: (response: Response) => Promise; reachabilityLongTimeout: number; reachabilityShortTimeout: number; reachabilityRequestTimeout: number; reachabilityShouldRun: () => boolean; shouldFetchWiFiSSID: boolean; useNativeReachability: boolean; } export {};