UNPKG

1.03 kBTypeScriptView Raw
1import type { SensorConfig, AnimatedSensor, Value3D, ValueRotation } from '../commonTypes';
2import { SensorType } from '../commonTypes';
3/**
4 * Lets you create animations based on data from the device's sensors.
5 *
6 * @param sensorType - Type of the sensor to use. Configured with
7 * {@link SensorType} enum.
8 * @param config - The sensor configuration - {@link SensorConfig}.
9 * @returns An object containing the sensor measurements [shared
10 * value](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#shared-value)
11 * and a function to unregister the sensor
12 * @see https://docs.swmansion.com/react-native-reanimated/docs/device/useAnimatedSensor
13 */
14export declare function useAnimatedSensor(sensorType: SensorType.ROTATION, userConfig?: Partial<SensorConfig>): AnimatedSensor<ValueRotation>;
15export declare function useAnimatedSensor(sensorType: Exclude<SensorType, SensorType.ROTATION>, userConfig?: Partial<SensorConfig>): AnimatedSensor<Value3D>;
16//# sourceMappingURL=useAnimatedSensor.d.ts.map
\No newline at end of file