native-fn
Version:
16 lines (15 loc) • 440 B
TypeScript
import type { Network } from "../types";
interface ConnectionInformation {
downlink: number;
rtt: number;
saveData: boolean;
effectiveType: 'slow-2g' | '2g' | '3g' | '4g';
type?: 'bluetooth' | 'cellular' | 'ethernet' | 'none' | 'wifi' | 'wimax' | 'other' | 'unknown';
}
declare global {
interface Navigator {
connection: ConnectionInformation;
}
}
declare const Network: Network;
export default Network;