/** * 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 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: boolean; isInternetReachable: boolean | null; details: D & NetInfoConnectedDetails; isWifiEnabled?: boolean; } interface NetInfoDisconnectedState { type: T; isConnected: boolean; isInternetReachable: boolean; details: null; isWifiEnabled?: boolean; } export interface NetInfoUnknownState { type: NetInfoStateType.unknown; isConnected: boolean | null; isInternetReachable: null; details: null; isWifiEnabled?: boolean; } export type NetInfoNoConnectionState = NetInfoDisconnectedState; export type NetInfoDisconnectedStates = NetInfoUnknownState | NetInfoNoConnectionState; export type NetInfoCellularState = NetInfoConnectedState; export type NetInfoWifiState = NetInfoConnectedState; export type NetInfoBluetoothState = NetInfoConnectedState; export type NetInfoEthernetState = NetInfoConnectedState; export type NetInfoWimaxState = NetInfoConnectedState; export type NetInfoVpnState = NetInfoConnectedState; export type NetInfoOtherState = NetInfoConnectedState; export type NetInfoConnectedStates = NetInfoCellularState | NetInfoWifiState | NetInfoBluetoothState | NetInfoEthernetState | NetInfoWimaxState | NetInfoVpnState | NetInfoOtherState; export type NetInfoState = NetInfoDisconnectedStates | NetInfoConnectedStates; export type NetInfoChangeHandler = (state: NetInfoState) => void; export type NetInfoSubscription = () => void; export interface NetInfoConfiguration { reachabilityUrl: string; reachabilityMethod?: NetInfoMethodType; reachabilityHeaders?: Record; reachabilityTest: (response: Response) => Promise; reachabilityLongTimeout: number; reachabilityShortTimeout: number; reachabilityRequestTimeout: number; reachabilityShouldRun: () => boolean; shouldFetchWiFiSSID: boolean; useNativeReachability: boolean; } export {};