UNPKG

web-api-hooks

Version:

Essential set of React Hooks for convenient Web API consumption.

15 lines (14 loc) 591 B
declare type ConnectionType = 'bluetooth' | 'cellular' | 'ethernet' | 'mixed' | 'none' | 'other' | 'unknown' | 'wifi' | 'wimax'; declare type EffectiveConnectionType = '2g' | '3g' | '4g' | 'slow-2g'; declare type Megabit = number; declare type Millisecond = number; export interface NetworkInformation extends EventTarget { readonly type?: ConnectionType; readonly effectiveType?: EffectiveConnectionType; readonly downlinkMax?: Megabit; readonly downlink?: Megabit; readonly rtt?: Millisecond; readonly saveData?: boolean; onchange?: EventListener; } export {};