refactor(accelerometer):

This commit is contained in:
Guille 2016-07-08 00:53:01 +02:00
parent 6e8248a0b8
commit b7fb2483bf

View File

@ -1,5 +1,6 @@
import {Plugin, Cordova} from './plugin'; import { Cordova, Plugin } from './plugin';
import {Observable} from 'rxjs/Observable'; import { Observable } from 'rxjs/Observable';
export interface AccelerationData { export interface AccelerationData {
@ -73,9 +74,7 @@ export class DeviceMotion {
* @returns {Promise<any>} Returns object with x, y, z, and timestamp properties * @returns {Promise<any>} Returns object with x, y, z, and timestamp properties
*/ */
@Cordova() @Cordova()
static getCurrentAcceleration(): Promise<AccelerationData> { static getCurrentAcceleration(): Promise<AccelerationData> { return; }
return;
}
/** /**
* Watch the device acceleration. Clear the watch by unsubscribing from the observable. * Watch the device acceleration. Clear the watch by unsubscribing from the observable.
@ -87,7 +86,5 @@ export class DeviceMotion {
observable: true, observable: true,
clearFunction: 'clearWatch' clearFunction: 'clearWatch'
}) })
static watchAcceleration(options?: AccelerometerOptions): Observable<AccelerationData> { static watchAcceleration(options?: AccelerometerOptions): Observable<AccelerationData> { return; }
return;
}
} }