type DeviceType = 'mobile' | 'tablet' | 'desktop' | 'unknown'; type DeviceOrientation = 'landscape' | 'portrait' | 'unknown'; type DeviceOs = 'ios' | 'iphone' | 'ipad' | 'ipod' | 'android' | 'blackberry' | 'macos' | 'windows' | 'fxos' | 'meego' | 'television' | 'unknown'; type OrientationChangeCallback = (newOrientation: 'landscape' | 'portrait') => void; interface Device { macos(): boolean; ios(): boolean; iphone(): boolean; ipod(): boolean; ipad(): boolean; android(): boolean; androidPhone(): boolean; androidTablet(): boolean; blackberry(): boolean; blackberryPhone(): boolean; blackberryTablet(): boolean; windows(): boolean; windowsPhone(): boolean; windowsTablet(): boolean; fxos(): boolean; fxosPhone(): boolean; fxosTablet(): boolean; meego(): boolean; television(): boolean; cordova(): boolean; nodeWebkit(): boolean; mobile(): boolean; tablet(): boolean; desktop(): boolean; portrait(): boolean; landscape(): boolean; onChangeOrientation(cb: OrientationChangeCallback): void; noConflict(): Device; type: DeviceType; os: DeviceOs; orientation: DeviceOrientation; } declare global { interface Window { device: Device; } } declare const device: Device; export { type Device, type DeviceOrientation, type DeviceOs, type DeviceType, type OrientationChangeCallback, device as default };