mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Always use forceConsistentCasingInFileNames * Rename files * Convert more packages to `types-2.0` style
26 lines
1.4 KiB
TypeScript
26 lines
1.4 KiB
TypeScript
// Type definitions for react-native-orientation
|
|
// Project: https://github.com/yamill/react-native-orientation
|
|
// Definitions by: Moshe Atlow <https://github.com/MoLow/>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
declare namespace Orientation {
|
|
type orientation = "LANDSCAPE" | "PORTRAIT" | "UNKNOWN" | "PORTRAITUPSIDEDOWN";
|
|
type specificOrientation = "LANDSCAPE-LEFT" | "LANDSCAPE-RIGHT" | "PORTRAIT" | "UNKNOWN" | "PORTRAITUPSIDEDOWN";
|
|
|
|
export function addOrientationListener(callback: (orientation: orientation) => void): void;
|
|
export function removeOrientationListener(callback: (orientation: orientation) => void): void;
|
|
export function addSpecificOrientationListener(callback: (specificOrientation: specificOrientation) => void): void;
|
|
export function removeSpecificOrientationListener(callback: (specificOrientation: specificOrientation) => void): void;
|
|
|
|
export function getInitialOrientation(): orientation;
|
|
export function lockToPortrait(): void;
|
|
export function lockToLandscape(): void;
|
|
export function lockToLandscapeLeft(): void;
|
|
export function lockToLandscapeRight(): void;
|
|
export function unlockAllOrientations(): void;
|
|
export function getOrientation(callback: (err: Error, orientation: orientation) => void): void;
|
|
export function getSpecificOrientation(callback: (err: Error, orientation: specificOrientation) => void): void;
|
|
}
|
|
|
|
export = Orientation;
|