import { BatteryStatus } from '@ionic-native/battery-status' ; import { Observable } from 'rxjs/Observable' ; import { Observer } from 'rxjs/Observer' ; export interface BatteryStatusResponse { /**
     * The battery charge percentage
     */ level : number ; /**
     * A boolean that indicates whether the device is plugged in
     */ isPlugged : boolean ; } export class BatteryStatusMock extends BatteryStatus { returns { Observable < BatteryStatusResponse > } onChange ( ) { let response ; return Observable . create ( ( observer ) => { observer . next ( response ) ; observer . complete ( ) ; } ) ; } ; returns { Observable < BatteryStatusResponse > } onLow ( ) { let response ; return Observable . create ( ( observer ) => { observer . next ( response ) ; observer . complete ( ) ; } ) ; } ; returns { Observable < BatteryStatusResponse > } onCritical ( ) { let response ; return Observable . create ( ( observer ) => { observer . next ( response ) ; observer . complete ( ) ; } ) ; } ; }