@types/react-native-orientation
TypeScript icon, indicating that this package has built-in type declarations

5.0.4 • Public • Published

Installation

npm install --save @types/react-native-orientation

Summary

This package contains type definitions for react-native-orientation (https://github.com/yamill/react-native-orientation).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-orientation.

index.d.ts

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;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Moshe Atlow.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-native-orientation

Weekly Downloads

12,068

Version

5.0.4

License

MIT

Unpacked Size

5.11 kB

Total Files

5

Last publish

Collaborators

  • types