interface Navigator { connection?: NetworkInformation; } interface NetworkInformation extends EventTarget { type: NetworkInformationConnectionType; saveData?: boolean; effectiveType?: string; downlink?: number; downlinkMax?: number; rtt?: number; } type NetworkInformationConnectionType = | "bluetooth" | "cellular" | "ethernet" | "none" | "other" | "unknown" | "wifi" | "wimax";