0.1.8 • Published 1 year ago

@types/react-native-sensor-manager v0.1.8

Weekly downloads
32
License
MIT
Repository
github
Last release
1 year ago

Installation

npm install --save @types/react-native-sensor-manager

Summary

This package contains type definitions for react-native-sensor-manager (https://github.com/kprimice/react-native-sensor-manager).

Details

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

index.d.ts

// Type definitions for react-native-sensor-manager 0.1
// Project: https://github.com/kprimice/react-native-sensor-manager
// Definitions by: DefinitelyTyped <https://github.com/DefinitelyTyped>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

/// <reference types="react-native" />

export * from 'react-native'

interface SensorManager {
    startAccelerometer(delay: number): void;
    stopAccelerometer(): void;
    startGyroscope(delay: number): void;
    stopGyroscope(): void;
    startMagnetometer(delay: number): void;
    stopMagnetometer(): void;
    startStepCounter(delay: number): void;
    stopStepCounter(): void;
    startThermometer(delay: number): void;
    stopThermometer(): void;
    startMotionValue(delay: number): void;
    stopMotionValue(): void;
    startOrientation(delay: number): void;
    stopOrientation(): void;
    startProximity(delay: number): void;
    stopProximity(): void;
    startLightSensor(delay: number): void;
    stopLightSensor(): void;
}

declare module 'react-native' {
    export interface DeviceEventEmitterStatic {
        addListener(event: 'Accelerometer' | 'Gyroscope' | 'Magnetometer', callback: (data: {x: number, y: number, z: number}) => void): EmitterSubscription;
        addListener(event: 'Orientation', callback: (data: {azimuth: number, pitch: number, roll: number}) => void): EmitterSubscription;
        addListener(event: 'StepCounter', callback: (data: {steps: number}) => void): EmitterSubscription;
        addListener(event: 'Thermometer', callback: (data: {temp: number}) => void): EmitterSubscription;
        addListener(event: 'LightSensor', callback: (data: {light: number}) => void): EmitterSubscription;
        addListener(event: 'Proximity', callback: (data: {isNear: boolean, value: number, maxRange: number}) => void): EmitterSubscription ;
    }

    export interface NativeModulesStatic {
        SensorManager: SensorManager
    }
}

Additional Details

  • Last updated: Thu, 23 Dec 2021 23:35:40 GMT
  • Dependencies: @types/react-native
  • Global values: none

Credits

These definitions were written by DefinitelyTyped.

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

2 years ago

0.1.4

3 years ago

0.1.3

6 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago