From d02688971d95142ccfb66315fe9e00c653a291d5 Mon Sep 17 00:00:00 2001 From: Ibby Date: Tue, 6 Dec 2016 08:51:38 -0500 Subject: [PATCH] refractor(): refractor interface(s) name(s) --- src/plugins/batterystatus.ts | 42 +++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/src/plugins/batterystatus.ts b/src/plugins/batterystatus.ts index 6c0a55c7b..abb934f61 100644 --- a/src/plugins/batterystatus.ts +++ b/src/plugins/batterystatus.ts @@ -1,6 +1,20 @@ import { Cordova, Plugin } from './plugin'; import { Observable } from 'rxjs/Observable'; +export interface BatteryStatusResponse { + + /** + * The battery charge percentage + */ + level: number; + + /** + * A boolean that indicates whether the device is plugged in + */ + isPlugged: boolean; + +} + /** * @name Battery Status * @description @@ -22,6 +36,8 @@ import { Observable } from 'rxjs/Observable'; * subscription.unsubscribe(); * * ``` + * @interfaces + * BatteryStatusResponse */ @Plugin({ pluginName: 'BatteryStatus', @@ -33,46 +49,32 @@ export class BatteryStatus { /** * Watch the change in battery level - * @returns {Observable} Returns an observable that pushes a status object + * @returns {Observable} Returns an observable that pushes a status object */ @Cordova({ eventObservable: true, event: 'batterystatus' }) - static onChange(): Observable { return; } + static onChange(): Observable { return; } /** * Watch when the battery level goes low - * @returns {Observable} Returns an observable that pushes a status object + * @returns {Observable} Returns an observable that pushes a status object */ @Cordova({ eventObservable: true, event: 'batterylow' }) - static onLow(): Observable { return; } + static onLow(): Observable { return; } /** * Watch when the battery level goes to critial - * @returns {Observable} Returns an observable that pushes a status object + * @returns {Observable} Returns an observable that pushes a status object */ @Cordova({ eventObservable: true, event: 'batterycritical' }) - static onCritical(): Observable { return; } - -} - -export interface StatusObject { - - /** - * The battery charge percentage - */ - level: number; - - /** - * A boolean that indicates whether the device is plugged in - */ - isPlugged: boolean; + static onCritical(): Observable { return; } }