diff --git a/packages/expo-sensors/build/DeviceMotion.d.ts b/packages/expo-sensors/build/DeviceMotion.d.ts index 37e050b4326dc..51b4627b35f4e 100644 --- a/packages/expo-sensors/build/DeviceMotion.d.ts +++ b/packages/expo-sensors/build/DeviceMotion.d.ts @@ -1,6 +1,6 @@ import DeviceSensor from './DeviceSensor'; export interface DeviceMotionMeasurement { - acceleration: { + acceleration: null | { x: number; y: number; z: number; @@ -18,7 +18,7 @@ export interface DeviceMotionMeasurement { /** * Device's rate of rotation in space expressed in degrees per second (deg/s). */ - rotationRate: { + rotationRate: null | { /** * x axis rotation. */ diff --git a/packages/expo-sensors/build/DeviceMotion.js.map b/packages/expo-sensors/build/DeviceMotion.js.map index 0faafdcca22fa..e6c7b2d5cf50b 100644 --- a/packages/expo-sensors/build/DeviceMotion.js.map +++ b/packages/expo-sensors/build/DeviceMotion.js.map @@ -1 +1 @@ -{"version":3,"file":"DeviceMotion.js","sourceRoot":"","sources":["../src/DeviceMotion.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AA0C1D,MAAM,kBAAmB,SAAQ,YAAqC;IAAtE;;QACE,YAAO,GAAG,oBAAoB,CAAC,OAAO,CAAC;IACzC,CAAC;CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,oBAAoB,CAAC,OAAO,CAAC;AAEpD,eAAe,IAAI,kBAAkB,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,CAAC","sourcesContent":["import DeviceSensor from './DeviceSensor';\nimport ExponentDeviceMotion from './ExponentDeviceMotion';\n\nexport interface DeviceMotionMeasurement {\n acceleration: {\n x: number;\n y: number;\n z: number;\n };\n accelerationIncludingGravity: {\n x: number;\n y: number;\n z: number;\n };\n rotation: {\n alpha: number;\n beta: number;\n gamma: number;\n };\n /**\n * Device's rate of rotation in space expressed in degrees per second (deg/s).\n */\n rotationRate: {\n /**\n * x axis rotation.\n */\n alpha: number;\n /**\n * y axis rotation.\n */\n beta: number;\n /**\n * z axis rotation.\n */\n gamma: number;\n };\n /**\n * Interval at which data is obtained from the native platform. Expressed in **milliseconds**.\n */\n interval: number;\n orientation: number;\n}\n\nclass DeviceMotionSensor extends DeviceSensor {\n Gravity = ExponentDeviceMotion.Gravity;\n}\n\nexport const Gravity = ExponentDeviceMotion.Gravity;\n\nexport default new DeviceMotionSensor(ExponentDeviceMotion, 'deviceMotionDidUpdate');\n"]} \ No newline at end of file +{"version":3,"file":"DeviceMotion.js","sourceRoot":"","sources":["../src/DeviceMotion.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AA0C1D,MAAM,kBAAmB,SAAQ,YAAqC;IAAtE;;QACE,YAAO,GAAG,oBAAoB,CAAC,OAAO,CAAC;IACzC,CAAC;CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,oBAAoB,CAAC,OAAO,CAAC;AAEpD,eAAe,IAAI,kBAAkB,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,CAAC","sourcesContent":["import DeviceSensor from './DeviceSensor';\nimport ExponentDeviceMotion from './ExponentDeviceMotion';\n\nexport interface DeviceMotionMeasurement {\n acceleration: null | {\n x: number;\n y: number;\n z: number;\n };\n accelerationIncludingGravity: {\n x: number;\n y: number;\n z: number;\n };\n rotation: {\n alpha: number;\n beta: number;\n gamma: number;\n };\n /**\n * Device's rate of rotation in space expressed in degrees per second (deg/s).\n */\n rotationRate: null | {\n /**\n * x axis rotation.\n */\n alpha: number;\n /**\n * y axis rotation.\n */\n beta: number;\n /**\n * z axis rotation.\n */\n gamma: number;\n };\n /**\n * Interval at which data is obtained from the native platform. Expressed in **milliseconds**.\n */\n interval: number;\n orientation: number;\n}\n\nclass DeviceMotionSensor extends DeviceSensor {\n Gravity = ExponentDeviceMotion.Gravity;\n}\n\nexport const Gravity = ExponentDeviceMotion.Gravity;\n\nexport default new DeviceMotionSensor(ExponentDeviceMotion, 'deviceMotionDidUpdate');\n"]} \ No newline at end of file diff --git a/packages/expo-sensors/src/DeviceMotion.ts b/packages/expo-sensors/src/DeviceMotion.ts index a97e00ae5505f..fd919ab887208 100644 --- a/packages/expo-sensors/src/DeviceMotion.ts +++ b/packages/expo-sensors/src/DeviceMotion.ts @@ -2,7 +2,7 @@ import DeviceSensor from './DeviceSensor'; import ExponentDeviceMotion from './ExponentDeviceMotion'; export interface DeviceMotionMeasurement { - acceleration: { + acceleration: null | { x: number; y: number; z: number; @@ -20,7 +20,7 @@ export interface DeviceMotionMeasurement { /** * Device's rate of rotation in space expressed in degrees per second (deg/s). */ - rotationRate: { + rotationRate: null | { /** * x axis rotation. */