UNPKG

expo-screen-orientation

Version:

Expo universal module for managing device's screen orientation

27 lines 1.27 kB
import { NativeModule } from 'expo-modules-core'; import type { ExpoOrientationEvents } from './ScreenOrientation.types'; import { Orientation, OrientationLock, WebOrientationLock } from './ScreenOrientation.types'; declare global { interface Screen { msOrientation?: Screen['orientation']['type']; mozOrientation?: Screen['orientation']; mozUnlockOrientation?(): boolean | undefined; msUnlockOrientation?(): boolean | undefined; unlockOrientation?(): boolean | undefined; } } declare class ExpoScreenOrientation extends NativeModule<ExpoOrientationEvents> { orientation: ScreenOrientation | null; emitOrientationEvent: () => Promise<void>; startObserving(): void; stopObserving(): void; supportsOrientationLockAsync(orientationLock: OrientationLock): Promise<boolean>; getPlatformOrientationLockAsync(): Promise<WebOrientationLock>; getOrientationAsync(): Promise<Orientation>; lockAsync(orientationLock: OrientationLock): Promise<void>; lockPlatformAsync(webOrientationLock: WebOrientationLock): Promise<void>; unlockAsync(): Promise<void>; } declare const _default: typeof ExpoScreenOrientation; export default _default; //# sourceMappingURL=ExpoScreenOrientation.web.d.ts.map