import { DeviceMotion } from '@ionic-native/device-motion' ; import { Observable } from 'rxjs/Observable' ; import { Observer } from 'rxjs/Observer' ; export interface DeviceMotionAccelerationData { /**
     * Amount of acceleration on the x-axis. (in m/s^2)
     */ x : number ; /**
     * Amount of acceleration on the y-axis. (in m/s^2)
     */ y : number ; /**
     * Amount of acceleration on the z-axis. (in m/s^2)
     */ z : number ; /**
     * Creation timestamp in milliseconds.
     */ timestamp : any ; } export interface DeviceMotionAccelerometerOptions { /**
     * Requested period of calls to accelerometerSuccess with acceleration data in Milliseconds. Default: 10000
     */ frequency ? : number ; } export class DeviceMotionMock extends DeviceMotion { getCurrentAcceleration ( ) { let data ; return new Promise ( ( resolve , reject ) => { resolve ( data ) ; } ) ; } ; param { AccelerometerOptions } options returns { Observable < DeviceMotionAccelerationData > } watchAcceleration ( options ? ) { let data ; return Observable . create ( ( observer ) => { observer . next ( data ) ; observer . complete ( ) ; } ) ; } ; }