fix(plugins): fix rxjs 6 build errors

#2439
This commit is contained in:
Daniel
2018-04-05 21:44:19 +02:00
parent 48b0f16ed9
commit 3ced31ed2a
54 changed files with 580 additions and 393 deletions
@@ -1,9 +1,8 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
export interface DeviceMotionAccelerationData {
/**
* Amount of acceleration on the x-axis. (in m/s^2)
*/
@@ -23,16 +22,13 @@ export interface DeviceMotionAccelerationData {
* Creation timestamp in milliseconds.
*/
timestamp: any;
}
export interface DeviceMotionAccelerometerOptions {
/**
* Requested period of calls to accelerometerSuccess with acceleration data in Milliseconds. Default: 10000
*/
frequency?: number;
}
/**
@@ -72,11 +68,20 @@ export interface DeviceMotionAccelerometerOptions {
plugin: 'cordova-plugin-device-motion',
pluginRef: 'navigator.accelerometer',
repo: 'https://github.com/apache/cordova-plugin-device-motion',
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone 8']
platforms: [
'Android',
'BlackBerry 10',
'Browser',
'Firefox OS',
'iOS',
'Tizen',
'Ubuntu',
'Windows',
'Windows Phone 8'
]
})
@Injectable()
export class DeviceMotion extends IonicNativePlugin {
/**
* Get the current acceleration along the x, y, and z axes.
* @returns {Promise<DeviceMotionAccelerationData>} Returns object with x, y, z, and timestamp properties
@@ -96,8 +101,9 @@ export class DeviceMotion extends IonicNativePlugin {
observable: true,
clearFunction: 'clearWatch'
})
watchAcceleration(options?: DeviceMotionAccelerometerOptions): Observable<DeviceMotionAccelerationData> {
watchAcceleration(
options?: DeviceMotionAccelerometerOptions
): Observable<DeviceMotionAccelerationData> {
return;
}
}