import { Pedometer } from '@ionic-native/pedometer' ; import { Observable } from 'rxjs/Observable' ; import { Observer } from 'rxjs/Observer' ; export interface IPedometerData { startDate ? : number ; endDate ? : number ; numberOfSteps : number ; distance : number ; floorsAscended : number ; floorsDescended : number ; } export class PedometerMock extends Pedometer { return { Promise < boolean > } isStepCountingAvailable ( ) { let response = true ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; return { Promise < boolean > } isDistanceAvailable ( ) { let response = true ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; return { Promise < boolean > } isFloorCountingAvailable ( ) { let response = true ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; return { Observable < IPedometerData > } startPedometerUpdates ( ) { let response ; return Observable . create ( ( observer ) => { observer . next ( response ) ; observer . complete ( ) ; } ) ; } ; return { Promise < boolean > } stopPedometerUpdates ( ) { let response = true ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; param { any } options return { Promise < IPedometerData > } queryData ( options ) { let response ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; }