UNPKG

one

Version:

One is a React framework for web, iOS, and Android apps.

24 lines (21 loc) • 826 B
import { validateCallback } from '../validateCallback' import type { ScreenOrientationLock, ScreenOrientationValue, } from '../specs/OneScreenOrientation.nitro' export type { ScreenOrientationLock, ScreenOrientationValue, } from '../specs/OneScreenOrientation.nitro' export const ScreenOrientation = Object.freeze({ getOrientation: (): Promise<ScreenOrientationValue> => Promise.resolve('unknown'), lock: (_orientation: ScreenOrientationLock): Promise<ScreenOrientationValue> => Promise.resolve('unknown'), unlock: (): Promise<ScreenOrientationValue> => Promise.resolve('unknown'), addChangeListener: ( onChange: (orientation: ScreenOrientationValue) => void ): (() => void) => { validateCallback(onChange, 'ScreenOrientation.addChangeListener requires a function') return () => {} }, })