export enum DOMOrientationType { Portrait, Landscape } export class DOMOrientation { static get type() { return this.isLandscape ? DOMOrientationType.Landscape : DOMOrientationType.Portrait; } static get isLandscape() { return window.innerWidth > window.innerHeight; } static get isPortrait() { return window.innerWidth < window.innerHeight; } }